diff --git a/ajax/libs/ink/3.0.0/css/font-awesome.css b/ajax/libs/ink/3.0.0/css/font-awesome.css new file mode 100644 index 000000000..e5a63eabd --- /dev/null +++ b/ajax/libs/ink/3.0.0/css/font-awesome.css @@ -0,0 +1,1740 @@ +/*! + * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: 'FontAwesome'; + src: url("../fonts/fontawesome-webfont.eot?v=4.0.3"); + src: url("../fonts/fontawesome-webfont.eot?#iefix&v=4.0.3") format("embedded-opentype"), url("../fonts/fontawesome-webfont.woff?v=4.0.3") format("woff"), url("../fonts/fontawesome-webfont.ttf?v=4.0.3") format("truetype"), url("../fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular") format("svg"); + font-weight: normal; + font-style: normal; +} + +.fa { + display: inline-block; + font-family: FontAwesome; + font-style: normal; + font-weight: normal; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/* makes the font 33% larger relative to the icon container */ +.fa-lg { + font-size: 1.33333em; + line-height: 0.75em; + vertical-align: -15%; +} + +.fa-2x { + font-size: 2em; +} + +.fa-3x { + font-size: 3em; +} + +.fa-4x { + font-size: 4em; +} + +.fa-5x { + font-size: 5em; +} + +.fa-fw { + width: 1.28571em; + text-align: center; +} + +.fa-ul { + padding-left: 0; + margin-left: 2.14286em; + list-style-type: none; +} +.fa-ul > li { + position: relative; +} + +.fa-li { + position: absolute; + left: -2.14286em; + width: 2.14286em; + top: 0.14286em; + text-align: center; +} +.fa-li.fa-lg { + left: -1.85714em; +} + +.fa-border { + padding: .2em .25em .15em; + border: solid 0.08em #eeeeee; + border-radius: .1em; +} + +.pull-right { + float: right; +} + +.pull-left { + float: left; +} + +.fa.pull-left { + margin-right: .3em; +} +.fa.pull-right { + margin-left: .3em; +} + +.fa-spin { + -webkit-animation: spin 2s infinite linear; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} + +@-moz-keyframes spin { + 0% { + -moz-transform: rotate(0deg); + } + + 100% { + -moz-transform: rotate(359deg); + } +} + +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(359deg); + } +} + +@-o-keyframes spin { + 0% { + -o-transform: rotate(0deg); + } + + 100% { + -o-transform: rotate(359deg); + } +} + +@-ms-keyframes spin { + 0% { + -ms-transform: rotate(0deg); + } + + 100% { + -ms-transform: rotate(359deg); + } +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(359deg); + } +} + +.fa-rotate-90 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation); + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + -o-transform: rotate(90deg); + transform: rotate(90deg); +} + +.fa-rotate-180 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation); + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -ms-transform: rotate(180deg); + -o-transform: rotate(180deg); + transform: rotate(180deg); +} + +.fa-rotate-270 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation); + -webkit-transform: rotate(270deg); + -moz-transform: rotate(270deg); + -ms-transform: rotate(270deg); + -o-transform: rotate(270deg); + transform: rotate(270deg); +} + +.fa-flip-horizontal { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation); + -webkit-transform: scale(-1, 1); + -moz-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + -o-transform: scale(-1, 1); + transform: scale(-1, 1); +} + +.fa-flip-vertical { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation); + -webkit-transform: scale(1, -1); + -moz-transform: scale(1, -1); + -ms-transform: scale(1, -1); + -o-transform: scale(1, -1); + transform: scale(1, -1); +} + +.fa-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} + +.fa-stack-1x, .fa-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} + +.fa-stack-1x { + line-height: inherit; +} + +.fa-stack-2x { + font-size: 2em; +} + +.fa-inverse { + color: white; +} + +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.fa-glass:before { + content: "\f000"; +} + +.fa-music:before { + content: "\f001"; +} + +.fa-search:before { + content: "\f002"; +} + +.fa-envelope-o:before { + content: "\f003"; +} + +.fa-heart:before { + content: "\f004"; +} + +.fa-star:before { + content: "\f005"; +} + +.fa-star-o:before { + content: "\f006"; +} + +.fa-user:before { + content: "\f007"; +} + +.fa-film:before { + content: "\f008"; +} + +.fa-th-large:before { + content: "\f009"; +} + +.fa-th:before { + content: "\f00a"; +} + +.fa-th-list:before { + content: "\f00b"; +} + +.fa-check:before { + content: "\f00c"; +} + +.fa-times:before { + content: "\f00d"; +} + +.fa-search-plus:before { + content: "\f00e"; +} + +.fa-search-minus:before { + content: "\f010"; +} + +.fa-power-off:before { + content: "\f011"; +} + +.fa-signal:before { + content: "\f012"; +} + +.fa-gear:before, +.fa-cog:before { + content: "\f013"; +} + +.fa-trash-o:before { + content: "\f014"; +} + +.fa-home:before { + content: "\f015"; +} + +.fa-file-o:before { + content: "\f016"; +} + +.fa-clock-o:before { + content: "\f017"; +} + +.fa-road:before { + content: "\f018"; +} + +.fa-download:before { + content: "\f019"; +} + +.fa-arrow-circle-o-down:before { + content: "\f01a"; +} + +.fa-arrow-circle-o-up:before { + content: "\f01b"; +} + +.fa-inbox:before { + content: "\f01c"; +} + +.fa-play-circle-o:before { + content: "\f01d"; +} + +.fa-rotate-right:before, +.fa-repeat:before { + content: "\f01e"; +} + +.fa-refresh:before { + content: "\f021"; +} + +.fa-list-alt:before { + content: "\f022"; +} + +.fa-lock:before { + content: "\f023"; +} + +.fa-flag:before { + content: "\f024"; +} + +.fa-headphones:before { + content: "\f025"; +} + +.fa-volume-off:before { + content: "\f026"; +} + +.fa-volume-down:before { + content: "\f027"; +} + +.fa-volume-up:before { + content: "\f028"; +} + +.fa-qrcode:before { + content: "\f029"; +} + +.fa-barcode:before { + content: "\f02a"; +} + +.fa-tag:before { + content: "\f02b"; +} + +.fa-tags:before { + content: "\f02c"; +} + +.fa-book:before { + content: "\f02d"; +} + +.fa-bookmark:before { + content: "\f02e"; +} + +.fa-print:before { + content: "\f02f"; +} + +.fa-camera:before { + content: "\f030"; +} + +.fa-font:before { + content: "\f031"; +} + +.fa-bold:before { + content: "\f032"; +} + +.fa-italic:before { + content: "\f033"; +} + +.fa-text-height:before { + content: "\f034"; +} + +.fa-text-width:before { + content: "\f035"; +} + +.fa-align-left:before { + content: "\f036"; +} + +.fa-align-center:before { + content: "\f037"; +} + +.fa-align-right:before { + content: "\f038"; +} + +.fa-align-justify:before { + content: "\f039"; +} + +.fa-list:before { + content: "\f03a"; +} + +.fa-dedent:before, +.fa-outdent:before { + content: "\f03b"; +} + +.fa-indent:before { + content: "\f03c"; +} + +.fa-video-camera:before { + content: "\f03d"; +} + +.fa-picture-o:before { + content: "\f03e"; +} + +.fa-pencil:before { + content: "\f040"; +} + +.fa-map-marker:before { + content: "\f041"; +} + +.fa-adjust:before { + content: "\f042"; +} + +.fa-tint:before { + content: "\f043"; +} + +.fa-edit:before, +.fa-pencil-square-o:before { + content: "\f044"; +} + +.fa-share-square-o:before { + content: "\f045"; +} + +.fa-check-square-o:before { + content: "\f046"; +} + +.fa-arrows:before { + content: "\f047"; +} + +.fa-step-backward:before { + content: "\f048"; +} + +.fa-fast-backward:before { + content: "\f049"; +} + +.fa-backward:before { + content: "\f04a"; +} + +.fa-play:before { + content: "\f04b"; +} + +.fa-pause:before { + content: "\f04c"; +} + +.fa-stop:before { + content: "\f04d"; +} + +.fa-forward:before { + content: "\f04e"; +} + +.fa-fast-forward:before { + content: "\f050"; +} + +.fa-step-forward:before { + content: "\f051"; +} + +.fa-eject:before { + content: "\f052"; +} + +.fa-chevron-left:before { + content: "\f053"; +} + +.fa-chevron-right:before { + content: "\f054"; +} + +.fa-plus-circle:before { + content: "\f055"; +} + +.fa-minus-circle:before { + content: "\f056"; +} + +.fa-times-circle:before { + content: "\f057"; +} + +.fa-check-circle:before { + content: "\f058"; +} + +.fa-question-circle:before { + content: "\f059"; +} + +.fa-info-circle:before { + content: "\f05a"; +} + +.fa-crosshairs:before { + content: "\f05b"; +} + +.fa-times-circle-o:before { + content: "\f05c"; +} + +.fa-check-circle-o:before { + content: "\f05d"; +} + +.fa-ban:before { + content: "\f05e"; +} + +.fa-arrow-left:before { + content: "\f060"; +} + +.fa-arrow-right:before { + content: "\f061"; +} + +.fa-arrow-up:before { + content: "\f062"; +} + +.fa-arrow-down:before { + content: "\f063"; +} + +.fa-mail-forward:before, +.fa-share:before { + content: "\f064"; +} + +.fa-expand:before { + content: "\f065"; +} + +.fa-compress:before { + content: "\f066"; +} + +.fa-plus:before { + content: "\f067"; +} + +.fa-minus:before { + content: "\f068"; +} + +.fa-asterisk:before { + content: "\f069"; +} + +.fa-exclamation-circle:before { + content: "\f06a"; +} + +.fa-gift:before { + content: "\f06b"; +} + +.fa-leaf:before { + content: "\f06c"; +} + +.fa-fire:before { + content: "\f06d"; +} + +.fa-eye:before { + content: "\f06e"; +} + +.fa-eye-slash:before { + content: "\f070"; +} + +.fa-warning:before, +.fa-exclamation-triangle:before { + content: "\f071"; +} + +.fa-plane:before { + content: "\f072"; +} + +.fa-calendar:before { + content: "\f073"; +} + +.fa-random:before { + content: "\f074"; +} + +.fa-comment:before { + content: "\f075"; +} + +.fa-magnet:before { + content: "\f076"; +} + +.fa-chevron-up:before { + content: "\f077"; +} + +.fa-chevron-down:before { + content: "\f078"; +} + +.fa-retweet:before { + content: "\f079"; +} + +.fa-shopping-cart:before { + content: "\f07a"; +} + +.fa-folder:before { + content: "\f07b"; +} + +.fa-folder-open:before { + content: "\f07c"; +} + +.fa-arrows-v:before { + content: "\f07d"; +} + +.fa-arrows-h:before { + content: "\f07e"; +} + +.fa-bar-chart-o:before { + content: "\f080"; +} + +.fa-twitter-square:before { + content: "\f081"; +} + +.fa-facebook-square:before { + content: "\f082"; +} + +.fa-camera-retro:before { + content: "\f083"; +} + +.fa-key:before { + content: "\f084"; +} + +.fa-gears:before, +.fa-cogs:before { + content: "\f085"; +} + +.fa-comments:before { + content: "\f086"; +} + +.fa-thumbs-o-up:before { + content: "\f087"; +} + +.fa-thumbs-o-down:before { + content: "\f088"; +} + +.fa-star-half:before { + content: "\f089"; +} + +.fa-heart-o:before { + content: "\f08a"; +} + +.fa-sign-out:before { + content: "\f08b"; +} + +.fa-linkedin-square:before { + content: "\f08c"; +} + +.fa-thumb-tack:before { + content: "\f08d"; +} + +.fa-external-link:before { + content: "\f08e"; +} + +.fa-sign-in:before { + content: "\f090"; +} + +.fa-trophy:before { + content: "\f091"; +} + +.fa-github-square:before { + content: "\f092"; +} + +.fa-upload:before { + content: "\f093"; +} + +.fa-lemon-o:before { + content: "\f094"; +} + +.fa-phone:before { + content: "\f095"; +} + +.fa-square-o:before { + content: "\f096"; +} + +.fa-bookmark-o:before { + content: "\f097"; +} + +.fa-phone-square:before { + content: "\f098"; +} + +.fa-twitter:before { + content: "\f099"; +} + +.fa-facebook:before { + content: "\f09a"; +} + +.fa-github:before { + content: "\f09b"; +} + +.fa-unlock:before { + content: "\f09c"; +} + +.fa-credit-card:before { + content: "\f09d"; +} + +.fa-rss:before { + content: "\f09e"; +} + +.fa-hdd-o:before { + content: "\f0a0"; +} + +.fa-bullhorn:before { + content: "\f0a1"; +} + +.fa-bell:before { + content: "\f0f3"; +} + +.fa-certificate:before { + content: "\f0a3"; +} + +.fa-hand-o-right:before { + content: "\f0a4"; +} + +.fa-hand-o-left:before { + content: "\f0a5"; +} + +.fa-hand-o-up:before { + content: "\f0a6"; +} + +.fa-hand-o-down:before { + content: "\f0a7"; +} + +.fa-arrow-circle-left:before { + content: "\f0a8"; +} + +.fa-arrow-circle-right:before { + content: "\f0a9"; +} + +.fa-arrow-circle-up:before { + content: "\f0aa"; +} + +.fa-arrow-circle-down:before { + content: "\f0ab"; +} + +.fa-globe:before { + content: "\f0ac"; +} + +.fa-wrench:before { + content: "\f0ad"; +} + +.fa-tasks:before { + content: "\f0ae"; +} + +.fa-filter:before { + content: "\f0b0"; +} + +.fa-briefcase:before { + content: "\f0b1"; +} + +.fa-arrows-alt:before { + content: "\f0b2"; +} + +.fa-group:before, +.fa-users:before { + content: "\f0c0"; +} + +.fa-chain:before, +.fa-link:before { + content: "\f0c1"; +} + +.fa-cloud:before { + content: "\f0c2"; +} + +.fa-flask:before { + content: "\f0c3"; +} + +.fa-cut:before, +.fa-scissors:before { + content: "\f0c4"; +} + +.fa-copy:before, +.fa-files-o:before { + content: "\f0c5"; +} + +.fa-paperclip:before { + content: "\f0c6"; +} + +.fa-save:before, +.fa-floppy-o:before { + content: "\f0c7"; +} + +.fa-square:before { + content: "\f0c8"; +} + +.fa-bars:before { + content: "\f0c9"; +} + +.fa-list-ul:before { + content: "\f0ca"; +} + +.fa-list-ol:before { + content: "\f0cb"; +} + +.fa-strikethrough:before { + content: "\f0cc"; +} + +.fa-underline:before { + content: "\f0cd"; +} + +.fa-table:before { + content: "\f0ce"; +} + +.fa-magic:before { + content: "\f0d0"; +} + +.fa-truck:before { + content: "\f0d1"; +} + +.fa-pinterest:before { + content: "\f0d2"; +} + +.fa-pinterest-square:before { + content: "\f0d3"; +} + +.fa-google-plus-square:before { + content: "\f0d4"; +} + +.fa-google-plus:before { + content: "\f0d5"; +} + +.fa-money:before { + content: "\f0d6"; +} + +.fa-caret-down:before { + content: "\f0d7"; +} + +.fa-caret-up:before { + content: "\f0d8"; +} + +.fa-caret-left:before { + content: "\f0d9"; +} + +.fa-caret-right:before { + content: "\f0da"; +} + +.fa-columns:before { + content: "\f0db"; +} + +.fa-unsorted:before, +.fa-sort:before { + content: "\f0dc"; +} + +.fa-sort-down:before, +.fa-sort-asc:before { + content: "\f0dd"; +} + +.fa-sort-up:before, +.fa-sort-desc:before { + content: "\f0de"; +} + +.fa-envelope:before { + content: "\f0e0"; +} + +.fa-linkedin:before { + content: "\f0e1"; +} + +.fa-rotate-left:before, +.fa-undo:before { + content: "\f0e2"; +} + +.fa-legal:before, +.fa-gavel:before { + content: "\f0e3"; +} + +.fa-dashboard:before, +.fa-tachometer:before { + content: "\f0e4"; +} + +.fa-comment-o:before { + content: "\f0e5"; +} + +.fa-comments-o:before { + content: "\f0e6"; +} + +.fa-flash:before, +.fa-bolt:before { + content: "\f0e7"; +} + +.fa-sitemap:before { + content: "\f0e8"; +} + +.fa-umbrella:before { + content: "\f0e9"; +} + +.fa-paste:before, +.fa-clipboard:before { + content: "\f0ea"; +} + +.fa-lightbulb-o:before { + content: "\f0eb"; +} + +.fa-exchange:before { + content: "\f0ec"; +} + +.fa-cloud-download:before { + content: "\f0ed"; +} + +.fa-cloud-upload:before { + content: "\f0ee"; +} + +.fa-user-md:before { + content: "\f0f0"; +} + +.fa-stethoscope:before { + content: "\f0f1"; +} + +.fa-suitcase:before { + content: "\f0f2"; +} + +.fa-bell-o:before { + content: "\f0a2"; +} + +.fa-coffee:before { + content: "\f0f4"; +} + +.fa-cutlery:before { + content: "\f0f5"; +} + +.fa-file-text-o:before { + content: "\f0f6"; +} + +.fa-building-o:before { + content: "\f0f7"; +} + +.fa-hospital-o:before { + content: "\f0f8"; +} + +.fa-ambulance:before { + content: "\f0f9"; +} + +.fa-medkit:before { + content: "\f0fa"; +} + +.fa-fighter-jet:before { + content: "\f0fb"; +} + +.fa-beer:before { + content: "\f0fc"; +} + +.fa-h-square:before { + content: "\f0fd"; +} + +.fa-plus-square:before { + content: "\f0fe"; +} + +.fa-angle-double-left:before { + content: "\f100"; +} + +.fa-angle-double-right:before { + content: "\f101"; +} + +.fa-angle-double-up:before { + content: "\f102"; +} + +.fa-angle-double-down:before { + content: "\f103"; +} + +.fa-angle-left:before { + content: "\f104"; +} + +.fa-angle-right:before { + content: "\f105"; +} + +.fa-angle-up:before { + content: "\f106"; +} + +.fa-angle-down:before { + content: "\f107"; +} + +.fa-desktop:before { + content: "\f108"; +} + +.fa-laptop:before { + content: "\f109"; +} + +.fa-tablet:before { + content: "\f10a"; +} + +.fa-mobile-phone:before, +.fa-mobile:before { + content: "\f10b"; +} + +.fa-circle-o:before { + content: "\f10c"; +} + +.fa-quote-left:before { + content: "\f10d"; +} + +.fa-quote-right:before { + content: "\f10e"; +} + +.fa-spinner:before { + content: "\f110"; +} + +.fa-circle:before { + content: "\f111"; +} + +.fa-mail-reply:before, +.fa-reply:before { + content: "\f112"; +} + +.fa-github-alt:before { + content: "\f113"; +} + +.fa-folder-o:before { + content: "\f114"; +} + +.fa-folder-open-o:before { + content: "\f115"; +} + +.fa-smile-o:before { + content: "\f118"; +} + +.fa-frown-o:before { + content: "\f119"; +} + +.fa-meh-o:before { + content: "\f11a"; +} + +.fa-gamepad:before { + content: "\f11b"; +} + +.fa-keyboard-o:before { + content: "\f11c"; +} + +.fa-flag-o:before { + content: "\f11d"; +} + +.fa-flag-checkered:before { + content: "\f11e"; +} + +.fa-terminal:before { + content: "\f120"; +} + +.fa-code:before { + content: "\f121"; +} + +.fa-reply-all:before { + content: "\f122"; +} + +.fa-mail-reply-all:before { + content: "\f122"; +} + +.fa-star-half-empty:before, +.fa-star-half-full:before, +.fa-star-half-o:before { + content: "\f123"; +} + +.fa-location-arrow:before { + content: "\f124"; +} + +.fa-crop:before { + content: "\f125"; +} + +.fa-code-fork:before { + content: "\f126"; +} + +.fa-unlink:before, +.fa-chain-broken:before { + content: "\f127"; +} + +.fa-question:before { + content: "\f128"; +} + +.fa-info:before { + content: "\f129"; +} + +.fa-exclamation:before { + content: "\f12a"; +} + +.fa-superscript:before { + content: "\f12b"; +} + +.fa-subscript:before { + content: "\f12c"; +} + +.fa-eraser:before { + content: "\f12d"; +} + +.fa-puzzle-piece:before { + content: "\f12e"; +} + +.fa-microphone:before { + content: "\f130"; +} + +.fa-microphone-slash:before { + content: "\f131"; +} + +.fa-shield:before { + content: "\f132"; +} + +.fa-calendar-o:before { + content: "\f133"; +} + +.fa-fire-extinguisher:before { + content: "\f134"; +} + +.fa-rocket:before { + content: "\f135"; +} + +.fa-maxcdn:before { + content: "\f136"; +} + +.fa-chevron-circle-left:before { + content: "\f137"; +} + +.fa-chevron-circle-right:before { + content: "\f138"; +} + +.fa-chevron-circle-up:before { + content: "\f139"; +} + +.fa-chevron-circle-down:before { + content: "\f13a"; +} + +.fa-html5:before { + content: "\f13b"; +} + +.fa-css3:before { + content: "\f13c"; +} + +.fa-anchor:before { + content: "\f13d"; +} + +.fa-unlock-alt:before { + content: "\f13e"; +} + +.fa-bullseye:before { + content: "\f140"; +} + +.fa-ellipsis-h:before { + content: "\f141"; +} + +.fa-ellipsis-v:before { + content: "\f142"; +} + +.fa-rss-square:before { + content: "\f143"; +} + +.fa-play-circle:before { + content: "\f144"; +} + +.fa-ticket:before { + content: "\f145"; +} + +.fa-minus-square:before { + content: "\f146"; +} + +.fa-minus-square-o:before { + content: "\f147"; +} + +.fa-level-up:before { + content: "\f148"; +} + +.fa-level-down:before { + content: "\f149"; +} + +.fa-check-square:before { + content: "\f14a"; +} + +.fa-pencil-square:before { + content: "\f14b"; +} + +.fa-external-link-square:before { + content: "\f14c"; +} + +.fa-share-square:before { + content: "\f14d"; +} + +.fa-compass:before { + content: "\f14e"; +} + +.fa-toggle-down:before, +.fa-caret-square-o-down:before { + content: "\f150"; +} + +.fa-toggle-up:before, +.fa-caret-square-o-up:before { + content: "\f151"; +} + +.fa-toggle-right:before, +.fa-caret-square-o-right:before { + content: "\f152"; +} + +.fa-euro:before, +.fa-eur:before { + content: "\f153"; +} + +.fa-gbp:before { + content: "\f154"; +} + +.fa-dollar:before, +.fa-usd:before { + content: "\f155"; +} + +.fa-rupee:before, +.fa-inr:before { + content: "\f156"; +} + +.fa-cny:before, +.fa-rmb:before, +.fa-yen:before, +.fa-jpy:before { + content: "\f157"; +} + +.fa-ruble:before, +.fa-rouble:before, +.fa-rub:before { + content: "\f158"; +} + +.fa-won:before, +.fa-krw:before { + content: "\f159"; +} + +.fa-bitcoin:before, +.fa-btc:before { + content: "\f15a"; +} + +.fa-file:before { + content: "\f15b"; +} + +.fa-file-text:before { + content: "\f15c"; +} + +.fa-sort-alpha-asc:before { + content: "\f15d"; +} + +.fa-sort-alpha-desc:before { + content: "\f15e"; +} + +.fa-sort-amount-asc:before { + content: "\f160"; +} + +.fa-sort-amount-desc:before { + content: "\f161"; +} + +.fa-sort-numeric-asc:before { + content: "\f162"; +} + +.fa-sort-numeric-desc:before { + content: "\f163"; +} + +.fa-thumbs-up:before { + content: "\f164"; +} + +.fa-thumbs-down:before { + content: "\f165"; +} + +.fa-youtube-square:before { + content: "\f166"; +} + +.fa-youtube:before { + content: "\f167"; +} + +.fa-xing:before { + content: "\f168"; +} + +.fa-xing-square:before { + content: "\f169"; +} + +.fa-youtube-play:before { + content: "\f16a"; +} + +.fa-dropbox:before { + content: "\f16b"; +} + +.fa-stack-overflow:before { + content: "\f16c"; +} + +.fa-instagram:before { + content: "\f16d"; +} + +.fa-flickr:before { + content: "\f16e"; +} + +.fa-adn:before { + content: "\f170"; +} + +.fa-bitbucket:before { + content: "\f171"; +} + +.fa-bitbucket-square:before { + content: "\f172"; +} + +.fa-tumblr:before { + content: "\f173"; +} + +.fa-tumblr-square:before { + content: "\f174"; +} + +.fa-long-arrow-down:before { + content: "\f175"; +} + +.fa-long-arrow-up:before { + content: "\f176"; +} + +.fa-long-arrow-left:before { + content: "\f177"; +} + +.fa-long-arrow-right:before { + content: "\f178"; +} + +.fa-apple:before { + content: "\f179"; +} + +.fa-windows:before { + content: "\f17a"; +} + +.fa-android:before { + content: "\f17b"; +} + +.fa-linux:before { + content: "\f17c"; +} + +.fa-dribbble:before { + content: "\f17d"; +} + +.fa-skype:before { + content: "\f17e"; +} + +.fa-foursquare:before { + content: "\f180"; +} + +.fa-trello:before { + content: "\f181"; +} + +.fa-female:before { + content: "\f182"; +} + +.fa-male:before { + content: "\f183"; +} + +.fa-gittip:before { + content: "\f184"; +} + +.fa-sun-o:before { + content: "\f185"; +} + +.fa-moon-o:before { + content: "\f186"; +} + +.fa-archive:before { + content: "\f187"; +} + +.fa-bug:before { + content: "\f188"; +} + +.fa-vk:before { + content: "\f189"; +} + +.fa-weibo:before { + content: "\f18a"; +} + +.fa-renren:before { + content: "\f18b"; +} + +.fa-pagelines:before { + content: "\f18c"; +} + +.fa-stack-exchange:before { + content: "\f18d"; +} + +.fa-arrow-circle-o-right:before { + content: "\f18e"; +} + +.fa-arrow-circle-o-left:before { + content: "\f190"; +} + +.fa-toggle-left:before, +.fa-caret-square-o-left:before { + content: "\f191"; +} + +.fa-dot-circle-o:before { + content: "\f192"; +} + +.fa-wheelchair:before { + content: "\f193"; +} + +.fa-vimeo-square:before { + content: "\f194"; +} + +.fa-turkish-lira:before, +.fa-try:before { + content: "\f195"; +} + +.fa-plus-square-o:before { + content: "\f196"; +} diff --git a/ajax/libs/ink/3.0.0/css/font-awesome.min.css b/ajax/libs/ink/3.0.0/css/font-awesome.min.css new file mode 100644 index 000000000..0de55105a --- /dev/null +++ b/ajax/libs/ink/3.0.0/css/font-awesome.min.css @@ -0,0 +1 @@ +@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.0.3);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.0.3) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff?v=4.0.3) format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.0.3) format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-asc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-desc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/css/ink-flex.css b/ajax/libs/ink/3.0.0/css/ink-flex.css new file mode 100644 index 000000000..1d843dd55 --- /dev/null +++ b/ajax/libs/ink/3.0.0/css/ink-flex.css @@ -0,0 +1,9502 @@ +@charset "UTF-8"; +/** + * Ink + * + * A set of tools for quick development of web interfaces. + * + * @package Ink + * @author Sapo Ink Team + * @license http://opensource.org/licenses/MIT MIT + * @link http://ink.sapo.pt + * @version 3.0.0 + */ +/** + * Ink class names prefix + * Used in all of Inks components root elements + */ +/** + * Grid class names + */ +/** + * Alerts class names + */ +/** + * Badges class names + */ +/** + * Buttons class names + */ +/** + * Forms class names + */ +/** + * Labels class names + */ +/** + * Navigation class names + */ +/** + * Dropdown class names + */ +/** + * Tables class names + */ +/** + * Images class names + */ +/** + * Sets the grids maximum width + * @var $grid-max-width (pixels|ems|percentage) + */ +/*! + * Sets the grids breakpoint + * + * To add a new break point you'll need to add an element to the list. + * + * Here's an example: ( class-name-prefix, minimum-width, maximum-width, gutter-width, no-media-query). + * + * class-name-prefix: this is the prefix used in tons of inks classes i.e.: large-100, small-40, etc. + * minimum-width: (pixels|null) the minimum width for the breakpoint + * maximum-width: (pixels|null) the maximum width for the breakpoint + * gutter-width: (ems) the width for the gutters (space between grid columns) for the breakpoint + * no-media-query: (true|false) if you need to support IE8 set this to true on a single breakpoint. + * Since IE8 does not support the @media statement leaving one of the breakpoints + * outside a @media query let's you use the grid in IE8. + * + */ +.grid-order { + flex: 100%; +} + +.show-all { + display: inherit; +} + +.hide-all { + display: none !important; +} + +.no-margin { + margin: 0 !important; +} + +.no-padding { + padding: 0 !important; +} + +.push-left { + float: left; + -webkit-justify-content: flex-start; + -moz-justify-content: flex-start; + justify-content: flex-start; +} + +.push-center { + float: none !important; + margin-left: auto; + margin-right: auto; + -webkit-justify-content: center; + -moz-justify-content: center; + justify-content: center; +} + +.push-right { + float: right; + -webkit-justify-content: flex-end; + -moz-justify-content: flex-end; + justify-content: flex-end; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +.clearfix { + overflow: hidden; + *zoom: 1; + *zoom: 1; +} +.clearfix:after { + content: ""; + display: table; + clear: both; +} + +/*! normalize.css v3.0.0 | 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 */ +} +html * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/** + * Remove default margin. + */ +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ +/** + * Correct `block` display not defined in IE 8/9. + */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ +audio, +canvas, +progress, +video { + display: inline-block; + /* 1 */ + vertical-align: baseline; + /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9. + * Hide the `template` element in IE, Safari, and Firefox < 22. + */ +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ +/** + * Remove the gray background color from active links in IE 10. + */ +a { + background: 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, Safari 5, and Chrome. + */ +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari 5 and Chrome. + */ +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ +h1 { + font-size: 2em; + margin: .67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -.5em; +} + +sub { + bottom: -.25em; +} + +/* Embedded content + ========================================================================== */ +/** + * Remove border when inside `a` element in IE 8/9. + */ +img { + border: 0; +} + +/** + * Correct overflow displayed oddly in IE 9. + */ +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ +/** + * Address margin not present in IE 8/9 and Safari 5. + */ +figure { + margin: 0; +} + +/** + * Address differences between Firefox and other browsers. + */ +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * 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; +} + +/* Forms + ========================================================================== */ +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ +button, +input, +optgroup, +select, +textarea { + color: inherit; + /* 1 */ + font: inherit; + /* 2 */ + margin: 0; + /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10. + */ +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8+, and Opera + * Correct `select` style inheritance in Firefox. + */ +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + /* 2 */ + cursor: pointer; + /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ +input[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + /* 2 */ + box-sizing: border-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: .35em .625em .75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ +legend { + border: 0; + /* 1 */ + padding: 0; + /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9. + */ +textarea { + overflow: auto; +} + +/** + * 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; +} + +.ink-alert.basic, .ink-alert.block { + font-size: .938em; + margin: 1em 0; + position: relative; + overflow: hidden; +} +.ink-alert.basic { + padding: 1em 3em 1em 1em; +} +.ink-alert.basic p { + margin: 0; +} +.ink-alert.basic .ink-close { + top: .55em; + *top: .2em; +} +.ink-alert.block { + font-size: 1em; +} +.ink-alert.block > h4 { + padding: 1em 3em 1em 1em; + font-size: .938em; + line-height: 1.5; + margin: 0; +} +.ink-alert.block p { + margin: 1.5em 1em; +} +.ink-alert.block ul { + list-style: inside; +} +.ink-alert .ink-dismiss { + position: absolute; + line-height: .56em; + font-size: 1.8em; + padding: 5px; + border: none; + background: none; + top: .5em; + *top: .2em; + right: .4em; +} + +.ink-badge { + padding: 0.2em 0.6em; + font-size: 0.813em; + margin-left: .6em; +} + +.ink-button { + -webkit-appearance: menuitem; + padding: 8px 12px; + cursor: pointer; + text-decoration: none; + text-align: center; + display: inline-block; + vertical-align: middle; + white-space: nowrap; + line-height: normal; +} +.ink-button + .ink-button { + margin-left: 5px; +} + +.button-group { + *zoom: 1; +} +.button-group > .ink-button { + float: left; + margin: 5px 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + -ms-border-radius: 0; + -o-border-radius: 0; + border-radius: 0; + border-left: none; +} +.button-group > .ink-button:hover, .button-group > .ink-button:active { + border-left: none; +} +.button-group > .ink-button:first-child { + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; + border-left: 1px solid #bfbfbf; +} +.button-group > .ink-button:last-child { + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; +} +.button-group:after { + content: ""; + display: table; + clear: both; +} + +.button-toolbar { + *zoom: 1; +} +.button-toolbar > .button-group { + margin-right: 10px; + float: left; +} +.button-toolbar:after { + content: ""; + display: table; + clear: both; +} + +.ink-form fieldset { + border: none; + margin-bottom: 1.5em; + padding: 0; + margin: 0; +} +.ink-form fieldset legend { + font-size: 1.438em; + font-weight: 700; + width: 100%; + border-bottom: 1px solid #ddd; +} +.ink-form fieldset legend + * { + -webkit-margin-top-collapse: separate; + margin: 2em 0; +} +.ink-form p.tip { + font-size: .875em; + color: #909090; + position: relative; + margin: .2em 0 0 .1em; +} +.ink-form p.label { + padding: 0; + margin: 0; + color: #555555; + white-space: normal; +} +.ink-form select, +.ink-form textarea, +.ink-form input[type="text"], +.ink-form input[type="password"], +.ink-form input[type="datetime"], +.ink-form input[type="datetime-local"], +.ink-form input[type="date"], +.ink-form input[type="month"], +.ink-form input[type="time"], +.ink-form input[type="week"], +.ink-form input[type="number"], +.ink-form input[type="email"], +.ink-form input[type="url"], +.ink-form input[type="search"], +.ink-form input[type="tel"], +.ink-form input[type="color"] { + font-family: "Roboto", Arial, Helvetica, sans-serif; + font-weight: 300; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + padding: 8px 6px; + border: 1px solid #c6c6c6; + resize: none; + background: white; + vertical-align: middle; +} +.ink-form select:focus, +.ink-form textarea:focus, +.ink-form input[type="text"]:focus, +.ink-form input[type="password"]:focus, +.ink-form input[type="datetime"]:focus, +.ink-form input[type="datetime-local"]:focus, +.ink-form input[type="date"]:focus, +.ink-form input[type="month"]:focus, +.ink-form input[type="time"]:focus, +.ink-form input[type="week"]:focus, +.ink-form input[type="number"]:focus, +.ink-form input[type="email"]:focus, +.ink-form input[type="url"]:focus, +.ink-form input[type="search"]:focus, +.ink-form input[type="tel"]:focus, +.ink-form input[type="color"]:focus { + outline: none; + border-color: rgba(153, 153, 153, 0.9); + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + outline: 0 none; +} +.ink-form select:disabled, +.ink-form textarea:disabled, +.ink-form input[type="text"]:disabled, +.ink-form input[type="password"]:disabled, +.ink-form input[type="datetime"]:disabled, +.ink-form input[type="datetime-local"]:disabled, +.ink-form input[type="date"]:disabled, +.ink-form input[type="month"]:disabled, +.ink-form input[type="time"]:disabled, +.ink-form input[type="week"]:disabled, +.ink-form input[type="number"]:disabled, +.ink-form input[type="email"]:disabled, +.ink-form input[type="url"]:disabled, +.ink-form input[type="search"]:disabled, +.ink-form input[type="tel"]:disabled, +.ink-form input[type="color"]:disabled { + background: #f2f2f2; + cursor: not-allowed; +} +.ink-form .input-file { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + padding: 6px; + border: 1px solid #c6c6c6; + background: white; + vertical-align: middle; + line-height: 1.2; +} +.ink-form .input-file input[type="file"] { + -webkit-border-radius: 0; + -moz-border-radius: 0; + -ms-border-radius: 0; + -o-border-radius: 0; + border-radius: 0; + border: none; + padding: 0; + background: none; + width: 100%; +} +.ink-form .ink-button { + margin: 0 5px; +} +.ink-form label { + cursor: pointer; +} +.ink-form select { + line-height: 2; + cursor: pointer; +} +.ink-form textarea { + min-height: 5em; +} +.ink-form .control-group { + line-height: 2; + margin-bottom: 1em; + *zoom: 1; +} +.ink-form .control-group:after { + content: ""; + display: table; + clear: both; +} +.ink-form .control-group .control { + position: relative; + *zoom: 1; +} +.ink-form .control-group .control:after { + content: ""; + display: table; + clear: both; +} +.ink-form .control-group .control > li { + margin: 0; + *zoom: 1; +} +.ink-form .control-group .control > li:after { + content: ""; + display: table; + clear: both; +} +.ink-form .control-group .control > input, .ink-form .control-group .control > select, .ink-form .control-group .control > textarea { + width: 100%; +} +.ink-form .control-group .control > input + [class^="icon-"], .ink-form .control-group .control > input + [class*=" icon-"], .ink-form .control-group .control > select + [class^="icon-"], .ink-form .control-group .control > select + [class*=" icon-"], .ink-form .control-group .control > textarea + [class^="icon-"], .ink-form .control-group .control > textarea + [class*=" icon-"] { + display: none; +} +.ink-form .control-group .control.append-button span, .ink-form .control-group .control.append-symbol span, .ink-form .control-group .control.prepend-button span, .ink-form .control-group .control.prepend-symbol span { + width: 100%; + position: relative; +} +.ink-form .control-group .control.append-button span > input, .ink-form .control-group .control.append-button span > select, .ink-form .control-group .control.append-button span > textarea, .ink-form .control-group .control.append-symbol span > input, .ink-form .control-group .control.append-symbol span > select, .ink-form .control-group .control.append-symbol span > textarea, .ink-form .control-group .control.prepend-button span > input, .ink-form .control-group .control.prepend-button span > select, .ink-form .control-group .control.prepend-button span > textarea, .ink-form .control-group .control.prepend-symbol span > input, .ink-form .control-group .control.prepend-symbol span > select, .ink-form .control-group .control.prepend-symbol span > textarea { + width: 100%; +} +.ink-form .control-group .control.append-button > input[type="submit"], .ink-form .control-group .control.append-button > input[type="button"], .ink-form .control-group .control.append-button > input[type="reset"], .ink-form .control-group .control.append-symbol > input[type="submit"], .ink-form .control-group .control.append-symbol > input[type="button"], .ink-form .control-group .control.append-symbol > input[type="reset"], .ink-form .control-group .control.prepend-button > input[type="submit"], .ink-form .control-group .control.prepend-button > input[type="button"], .ink-form .control-group .control.prepend-button > input[type="reset"], .ink-form .control-group .control.prepend-symbol > input[type="submit"], .ink-form .control-group .control.prepend-symbol > input[type="button"], .ink-form .control-group .control.prepend-symbol > input[type="reset"] { + width: auto; +} +.ink-form .control-group .control.append-button { + display: table; +} +.ink-form .control-group .control.append-button span { + display: table-cell; +} +.ink-form .control-group .control.append-button span > input, .ink-form .control-group .control.append-button span > select, .ink-form .control-group .control.append-button span > textarea { + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; +} +.ink-form .control-group .control.append-button .ink-button { + margin: 0; + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; + border-left: none; +} +.ink-form .control-group .control.prepend-button { + display: table; +} +.ink-form .control-group .control.prepend-button span { + display: table-cell; +} +.ink-form .control-group .control.prepend-button span > input, .ink-form .control-group .control.prepend-button span > select, .ink-form .control-group .control.prepend-button span > textarea { + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; +} +.ink-form .control-group .control.prepend-button .ink-button { + margin: 0; + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; + border-right: none; +} +.ink-form .control-group .control.append-symbol span { + display: block; +} +.ink-form .control-group .control.append-symbol span > input, .ink-form .control-group .control.append-symbol span > select, .ink-form .control-group .control.append-symbol span > textarea { + padding-right: 2.5em; +} +.ink-form .control-group .control.append-symbol span > [class^="fa-"], .ink-form .control-group .control.append-symbol span > [class*=" fa-"] { + position: absolute; + right: 1em; + top: .86em; + pointer-events: none; +} +.ink-form .control-group .control.prepend-symbol span { + display: block; +} +.ink-form .control-group .control.prepend-symbol span > input, .ink-form .control-group .control.prepend-symbol span > select, .ink-form .control-group .control.prepend-symbol span > textarea { + padding-left: 2.5em; +} +.ink-form .control-group .control.prepend-symbol span > [class^="fa-"], .ink-form .control-group .control.prepend-symbol span > [class*=" fa-"] { + position: absolute; + left: 1em; + top: .86em; + pointer-events: none; +} +.ink-form .control-group input[type="radio"], +.ink-form .control-group input[type="checkbox"] { + padding: 0; + margin: .55em 0; + border: none; + clear: left; + float: left; + cursor: pointer; +} +.ink-form .control-group input[type="radio"] + label, +.ink-form .control-group input[type="checkbox"] + label { + float: left; + margin: .25em 0 .25em .4em; +} +.ink-form .control-group .inline li { + padding: 0; +} +.ink-form .control-group .inline li label { + margin-right: 1em; +} +.ink-form .control-group.validation.error input, .ink-form .control-group.validation.error textarea, .ink-form .control-group.validation.error select { + outline: none; + border-color: rgba(200, 10, 16, 0.8); + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + border: 1px solid rgba(200, 10, 16, 0.5); +} +.ink-form .control-group.validation.error p.tip { + color: rgba(150, 7, 12, 0.55); +} +.ink-form .control-group.validation.warning input, .ink-form .control-group.validation.warning textarea, .ink-form .control-group.validation.warning select { + outline: none; + border-color: rgba(255, 156, 0, 0.9); + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + border: 1px solid rgba(255, 156, 0, 0.6); +} +.ink-form .control-group.validation.warning p.tip { + color: rgba(204, 125, 0, 0.6); +} +.ink-form .control-group.required label, .ink-form .control-group.required p.label { + color: #555555; +} +.ink-form .control-group.required label:after, .ink-form .control-group.required p.label:after { + content: "\f069"; + color: #c91111; + margin-left: .6em; + font-family: FontAwesome; + font-size: .75em; + width: 1.25em; +} +.ink-form .control-group.required ul.control label:after { + content: ""; +} + +.ink-grid { + width: auto; + max-width: 1440px; + margin: 0 auto; +} + +.order-1 { + order: 1; +} + +.order-2 { + order: 2; +} + +.order-3 { + order: 3; +} + +.order-4 { + order: 4; +} + +.order-5 { + order: 5; +} + +.order-6 { + order: 6; +} + +.order-7 { + order: 7; +} + +.order-8 { + order: 8; +} + +.order-9 { + order: 9; +} + +.order-10 { + order: 10; +} + +@media screen and (min-width: 1261px) { + .ink-grid { + padding: 0 2em; + } + + .column-group.gutters { + margin-left: -2em; + } + .column-group.gutters > [class*=xlarge-], .column-group.gutters > [class*=all-], .column-group.gutters > .all-auto { + padding-left: 2em; + margin-bottom: 2em; + } + + .column-group.horizontal-gutters { + margin-left: -2em; + } + .column-group.horizontal-gutters > [class*=xlarge-], .column-group.horizontal-gutters > [class*=all-], .column-group.horizontal-gutters > .all-auto { + padding-left: 2em; + } + + .column-group.vertical-gutters > [class*=xlarge-], .column-group.vertical-gutters > [class*=all-], .column-group.vertical-gutters > .all-auto { + margin-bottom: 2em; + } + + .column-group.double-gutters { + margin-left: -4em; + } + .column-group.double-gutters > [class*=xlarge-], .column-group.double-gutters > [class*=all-], .column-group.double-gutters > .all-auto { + padding-left: 4em; + margin-bottom: 4em; + } + + .column-group.double-horizontal-gutters { + margin-left: -4em; + } + .column-group.double-horizontal-gutters > [class*=xlarge-], .column-group.double-horizontal-gutters > [class*=all-], .column-group.double-horizontal-gutters > .all-auto { + padding-left: 4em; + } + + .column-group.double-vertical-gutters > [class*=xlarge-], .column-group.double-vertical-gutters > [class*=all-], .column-group.double-vertical-gutters > .all-auto { + margin-bottom: 4em; + } + + .column-group.half-gutters { + margin-left: -1em; + } + .column-group.half-gutters > [class*=xlarge-], .column-group.half-gutters > [class*=all-], .column-group.half-gutters > .all-auto { + padding-left: 1em; + margin-bottom: 1em; + } + + .column-group.half-horizontal-gutters { + margin-left: -1em; + } + .column-group.half-horizontal-gutters > [class*=xlarge-], .column-group.half-horizontal-gutters > [class*=all-], .column-group.half-horizontal-gutters > .all-auto { + padding-left: 1em; + } + + .column-group.half-vertical-gutters > [class*=xlarge-], .column-group.half-vertical-gutters > [class*=all-], .column-group.half-vertical-gutters > .all-auto { + margin-bottom: 1em; + } + + .column-group.quarter-gutters { + margin-left: -0.5em; + } + .column-group.quarter-gutters > [class*=xlarge-], .column-group.quarter-gutters > [class*=all-], .column-group.quarter-gutters > .all-auto { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + + .column-group.quarter-horizontal-gutters { + margin-left: -0.5em; + } + .column-group.quarter-horizontal-gutters > [class*=xlarge-], .column-group.quarter-horizontal-gutters > [class*=all-], .column-group.quarter-horizontal-gutters > .all-auto { + padding-left: 0.5em; + } + + .column-group.quarter-vertical-gutters > [class*=xlarge-], .column-group.quarter-vertical-gutters > [class*=all-], .column-group.quarter-vertical-gutters > .all-auto { + margin-bottom: 0.5em; + } + + .column-group.xlarge-gutters { + margin-left: -2em; + } + .column-group.xlarge-gutters > [class*=xlarge-], .column-group.xlarge-gutters > [class*=all-], .column-group.xlarge-gutters > .all-auto { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + + .column-group.xlarge-horizontal-gutters { + margin-left: -2em; + } + .column-group.xlarge-horizontal-gutters > [class*=xlarge-], .column-group.xlarge-horizontal-gutters > [class*=all-], .column-group.xlarge-horizontal-gutters > .all-auto { + padding-left: 2em; + } + + .column-group.xlarge-vertical-gutters > [class*=xlarge-], .column-group.xlarge-vertical-gutters > [class*=all-], .column-group.xlarge-vertical-gutters > .all-auto { + margin-bottom: 2em; + } + + .column-group.xlarge-double-gutters { + margin-left: -4em; + } + .column-group.xlarge-double-gutters > [class*=xlarge-], .column-group.xlarge-double-gutters > [class*=all-], .column-group.xlarge-double-gutters > .all-auto { + padding-left: 4em; + margin-bottom: 4em; + } + + .column-group.xlarge-double-horizontal-gutters { + margin-left: -4em; + } + .column-group.xlarge-double-horizontal-gutters > [class*=xlarge-], .column-group.xlarge-double-horizontal-gutters > [class*=all-], .column-group.xlarge-double-horizontal-gutters > .all-auto { + padding-left: 4em; + } + + .column-group.xlarge-double-vertical-gutters > [class*=xlarge-], .column-group.xlarge-double-vertical-gutters > [class*=all-], .column-group.xlarge-double-vertical-gutters > .all-auto { + margin-bottom: 4em; + } + + .column-group.xlarge-half-gutters { + margin-left: -1em; + } + .column-group.xlarge-half-gutters > [class*=xlarge-], .column-group.xlarge-half-gutters > [class*=all-], .column-group.xlarge-half-gutters > .all-auto { + padding-left: 1em; + margin-bottom: 1em; + } + + .column-group.xlarge-half-horizontal-gutters { + margin-left: -1em; + } + .column-group.xlarge-half-horizontal-gutters > [class*=xlarge-], .column-group.xlarge-half-horizontal-gutters > [class*=all-], .column-group.xlarge-half-horizontal-gutters > .all-auto { + padding-left: 1em; + } + + .column-group.xlarge-half-vertical-gutters > [class*=xlarge-], .column-group.xlarge-half-vertical-gutters > [class*=all-], .column-group.xlarge-half-vertical-gutters > .all-auto { + margin-bottom: 1em; + } + + .column-group.xlarge-quarter-gutters { + margin-left: -0.5em; + } + .column-group.xlarge-quarter-gutters > [class*=xlarge-], .column-group.xlarge-quarter-gutters > [class*=all-], .column-group.xlarge-quarter-gutters > .all-auto { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + + .column-group.xlarge-quarter-horizontal-gutters { + margin-left: -0.5em; + } + .column-group.xlarge-quarter-horizontal-gutters > [class*=xlarge-], .column-group.xlarge-quarter-horizontal-gutters > [class*=all-], .column-group.xlarge-quarter-horizontal-gutters > .all-auto { + padding-left: 0.5em; + } + + .column-group.xlarge-quarter-vertical-gutters > [class*=xlarge-], .column-group.xlarge-quarter-vertical-gutters > [class*=all-], .column-group.xlarge-quarter-vertical-gutters > .all-auto { + margin-bottom: 0.5em; + } + + .column-group.xlarge-no-gutters { + margin-left: 0; + } + .column-group.xlarge-no-gutters > [class*=xlarge-], .column-group.xlarge-no-gutters > [class*=all-], .column-group.xlarge-no-gutters > .all-auto { + padding-left: 0; + margin-bottom: 0; + } + + .all-5, + .xlarge-5 { + width: 5%; + -webkit-flex-basis: 5%; + -moz-flex-basis: 5%; + flex-basis: 5%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-10, + .xlarge-10 { + width: 10%; + -webkit-flex-basis: 10%; + -moz-flex-basis: 10%; + flex-basis: 10%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-15, + .xlarge-15 { + width: 15%; + -webkit-flex-basis: 15%; + -moz-flex-basis: 15%; + flex-basis: 15%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-20, + .xlarge-20 { + width: 20%; + -webkit-flex-basis: 20%; + -moz-flex-basis: 20%; + flex-basis: 20%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-25, + .xlarge-25 { + width: 25%; + -webkit-flex-basis: 25%; + -moz-flex-basis: 25%; + flex-basis: 25%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-30, + .xlarge-30 { + width: 30%; + -webkit-flex-basis: 30%; + -moz-flex-basis: 30%; + flex-basis: 30%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-33, + .xlarge-33 { + width: 33,33333%; + -webkit-flex-basis: 33.33333%; + -moz-flex-basis: 33.33333%; + flex-basis: 33.33333%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-35, + .xlarge-35 { + width: 35%; + -webkit-flex-basis: 35%; + -moz-flex-basis: 35%; + flex-basis: 35%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-40, + .xlarge-40 { + width: 40%; + -webkit-flex-basis: 40%; + -moz-flex-basis: 40%; + flex-basis: 40%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-45, + .xlarge-45 { + width: 45%; + -webkit-flex-basis: 45%; + -moz-flex-basis: 45%; + flex-basis: 45%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-50, + .xlarge-50 { + width: 50%; + -webkit-flex-basis: 50%; + -moz-flex-basis: 50%; + flex-basis: 50%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-55, + .xlarge-55 { + width: 55%; + -webkit-flex-basis: 55%; + -moz-flex-basis: 55%; + flex-basis: 55%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-60, + .xlarge-60 { + width: 60%; + -webkit-flex-basis: 60%; + -moz-flex-basis: 60%; + flex-basis: 60%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-65, + .xlarge-65 { + width: 65%; + -webkit-flex-basis: 65%; + -moz-flex-basis: 65%; + flex-basis: 65%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-66, + .xlarge-66 { + width: 66,66666%; + -webkit-flex-basis: 66.66666%; + -moz-flex-basis: 66.66666%; + flex-basis: 66.66666%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-70, + .xlarge-70 { + width: 70%; + -webkit-flex-basis: 70%; + -moz-flex-basis: 70%; + flex-basis: 70%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-75, + .xlarge-75 { + width: 75%; + -webkit-flex-basis: 75%; + -moz-flex-basis: 75%; + flex-basis: 75%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-80, + .xlarge-80 { + width: 80%; + -webkit-flex-basis: 80%; + -moz-flex-basis: 80%; + flex-basis: 80%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-85, + .xlarge-85 { + width: 85%; + -webkit-flex-basis: 85%; + -moz-flex-basis: 85%; + flex-basis: 85%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-90, + .xlarge-90 { + width: 90%; + -webkit-flex-basis: 90%; + -moz-flex-basis: 90%; + flex-basis: 90%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-95, + .xlarge-95 { + width: 95%; + -webkit-flex-basis: 95%; + -moz-flex-basis: 95%; + flex-basis: 95%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-100, + .xlarge-100 { + width: 100%; + -webkit-flex-basis: 100%; + -moz-flex-basis: 100%; + flex-basis: 100%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-auto, + .xlarge-auto { + width: auto; + -webkit-flex-basis: auto; + flex-basis: auto; + -webkit-flex-grow: 1; + flex-grow: 1; + } + + .ink-flex, + .column-group { + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-flex-direction: row; + flex-direction: row; + list-style: none; + } + .ink-flex.xlarge-reverse, .ink-flex.reverse, + .column-group.xlarge-reverse, + .column-group.reverse { + -webkit-flex-direction: row-reverse; + -moz-flex-direction: row-reverse; + flex-direction: row-reverse; + } + .ink-flex.xlarge-vertical, .ink-flex.vertical, + .column-group.xlarge-vertical, + .column-group.vertical { + -webkit-flex-direction: column; + -moz-flex-direction: column; + flex-direction: column; + } + .ink-flex.xlarge-vertical.xlarge-reverse, .ink-flex.vertical.reverse, + .column-group.xlarge-vertical.xlarge-reverse, + .column-group.vertical.reverse { + -webkit-flex-direction: column-reverse; + -moz-flex-direction: column-reverse; + flex-direction: column-reverse; + } + + .xlarge-order-1 { + order: 1; + } + + .xlarge-order-2 { + order: 2; + } + + .xlarge-order-3 { + order: 3; + } + + .xlarge-order-4 { + order: 4; + } + + .xlarge-order-5 { + order: 5; + } + + .xlarge-order-6 { + order: 6; + } + + .xlarge-order-7 { + order: 7; + } + + .xlarge-order-8 { + order: 8; + } + + .xlarge-order-9 { + order: 9; + } + + .xlarge-order-10 { + order: 10; + } + + .column-group .xlarge-auto { + -webkit-flex-basis: auto; + flex-basis: auto; + -webkit-flex-grow: 1; + flex-grow: 1; + } + + .push-top, + .xlarge-push-top { + -webkit-box-align: start; + -webkit-align-items: flex-start; + -moz-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + -webkit-align-self: flex-start; + -ms-flex-item-align: start; + align-self: flex-start; + } + + .push-bottom, + .xlarge-push-bottom { + -webkit-box-align: end; + -webkit-align-items: flex-end; + -moz-box-align: end; + -ms-flex-align: end; + align-items: flex-end; + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; + } + + .push-middle, + .xlarge-push-middle { + -webkit-box-align: center; + -webkit-align-items: center; + -moz-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-align-self: flex-center; + -ms-flex-item-align: center; + align-self: center; + } + + .push-left, + .xlarge-push-left { + -webkit-justify-content: flex-start; + -moz-justify-content: flex-start; + justify-content: flex-start; + float: left; + } + + .push-center, + .xlarge-push-center { + float: none !important; + -webkit-justify-content: center; + -moz-justify-content: center; + justify-content: center; + margin-left: auto; + margin-right: auto; + } + + .push-right, + .xlarge-push-right { + -webkit-justify-content: flex-end; + -moz-justify-content: flex-end; + justify-content: flex-end; + float: right; + } + + .xlarge-align-left { + text-align: left; + } + + .xlarge-align-center { + text-align: center; + } + + .xlarge-align-right { + text-align: right; + } + + .space { + margin: 2em; + } + + .xlarge-space { + margin: 2em; + } + + .padding { + padding: 2em; + } + + .xlarge-padding { + padding: 2em; + } + + .double-space { + margin: 1em; + } + + .xlarge-double-space { + margin: 1em; + } + + .double-padding { + padding: 1em; + } + + .xlarge-double-padding { + padding: 1em; + } + + .half-space { + margin: 4em; + } + + .xlarge-half-space { + margin: 4em; + } + + .half-padding { + padding: 4em; + } + + .xlarge-half-padding { + padding: 4em; + } + + .quarter-space { + margin: 8em; + } + + .xlarge-quarter-space { + margin: 8em; + } + + .quarter-padding { + padding: 8em; + } + + .xlarge-quarter-padding { + padding: 8em; + } + + .vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + + .xlarge-vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + + .vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + + .xlarge-vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + + .double-vertical-space { + margin-top: 4em; + margin-bottom: 4em; + } + + .xlarge-double-vertical-space { + margin-top: 4em; + margin-bottom: 4em; + } + + .double-vertical-padding { + padding-top: 4em; + padding-bottom: 4em; + } + + .xlarge-double-vertical-padding { + padding-top: 4em; + padding-bottom: 4em; + } + + .half-vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + + .xlarge-half-vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + + .half-vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + + .xlarge-half-vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + + .quarter-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + + .xlarge-quarter-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + + .quarter-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + + .xlarge-quarter-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + + .horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + + .xlarge-horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + + .horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + + .xlarge-horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + + .double-horizontal-space { + margin-left: 4em; + margin-right: 4em; + } + + .xlarge-double-horizontal-space { + margin-left: 4em; + margin-right: 4em; + } + + .double-horizontal-padding { + padding-left: 4em; + padding-right: 4em; + } + + .xlarge-double-horizontal-padding { + padding-left: 4em; + padding-right: 4em; + } + + .half-horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + + .xlarge-half-horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + + .half-horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + + .xlarge-half-horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + + .quarter-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + + .xlarge-quarter-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + + .quarter-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + + .xlarge-quarter-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + + .top-space { + margin-top: 2em; + } + + .xlarge-top-space { + margin-top: 2em; + } + + .top-padding { + padding-top: 2em; + } + + .xlarge-top-padding { + padding-top: 2em; + } + + .double-top-space { + margin-top: 4em; + } + + .xlarge-double-top-space { + margin-top: 4em; + } + + .double-top-padding { + padding-top: 4em; + } + + .xlarge-double-top-padding { + padding-top: 4em; + } + + .half-top-space { + margin-top: 1em; + } + + .xlarge-half-top-space { + margin-top: 1em; + } + + .half-top-padding { + padding-top: 1em; + } + + .xlarge-half-top-padding { + padding-top: 1em; + } + + .quarter-top-space { + margin-top: 0.5em; + } + + .xlarge-quarter-top-space { + margin-top: 0.5em; + } + + .quarter-top-padding { + padding-top: 0.5em; + } + + .xlarge-quarter-top-padding { + padding-top: 0.5em; + } + + .right-space { + margin-right: 2em; + } + + .xlarge-right-space { + margin-right: 2em; + } + + .right-padding { + padding-right: 2em; + } + + .xlarge-right-padding { + padding-right: 2em; + } + + .double-right-space { + margin-right: 4em; + } + + .xlarge-double-right-space { + margin-right: 4em; + } + + .double-right-padding { + padding-right: 4em; + } + + .xlarge-double-right-padding { + padding-right: 4em; + } + + .half-right-space { + margin-right: 1em; + } + + .xlarge-half-right-space { + margin-right: 1em; + } + + .half-right-padding { + padding-right: 1em; + } + + .xlarge-half-right-padding { + padding-right: 1em; + } + + .quarter-right-space { + margin-right: 0.5em; + } + + .xlarge-quarter-right-space { + margin-right: 0.5em; + } + + .quarter-right-padding { + padding-right: 0.5em; + } + + .xlarge-quarter-right-padding { + padding-right: 0.5em; + } + + .bottom-space { + margin-bottom: 2em; + } + + .xlarge-bottom-space { + margin-bottom: 2em; + } + + .bottom-padding { + padding-bottom: 2em; + } + + .xlarge-bottom-padding { + padding-bottom: 2em; + } + + .double-bottom-space { + margin-bottom: 4em; + } + + .xlarge-double-bottom-space { + margin-bottom: 4em; + } + + .double-bottom-padding { + padding-bottom: 4em; + } + + .xlarge-double-bottom-padding { + padding-bottom: 4em; + } + + .half-bottom-space { + margin-bottom: 1em; + } + + .xlarge-half-bottom-space { + margin-bottom: 1em; + } + + .half-bottom-padding { + padding-bottom: 1em; + } + + .xlarge-half-bottom-padding { + padding-bottom: 1em; + } + + .quarter-bottom-space { + margin-bottom: 0.5em; + } + + .xlarge-quarter-bottom-space { + margin-bottom: 0.5em; + } + + .quarter-bottom-padding { + padding-bottom: 0.5em; + } + + .xlarge-quarter-bottom-padding { + padding-bottom: 0.5em; + } + + .left-space { + margin-left: 2em; + } + + .xlarge-left-space { + margin-left: 2em; + } + + .left-padding { + padding-left: 2em; + } + + .xlarge-left-padding { + padding-left: 2em; + } + + .double-left-space { + margin-left: 4em; + } + + .xlarge-double-left-space { + margin-left: 4em; + } + + .double-left-padding { + padding-left: 4em; + } + + .xlarge-double-left-padding { + padding-left: 4em; + } + + .half-left-space { + margin-left: 1em; + } + + .xlarge-half-left-space { + margin-left: 1em; + } + + .half-left-padding { + padding-left: 1em; + } + + .xlarge-half-left-padding { + padding-left: 1em; + } + + .quarter-left-space { + margin-left: 0.5em; + } + + .xlarge-quarter-left-space { + margin-left: 0.5em; + } + + .quarter-left-padding { + padding-left: 0.5em; + } + + .xlarge-quarter-left-padding { + padding-left: 0.5em; + } + + .hide-xlarge { + display: none !important; + } + + .show-xlarge { + display: inherit !important; + } + + table.show-xlarge { + display: table; + } + + thead.show-xlarge { + display: table-header-group; + } + + tbody.show-xlarge { + display: table-row-group; + } + + tfoot.show-xlarge { + display: table-footer-group; + } + + tr.show-xlarge { + display: table-row; + } + + th.show-xlarge, + td.show-xlarge { + display: table-cell; + } +} +@media screen and (min-width: 961px) and (max-width: 1260px) { + .ink-grid { + padding: 0 1.75em; + } + + .column-group.gutters { + margin-left: -1.75em; + } + .column-group.gutters > [class*=large-], .column-group.gutters > [class*=all-], .column-group.gutters > .all-auto { + padding-left: 1.75em; + margin-bottom: 1.75em; + } + + .column-group.horizontal-gutters { + margin-left: -1.75em; + } + .column-group.horizontal-gutters > [class*=large-], .column-group.horizontal-gutters > [class*=all-], .column-group.horizontal-gutters > .all-auto { + padding-left: 1.75em; + } + + .column-group.vertical-gutters > [class*=large-], .column-group.vertical-gutters > [class*=all-], .column-group.vertical-gutters > .all-auto { + margin-bottom: 1.75em; + } + + .column-group.double-gutters { + margin-left: -3.5em; + } + .column-group.double-gutters > [class*=large-], .column-group.double-gutters > [class*=all-], .column-group.double-gutters > .all-auto { + padding-left: 3.5em; + margin-bottom: 3.5em; + } + + .column-group.double-horizontal-gutters { + margin-left: -3.5em; + } + .column-group.double-horizontal-gutters > [class*=large-], .column-group.double-horizontal-gutters > [class*=all-], .column-group.double-horizontal-gutters > .all-auto { + padding-left: 3.5em; + } + + .column-group.double-vertical-gutters > [class*=large-], .column-group.double-vertical-gutters > [class*=all-], .column-group.double-vertical-gutters > .all-auto { + margin-bottom: 3.5em; + } + + .column-group.half-gutters { + margin-left: -0.875em; + } + .column-group.half-gutters > [class*=large-], .column-group.half-gutters > [class*=all-], .column-group.half-gutters > .all-auto { + padding-left: 0.875em; + margin-bottom: 0.875em; + } + + .column-group.half-horizontal-gutters { + margin-left: -0.875em; + } + .column-group.half-horizontal-gutters > [class*=large-], .column-group.half-horizontal-gutters > [class*=all-], .column-group.half-horizontal-gutters > .all-auto { + padding-left: 0.875em; + } + + .column-group.half-vertical-gutters > [class*=large-], .column-group.half-vertical-gutters > [class*=all-], .column-group.half-vertical-gutters > .all-auto { + margin-bottom: 0.875em; + } + + .column-group.quarter-gutters { + margin-left: -0.4375em; + } + .column-group.quarter-gutters > [class*=large-], .column-group.quarter-gutters > [class*=all-], .column-group.quarter-gutters > .all-auto { + padding-left: 0.4375em; + margin-bottom: 0.4375em; + } + + .column-group.quarter-horizontal-gutters { + margin-left: -0.4375em; + } + .column-group.quarter-horizontal-gutters > [class*=large-], .column-group.quarter-horizontal-gutters > [class*=all-], .column-group.quarter-horizontal-gutters > .all-auto { + padding-left: 0.4375em; + } + + .column-group.quarter-vertical-gutters > [class*=large-], .column-group.quarter-vertical-gutters > [class*=all-], .column-group.quarter-vertical-gutters > .all-auto { + margin-bottom: 0.4375em; + } + + .column-group.large-gutters { + margin-left: -1.75em; + } + .column-group.large-gutters > [class*=large-], .column-group.large-gutters > [class*=all-], .column-group.large-gutters > .all-auto { + padding-left: 0.4375em; + margin-bottom: 0.4375em; + } + + .column-group.large-horizontal-gutters { + margin-left: -1.75em; + } + .column-group.large-horizontal-gutters > [class*=large-], .column-group.large-horizontal-gutters > [class*=all-], .column-group.large-horizontal-gutters > .all-auto { + padding-left: 1.75em; + } + + .column-group.large-vertical-gutters > [class*=large-], .column-group.large-vertical-gutters > [class*=all-], .column-group.large-vertical-gutters > .all-auto { + margin-bottom: 1.75em; + } + + .column-group.large-double-gutters { + margin-left: -3.5em; + } + .column-group.large-double-gutters > [class*=large-], .column-group.large-double-gutters > [class*=all-], .column-group.large-double-gutters > .all-auto { + padding-left: 3.5em; + margin-bottom: 3.5em; + } + + .column-group.large-double-horizontal-gutters { + margin-left: -3.5em; + } + .column-group.large-double-horizontal-gutters > [class*=large-], .column-group.large-double-horizontal-gutters > [class*=all-], .column-group.large-double-horizontal-gutters > .all-auto { + padding-left: 3.5em; + } + + .column-group.large-double-vertical-gutters > [class*=large-], .column-group.large-double-vertical-gutters > [class*=all-], .column-group.large-double-vertical-gutters > .all-auto { + margin-bottom: 3.5em; + } + + .column-group.large-half-gutters { + margin-left: -0.875em; + } + .column-group.large-half-gutters > [class*=large-], .column-group.large-half-gutters > [class*=all-], .column-group.large-half-gutters > .all-auto { + padding-left: 0.875em; + margin-bottom: 0.875em; + } + + .column-group.large-half-horizontal-gutters { + margin-left: -0.875em; + } + .column-group.large-half-horizontal-gutters > [class*=large-], .column-group.large-half-horizontal-gutters > [class*=all-], .column-group.large-half-horizontal-gutters > .all-auto { + padding-left: 0.875em; + } + + .column-group.large-half-vertical-gutters > [class*=large-], .column-group.large-half-vertical-gutters > [class*=all-], .column-group.large-half-vertical-gutters > .all-auto { + margin-bottom: 0.875em; + } + + .column-group.large-quarter-gutters { + margin-left: -0.4375em; + } + .column-group.large-quarter-gutters > [class*=large-], .column-group.large-quarter-gutters > [class*=all-], .column-group.large-quarter-gutters > .all-auto { + padding-left: 0.4375em; + margin-bottom: 0.4375em; + } + + .column-group.large-quarter-horizontal-gutters { + margin-left: -0.4375em; + } + .column-group.large-quarter-horizontal-gutters > [class*=large-], .column-group.large-quarter-horizontal-gutters > [class*=all-], .column-group.large-quarter-horizontal-gutters > .all-auto { + padding-left: 0.4375em; + } + + .column-group.large-quarter-vertical-gutters > [class*=large-], .column-group.large-quarter-vertical-gutters > [class*=all-], .column-group.large-quarter-vertical-gutters > .all-auto { + margin-bottom: 0.4375em; + } + + .column-group.large-no-gutters { + margin-left: 0; + } + .column-group.large-no-gutters > [class*=large-], .column-group.large-no-gutters > [class*=all-], .column-group.large-no-gutters > .all-auto { + padding-left: 0; + margin-bottom: 0; + } + + .all-5, + .large-5 { + width: 5%; + -webkit-flex-basis: 5%; + -moz-flex-basis: 5%; + flex-basis: 5%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-10, + .large-10 { + width: 10%; + -webkit-flex-basis: 10%; + -moz-flex-basis: 10%; + flex-basis: 10%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-15, + .large-15 { + width: 15%; + -webkit-flex-basis: 15%; + -moz-flex-basis: 15%; + flex-basis: 15%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-20, + .large-20 { + width: 20%; + -webkit-flex-basis: 20%; + -moz-flex-basis: 20%; + flex-basis: 20%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-25, + .large-25 { + width: 25%; + -webkit-flex-basis: 25%; + -moz-flex-basis: 25%; + flex-basis: 25%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-30, + .large-30 { + width: 30%; + -webkit-flex-basis: 30%; + -moz-flex-basis: 30%; + flex-basis: 30%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-33, + .large-33 { + width: 33,33333%; + -webkit-flex-basis: 33.33333%; + -moz-flex-basis: 33.33333%; + flex-basis: 33.33333%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-35, + .large-35 { + width: 35%; + -webkit-flex-basis: 35%; + -moz-flex-basis: 35%; + flex-basis: 35%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-40, + .large-40 { + width: 40%; + -webkit-flex-basis: 40%; + -moz-flex-basis: 40%; + flex-basis: 40%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-45, + .large-45 { + width: 45%; + -webkit-flex-basis: 45%; + -moz-flex-basis: 45%; + flex-basis: 45%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-50, + .large-50 { + width: 50%; + -webkit-flex-basis: 50%; + -moz-flex-basis: 50%; + flex-basis: 50%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-55, + .large-55 { + width: 55%; + -webkit-flex-basis: 55%; + -moz-flex-basis: 55%; + flex-basis: 55%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-60, + .large-60 { + width: 60%; + -webkit-flex-basis: 60%; + -moz-flex-basis: 60%; + flex-basis: 60%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-65, + .large-65 { + width: 65%; + -webkit-flex-basis: 65%; + -moz-flex-basis: 65%; + flex-basis: 65%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-66, + .large-66 { + width: 66,66666%; + -webkit-flex-basis: 66.66666%; + -moz-flex-basis: 66.66666%; + flex-basis: 66.66666%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-70, + .large-70 { + width: 70%; + -webkit-flex-basis: 70%; + -moz-flex-basis: 70%; + flex-basis: 70%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-75, + .large-75 { + width: 75%; + -webkit-flex-basis: 75%; + -moz-flex-basis: 75%; + flex-basis: 75%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-80, + .large-80 { + width: 80%; + -webkit-flex-basis: 80%; + -moz-flex-basis: 80%; + flex-basis: 80%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-85, + .large-85 { + width: 85%; + -webkit-flex-basis: 85%; + -moz-flex-basis: 85%; + flex-basis: 85%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-90, + .large-90 { + width: 90%; + -webkit-flex-basis: 90%; + -moz-flex-basis: 90%; + flex-basis: 90%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-95, + .large-95 { + width: 95%; + -webkit-flex-basis: 95%; + -moz-flex-basis: 95%; + flex-basis: 95%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-100, + .large-100 { + width: 100%; + -webkit-flex-basis: 100%; + -moz-flex-basis: 100%; + flex-basis: 100%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-auto, + .large-auto { + width: auto; + -webkit-flex-basis: auto; + flex-basis: auto; + -webkit-flex-grow: 1; + flex-grow: 1; + } + + .ink-flex, + .column-group { + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-flex-direction: row; + flex-direction: row; + list-style: none; + } + .ink-flex.large-reverse, .ink-flex.reverse, + .column-group.large-reverse, + .column-group.reverse { + -webkit-flex-direction: row-reverse; + -moz-flex-direction: row-reverse; + flex-direction: row-reverse; + } + .ink-flex.large-vertical, .ink-flex.vertical, + .column-group.large-vertical, + .column-group.vertical { + -webkit-flex-direction: column; + -moz-flex-direction: column; + flex-direction: column; + } + .ink-flex.large-vertical.large-reverse, .ink-flex.vertical.reverse, + .column-group.large-vertical.large-reverse, + .column-group.vertical.reverse { + -webkit-flex-direction: column-reverse; + -moz-flex-direction: column-reverse; + flex-direction: column-reverse; + } + + .large-order-1 { + order: 1; + } + + .large-order-2 { + order: 2; + } + + .large-order-3 { + order: 3; + } + + .large-order-4 { + order: 4; + } + + .large-order-5 { + order: 5; + } + + .large-order-6 { + order: 6; + } + + .large-order-7 { + order: 7; + } + + .large-order-8 { + order: 8; + } + + .large-order-9 { + order: 9; + } + + .large-order-10 { + order: 10; + } + + .column-group .large-auto { + -webkit-flex-basis: auto; + flex-basis: auto; + -webkit-flex-grow: 1; + flex-grow: 1; + } + + .push-top, + .large-push-top { + -webkit-box-align: start; + -webkit-align-items: flex-start; + -moz-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + -webkit-align-self: flex-start; + -ms-flex-item-align: start; + align-self: flex-start; + } + + .push-bottom, + .large-push-bottom { + -webkit-box-align: end; + -webkit-align-items: flex-end; + -moz-box-align: end; + -ms-flex-align: end; + align-items: flex-end; + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; + } + + .push-middle, + .large-push-middle { + -webkit-box-align: center; + -webkit-align-items: center; + -moz-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-align-self: flex-center; + -ms-flex-item-align: center; + align-self: center; + } + + .push-left, + .large-push-left { + -webkit-justify-content: flex-start; + -moz-justify-content: flex-start; + justify-content: flex-start; + float: left; + } + + .push-center, + .large-push-center { + float: none !important; + -webkit-justify-content: center; + -moz-justify-content: center; + justify-content: center; + margin-left: auto; + margin-right: auto; + } + + .push-right, + .large-push-right { + -webkit-justify-content: flex-end; + -moz-justify-content: flex-end; + justify-content: flex-end; + float: right; + } + + .large-align-left { + text-align: left; + } + + .large-align-center { + text-align: center; + } + + .large-align-right { + text-align: right; + } + + .space { + margin: 1.75em; + } + + .large-space { + margin: 1.75em; + } + + .padding { + padding: 1.75em; + } + + .large-padding { + padding: 1.75em; + } + + .double-space { + margin: 0.875em; + } + + .large-double-space { + margin: 0.875em; + } + + .double-padding { + padding: 0.875em; + } + + .large-double-padding { + padding: 0.875em; + } + + .half-space { + margin: 3.5em; + } + + .large-half-space { + margin: 3.5em; + } + + .half-padding { + padding: 3.5em; + } + + .large-half-padding { + padding: 3.5em; + } + + .quarter-space { + margin: 7em; + } + + .large-quarter-space { + margin: 7em; + } + + .quarter-padding { + padding: 7em; + } + + .large-quarter-padding { + padding: 7em; + } + + .vertical-space { + margin-top: 1.75em; + margin-bottom: 1.75em; + } + + .large-vertical-space { + margin-top: 1.75em; + margin-bottom: 1.75em; + } + + .vertical-padding { + padding-top: 1.75em; + padding-bottom: 1.75em; + } + + .large-vertical-padding { + padding-top: 1.75em; + padding-bottom: 1.75em; + } + + .double-vertical-space { + margin-top: 3.5em; + margin-bottom: 3.5em; + } + + .large-double-vertical-space { + margin-top: 3.5em; + margin-bottom: 3.5em; + } + + .double-vertical-padding { + padding-top: 3.5em; + padding-bottom: 3.5em; + } + + .large-double-vertical-padding { + padding-top: 3.5em; + padding-bottom: 3.5em; + } + + .half-vertical-space { + margin-top: 0.875em; + margin-bottom: 0.875em; + } + + .large-half-vertical-space { + margin-top: 0.875em; + margin-bottom: 0.875em; + } + + .half-vertical-padding { + padding-top: 0.875em; + padding-bottom: 0.875em; + } + + .large-half-vertical-padding { + padding-top: 0.875em; + padding-bottom: 0.875em; + } + + .quarter-vertical-space { + margin-top: 0.4375em; + margin-bottom: 0.4375em; + } + + .large-quarter-vertical-space { + margin-top: 0.4375em; + margin-bottom: 0.4375em; + } + + .quarter-vertical-padding { + padding-top: 0.4375em; + padding-bottom: 0.4375em; + } + + .large-quarter-vertical-padding { + padding-top: 0.4375em; + padding-bottom: 0.4375em; + } + + .horizontal-space { + margin-left: 1.75em; + margin-right: 1.75em; + } + + .large-horizontal-space { + margin-left: 1.75em; + margin-right: 1.75em; + } + + .horizontal-padding { + padding-left: 1.75em; + padding-right: 1.75em; + } + + .large-horizontal-padding { + padding-left: 1.75em; + padding-right: 1.75em; + } + + .double-horizontal-space { + margin-left: 3.5em; + margin-right: 3.5em; + } + + .large-double-horizontal-space { + margin-left: 3.5em; + margin-right: 3.5em; + } + + .double-horizontal-padding { + padding-left: 3.5em; + padding-right: 3.5em; + } + + .large-double-horizontal-padding { + padding-left: 3.5em; + padding-right: 3.5em; + } + + .half-horizontal-space { + margin-left: 0.875em; + margin-right: 0.875em; + } + + .large-half-horizontal-space { + margin-left: 0.875em; + margin-right: 0.875em; + } + + .half-horizontal-padding { + padding-left: 0.875em; + padding-right: 0.875em; + } + + .large-half-horizontal-padding { + padding-left: 0.875em; + padding-right: 0.875em; + } + + .quarter-horizontal-space { + margin-left: 0.4375em; + margin-right: 0.4375em; + } + + .large-quarter-horizontal-space { + margin-left: 0.4375em; + margin-right: 0.4375em; + } + + .quarter-horizontal-padding { + padding-left: 0.4375em; + padding-right: 0.4375em; + } + + .large-quarter-horizontal-padding { + padding-left: 0.4375em; + padding-right: 0.4375em; + } + + .top-space { + margin-top: 1.75em; + } + + .large-top-space { + margin-top: 1.75em; + } + + .top-padding { + padding-top: 1.75em; + } + + .large-top-padding { + padding-top: 1.75em; + } + + .double-top-space { + margin-top: 3.5em; + } + + .large-double-top-space { + margin-top: 3.5em; + } + + .double-top-padding { + padding-top: 3.5em; + } + + .large-double-top-padding { + padding-top: 3.5em; + } + + .half-top-space { + margin-top: 0.875em; + } + + .large-half-top-space { + margin-top: 0.875em; + } + + .half-top-padding { + padding-top: 0.875em; + } + + .large-half-top-padding { + padding-top: 0.875em; + } + + .quarter-top-space { + margin-top: 0.4375em; + } + + .large-quarter-top-space { + margin-top: 0.4375em; + } + + .quarter-top-padding { + padding-top: 0.4375em; + } + + .large-quarter-top-padding { + padding-top: 0.4375em; + } + + .right-space { + margin-right: 1.75em; + } + + .large-right-space { + margin-right: 1.75em; + } + + .right-padding { + padding-right: 1.75em; + } + + .large-right-padding { + padding-right: 1.75em; + } + + .double-right-space { + margin-right: 3.5em; + } + + .large-double-right-space { + margin-right: 3.5em; + } + + .double-right-padding { + padding-right: 3.5em; + } + + .large-double-right-padding { + padding-right: 3.5em; + } + + .half-right-space { + margin-right: 0.875em; + } + + .large-half-right-space { + margin-right: 0.875em; + } + + .half-right-padding { + padding-right: 0.875em; + } + + .large-half-right-padding { + padding-right: 0.875em; + } + + .quarter-right-space { + margin-right: 0.4375em; + } + + .large-quarter-right-space { + margin-right: 0.4375em; + } + + .quarter-right-padding { + padding-right: 0.4375em; + } + + .large-quarter-right-padding { + padding-right: 0.4375em; + } + + .bottom-space { + margin-bottom: 1.75em; + } + + .large-bottom-space { + margin-bottom: 1.75em; + } + + .bottom-padding { + padding-bottom: 1.75em; + } + + .large-bottom-padding { + padding-bottom: 1.75em; + } + + .double-bottom-space { + margin-bottom: 3.5em; + } + + .large-double-bottom-space { + margin-bottom: 3.5em; + } + + .double-bottom-padding { + padding-bottom: 3.5em; + } + + .large-double-bottom-padding { + padding-bottom: 3.5em; + } + + .half-bottom-space { + margin-bottom: 0.875em; + } + + .large-half-bottom-space { + margin-bottom: 0.875em; + } + + .half-bottom-padding { + padding-bottom: 0.875em; + } + + .large-half-bottom-padding { + padding-bottom: 0.875em; + } + + .quarter-bottom-space { + margin-bottom: 0.4375em; + } + + .large-quarter-bottom-space { + margin-bottom: 0.4375em; + } + + .quarter-bottom-padding { + padding-bottom: 0.4375em; + } + + .large-quarter-bottom-padding { + padding-bottom: 0.4375em; + } + + .left-space { + margin-left: 1.75em; + } + + .large-left-space { + margin-left: 1.75em; + } + + .left-padding { + padding-left: 1.75em; + } + + .large-left-padding { + padding-left: 1.75em; + } + + .double-left-space { + margin-left: 3.5em; + } + + .large-double-left-space { + margin-left: 3.5em; + } + + .double-left-padding { + padding-left: 3.5em; + } + + .large-double-left-padding { + padding-left: 3.5em; + } + + .half-left-space { + margin-left: 0.875em; + } + + .large-half-left-space { + margin-left: 0.875em; + } + + .half-left-padding { + padding-left: 0.875em; + } + + .large-half-left-padding { + padding-left: 0.875em; + } + + .quarter-left-space { + margin-left: 0.4375em; + } + + .large-quarter-left-space { + margin-left: 0.4375em; + } + + .quarter-left-padding { + padding-left: 0.4375em; + } + + .large-quarter-left-padding { + padding-left: 0.4375em; + } + + .hide-large { + display: none !important; + } + + .show-large { + display: inherit !important; + } + + table.show-large { + display: table; + } + + thead.show-large { + display: table-header-group; + } + + tbody.show-large { + display: table-row-group; + } + + tfoot.show-large { + display: table-footer-group; + } + + tr.show-large { + display: table-row; + } + + th.show-large, + td.show-large { + display: table-cell; + } +} +@media screen and (min-width: 641px) and (max-width: 960px) { + .ink-grid { + padding: 0 1.5em; + } + + .column-group.gutters { + margin-left: -1.5em; + } + .column-group.gutters > [class*=medium-], .column-group.gutters > [class*=all-], .column-group.gutters > .all-auto { + padding-left: 1.5em; + margin-bottom: 1.5em; + } + + .column-group.horizontal-gutters { + margin-left: -1.5em; + } + .column-group.horizontal-gutters > [class*=medium-], .column-group.horizontal-gutters > [class*=all-], .column-group.horizontal-gutters > .all-auto { + padding-left: 1.5em; + } + + .column-group.vertical-gutters > [class*=medium-], .column-group.vertical-gutters > [class*=all-], .column-group.vertical-gutters > .all-auto { + margin-bottom: 1.5em; + } + + .column-group.double-gutters { + margin-left: -3em; + } + .column-group.double-gutters > [class*=medium-], .column-group.double-gutters > [class*=all-], .column-group.double-gutters > .all-auto { + padding-left: 3em; + margin-bottom: 3em; + } + + .column-group.double-horizontal-gutters { + margin-left: -3em; + } + .column-group.double-horizontal-gutters > [class*=medium-], .column-group.double-horizontal-gutters > [class*=all-], .column-group.double-horizontal-gutters > .all-auto { + padding-left: 3em; + } + + .column-group.double-vertical-gutters > [class*=medium-], .column-group.double-vertical-gutters > [class*=all-], .column-group.double-vertical-gutters > .all-auto { + margin-bottom: 3em; + } + + .column-group.half-gutters { + margin-left: -0.75em; + } + .column-group.half-gutters > [class*=medium-], .column-group.half-gutters > [class*=all-], .column-group.half-gutters > .all-auto { + padding-left: 0.75em; + margin-bottom: 0.75em; + } + + .column-group.half-horizontal-gutters { + margin-left: -0.75em; + } + .column-group.half-horizontal-gutters > [class*=medium-], .column-group.half-horizontal-gutters > [class*=all-], .column-group.half-horizontal-gutters > .all-auto { + padding-left: 0.75em; + } + + .column-group.half-vertical-gutters > [class*=medium-], .column-group.half-vertical-gutters > [class*=all-], .column-group.half-vertical-gutters > .all-auto { + margin-bottom: 0.75em; + } + + .column-group.quarter-gutters { + margin-left: -0.375em; + } + .column-group.quarter-gutters > [class*=medium-], .column-group.quarter-gutters > [class*=all-], .column-group.quarter-gutters > .all-auto { + padding-left: 0.375em; + margin-bottom: 0.375em; + } + + .column-group.quarter-horizontal-gutters { + margin-left: -0.375em; + } + .column-group.quarter-horizontal-gutters > [class*=medium-], .column-group.quarter-horizontal-gutters > [class*=all-], .column-group.quarter-horizontal-gutters > .all-auto { + padding-left: 0.375em; + } + + .column-group.quarter-vertical-gutters > [class*=medium-], .column-group.quarter-vertical-gutters > [class*=all-], .column-group.quarter-vertical-gutters > .all-auto { + margin-bottom: 0.375em; + } + + .column-group.medium-gutters { + margin-left: -1.5em; + } + .column-group.medium-gutters > [class*=medium-], .column-group.medium-gutters > [class*=all-], .column-group.medium-gutters > .all-auto { + padding-left: 0.375em; + margin-bottom: 0.375em; + } + + .column-group.medium-horizontal-gutters { + margin-left: -1.5em; + } + .column-group.medium-horizontal-gutters > [class*=medium-], .column-group.medium-horizontal-gutters > [class*=all-], .column-group.medium-horizontal-gutters > .all-auto { + padding-left: 1.5em; + } + + .column-group.medium-vertical-gutters > [class*=medium-], .column-group.medium-vertical-gutters > [class*=all-], .column-group.medium-vertical-gutters > .all-auto { + margin-bottom: 1.5em; + } + + .column-group.medium-double-gutters { + margin-left: -3em; + } + .column-group.medium-double-gutters > [class*=medium-], .column-group.medium-double-gutters > [class*=all-], .column-group.medium-double-gutters > .all-auto { + padding-left: 3em; + margin-bottom: 3em; + } + + .column-group.medium-double-horizontal-gutters { + margin-left: -3em; + } + .column-group.medium-double-horizontal-gutters > [class*=medium-], .column-group.medium-double-horizontal-gutters > [class*=all-], .column-group.medium-double-horizontal-gutters > .all-auto { + padding-left: 3em; + } + + .column-group.medium-double-vertical-gutters > [class*=medium-], .column-group.medium-double-vertical-gutters > [class*=all-], .column-group.medium-double-vertical-gutters > .all-auto { + margin-bottom: 3em; + } + + .column-group.medium-half-gutters { + margin-left: -0.75em; + } + .column-group.medium-half-gutters > [class*=medium-], .column-group.medium-half-gutters > [class*=all-], .column-group.medium-half-gutters > .all-auto { + padding-left: 0.75em; + margin-bottom: 0.75em; + } + + .column-group.medium-half-horizontal-gutters { + margin-left: -0.75em; + } + .column-group.medium-half-horizontal-gutters > [class*=medium-], .column-group.medium-half-horizontal-gutters > [class*=all-], .column-group.medium-half-horizontal-gutters > .all-auto { + padding-left: 0.75em; + } + + .column-group.medium-half-vertical-gutters > [class*=medium-], .column-group.medium-half-vertical-gutters > [class*=all-], .column-group.medium-half-vertical-gutters > .all-auto { + margin-bottom: 0.75em; + } + + .column-group.medium-quarter-gutters { + margin-left: -0.375em; + } + .column-group.medium-quarter-gutters > [class*=medium-], .column-group.medium-quarter-gutters > [class*=all-], .column-group.medium-quarter-gutters > .all-auto { + padding-left: 0.375em; + margin-bottom: 0.375em; + } + + .column-group.medium-quarter-horizontal-gutters { + margin-left: -0.375em; + } + .column-group.medium-quarter-horizontal-gutters > [class*=medium-], .column-group.medium-quarter-horizontal-gutters > [class*=all-], .column-group.medium-quarter-horizontal-gutters > .all-auto { + padding-left: 0.375em; + } + + .column-group.medium-quarter-vertical-gutters > [class*=medium-], .column-group.medium-quarter-vertical-gutters > [class*=all-], .column-group.medium-quarter-vertical-gutters > .all-auto { + margin-bottom: 0.375em; + } + + .column-group.medium-no-gutters { + margin-left: 0; + } + .column-group.medium-no-gutters > [class*=medium-], .column-group.medium-no-gutters > [class*=all-], .column-group.medium-no-gutters > .all-auto { + padding-left: 0; + margin-bottom: 0; + } + + .all-5, + .medium-5 { + width: 5%; + -webkit-flex-basis: 5%; + -moz-flex-basis: 5%; + flex-basis: 5%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-10, + .medium-10 { + width: 10%; + -webkit-flex-basis: 10%; + -moz-flex-basis: 10%; + flex-basis: 10%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-15, + .medium-15 { + width: 15%; + -webkit-flex-basis: 15%; + -moz-flex-basis: 15%; + flex-basis: 15%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-20, + .medium-20 { + width: 20%; + -webkit-flex-basis: 20%; + -moz-flex-basis: 20%; + flex-basis: 20%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-25, + .medium-25 { + width: 25%; + -webkit-flex-basis: 25%; + -moz-flex-basis: 25%; + flex-basis: 25%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-30, + .medium-30 { + width: 30%; + -webkit-flex-basis: 30%; + -moz-flex-basis: 30%; + flex-basis: 30%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-33, + .medium-33 { + width: 33,33333%; + -webkit-flex-basis: 33.33333%; + -moz-flex-basis: 33.33333%; + flex-basis: 33.33333%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-35, + .medium-35 { + width: 35%; + -webkit-flex-basis: 35%; + -moz-flex-basis: 35%; + flex-basis: 35%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-40, + .medium-40 { + width: 40%; + -webkit-flex-basis: 40%; + -moz-flex-basis: 40%; + flex-basis: 40%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-45, + .medium-45 { + width: 45%; + -webkit-flex-basis: 45%; + -moz-flex-basis: 45%; + flex-basis: 45%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-50, + .medium-50 { + width: 50%; + -webkit-flex-basis: 50%; + -moz-flex-basis: 50%; + flex-basis: 50%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-55, + .medium-55 { + width: 55%; + -webkit-flex-basis: 55%; + -moz-flex-basis: 55%; + flex-basis: 55%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-60, + .medium-60 { + width: 60%; + -webkit-flex-basis: 60%; + -moz-flex-basis: 60%; + flex-basis: 60%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-65, + .medium-65 { + width: 65%; + -webkit-flex-basis: 65%; + -moz-flex-basis: 65%; + flex-basis: 65%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-66, + .medium-66 { + width: 66,66666%; + -webkit-flex-basis: 66.66666%; + -moz-flex-basis: 66.66666%; + flex-basis: 66.66666%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-70, + .medium-70 { + width: 70%; + -webkit-flex-basis: 70%; + -moz-flex-basis: 70%; + flex-basis: 70%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-75, + .medium-75 { + width: 75%; + -webkit-flex-basis: 75%; + -moz-flex-basis: 75%; + flex-basis: 75%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-80, + .medium-80 { + width: 80%; + -webkit-flex-basis: 80%; + -moz-flex-basis: 80%; + flex-basis: 80%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-85, + .medium-85 { + width: 85%; + -webkit-flex-basis: 85%; + -moz-flex-basis: 85%; + flex-basis: 85%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-90, + .medium-90 { + width: 90%; + -webkit-flex-basis: 90%; + -moz-flex-basis: 90%; + flex-basis: 90%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-95, + .medium-95 { + width: 95%; + -webkit-flex-basis: 95%; + -moz-flex-basis: 95%; + flex-basis: 95%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-100, + .medium-100 { + width: 100%; + -webkit-flex-basis: 100%; + -moz-flex-basis: 100%; + flex-basis: 100%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-auto, + .medium-auto { + width: auto; + -webkit-flex-basis: auto; + flex-basis: auto; + -webkit-flex-grow: 1; + flex-grow: 1; + } + + .ink-flex, + .column-group { + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-flex-direction: row; + flex-direction: row; + list-style: none; + } + .ink-flex.medium-reverse, .ink-flex.reverse, + .column-group.medium-reverse, + .column-group.reverse { + -webkit-flex-direction: row-reverse; + -moz-flex-direction: row-reverse; + flex-direction: row-reverse; + } + .ink-flex.medium-vertical, .ink-flex.vertical, + .column-group.medium-vertical, + .column-group.vertical { + -webkit-flex-direction: column; + -moz-flex-direction: column; + flex-direction: column; + } + .ink-flex.medium-vertical.medium-reverse, .ink-flex.vertical.reverse, + .column-group.medium-vertical.medium-reverse, + .column-group.vertical.reverse { + -webkit-flex-direction: column-reverse; + -moz-flex-direction: column-reverse; + flex-direction: column-reverse; + } + + .medium-order-1 { + order: 1; + } + + .medium-order-2 { + order: 2; + } + + .medium-order-3 { + order: 3; + } + + .medium-order-4 { + order: 4; + } + + .medium-order-5 { + order: 5; + } + + .medium-order-6 { + order: 6; + } + + .medium-order-7 { + order: 7; + } + + .medium-order-8 { + order: 8; + } + + .medium-order-9 { + order: 9; + } + + .medium-order-10 { + order: 10; + } + + .column-group .medium-auto { + -webkit-flex-basis: auto; + flex-basis: auto; + -webkit-flex-grow: 1; + flex-grow: 1; + } + + .push-top, + .medium-push-top { + -webkit-box-align: start; + -webkit-align-items: flex-start; + -moz-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + -webkit-align-self: flex-start; + -ms-flex-item-align: start; + align-self: flex-start; + } + + .push-bottom, + .medium-push-bottom { + -webkit-box-align: end; + -webkit-align-items: flex-end; + -moz-box-align: end; + -ms-flex-align: end; + align-items: flex-end; + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; + } + + .push-middle, + .medium-push-middle { + -webkit-box-align: center; + -webkit-align-items: center; + -moz-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-align-self: flex-center; + -ms-flex-item-align: center; + align-self: center; + } + + .push-left, + .medium-push-left { + -webkit-justify-content: flex-start; + -moz-justify-content: flex-start; + justify-content: flex-start; + float: left; + } + + .push-center, + .medium-push-center { + float: none !important; + -webkit-justify-content: center; + -moz-justify-content: center; + justify-content: center; + margin-left: auto; + margin-right: auto; + } + + .push-right, + .medium-push-right { + -webkit-justify-content: flex-end; + -moz-justify-content: flex-end; + justify-content: flex-end; + float: right; + } + + .medium-align-left { + text-align: left; + } + + .medium-align-center { + text-align: center; + } + + .medium-align-right { + text-align: right; + } + + .space { + margin: 1.5em; + } + + .medium-space { + margin: 1.5em; + } + + .padding { + padding: 1.5em; + } + + .medium-padding { + padding: 1.5em; + } + + .double-space { + margin: 0.75em; + } + + .medium-double-space { + margin: 0.75em; + } + + .double-padding { + padding: 0.75em; + } + + .medium-double-padding { + padding: 0.75em; + } + + .half-space { + margin: 3em; + } + + .medium-half-space { + margin: 3em; + } + + .half-padding { + padding: 3em; + } + + .medium-half-padding { + padding: 3em; + } + + .quarter-space { + margin: 6em; + } + + .medium-quarter-space { + margin: 6em; + } + + .quarter-padding { + padding: 6em; + } + + .medium-quarter-padding { + padding: 6em; + } + + .vertical-space { + margin-top: 1.5em; + margin-bottom: 1.5em; + } + + .medium-vertical-space { + margin-top: 1.5em; + margin-bottom: 1.5em; + } + + .vertical-padding { + padding-top: 1.5em; + padding-bottom: 1.5em; + } + + .medium-vertical-padding { + padding-top: 1.5em; + padding-bottom: 1.5em; + } + + .double-vertical-space { + margin-top: 3em; + margin-bottom: 3em; + } + + .medium-double-vertical-space { + margin-top: 3em; + margin-bottom: 3em; + } + + .double-vertical-padding { + padding-top: 3em; + padding-bottom: 3em; + } + + .medium-double-vertical-padding { + padding-top: 3em; + padding-bottom: 3em; + } + + .half-vertical-space { + margin-top: 0.75em; + margin-bottom: 0.75em; + } + + .medium-half-vertical-space { + margin-top: 0.75em; + margin-bottom: 0.75em; + } + + .half-vertical-padding { + padding-top: 0.75em; + padding-bottom: 0.75em; + } + + .medium-half-vertical-padding { + padding-top: 0.75em; + padding-bottom: 0.75em; + } + + .quarter-vertical-space { + margin-top: 0.375em; + margin-bottom: 0.375em; + } + + .medium-quarter-vertical-space { + margin-top: 0.375em; + margin-bottom: 0.375em; + } + + .quarter-vertical-padding { + padding-top: 0.375em; + padding-bottom: 0.375em; + } + + .medium-quarter-vertical-padding { + padding-top: 0.375em; + padding-bottom: 0.375em; + } + + .horizontal-space { + margin-left: 1.5em; + margin-right: 1.5em; + } + + .medium-horizontal-space { + margin-left: 1.5em; + margin-right: 1.5em; + } + + .horizontal-padding { + padding-left: 1.5em; + padding-right: 1.5em; + } + + .medium-horizontal-padding { + padding-left: 1.5em; + padding-right: 1.5em; + } + + .double-horizontal-space { + margin-left: 3em; + margin-right: 3em; + } + + .medium-double-horizontal-space { + margin-left: 3em; + margin-right: 3em; + } + + .double-horizontal-padding { + padding-left: 3em; + padding-right: 3em; + } + + .medium-double-horizontal-padding { + padding-left: 3em; + padding-right: 3em; + } + + .half-horizontal-space { + margin-left: 0.75em; + margin-right: 0.75em; + } + + .medium-half-horizontal-space { + margin-left: 0.75em; + margin-right: 0.75em; + } + + .half-horizontal-padding { + padding-left: 0.75em; + padding-right: 0.75em; + } + + .medium-half-horizontal-padding { + padding-left: 0.75em; + padding-right: 0.75em; + } + + .quarter-horizontal-space { + margin-left: 0.375em; + margin-right: 0.375em; + } + + .medium-quarter-horizontal-space { + margin-left: 0.375em; + margin-right: 0.375em; + } + + .quarter-horizontal-padding { + padding-left: 0.375em; + padding-right: 0.375em; + } + + .medium-quarter-horizontal-padding { + padding-left: 0.375em; + padding-right: 0.375em; + } + + .top-space { + margin-top: 1.5em; + } + + .medium-top-space { + margin-top: 1.5em; + } + + .top-padding { + padding-top: 1.5em; + } + + .medium-top-padding { + padding-top: 1.5em; + } + + .double-top-space { + margin-top: 3em; + } + + .medium-double-top-space { + margin-top: 3em; + } + + .double-top-padding { + padding-top: 3em; + } + + .medium-double-top-padding { + padding-top: 3em; + } + + .half-top-space { + margin-top: 0.75em; + } + + .medium-half-top-space { + margin-top: 0.75em; + } + + .half-top-padding { + padding-top: 0.75em; + } + + .medium-half-top-padding { + padding-top: 0.75em; + } + + .quarter-top-space { + margin-top: 0.375em; + } + + .medium-quarter-top-space { + margin-top: 0.375em; + } + + .quarter-top-padding { + padding-top: 0.375em; + } + + .medium-quarter-top-padding { + padding-top: 0.375em; + } + + .right-space { + margin-right: 1.5em; + } + + .medium-right-space { + margin-right: 1.5em; + } + + .right-padding { + padding-right: 1.5em; + } + + .medium-right-padding { + padding-right: 1.5em; + } + + .double-right-space { + margin-right: 3em; + } + + .medium-double-right-space { + margin-right: 3em; + } + + .double-right-padding { + padding-right: 3em; + } + + .medium-double-right-padding { + padding-right: 3em; + } + + .half-right-space { + margin-right: 0.75em; + } + + .medium-half-right-space { + margin-right: 0.75em; + } + + .half-right-padding { + padding-right: 0.75em; + } + + .medium-half-right-padding { + padding-right: 0.75em; + } + + .quarter-right-space { + margin-right: 0.375em; + } + + .medium-quarter-right-space { + margin-right: 0.375em; + } + + .quarter-right-padding { + padding-right: 0.375em; + } + + .medium-quarter-right-padding { + padding-right: 0.375em; + } + + .bottom-space { + margin-bottom: 1.5em; + } + + .medium-bottom-space { + margin-bottom: 1.5em; + } + + .bottom-padding { + padding-bottom: 1.5em; + } + + .medium-bottom-padding { + padding-bottom: 1.5em; + } + + .double-bottom-space { + margin-bottom: 3em; + } + + .medium-double-bottom-space { + margin-bottom: 3em; + } + + .double-bottom-padding { + padding-bottom: 3em; + } + + .medium-double-bottom-padding { + padding-bottom: 3em; + } + + .half-bottom-space { + margin-bottom: 0.75em; + } + + .medium-half-bottom-space { + margin-bottom: 0.75em; + } + + .half-bottom-padding { + padding-bottom: 0.75em; + } + + .medium-half-bottom-padding { + padding-bottom: 0.75em; + } + + .quarter-bottom-space { + margin-bottom: 0.375em; + } + + .medium-quarter-bottom-space { + margin-bottom: 0.375em; + } + + .quarter-bottom-padding { + padding-bottom: 0.375em; + } + + .medium-quarter-bottom-padding { + padding-bottom: 0.375em; + } + + .left-space { + margin-left: 1.5em; + } + + .medium-left-space { + margin-left: 1.5em; + } + + .left-padding { + padding-left: 1.5em; + } + + .medium-left-padding { + padding-left: 1.5em; + } + + .double-left-space { + margin-left: 3em; + } + + .medium-double-left-space { + margin-left: 3em; + } + + .double-left-padding { + padding-left: 3em; + } + + .medium-double-left-padding { + padding-left: 3em; + } + + .half-left-space { + margin-left: 0.75em; + } + + .medium-half-left-space { + margin-left: 0.75em; + } + + .half-left-padding { + padding-left: 0.75em; + } + + .medium-half-left-padding { + padding-left: 0.75em; + } + + .quarter-left-space { + margin-left: 0.375em; + } + + .medium-quarter-left-space { + margin-left: 0.375em; + } + + .quarter-left-padding { + padding-left: 0.375em; + } + + .medium-quarter-left-padding { + padding-left: 0.375em; + } + + .hide-medium { + display: none !important; + } + + .show-medium { + display: inherit !important; + } + + table.show-medium { + display: table; + } + + thead.show-medium { + display: table-header-group; + } + + tbody.show-medium { + display: table-row-group; + } + + tfoot.show-medium { + display: table-footer-group; + } + + tr.show-medium { + display: table-row; + } + + th.show-medium, + td.show-medium { + display: table-cell; + } +} +@media screen and (min-width: 321px) and (max-width: 640px) { + .ink-grid { + padding: 0 1.25em; + } + + .column-group.gutters { + margin-left: -1.25em; + } + .column-group.gutters > [class*=small-], .column-group.gutters > [class*=all-], .column-group.gutters > .all-auto { + padding-left: 1.25em; + margin-bottom: 1.25em; + } + + .column-group.horizontal-gutters { + margin-left: -1.25em; + } + .column-group.horizontal-gutters > [class*=small-], .column-group.horizontal-gutters > [class*=all-], .column-group.horizontal-gutters > .all-auto { + padding-left: 1.25em; + } + + .column-group.vertical-gutters > [class*=small-], .column-group.vertical-gutters > [class*=all-], .column-group.vertical-gutters > .all-auto { + margin-bottom: 1.25em; + } + + .column-group.double-gutters { + margin-left: -2.5em; + } + .column-group.double-gutters > [class*=small-], .column-group.double-gutters > [class*=all-], .column-group.double-gutters > .all-auto { + padding-left: 2.5em; + margin-bottom: 2.5em; + } + + .column-group.double-horizontal-gutters { + margin-left: -2.5em; + } + .column-group.double-horizontal-gutters > [class*=small-], .column-group.double-horizontal-gutters > [class*=all-], .column-group.double-horizontal-gutters > .all-auto { + padding-left: 2.5em; + } + + .column-group.double-vertical-gutters > [class*=small-], .column-group.double-vertical-gutters > [class*=all-], .column-group.double-vertical-gutters > .all-auto { + margin-bottom: 2.5em; + } + + .column-group.half-gutters { + margin-left: -0.625em; + } + .column-group.half-gutters > [class*=small-], .column-group.half-gutters > [class*=all-], .column-group.half-gutters > .all-auto { + padding-left: 0.625em; + margin-bottom: 0.625em; + } + + .column-group.half-horizontal-gutters { + margin-left: -0.625em; + } + .column-group.half-horizontal-gutters > [class*=small-], .column-group.half-horizontal-gutters > [class*=all-], .column-group.half-horizontal-gutters > .all-auto { + padding-left: 0.625em; + } + + .column-group.half-vertical-gutters > [class*=small-], .column-group.half-vertical-gutters > [class*=all-], .column-group.half-vertical-gutters > .all-auto { + margin-bottom: 0.625em; + } + + .column-group.quarter-gutters { + margin-left: -0.3125em; + } + .column-group.quarter-gutters > [class*=small-], .column-group.quarter-gutters > [class*=all-], .column-group.quarter-gutters > .all-auto { + padding-left: 0.3125em; + margin-bottom: 0.3125em; + } + + .column-group.quarter-horizontal-gutters { + margin-left: -0.3125em; + } + .column-group.quarter-horizontal-gutters > [class*=small-], .column-group.quarter-horizontal-gutters > [class*=all-], .column-group.quarter-horizontal-gutters > .all-auto { + padding-left: 0.3125em; + } + + .column-group.quarter-vertical-gutters > [class*=small-], .column-group.quarter-vertical-gutters > [class*=all-], .column-group.quarter-vertical-gutters > .all-auto { + margin-bottom: 0.3125em; + } + + .column-group.small-gutters { + margin-left: -1.25em; + } + .column-group.small-gutters > [class*=small-], .column-group.small-gutters > [class*=all-], .column-group.small-gutters > .all-auto { + padding-left: 0.3125em; + margin-bottom: 0.3125em; + } + + .column-group.small-horizontal-gutters { + margin-left: -1.25em; + } + .column-group.small-horizontal-gutters > [class*=small-], .column-group.small-horizontal-gutters > [class*=all-], .column-group.small-horizontal-gutters > .all-auto { + padding-left: 1.25em; + } + + .column-group.small-vertical-gutters > [class*=small-], .column-group.small-vertical-gutters > [class*=all-], .column-group.small-vertical-gutters > .all-auto { + margin-bottom: 1.25em; + } + + .column-group.small-double-gutters { + margin-left: -2.5em; + } + .column-group.small-double-gutters > [class*=small-], .column-group.small-double-gutters > [class*=all-], .column-group.small-double-gutters > .all-auto { + padding-left: 2.5em; + margin-bottom: 2.5em; + } + + .column-group.small-double-horizontal-gutters { + margin-left: -2.5em; + } + .column-group.small-double-horizontal-gutters > [class*=small-], .column-group.small-double-horizontal-gutters > [class*=all-], .column-group.small-double-horizontal-gutters > .all-auto { + padding-left: 2.5em; + } + + .column-group.small-double-vertical-gutters > [class*=small-], .column-group.small-double-vertical-gutters > [class*=all-], .column-group.small-double-vertical-gutters > .all-auto { + margin-bottom: 2.5em; + } + + .column-group.small-half-gutters { + margin-left: -0.625em; + } + .column-group.small-half-gutters > [class*=small-], .column-group.small-half-gutters > [class*=all-], .column-group.small-half-gutters > .all-auto { + padding-left: 0.625em; + margin-bottom: 0.625em; + } + + .column-group.small-half-horizontal-gutters { + margin-left: -0.625em; + } + .column-group.small-half-horizontal-gutters > [class*=small-], .column-group.small-half-horizontal-gutters > [class*=all-], .column-group.small-half-horizontal-gutters > .all-auto { + padding-left: 0.625em; + } + + .column-group.small-half-vertical-gutters > [class*=small-], .column-group.small-half-vertical-gutters > [class*=all-], .column-group.small-half-vertical-gutters > .all-auto { + margin-bottom: 0.625em; + } + + .column-group.small-quarter-gutters { + margin-left: -0.3125em; + } + .column-group.small-quarter-gutters > [class*=small-], .column-group.small-quarter-gutters > [class*=all-], .column-group.small-quarter-gutters > .all-auto { + padding-left: 0.3125em; + margin-bottom: 0.3125em; + } + + .column-group.small-quarter-horizontal-gutters { + margin-left: -0.3125em; + } + .column-group.small-quarter-horizontal-gutters > [class*=small-], .column-group.small-quarter-horizontal-gutters > [class*=all-], .column-group.small-quarter-horizontal-gutters > .all-auto { + padding-left: 0.3125em; + } + + .column-group.small-quarter-vertical-gutters > [class*=small-], .column-group.small-quarter-vertical-gutters > [class*=all-], .column-group.small-quarter-vertical-gutters > .all-auto { + margin-bottom: 0.3125em; + } + + .column-group.small-no-gutters { + margin-left: 0; + } + .column-group.small-no-gutters > [class*=small-], .column-group.small-no-gutters > [class*=all-], .column-group.small-no-gutters > .all-auto { + padding-left: 0; + margin-bottom: 0; + } + + .all-5, + .small-5 { + width: 5%; + -webkit-flex-basis: 5%; + -moz-flex-basis: 5%; + flex-basis: 5%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-10, + .small-10 { + width: 10%; + -webkit-flex-basis: 10%; + -moz-flex-basis: 10%; + flex-basis: 10%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-15, + .small-15 { + width: 15%; + -webkit-flex-basis: 15%; + -moz-flex-basis: 15%; + flex-basis: 15%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-20, + .small-20 { + width: 20%; + -webkit-flex-basis: 20%; + -moz-flex-basis: 20%; + flex-basis: 20%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-25, + .small-25 { + width: 25%; + -webkit-flex-basis: 25%; + -moz-flex-basis: 25%; + flex-basis: 25%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-30, + .small-30 { + width: 30%; + -webkit-flex-basis: 30%; + -moz-flex-basis: 30%; + flex-basis: 30%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-33, + .small-33 { + width: 33,33333%; + -webkit-flex-basis: 33.33333%; + -moz-flex-basis: 33.33333%; + flex-basis: 33.33333%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-35, + .small-35 { + width: 35%; + -webkit-flex-basis: 35%; + -moz-flex-basis: 35%; + flex-basis: 35%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-40, + .small-40 { + width: 40%; + -webkit-flex-basis: 40%; + -moz-flex-basis: 40%; + flex-basis: 40%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-45, + .small-45 { + width: 45%; + -webkit-flex-basis: 45%; + -moz-flex-basis: 45%; + flex-basis: 45%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-50, + .small-50 { + width: 50%; + -webkit-flex-basis: 50%; + -moz-flex-basis: 50%; + flex-basis: 50%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-55, + .small-55 { + width: 55%; + -webkit-flex-basis: 55%; + -moz-flex-basis: 55%; + flex-basis: 55%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-60, + .small-60 { + width: 60%; + -webkit-flex-basis: 60%; + -moz-flex-basis: 60%; + flex-basis: 60%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-65, + .small-65 { + width: 65%; + -webkit-flex-basis: 65%; + -moz-flex-basis: 65%; + flex-basis: 65%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-66, + .small-66 { + width: 66,66666%; + -webkit-flex-basis: 66.66666%; + -moz-flex-basis: 66.66666%; + flex-basis: 66.66666%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-70, + .small-70 { + width: 70%; + -webkit-flex-basis: 70%; + -moz-flex-basis: 70%; + flex-basis: 70%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-75, + .small-75 { + width: 75%; + -webkit-flex-basis: 75%; + -moz-flex-basis: 75%; + flex-basis: 75%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-80, + .small-80 { + width: 80%; + -webkit-flex-basis: 80%; + -moz-flex-basis: 80%; + flex-basis: 80%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-85, + .small-85 { + width: 85%; + -webkit-flex-basis: 85%; + -moz-flex-basis: 85%; + flex-basis: 85%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-90, + .small-90 { + width: 90%; + -webkit-flex-basis: 90%; + -moz-flex-basis: 90%; + flex-basis: 90%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-95, + .small-95 { + width: 95%; + -webkit-flex-basis: 95%; + -moz-flex-basis: 95%; + flex-basis: 95%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-100, + .small-100 { + width: 100%; + -webkit-flex-basis: 100%; + -moz-flex-basis: 100%; + flex-basis: 100%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-auto, + .small-auto { + width: auto; + -webkit-flex-basis: auto; + flex-basis: auto; + -webkit-flex-grow: 1; + flex-grow: 1; + } + + .ink-flex, + .column-group { + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-flex-direction: row; + flex-direction: row; + list-style: none; + } + .ink-flex.small-reverse, .ink-flex.reverse, + .column-group.small-reverse, + .column-group.reverse { + -webkit-flex-direction: row-reverse; + -moz-flex-direction: row-reverse; + flex-direction: row-reverse; + } + .ink-flex.small-vertical, .ink-flex.vertical, + .column-group.small-vertical, + .column-group.vertical { + -webkit-flex-direction: column; + -moz-flex-direction: column; + flex-direction: column; + } + .ink-flex.small-vertical.small-reverse, .ink-flex.vertical.reverse, + .column-group.small-vertical.small-reverse, + .column-group.vertical.reverse { + -webkit-flex-direction: column-reverse; + -moz-flex-direction: column-reverse; + flex-direction: column-reverse; + } + + .small-order-1 { + order: 1; + } + + .small-order-2 { + order: 2; + } + + .small-order-3 { + order: 3; + } + + .small-order-4 { + order: 4; + } + + .small-order-5 { + order: 5; + } + + .small-order-6 { + order: 6; + } + + .small-order-7 { + order: 7; + } + + .small-order-8 { + order: 8; + } + + .small-order-9 { + order: 9; + } + + .small-order-10 { + order: 10; + } + + .column-group .small-auto { + -webkit-flex-basis: auto; + flex-basis: auto; + -webkit-flex-grow: 1; + flex-grow: 1; + } + + .push-top, + .small-push-top { + -webkit-box-align: start; + -webkit-align-items: flex-start; + -moz-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + -webkit-align-self: flex-start; + -ms-flex-item-align: start; + align-self: flex-start; + } + + .push-bottom, + .small-push-bottom { + -webkit-box-align: end; + -webkit-align-items: flex-end; + -moz-box-align: end; + -ms-flex-align: end; + align-items: flex-end; + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; + } + + .push-middle, + .small-push-middle { + -webkit-box-align: center; + -webkit-align-items: center; + -moz-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-align-self: flex-center; + -ms-flex-item-align: center; + align-self: center; + } + + .push-left, + .small-push-left { + -webkit-justify-content: flex-start; + -moz-justify-content: flex-start; + justify-content: flex-start; + float: left; + } + + .push-center, + .small-push-center { + float: none !important; + -webkit-justify-content: center; + -moz-justify-content: center; + justify-content: center; + margin-left: auto; + margin-right: auto; + } + + .push-right, + .small-push-right { + -webkit-justify-content: flex-end; + -moz-justify-content: flex-end; + justify-content: flex-end; + float: right; + } + + .small-align-left { + text-align: left; + } + + .small-align-center { + text-align: center; + } + + .small-align-right { + text-align: right; + } + + .space { + margin: 1.25em; + } + + .small-space { + margin: 1.25em; + } + + .padding { + padding: 1.25em; + } + + .small-padding { + padding: 1.25em; + } + + .double-space { + margin: 0.625em; + } + + .small-double-space { + margin: 0.625em; + } + + .double-padding { + padding: 0.625em; + } + + .small-double-padding { + padding: 0.625em; + } + + .half-space { + margin: 2.5em; + } + + .small-half-space { + margin: 2.5em; + } + + .half-padding { + padding: 2.5em; + } + + .small-half-padding { + padding: 2.5em; + } + + .quarter-space { + margin: 5em; + } + + .small-quarter-space { + margin: 5em; + } + + .quarter-padding { + padding: 5em; + } + + .small-quarter-padding { + padding: 5em; + } + + .vertical-space { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + + .small-vertical-space { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + + .vertical-padding { + padding-top: 1.25em; + padding-bottom: 1.25em; + } + + .small-vertical-padding { + padding-top: 1.25em; + padding-bottom: 1.25em; + } + + .double-vertical-space { + margin-top: 2.5em; + margin-bottom: 2.5em; + } + + .small-double-vertical-space { + margin-top: 2.5em; + margin-bottom: 2.5em; + } + + .double-vertical-padding { + padding-top: 2.5em; + padding-bottom: 2.5em; + } + + .small-double-vertical-padding { + padding-top: 2.5em; + padding-bottom: 2.5em; + } + + .half-vertical-space { + margin-top: 0.625em; + margin-bottom: 0.625em; + } + + .small-half-vertical-space { + margin-top: 0.625em; + margin-bottom: 0.625em; + } + + .half-vertical-padding { + padding-top: 0.625em; + padding-bottom: 0.625em; + } + + .small-half-vertical-padding { + padding-top: 0.625em; + padding-bottom: 0.625em; + } + + .quarter-vertical-space { + margin-top: 0.3125em; + margin-bottom: 0.3125em; + } + + .small-quarter-vertical-space { + margin-top: 0.3125em; + margin-bottom: 0.3125em; + } + + .quarter-vertical-padding { + padding-top: 0.3125em; + padding-bottom: 0.3125em; + } + + .small-quarter-vertical-padding { + padding-top: 0.3125em; + padding-bottom: 0.3125em; + } + + .horizontal-space { + margin-left: 1.25em; + margin-right: 1.25em; + } + + .small-horizontal-space { + margin-left: 1.25em; + margin-right: 1.25em; + } + + .horizontal-padding { + padding-left: 1.25em; + padding-right: 1.25em; + } + + .small-horizontal-padding { + padding-left: 1.25em; + padding-right: 1.25em; + } + + .double-horizontal-space { + margin-left: 2.5em; + margin-right: 2.5em; + } + + .small-double-horizontal-space { + margin-left: 2.5em; + margin-right: 2.5em; + } + + .double-horizontal-padding { + padding-left: 2.5em; + padding-right: 2.5em; + } + + .small-double-horizontal-padding { + padding-left: 2.5em; + padding-right: 2.5em; + } + + .half-horizontal-space { + margin-left: 0.625em; + margin-right: 0.625em; + } + + .small-half-horizontal-space { + margin-left: 0.625em; + margin-right: 0.625em; + } + + .half-horizontal-padding { + padding-left: 0.625em; + padding-right: 0.625em; + } + + .small-half-horizontal-padding { + padding-left: 0.625em; + padding-right: 0.625em; + } + + .quarter-horizontal-space { + margin-left: 0.3125em; + margin-right: 0.3125em; + } + + .small-quarter-horizontal-space { + margin-left: 0.3125em; + margin-right: 0.3125em; + } + + .quarter-horizontal-padding { + padding-left: 0.3125em; + padding-right: 0.3125em; + } + + .small-quarter-horizontal-padding { + padding-left: 0.3125em; + padding-right: 0.3125em; + } + + .top-space { + margin-top: 1.25em; + } + + .small-top-space { + margin-top: 1.25em; + } + + .top-padding { + padding-top: 1.25em; + } + + .small-top-padding { + padding-top: 1.25em; + } + + .double-top-space { + margin-top: 2.5em; + } + + .small-double-top-space { + margin-top: 2.5em; + } + + .double-top-padding { + padding-top: 2.5em; + } + + .small-double-top-padding { + padding-top: 2.5em; + } + + .half-top-space { + margin-top: 0.625em; + } + + .small-half-top-space { + margin-top: 0.625em; + } + + .half-top-padding { + padding-top: 0.625em; + } + + .small-half-top-padding { + padding-top: 0.625em; + } + + .quarter-top-space { + margin-top: 0.3125em; + } + + .small-quarter-top-space { + margin-top: 0.3125em; + } + + .quarter-top-padding { + padding-top: 0.3125em; + } + + .small-quarter-top-padding { + padding-top: 0.3125em; + } + + .right-space { + margin-right: 1.25em; + } + + .small-right-space { + margin-right: 1.25em; + } + + .right-padding { + padding-right: 1.25em; + } + + .small-right-padding { + padding-right: 1.25em; + } + + .double-right-space { + margin-right: 2.5em; + } + + .small-double-right-space { + margin-right: 2.5em; + } + + .double-right-padding { + padding-right: 2.5em; + } + + .small-double-right-padding { + padding-right: 2.5em; + } + + .half-right-space { + margin-right: 0.625em; + } + + .small-half-right-space { + margin-right: 0.625em; + } + + .half-right-padding { + padding-right: 0.625em; + } + + .small-half-right-padding { + padding-right: 0.625em; + } + + .quarter-right-space { + margin-right: 0.3125em; + } + + .small-quarter-right-space { + margin-right: 0.3125em; + } + + .quarter-right-padding { + padding-right: 0.3125em; + } + + .small-quarter-right-padding { + padding-right: 0.3125em; + } + + .bottom-space { + margin-bottom: 1.25em; + } + + .small-bottom-space { + margin-bottom: 1.25em; + } + + .bottom-padding { + padding-bottom: 1.25em; + } + + .small-bottom-padding { + padding-bottom: 1.25em; + } + + .double-bottom-space { + margin-bottom: 2.5em; + } + + .small-double-bottom-space { + margin-bottom: 2.5em; + } + + .double-bottom-padding { + padding-bottom: 2.5em; + } + + .small-double-bottom-padding { + padding-bottom: 2.5em; + } + + .half-bottom-space { + margin-bottom: 0.625em; + } + + .small-half-bottom-space { + margin-bottom: 0.625em; + } + + .half-bottom-padding { + padding-bottom: 0.625em; + } + + .small-half-bottom-padding { + padding-bottom: 0.625em; + } + + .quarter-bottom-space { + margin-bottom: 0.3125em; + } + + .small-quarter-bottom-space { + margin-bottom: 0.3125em; + } + + .quarter-bottom-padding { + padding-bottom: 0.3125em; + } + + .small-quarter-bottom-padding { + padding-bottom: 0.3125em; + } + + .left-space { + margin-left: 1.25em; + } + + .small-left-space { + margin-left: 1.25em; + } + + .left-padding { + padding-left: 1.25em; + } + + .small-left-padding { + padding-left: 1.25em; + } + + .double-left-space { + margin-left: 2.5em; + } + + .small-double-left-space { + margin-left: 2.5em; + } + + .double-left-padding { + padding-left: 2.5em; + } + + .small-double-left-padding { + padding-left: 2.5em; + } + + .half-left-space { + margin-left: 0.625em; + } + + .small-half-left-space { + margin-left: 0.625em; + } + + .half-left-padding { + padding-left: 0.625em; + } + + .small-half-left-padding { + padding-left: 0.625em; + } + + .quarter-left-space { + margin-left: 0.3125em; + } + + .small-quarter-left-space { + margin-left: 0.3125em; + } + + .quarter-left-padding { + padding-left: 0.3125em; + } + + .small-quarter-left-padding { + padding-left: 0.3125em; + } + + .hide-small { + display: none !important; + } + + .show-small { + display: inherit !important; + } + + table.show-small { + display: table; + } + + thead.show-small { + display: table-header-group; + } + + tbody.show-small { + display: table-row-group; + } + + tfoot.show-small { + display: table-footer-group; + } + + tr.show-small { + display: table-row; + } + + th.show-small, + td.show-small { + display: table-cell; + } +} +@media screen and (max-width: 320px) { + .ink-grid { + padding: 0 1em; + } + + .column-group.gutters { + margin-left: -1em; + } + .column-group.gutters > [class*=tiny-], .column-group.gutters > [class*=all-], .column-group.gutters > .all-auto { + padding-left: 1em; + margin-bottom: 1em; + } + + .column-group.horizontal-gutters { + margin-left: -1em; + } + .column-group.horizontal-gutters > [class*=tiny-], .column-group.horizontal-gutters > [class*=all-], .column-group.horizontal-gutters > .all-auto { + padding-left: 1em; + } + + .column-group.vertical-gutters > [class*=tiny-], .column-group.vertical-gutters > [class*=all-], .column-group.vertical-gutters > .all-auto { + margin-bottom: 1em; + } + + .column-group.double-gutters { + margin-left: -2em; + } + .column-group.double-gutters > [class*=tiny-], .column-group.double-gutters > [class*=all-], .column-group.double-gutters > .all-auto { + padding-left: 2em; + margin-bottom: 2em; + } + + .column-group.double-horizontal-gutters { + margin-left: -2em; + } + .column-group.double-horizontal-gutters > [class*=tiny-], .column-group.double-horizontal-gutters > [class*=all-], .column-group.double-horizontal-gutters > .all-auto { + padding-left: 2em; + } + + .column-group.double-vertical-gutters > [class*=tiny-], .column-group.double-vertical-gutters > [class*=all-], .column-group.double-vertical-gutters > .all-auto { + margin-bottom: 2em; + } + + .column-group.half-gutters { + margin-left: -0.5em; + } + .column-group.half-gutters > [class*=tiny-], .column-group.half-gutters > [class*=all-], .column-group.half-gutters > .all-auto { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + + .column-group.half-horizontal-gutters { + margin-left: -0.5em; + } + .column-group.half-horizontal-gutters > [class*=tiny-], .column-group.half-horizontal-gutters > [class*=all-], .column-group.half-horizontal-gutters > .all-auto { + padding-left: 0.5em; + } + + .column-group.half-vertical-gutters > [class*=tiny-], .column-group.half-vertical-gutters > [class*=all-], .column-group.half-vertical-gutters > .all-auto { + margin-bottom: 0.5em; + } + + .column-group.quarter-gutters { + margin-left: -0.25em; + } + .column-group.quarter-gutters > [class*=tiny-], .column-group.quarter-gutters > [class*=all-], .column-group.quarter-gutters > .all-auto { + padding-left: 0.25em; + margin-bottom: 0.25em; + } + + .column-group.quarter-horizontal-gutters { + margin-left: -0.25em; + } + .column-group.quarter-horizontal-gutters > [class*=tiny-], .column-group.quarter-horizontal-gutters > [class*=all-], .column-group.quarter-horizontal-gutters > .all-auto { + padding-left: 0.25em; + } + + .column-group.quarter-vertical-gutters > [class*=tiny-], .column-group.quarter-vertical-gutters > [class*=all-], .column-group.quarter-vertical-gutters > .all-auto { + margin-bottom: 0.25em; + } + + .column-group.tiny-gutters { + margin-left: -1em; + } + .column-group.tiny-gutters > [class*=tiny-], .column-group.tiny-gutters > [class*=all-], .column-group.tiny-gutters > .all-auto { + padding-left: 0.25em; + margin-bottom: 0.25em; + } + + .column-group.tiny-horizontal-gutters { + margin-left: -1em; + } + .column-group.tiny-horizontal-gutters > [class*=tiny-], .column-group.tiny-horizontal-gutters > [class*=all-], .column-group.tiny-horizontal-gutters > .all-auto { + padding-left: 1em; + } + + .column-group.tiny-vertical-gutters > [class*=tiny-], .column-group.tiny-vertical-gutters > [class*=all-], .column-group.tiny-vertical-gutters > .all-auto { + margin-bottom: 1em; + } + + .column-group.tiny-double-gutters { + margin-left: -2em; + } + .column-group.tiny-double-gutters > [class*=tiny-], .column-group.tiny-double-gutters > [class*=all-], .column-group.tiny-double-gutters > .all-auto { + padding-left: 2em; + margin-bottom: 2em; + } + + .column-group.tiny-double-horizontal-gutters { + margin-left: -2em; + } + .column-group.tiny-double-horizontal-gutters > [class*=tiny-], .column-group.tiny-double-horizontal-gutters > [class*=all-], .column-group.tiny-double-horizontal-gutters > .all-auto { + padding-left: 2em; + } + + .column-group.tiny-double-vertical-gutters > [class*=tiny-], .column-group.tiny-double-vertical-gutters > [class*=all-], .column-group.tiny-double-vertical-gutters > .all-auto { + margin-bottom: 2em; + } + + .column-group.tiny-half-gutters { + margin-left: -0.5em; + } + .column-group.tiny-half-gutters > [class*=tiny-], .column-group.tiny-half-gutters > [class*=all-], .column-group.tiny-half-gutters > .all-auto { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + + .column-group.tiny-half-horizontal-gutters { + margin-left: -0.5em; + } + .column-group.tiny-half-horizontal-gutters > [class*=tiny-], .column-group.tiny-half-horizontal-gutters > [class*=all-], .column-group.tiny-half-horizontal-gutters > .all-auto { + padding-left: 0.5em; + } + + .column-group.tiny-half-vertical-gutters > [class*=tiny-], .column-group.tiny-half-vertical-gutters > [class*=all-], .column-group.tiny-half-vertical-gutters > .all-auto { + margin-bottom: 0.5em; + } + + .column-group.tiny-quarter-gutters { + margin-left: -0.25em; + } + .column-group.tiny-quarter-gutters > [class*=tiny-], .column-group.tiny-quarter-gutters > [class*=all-], .column-group.tiny-quarter-gutters > .all-auto { + padding-left: 0.25em; + margin-bottom: 0.25em; + } + + .column-group.tiny-quarter-horizontal-gutters { + margin-left: -0.25em; + } + .column-group.tiny-quarter-horizontal-gutters > [class*=tiny-], .column-group.tiny-quarter-horizontal-gutters > [class*=all-], .column-group.tiny-quarter-horizontal-gutters > .all-auto { + padding-left: 0.25em; + } + + .column-group.tiny-quarter-vertical-gutters > [class*=tiny-], .column-group.tiny-quarter-vertical-gutters > [class*=all-], .column-group.tiny-quarter-vertical-gutters > .all-auto { + margin-bottom: 0.25em; + } + + .column-group.tiny-no-gutters { + margin-left: 0; + } + .column-group.tiny-no-gutters > [class*=tiny-], .column-group.tiny-no-gutters > [class*=all-], .column-group.tiny-no-gutters > .all-auto { + padding-left: 0; + margin-bottom: 0; + } + + .all-5, + .tiny-5 { + width: 5%; + -webkit-flex-basis: 5%; + -moz-flex-basis: 5%; + flex-basis: 5%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-10, + .tiny-10 { + width: 10%; + -webkit-flex-basis: 10%; + -moz-flex-basis: 10%; + flex-basis: 10%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-15, + .tiny-15 { + width: 15%; + -webkit-flex-basis: 15%; + -moz-flex-basis: 15%; + flex-basis: 15%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-20, + .tiny-20 { + width: 20%; + -webkit-flex-basis: 20%; + -moz-flex-basis: 20%; + flex-basis: 20%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-25, + .tiny-25 { + width: 25%; + -webkit-flex-basis: 25%; + -moz-flex-basis: 25%; + flex-basis: 25%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-30, + .tiny-30 { + width: 30%; + -webkit-flex-basis: 30%; + -moz-flex-basis: 30%; + flex-basis: 30%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-33, + .tiny-33 { + width: 33,33333%; + -webkit-flex-basis: 33.33333%; + -moz-flex-basis: 33.33333%; + flex-basis: 33.33333%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-35, + .tiny-35 { + width: 35%; + -webkit-flex-basis: 35%; + -moz-flex-basis: 35%; + flex-basis: 35%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-40, + .tiny-40 { + width: 40%; + -webkit-flex-basis: 40%; + -moz-flex-basis: 40%; + flex-basis: 40%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-45, + .tiny-45 { + width: 45%; + -webkit-flex-basis: 45%; + -moz-flex-basis: 45%; + flex-basis: 45%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-50, + .tiny-50 { + width: 50%; + -webkit-flex-basis: 50%; + -moz-flex-basis: 50%; + flex-basis: 50%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-55, + .tiny-55 { + width: 55%; + -webkit-flex-basis: 55%; + -moz-flex-basis: 55%; + flex-basis: 55%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-60, + .tiny-60 { + width: 60%; + -webkit-flex-basis: 60%; + -moz-flex-basis: 60%; + flex-basis: 60%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-65, + .tiny-65 { + width: 65%; + -webkit-flex-basis: 65%; + -moz-flex-basis: 65%; + flex-basis: 65%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-66, + .tiny-66 { + width: 66,66666%; + -webkit-flex-basis: 66.66666%; + -moz-flex-basis: 66.66666%; + flex-basis: 66.66666%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-70, + .tiny-70 { + width: 70%; + -webkit-flex-basis: 70%; + -moz-flex-basis: 70%; + flex-basis: 70%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-75, + .tiny-75 { + width: 75%; + -webkit-flex-basis: 75%; + -moz-flex-basis: 75%; + flex-basis: 75%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-80, + .tiny-80 { + width: 80%; + -webkit-flex-basis: 80%; + -moz-flex-basis: 80%; + flex-basis: 80%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-85, + .tiny-85 { + width: 85%; + -webkit-flex-basis: 85%; + -moz-flex-basis: 85%; + flex-basis: 85%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-90, + .tiny-90 { + width: 90%; + -webkit-flex-basis: 90%; + -moz-flex-basis: 90%; + flex-basis: 90%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-95, + .tiny-95 { + width: 95%; + -webkit-flex-basis: 95%; + -moz-flex-basis: 95%; + flex-basis: 95%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-100, + .tiny-100 { + width: 100%; + -webkit-flex-basis: 100%; + -moz-flex-basis: 100%; + flex-basis: 100%; + -webkit-flex-grow: 0; + flex-grow: 0; + } + + .all-auto, + .tiny-auto { + width: auto; + -webkit-flex-basis: auto; + flex-basis: auto; + -webkit-flex-grow: 1; + flex-grow: 1; + } + + .ink-flex, + .column-group { + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-flex-direction: row; + flex-direction: row; + list-style: none; + } + .ink-flex.tiny-reverse, .ink-flex.reverse, + .column-group.tiny-reverse, + .column-group.reverse { + -webkit-flex-direction: row-reverse; + -moz-flex-direction: row-reverse; + flex-direction: row-reverse; + } + .ink-flex.tiny-vertical, .ink-flex.vertical, + .column-group.tiny-vertical, + .column-group.vertical { + -webkit-flex-direction: column; + -moz-flex-direction: column; + flex-direction: column; + } + .ink-flex.tiny-vertical.tiny-reverse, .ink-flex.vertical.reverse, + .column-group.tiny-vertical.tiny-reverse, + .column-group.vertical.reverse { + -webkit-flex-direction: column-reverse; + -moz-flex-direction: column-reverse; + flex-direction: column-reverse; + } + + .tiny-order-1 { + order: 1; + } + + .tiny-order-2 { + order: 2; + } + + .tiny-order-3 { + order: 3; + } + + .tiny-order-4 { + order: 4; + } + + .tiny-order-5 { + order: 5; + } + + .tiny-order-6 { + order: 6; + } + + .tiny-order-7 { + order: 7; + } + + .tiny-order-8 { + order: 8; + } + + .tiny-order-9 { + order: 9; + } + + .tiny-order-10 { + order: 10; + } + + .column-group .tiny-auto { + -webkit-flex-basis: auto; + flex-basis: auto; + -webkit-flex-grow: 1; + flex-grow: 1; + } + + .push-top, + .tiny-push-top { + -webkit-box-align: start; + -webkit-align-items: flex-start; + -moz-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + -webkit-align-self: flex-start; + -ms-flex-item-align: start; + align-self: flex-start; + } + + .push-bottom, + .tiny-push-bottom { + -webkit-box-align: end; + -webkit-align-items: flex-end; + -moz-box-align: end; + -ms-flex-align: end; + align-items: flex-end; + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; + } + + .push-middle, + .tiny-push-middle { + -webkit-box-align: center; + -webkit-align-items: center; + -moz-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-align-self: flex-center; + -ms-flex-item-align: center; + align-self: center; + } + + .push-left, + .tiny-push-left { + -webkit-justify-content: flex-start; + -moz-justify-content: flex-start; + justify-content: flex-start; + float: left; + } + + .push-center, + .tiny-push-center { + float: none !important; + -webkit-justify-content: center; + -moz-justify-content: center; + justify-content: center; + margin-left: auto; + margin-right: auto; + } + + .push-right, + .tiny-push-right { + -webkit-justify-content: flex-end; + -moz-justify-content: flex-end; + justify-content: flex-end; + float: right; + } + + .tiny-align-left { + text-align: left; + } + + .tiny-align-center { + text-align: center; + } + + .tiny-align-right { + text-align: right; + } + + .space { + margin: 1em; + } + + .tiny-space { + margin: 1em; + } + + .padding { + padding: 1em; + } + + .tiny-padding { + padding: 1em; + } + + .double-space { + margin: 0.5em; + } + + .tiny-double-space { + margin: 0.5em; + } + + .double-padding { + padding: 0.5em; + } + + .tiny-double-padding { + padding: 0.5em; + } + + .half-space { + margin: 2em; + } + + .tiny-half-space { + margin: 2em; + } + + .half-padding { + padding: 2em; + } + + .tiny-half-padding { + padding: 2em; + } + + .quarter-space { + margin: 4em; + } + + .tiny-quarter-space { + margin: 4em; + } + + .quarter-padding { + padding: 4em; + } + + .tiny-quarter-padding { + padding: 4em; + } + + .vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + + .tiny-vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + + .vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + + .tiny-vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + + .double-vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + + .tiny-double-vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + + .double-vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + + .tiny-double-vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + + .half-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + + .tiny-half-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + + .half-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + + .tiny-half-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + + .quarter-vertical-space { + margin-top: 0.25em; + margin-bottom: 0.25em; + } + + .tiny-quarter-vertical-space { + margin-top: 0.25em; + margin-bottom: 0.25em; + } + + .quarter-vertical-padding { + padding-top: 0.25em; + padding-bottom: 0.25em; + } + + .tiny-quarter-vertical-padding { + padding-top: 0.25em; + padding-bottom: 0.25em; + } + + .horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + + .tiny-horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + + .horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + + .tiny-horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + + .double-horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + + .tiny-double-horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + + .double-horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + + .tiny-double-horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + + .half-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + + .tiny-half-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + + .half-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + + .tiny-half-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + + .quarter-horizontal-space { + margin-left: 0.25em; + margin-right: 0.25em; + } + + .tiny-quarter-horizontal-space { + margin-left: 0.25em; + margin-right: 0.25em; + } + + .quarter-horizontal-padding { + padding-left: 0.25em; + padding-right: 0.25em; + } + + .tiny-quarter-horizontal-padding { + padding-left: 0.25em; + padding-right: 0.25em; + } + + .top-space { + margin-top: 1em; + } + + .tiny-top-space { + margin-top: 1em; + } + + .top-padding { + padding-top: 1em; + } + + .tiny-top-padding { + padding-top: 1em; + } + + .double-top-space { + margin-top: 2em; + } + + .tiny-double-top-space { + margin-top: 2em; + } + + .double-top-padding { + padding-top: 2em; + } + + .tiny-double-top-padding { + padding-top: 2em; + } + + .half-top-space { + margin-top: 0.5em; + } + + .tiny-half-top-space { + margin-top: 0.5em; + } + + .half-top-padding { + padding-top: 0.5em; + } + + .tiny-half-top-padding { + padding-top: 0.5em; + } + + .quarter-top-space { + margin-top: 0.25em; + } + + .tiny-quarter-top-space { + margin-top: 0.25em; + } + + .quarter-top-padding { + padding-top: 0.25em; + } + + .tiny-quarter-top-padding { + padding-top: 0.25em; + } + + .right-space { + margin-right: 1em; + } + + .tiny-right-space { + margin-right: 1em; + } + + .right-padding { + padding-right: 1em; + } + + .tiny-right-padding { + padding-right: 1em; + } + + .double-right-space { + margin-right: 2em; + } + + .tiny-double-right-space { + margin-right: 2em; + } + + .double-right-padding { + padding-right: 2em; + } + + .tiny-double-right-padding { + padding-right: 2em; + } + + .half-right-space { + margin-right: 0.5em; + } + + .tiny-half-right-space { + margin-right: 0.5em; + } + + .half-right-padding { + padding-right: 0.5em; + } + + .tiny-half-right-padding { + padding-right: 0.5em; + } + + .quarter-right-space { + margin-right: 0.25em; + } + + .tiny-quarter-right-space { + margin-right: 0.25em; + } + + .quarter-right-padding { + padding-right: 0.25em; + } + + .tiny-quarter-right-padding { + padding-right: 0.25em; + } + + .bottom-space { + margin-bottom: 1em; + } + + .tiny-bottom-space { + margin-bottom: 1em; + } + + .bottom-padding { + padding-bottom: 1em; + } + + .tiny-bottom-padding { + padding-bottom: 1em; + } + + .double-bottom-space { + margin-bottom: 2em; + } + + .tiny-double-bottom-space { + margin-bottom: 2em; + } + + .double-bottom-padding { + padding-bottom: 2em; + } + + .tiny-double-bottom-padding { + padding-bottom: 2em; + } + + .half-bottom-space { + margin-bottom: 0.5em; + } + + .tiny-half-bottom-space { + margin-bottom: 0.5em; + } + + .half-bottom-padding { + padding-bottom: 0.5em; + } + + .tiny-half-bottom-padding { + padding-bottom: 0.5em; + } + + .quarter-bottom-space { + margin-bottom: 0.25em; + } + + .tiny-quarter-bottom-space { + margin-bottom: 0.25em; + } + + .quarter-bottom-padding { + padding-bottom: 0.25em; + } + + .tiny-quarter-bottom-padding { + padding-bottom: 0.25em; + } + + .left-space { + margin-left: 1em; + } + + .tiny-left-space { + margin-left: 1em; + } + + .left-padding { + padding-left: 1em; + } + + .tiny-left-padding { + padding-left: 1em; + } + + .double-left-space { + margin-left: 2em; + } + + .tiny-double-left-space { + margin-left: 2em; + } + + .double-left-padding { + padding-left: 2em; + } + + .tiny-double-left-padding { + padding-left: 2em; + } + + .half-left-space { + margin-left: 0.5em; + } + + .tiny-half-left-space { + margin-left: 0.5em; + } + + .half-left-padding { + padding-left: 0.5em; + } + + .tiny-half-left-padding { + padding-left: 0.5em; + } + + .quarter-left-space { + margin-left: 0.25em; + } + + .tiny-quarter-left-space { + margin-left: 0.25em; + } + + .quarter-left-padding { + padding-left: 0.25em; + } + + .tiny-quarter-left-padding { + padding-left: 0.25em; + } + + .hide-tiny { + display: none !important; + } + + .show-tiny { + display: inherit !important; + } + + table.show-tiny { + display: table; + } + + thead.show-tiny { + display: table-header-group; + } + + tbody.show-tiny { + display: table-row-group; + } + + tfoot.show-tiny { + display: table-footer-group; + } + + tr.show-tiny { + display: table-row; + } + + th.show-tiny, + td.show-tiny { + display: table-cell; + } +} +@media screen and (min-width: 1261px) { + html { + font-size: 1.08em; + } + html:after { + font-family: '{"name":"xlarge",{"min":"1261px","max":""}}'; + } +} +@media screen and (min-width: 961px) and (max-width: 1260px) { + html { + font-size: 1.05em; + } + html:after { + font-family: '{"name":"large",{"min":"961px","max":"1260px"}}'; + } +} +@media screen and (min-width: 641px) and (max-width: 960px) { + html { + font-size: 1em; + } + html:after { + font-family: '{"name":"medium",{"min":"641px","max":"960px"}}'; + } +} +@media screen and (min-width: 321px) and (max-width: 640px) { + html { + font-size: 0.98em; + } + html:after { + font-family: '{"name":"small",{"min":"321px","max":"640px"}}'; + } +} +@media screen and (max-width: 320px) { + html { + font-size: 0.97em; + } + html:after { + font-family: '{"name":"tiny",{"min":"","max":"320px"}}'; + } +} +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-thin-webfont.eot'); + src: url('../fonts/Roboto/roboto-thin-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-thin-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-thin-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-thin-webfont.svg') format('svg'); + font-weight: 100; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-thinitalic-webfont.eot'); + src: url('../fonts/Roboto/roboto-thinitalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-thinitalic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-thinitalic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-thinitalic-webfont.svg') format('svg'); + font-weight: 100; + font-style: italic; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-light-webfont.eot'); + src: url('../fonts/Roboto/roboto-light-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-light-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-light-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-light-webfont.svg') format('svg'); + font-weight: 300; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-lightitalic-webfont.eot'); + src: url('../fonts/Roboto/roboto-lightitalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-lightitalic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-lightitalic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-lightitalic-webfont.svg') format('svg'); + font-weight: 300; + font-style: italic; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-regular-webfont.eot'); + src: url('../fonts/Roboto/roboto-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-regular-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-regular-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-regular-webfont.svg') format('svg'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-italic-webfont.eot'); + src: url('../fonts/Roboto/roboto-italic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-italic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-italic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-italic-webfont.svg') format('svg'); + font-weight: 400; + font-style: italic; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-medium-webfont.eot'); + src: url('../fonts/Roboto/roboto-medium-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-medium-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-medium-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-medium-webfont.svg') format('svg'); + font-weight: 500; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-mediumitalic-webfont.eot'); + src: url('../fonts/Roboto/roboto-mediumitalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-mediumitalic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-mediumitalic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-mediumitalic-webfont.svg') format('svg'); + font-weight: 500; + font-style: italic; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-bold-webfont.eot'); + src: url('../fonts/Roboto/roboto-bold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-bold-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-bold-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-bold-webfont.svg') format('svg'); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-bolditalic-webfont.eot'); + src: url('../fonts/Roboto/roboto-bolditalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-bolditalic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-bolditalic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-bolditalic-webfont.svg') format('svg'); + font-weight: 700; + font-style: italic; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-black-webfont.eot'); + src: url('../fonts/Roboto/roboto-black-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-black-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-black-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-black-webfont.svg') format('svg'); + font-weight: 900; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-blackitalic-webfont.eot'); + src: url('../fonts/Roboto/roboto-blackitalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-blackitalic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-blackitalic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-blackitalic-webfont.svg') format('svg'); + font-weight: 900; + font-style: italic; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-light-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-light-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-light-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-light-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-light-webfont.svg') format('svg'); + font-weight: 300; + font-style: normal; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.svg') format('svg'); + font-weight: 300; + font-style: italic; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-regular-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-regular-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-regular-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-regular-webfont.svg') format('svg'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-italic-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-italic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-italic-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-italic-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-italic-webfont.svg') format('svg'); + font-weight: 400; + font-style: italic; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-bold-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-bold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-bold-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-bold-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-bold-webfont.svg') format('svg'); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.svg') format('svg'); + font-weight: 700; + font-style: italic; +} + +@font-face { + font-family: "Roboto_slab"; + src: url('../fonts/Roboto_slab/robotoslab-thin-webfont.eot'); + src: url('../fonts/Roboto_slab/robotoslab-thin-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_slab/robotoslab-thin-webfont.woff') format('woff'), url('../fonts/Roboto_slab/robotoslab-thin-webfont.ttf') format('truetype'), url('../fonts/Roboto_slab/robotoslab-thin-webfont.svg') format('svg'); + font-weight: 100; + font-style: normal; +} + +@font-face { + font-family: "Roboto_slab"; + src: url('../fonts/Roboto_slab/robotoslab-light-webfont.eot'); + src: url('../fonts/Roboto_slab/robotoslab-light-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_slab/robotoslab-light-webfont.woff') format('woff'), url('../fonts/Roboto_slab/robotoslab-light-webfont.ttf') format('truetype'), url('../fonts/Roboto_slab/robotoslab-light-webfont.svg') format('svg'); + font-weight: 300; + font-style: normal; +} + +@font-face { + font-family: "Roboto_slab"; + src: url('../fonts/Roboto_slab/robotoslab-regular-webfont.eot'); + src: url('../fonts/Roboto_slab/robotoslab-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_slab/robotoslab-regular-webfont.woff') format('woff'), url('../fonts/Roboto_slab/robotoslab-regular-webfont.ttf') format('truetype'), url('../fonts/Roboto_slab/robotoslab-regular-webfont.svg') format('svg'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: "Roboto_slab"; + src: url('../fonts/Roboto_slab/robotoslab-bold-webfont.eot'); + src: url('../fonts/Roboto_slab/robotoslab-bold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_slab/robotoslab-bold-webfont.woff') format('woff'), url('../fonts/Roboto_slab/robotoslab-bold-webfont.ttf') format('truetype'), url('../fonts/Roboto_slab/robotoslab-bold-webfont.svg') format('svg'); + font-weight: 700; + font-style: normal; +} + +.ink-label { + padding: 0 0.35em; + white-space: nowrap; +} + +.ink-navigation { + overflow: visible; +} +.ink-navigation ul { + list-style-type: none; + padding: 0; + margin: 0; +} +.ink-navigation ul li { + margin: 0; +} + +.ink-navigation .breadcrumbs li { + line-height: 2.7em; + display: inline; +} +.ink-navigation .breadcrumbs li a { + display: inline; + padding: 0; +} +.ink-navigation .breadcrumbs li a:hover { + background: transparent; +} +.ink-navigation .breadcrumbs li.active a { + cursor: default; + text-decoration: none; +} +.ink-navigation .breadcrumbs li:first-child a { + padding-left: 1.2em; +} +.ink-navigation .breadcrumbs li:after { + content: '/'; + display: inline; + margin: 0 .7em; +} +.ink-navigation .breadcrumbs li:last-child:after { + content: ''; + display: none; +} + +.ink-dropdown ul.dropdown-menu, +.ink-dropdown ul.dropdown, +.ink-navigation ul.dropdown-menu, +.ink-navigation ul.dropdown { + display: inline-block; + background: white; + z-index: 30; + border: 1px solid #d9d9d9; + height: auto; + width: auto; + min-width: 10em; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: rgba(100, 100, 100, 0.3) 0 0 1px 0; + -moz-box-shadow: rgba(100, 100, 100, 0.3) 0 0 1px 0; + box-shadow: rgba(100, 100, 100, 0.3) 0 0 1px 0; + padding: .3em 0; + margin-left: 0px; + padding: .35em 0; + font-size: .85em; +} +.ink-dropdown ul.dropdown-menu li, +.ink-dropdown ul.dropdown li, +.ink-navigation ul.dropdown-menu li, +.ink-navigation ul.dropdown li { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + -webkit-border-radius: none; + -moz-border-radius: none; + -ms-border-radius: none; + -o-border-radius: none; + border-radius: none; + width: auto; + height: auto; + min-height: auto; + display: list-item; + float: none; + margin: 0; + text-align: left; + text-transform: none; + padding: 0; + position: relative; + list-style-type: none; +} +.ink-dropdown ul.dropdown-menu li.separator-above, +.ink-dropdown ul.dropdown li.separator-above, +.ink-navigation ul.dropdown-menu li.separator-above, +.ink-navigation ul.dropdown li.separator-above { + padding-top: .35em; + margin-top: .35em; + border-top: 1px solid #d9d9d9; +} +.ink-dropdown ul.dropdown-menu li.separator-below, +.ink-dropdown ul.dropdown li.separator-below, +.ink-navigation ul.dropdown-menu li.separator-below, +.ink-navigation ul.dropdown li.separator-below { + padding-bottom: .35em; + margin-bottom: .35em; + border-bottom: 1px solid #d9d9d9; +} +.ink-dropdown ul.dropdown-menu li.heading, +.ink-dropdown ul.dropdown li.heading, +.ink-navigation ul.dropdown-menu li.heading, +.ink-navigation ul.dropdown li.heading { + font-weight: 700; + padding-bottom: .35em; + margin-bottom: .35em; + padding: .5em .8em; + color: #333333; +} +.ink-dropdown ul.dropdown-menu li a, +.ink-dropdown ul.dropdown li a, +.ink-navigation ul.dropdown-menu li a, +.ink-navigation ul.dropdown li a { + color: #444; + padding: .5em .8em; + display: block; + clear: both; +} +.ink-dropdown ul.dropdown-menu li a:hover, +.ink-dropdown ul.dropdown li a:hover, +.ink-navigation ul.dropdown-menu li a:hover, +.ink-navigation ul.dropdown li a:hover { + background: #f2f2f2; + text-decoration: none; +} +.ink-dropdown ul.dropdown-menu li.active a, +.ink-dropdown ul.dropdown li.active a, +.ink-navigation ul.dropdown-menu li.active a, +.ink-navigation ul.dropdown li.active a { + background: #999999; + color: white; +} +.ink-dropdown ul.dropdown-menu li.disabled a, +.ink-dropdown ul.dropdown li.disabled a, +.ink-navigation ul.dropdown-menu li.disabled a, +.ink-navigation ul.dropdown li.disabled a { + color: #b3b3b3; +} +.ink-dropdown ul.dropdown-menu li.disabled a:hover, +.ink-dropdown ul.dropdown li.disabled a:hover, +.ink-navigation ul.dropdown-menu li.disabled a:hover, +.ink-navigation ul.dropdown li.disabled a:hover { + background: transparent; + cursor: default; +} +.ink-dropdown ul.dropdown-menu li.submenu, +.ink-dropdown ul.dropdown li.submenu, +.ink-navigation ul.dropdown-menu li.submenu, +.ink-navigation ul.dropdown li.submenu { + overflow: visible; +} +.ink-dropdown ul.dropdown-menu li.submenu > a, +.ink-dropdown ul.dropdown li.submenu > a, +.ink-navigation ul.dropdown-menu li.submenu > a, +.ink-navigation ul.dropdown li.submenu > a { + white-space: nowrap; +} +.ink-dropdown ul.dropdown-menu li.submenu > a:after, +.ink-dropdown ul.dropdown li.submenu > a:after, +.ink-navigation ul.dropdown-menu li.submenu > a:after, +.ink-navigation ul.dropdown li.submenu > a:after { + content: "\f0da"; + width: auto; + margin-left: .8em; + font-family: FontAwesome; + color: #b3b3b3; +} +.ink-dropdown ul.dropdown-menu li.submenu:hover > a, +.ink-dropdown ul.dropdown li.submenu:hover > a, +.ink-navigation ul.dropdown-menu li.submenu:hover > a, +.ink-navigation ul.dropdown li.submenu:hover > a { + background: #f2f2f2; + text-decoration: none; +} +.ink-dropdown ul.dropdown-menu li.submenu:hover:hover > ul.dropdown-menu, .ink-dropdown ul.dropdown-menu li.submenu:hover:hover > ul.dropdown, +.ink-dropdown ul.dropdown li.submenu:hover:hover > ul.dropdown-menu, +.ink-dropdown ul.dropdown li.submenu:hover:hover > ul.dropdown, +.ink-navigation ul.dropdown-menu li.submenu:hover:hover > ul.dropdown-menu, +.ink-navigation ul.dropdown-menu li.submenu:hover:hover > ul.dropdown, +.ink-navigation ul.dropdown li.submenu:hover:hover > ul.dropdown-menu, +.ink-navigation ul.dropdown li.submenu:hover:hover > ul.dropdown { + display: block; +} +.ink-dropdown ul.dropdown-menu li.submenu > ul.dropdown-menu, .ink-dropdown ul.dropdown-menu li.submenu > ul.dropdown, +.ink-dropdown ul.dropdown li.submenu > ul.dropdown-menu, +.ink-dropdown ul.dropdown li.submenu > ul.dropdown, +.ink-navigation ul.dropdown-menu li.submenu > ul.dropdown-menu, +.ink-navigation ul.dropdown-menu li.submenu > ul.dropdown, +.ink-navigation ul.dropdown li.submenu > ul.dropdown-menu, +.ink-navigation ul.dropdown li.submenu > ul.dropdown { + font-size: inherit; + position: absolute; + top: -.36em; + left: 100%; + display: none; +} + +.ink-navigation ul.pagination { + overflow: hidden; + *zoom: 1; +} +.ink-navigation ul.pagination li { + line-height: 1.7; + float: left; +} +.ink-navigation ul.pagination li a { + padding: 0.5em 1em; + display: block; + float: left; +} +.ink-navigation ul.pagination.dotted li a { + display: block; + height: 1em; + width: 1em; + margin-right: .6em; + padding: 0; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + -ms-border-radius: 50%; + -o-border-radius: 50%; + border-radius: 50%; + text-indent: 99999px; +} +.ink-navigation ul.pagination.dotted li a:first-child, .ink-navigation ul.pagination.dotted li a:last-child { + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + -ms-border-radius: 50%; + -o-border-radius: 50%; + border-radius: 50%; +} +.ink-navigation ul.pagination.chevron li { + display: none; +} +.ink-navigation ul.pagination.chevron li.next, .ink-navigation ul.pagination.chevron li.previous { + display: block; +} +.ink-navigation ul.pagination.chevron li.next a, .ink-navigation ul.pagination.chevron li.previous a { + display: block; + position: absolute; + top: 35%; + padding: 0 .5em; + margin: 0; + font-family: FontAwesome; + font-size: 4em; +} +.ink-navigation ul.pagination.chevron li.next a span, .ink-navigation ul.pagination.chevron li.previous a span { + text-indent: -99999px; + display: inline-block; +} +.ink-navigation ul.pagination.chevron li.disabled a { + color: rgba(255, 255, 255, 0.6); + text-shadow: none; +} +.ink-navigation ul.pagination.chevron li.disabled a:hover, .ink-navigation ul.pagination.chevron li.disabled a:focus { + color: rgba(255, 255, 255, 0.6); +} +.ink-navigation ul.pagination.chevron li.previous a { + left: 0; +} +.ink-navigation ul.pagination.chevron li.previous a:after { + content: "\f137"; +} +.ink-navigation ul.pagination.chevron li.next a { + right: 0; +} +.ink-navigation ul.pagination.chevron li.next a:after { + content: "\f138"; +} + +.ink-navigation .pills { + overflow: hidden; + *zoom: 1; +} +.ink-navigation .pills li { + overflow: hidden; + display: block; + float: left; + margin: 0 .5em .5em 0; + line-height: 1.7; +} +.ink-navigation .pills li a { + display: block; + padding: 0.5em 1em; +} +.ink-navigation .pills li a:hover { + text-decoration: none; +} +.ink-navigation .pills li.active a, .ink-navigation .pills li.disabled a { + cursor: default; +} + +.ink-navigation ul { + *height: 100%; +} +.ink-navigation ul.menu { + *zoom: 1; +} +.ink-navigation ul.menu:after { + content: ""; + display: table; + clear: both; +} +.ink-navigation ul.menu li { + *height: 100%; +} +.ink-navigation ul.menu li:hover ul.submenu { + display: block; +} +.ink-navigation ul.menu li ul.submenu { + display: none; + position: absolute; + z-index: 10; +} +.ink-navigation ul.menu li ul.submenu li { + overflow: hidden; +} +.ink-navigation ul.menu li ul.submenu li a { + padding: 0.5em 1em; + display: block; + float: none; +} +.ink-navigation ul.menu.horizontal li { + float: left; + position: relative; +} +.ink-navigation ul.menu.horizontal li a { + padding: 0.5em 1em; + display: block; + line-height: 1.7; +} +.ink-navigation ul.menu.horizontal li .control { + margin-top: .3em; +} +.ink-navigation ul.menu.horizontal li ul.submenu { + min-width: 100%; + left: 0; + z-index: 50; +} +.ink-navigation ul.menu.horizontal li ul.submenu li { + float: none; +} +.ink-navigation ul.menu.vertical li { + line-height: 1.7; + position: relative; +} +.ink-navigation ul.menu.vertical li a { + padding: 0.5em 1em; + display: block; +} +.ink-navigation ul.menu.vertical li ul.submenu { + position: relative; + top: auto; + left: auto; +} +.ink-navigation ul.menu.vertical li ul.submenu.flyout { + position: absolute; + min-width: 8em; + top: 0; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.menu.vertical li ul.submenu.flyout.left { + right: 100%; +} +.ink-navigation ul.menu.vertical li ul.submenu.flyout.right { + left: 100%; +} + +table.ink-table { + width: 100%; + border-collapse: collapse; + border-spacing: 0; +} +table.ink-table tr th { + padding: 5px 10px; + line-height: 1.3; +} +table.ink-table tr th[data-sortable="true"]:hover { + cursor: pointer; + text-decoration: underline; +} +table.ink-table tr th[data-sortable="true"]:hover i { + text-decoration: none; +} +table.ink-table tr th[data-sortable="true"] i { + padding-left: .5em; +} +table.ink-table tr td { + padding: 5px 10px; + line-height: 1.3; +} +table.ink-table.hover tbody tr:hover { + cursor: pointer; +} +table.ink-table.bordered { + border-collapse: separate; +} + +html { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} + +body { + color: #555555; + font-family: "Roboto", Arial, Helvetica, sans-serif; + line-height: 1.45; +} + +.fw-100, .fw-light { + font-weight: 100; +} + +.fw-300, .fw-thin { + font-weight: 300; +} + +.fw-400, .fw-regular { + font-weight: 400; +} + +.fw-500, .fw-medium { + font-weight: 500; +} + +.fw-700, .fw-bold { + font-weight: 700; +} + +.fw-900, .fw-black { + font-weight: 900; +} + +.condensed-300, .condensed-thin { + font-weight: 200; + font-family: Roboto_condensed, Arial, Helvetica, sans-serif; +} + +.condensed-400, .condensed-regular { + font-weight: 400; + font-family: Roboto_condensed, Arial, Helvetica, sans-serif; +} + +.condensed-700, .condensed-bold { + font-weight: 700; + font-family: Roboto_condensed, Arial, Helvetica, sans-serif; +} + +.slab-100, .slab-light { + font-weight: 100; + font-family: Roboto_slab, Arial, Helvetica, sans-serif; +} + +.slab-300, .slab-thin { + font-weight: 300; + font-family: Roboto_slab, Arial, Helvetica, sans-serif; +} + +.slab-400, .slab-regular { + font-weight: 400; + font-family: Roboto_slab, Arial, Helvetica, sans-serif; +} + +.slab-700, .slab-bold { + font-weight: 700; + font-family: Roboto_slab, Arial, Helvetica, sans-serif; +} + +.sans { + font-family: "Roboto", Arial, Helvetica, sans-serif; +} + +.serif { + font-family: Times, "Times New Roman", serif; +} + +.monospace { + font-family: Monaco, "Andale Mono", "Courier New", monospace; +} + +.condensed { + font-family: Roboto_condensed, Arial, Helvetica, sans-serif; +} + +.slab { + font-family: Roboto_slab, Arial, Helvetica, sans-serif; +} + +.italic { + font-style: italic; +} + +.uppercase { + text-transform: uppercase; +} + +.lowercase { + text-transform: lowercase; +} + +.capitalizer { + text-transform: capitalize; +} + +.fa { + font-size: 14px; +} + +a { + color: #6998c9; + text-decoration: none; + cursor: pointer; +} +a:hover { + color: #007ed5; + text-decoration: underline; +} + +h1 { + font-size: 2.2em; + margin-top: 0; + margin-bottom: 0.57539em; +} + +h2 { + font-size: 1.75em; + margin-top: 0; + margin-bottom: 0.72334em; +} + +h3 { + font-size: 1.5em; + margin-top: 0; + margin-bottom: 0.8439em; +} + +h4 { + font-size: 1.25em; + margin-top: 0; + margin-bottom: 1.01268em; +} + +h5 { + font-size: 1.1em; + margin-top: 0; + margin-bottom: 1.15077em; +} + +h6 { + font-size: 1.1em; + margin-top: 0; + margin-bottom: 1.15077em; +} + +p { + font-size: 1em; + margin-top: 0; + margin-bottom: 1.26585em; +} + +table { + font-size: 1em; + margin-top: 0; + margin-bottom: 1.26585em; +} + +h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, h6:first-child, p:first-child { + margin-top: 0; +} + +/* Headings */ +h1, h2, h3, h4, h5, h6 { + color: #404040; + font-weight: 700; + line-height: 1.16; +} + +small { + color: #888888; +} + +input, textarea { + color: #666; +} + +h1 small, h2 small, h3 small, h4 small { + color: #bbb; + font-size: .6em; + font-weight: 100; + line-height: 1; +} + +mark { + background: #dae5f2; +} + +address { + color: #777777; + font-size: 1em; + line-height: 1.4; +} +address p { + margin-top: 0; +} +address h6 { + color: #555555; +} + +abbr:hover { + cursor: help; +} + +blockquote { + border-left: 4px solid #ddd; + padding-left: 25px; + margin: 1em 0; + font-weight: 200; + font-size: 1.1em; +} +blockquote small { + font-size: .9em; +} +blockquote small::before, blockquote small::after { + content: ' — '; +} + +.note { + font-size: .9em; + color: #777777; +} +.note strong { + color: #555555; +} + +.small { + font-size: .75em; +} + +.medium { + font-size: .85em; +} + +.large { + font-size: 1.2em; +} + +.extralarge { + font-size: 1.45em !important; +} + +hr { + border: 0; + border-top: 1px solid #ddd; + margin: 1em 0; +} + +.lead { + font-size: 1.1em; + font-weight: bold; +} + +ul, ol { + line-height: 1.4; + padding: 0 0 0 1.45; + margin: 1em 0; +} +ul li, ol li { + margin: .5em 0; +} + +ul.unstyled { + list-style: none; + padding-left: 0em; +} +ul.unstyled ul { + list-style: disc outside; +} +ul.inline { + list-style: none; +} +ul.inline li { + display: inline-block; + padding: 0 .5em; +} +ul.inline li:first-child { + padding: 0 .5em 0 0; +} + +dl { + margin: 1em 0; +} +dl dt { + font-weight: bold; + margin: .5em 0; +} +dl dd { + margin: 0.5em 0 0.5em 25px; +} +dl.inline dt { + float: left; + clear: left; + text-align: right; + width: 180px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + margin: 0; +} +dl.inline dd { + margin: .5em 0 .5em 200px; +} + +figure.ink-image { + position: relative; + border: 1px solid #555555; +} +figure.ink-image > img { + width: 100%; +} +figure.ink-image > figcaption { + padding: 1em; + background: white; + line-height: 1.3; +} +figure.ink-image > figcaption.over-top, figure.ink-image > figcaption.over-bottom { + position: absolute; + width: 100%; + left: 0; + border: none; +} +figure.ink-image > figcaption.over-top.dark, figure.ink-image > figcaption.over-bottom.dark { + color: white; + background: rgba(0, 0, 0, 0.6); +} +figure.ink-image > figcaption.over-top { + top: 0; + background: rgba(255, 255, 255, 0.7); +} +figure.ink-image > figcaption.over-bottom { + bottom: 0; + background: rgba(255, 255, 255, 0.7); +} +figure.ink-image > figcaption.dark { + color: white; + background: #222222; +} + +img { + border: 0; + width: auto; + max-width: 100%; + vertical-align: top; +} + +.ink-alert.basic, .ink-alert.block { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-alert.basic { + background: rgba(255, 156, 0, 0.25); + color: #b87814; + border: 1px solid #b87814; +} +.ink-alert.basic .ink-dismiss { + color: #b87814; +} +.ink-alert.basic.success { + background: rgba(74, 155, 23, 0.25); + color: #38621d; + border: 1px solid #38621d; +} +.ink-alert.basic.success .ink-dismiss { + color: #38621d; +} +.ink-alert.basic.error { + background: rgba(201, 17, 17, 0.25); + color: #891e1e; + border: 1px solid #891e1e; +} +.ink-alert.basic.error .ink-dismiss { + color: #891e1e; +} +.ink-alert.basic.info { + background: rgba(15, 117, 218, 0.25); + color: #1e5b98; + border: 1px solid #1e5b98; +} +.ink-alert.basic.info .ink-dismiss { + color: #1e5b98; +} +.ink-alert.block { + border: 1px solid #b87814; + background: white; +} +.ink-alert.block > h4 { + background: rgba(255, 156, 0, 0.3); + color: #b87814; +} +.ink-alert.block .ink-dismiss { + color: #b87814; +} +.ink-alert.block.success { + border: 1px solid #38621d; + background: white; +} +.ink-alert.block.success > h4 { + background: rgba(74, 155, 23, 0.3); + color: #38621d; +} +.ink-alert.block.success .ink-dismiss { + color: #38621d; +} +.ink-alert.block.error { + border: 1px solid #891e1e; + background: white; +} +.ink-alert.block.error > h4 { + background: rgba(201, 17, 17, 0.3); + color: #891e1e; +} +.ink-alert.block.error .ink-dismiss { + color: #891e1e; +} +.ink-alert.block.info { + border: 1px solid #1e5b98; + background: white; +} +.ink-alert.block.info > h4 { + background: rgba(15, 117, 218, 0.3); + color: #1e5b98; +} +.ink-alert.block.info .ink-dismiss { + color: #1e5b98; +} +.ink-alert .ink-dismiss { + font-family: Arial, sans-serif; + font-weight: bold; + text-shadow: white 0 1px 0; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=25); + opacity: 0.25; +} +.ink-alert .ink-dismiss:hover { + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); + opacity: 0.6; +} + +.ink-badge { + -webkit-border-radius: 8em; + -moz-border-radius: 8em; + -ms-border-radius: 8em; + -o-border-radius: 8em; + border-radius: 8em; + color: white; +} +.ink-badge.white { + background: white; + color: #555555; +} +.ink-badge.black { + background: black; +} +.ink-badge.orange { + background: #ff9c00; +} +.ink-badge.red { + background: #c91111; +} +.ink-badge.green { + background: #4a9b17; +} +.ink-badge.blue { + background: #0f75da; +} +.ink-badge.yellow { + background: #ffd500; + color: #555555; +} +.ink-badge.grey { + background: gray; +} +.ink-badge + .ink-badge { + margin-left: .2em; +} + +/** + * Ink + * + * A set of tools for quick development of web interfaces. + * + * @package Ink + * @author Sapo Ink Team + * @license http://opensource.org/licenses/MIT MIT + * @link http://ink.sapo.pt + * @version 3.0.0 + */ +/** + * Ink + * + * A set of tools for quick development of web interfaces. + * + * @package Ink + * @subpackage Theme + * @category Buttons + * @since 3.0.0 + */ +.ink-button { + background: #d9d9d9; + color: black; + border: 1px solid #bfbfbf; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-button:hover, .ink-button:active { + text-decoration: none; + color: black; + background: #cccccc; + border: 1px solid #b3b3b3; + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; +} +.ink-button:focus { + outline: none; + background: #cccccc; + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; +} +.ink-button[disabled] { + background: #e6e6e6; + border: none; +} +.ink-button[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.blue { + color: white; + background: #0f75da; + border-color: #0c63b9; +} +.ink-button.blue:hover, .ink-button.blue:active { + background: #0d68c2; + border-color: #0a56a1; + color: white; + text-decoration: none; +} +.ink-button.blue:focus { + background: #0d68c2; +} +.ink-button.blue[disabled] { + background: rgba(15, 117, 218, 0.6); + border: none; +} +.ink-button.blue[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.green { + color: white; + background: #4a9b17; + border-color: #3e8313; +} +.ink-button.green:hover, .ink-button.green:active { + background: #3f8514; + border-color: #336d10; + color: white; + text-decoration: none; +} +.ink-button.green:focus { + background: #3f8514; +} +.ink-button.green[disabled] { + background: rgba(74, 155, 23, 0.6); + border: none; +} +.ink-button.green[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.orange { + color: white; + background: #ff9c00; + border-color: #d88400; +} +.ink-button.orange:hover, .ink-button.orange:active { + background: #e68c00; + border-color: #bf7400; + color: white; + text-decoration: none; +} +.ink-button.orange:focus { + background: #e68c00; +} +.ink-button.orange[disabled] { + background: rgba(255, 156, 0, 0.6); + border: none; +} +.ink-button.orange[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.red { + color: white; + background: #c91111; + border-color: #aa0e0e; +} +.ink-button.red:hover, .ink-button.red:active { + background: #b10f0f; + border-color: #920c0c; + color: white; + text-decoration: none; +} +.ink-button.red:focus { + background: #b10f0f; +} +.ink-button.red[disabled] { + background: rgba(201, 17, 17, 0.6); + border: none; +} +.ink-button.red[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.black { + color: white; + background: #1a1a1a; + border-color: #161616; +} +.ink-button.black:hover, .ink-button.black:active { + background: #0d0d0d; + border-color: #090909; + color: white; + text-decoration: none; +} +.ink-button.black:focus { + background: #0d0d0d; +} +.ink-button.black[disabled] { + background: rgba(26, 26, 26, 0.6); + border: none; +} +.ink-button.black[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.white { + color: #555555; + background: white; + border-color: #d8d8d8; +} +.ink-button.white:hover, .ink-button.white:active { + background: #f2f2f2; + border-color: #cbcbcb; + color: #555555; + text-decoration: none; +} +.ink-button.white:focus { + background: #f2f2f2; +} +.ink-button.white[disabled] { + background: rgba(255, 255, 255, 0.6); + border: none; +} +.ink-button.white[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.button-group > .ink-button.blue:first-child { + border-left: #0c63b9; +} +.button-group > .ink-button.green:first-child { + border-left: #3e8313; +} +.button-group > .ink-button.orange:first-child { + border-left: #d88400; +} +.button-group > .ink-button.red:first-child { + border-left: #aa0e0e; +} +.button-group > .ink-button.black:first-child { + border-left: #161616; +} +.button-group > .ink-button.white:first-child { + border-left: #d8d8d8; +} + +.ink-label { + color: white; + font-weight: 300; + font-size: 0.938em; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-label.white { + background: white; + color: #555555; +} +.ink-label.black { + background: black; +} +.ink-label.orange { + background: #ff9c00; +} +.ink-label.red { + background: #c91111; +} +.ink-label.green { + background: #4a9b17; +} +.ink-label.blue { + background: #0f75da; +} +.ink-label.yellow { + background: #ffd500; + color: #555555; +} +.ink-label.grey { + background: gray; +} +.ink-label + .ink-label { + margin-left: .2em; +} + +.ink-navigation ul.breadcrumbs { + font-weight: 300; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.breadcrumbs li.active a { + background: none; + color: #999999; +} +.ink-navigation ul.breadcrumbs li.active a:hover { + cursor: default; + text-decoration: none; +} +.ink-navigation ul.breadcrumbs li a:hover { + background: none; + text-decoration: underline; +} +.ink-navigation ul.breadcrumbs.white { + background: white; +} +.ink-navigation ul.breadcrumbs.white li a, .ink-navigation ul.breadcrumbs.white li:after { + color: #555555; +} +.ink-navigation ul.breadcrumbs.white li.active a { + color: #cccccc; + text-shadow: white 0 1px 0; +} +.ink-navigation ul.breadcrumbs.grey { + background: #d9d9d9; +} +.ink-navigation ul.breadcrumbs.grey li a, .ink-navigation ul.breadcrumbs.grey li:after { + color: #555555; +} +.ink-navigation ul.breadcrumbs.grey li.active a { + color: #a6a6a6; + text-shadow: #ededed 0 1px 0; +} +.ink-navigation ul.breadcrumbs.black { + background: #1a1a1a; +} +.ink-navigation ul.breadcrumbs.black li a, .ink-navigation ul.breadcrumbs.black li:after { + color: white; +} +.ink-navigation ul.breadcrumbs.black li.active a { + color: #666666; + text-shadow: black 0 -1px 0; +} +.ink-navigation ul.breadcrumbs.blue { + background: #1b75ce; +} +.ink-navigation ul.breadcrumbs.blue li a, .ink-navigation ul.breadcrumbs.blue li:after { + color: white; +} +.ink-navigation ul.breadcrumbs.blue li.active a { + color: #08427b; + text-shadow: #1884ef 0 1px 0; +} +.ink-navigation ul.breadcrumbs.orange { + background: #f2990d; +} +.ink-navigation ul.breadcrumbs.orange li a, .ink-navigation ul.breadcrumbs.orange li:after { + color: white; +} +.ink-navigation ul.breadcrumbs.orange li.active a { + color: #995e00; + text-shadow: #ffa81f 0 1px 0; +} +.ink-navigation ul.breadcrumbs.green { + background: #4c9220; +} +.ink-navigation ul.breadcrumbs.green li a, .ink-navigation ul.breadcrumbs.green li:after { + color: white; +} +.ink-navigation ul.breadcrumbs.green li.active a { + color: #20420a; + text-shadow: #57b61b 0 1px 0; +} +.ink-navigation ul.breadcrumbs.red { + background: #be1c1c; +} +.ink-navigation ul.breadcrumbs.red li a, .ink-navigation ul.breadcrumbs.red li:after { + color: white; +} +.ink-navigation ul.breadcrumbs.red li.active a { + color: #6b0909; + text-shadow: #e51313 0 1px 0; +} + +.ink-dropdown.blue ul.dropdown-menu li.active a { + background: #0f75da; + color: white; +} +.ink-dropdown.green ul.dropdown-menu li.active a { + background: #4a9b17; + color: white; +} +.ink-dropdown.orange ul.dropdown-menu li.active a { + background: #ff9c00; + color: white; +} +.ink-dropdown.red ul.dropdown-menu li.active a { + background: #c91111; + color: white; +} +.ink-dropdown.black ul.dropdown-menu li.active a { + background: #1a1a1a; + color: white; +} +.ink-dropdown.blue ul.dropdown-menu li.active a { + background: #0f75da; + color: white; +} + +.ink-navigation ul.menu { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.menu > li { + font-weight: 300; +} +.ink-navigation ul.menu > li.active a { + text-decoration: underline; +} +.ink-navigation ul.menu > li.heading { + font-weight: 500; +} +.ink-navigation ul.menu > li.disabled a { + color: #b3b3b3; + text-shadow: white 0 1px 0; +} +.ink-navigation ul.menu > li.disabled a:hover { + cursor: default; + background: none; + text-decoration: none; +} +.ink-navigation ul.menu > li ul.submenu li { + font-size: .875em; +} +.ink-navigation ul.menu > li ul.submenu li a { + border-bottom: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.vertical li a { + border-bottom: 1px solid rgba(0, 0, 0, 0.15); +} +.ink-navigation ul.menu.vertical li:first-child { + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + -ms-border-radius: 2px 2px 0 0; + -o-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +.ink-navigation ul.menu.vertical li:first-child > a { + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + -ms-border-radius: 2px 2px 0 0; + -o-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +.ink-navigation ul.menu.vertical li:last-child { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.vertical li:last-child > a { + border-bottom: none; + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.vertical li:last-child .submenu { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.vertical li:last-child .submenu.flyout { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.menu.vertical li:last-child .submenu li:last-child { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.vertical li:last-child .submenu li:last-child a { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.horizontal > li:first-child { + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; +} +.ink-navigation ul.menu.horizontal > li:first-child a { + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; +} +.ink-navigation ul.menu.horizontal > li:last-child { + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; +} +.ink-navigation ul.menu.horizontal > li:last-child a { + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; +} +.ink-navigation ul.menu.horizontal > li ul.submenu { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; + background: white; +} +.ink-navigation ul.menu.horizontal > li ul.submenu li:last-child { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.horizontal > li ul.submenu li:last-child a { + border-bottom: none; +} +.ink-navigation ul.menu.white { + background: white; +} +.ink-navigation ul.menu.white li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.white li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.white li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.white li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.white li.active { + background: #e6e6e6; +} +.ink-navigation ul.menu.white li.disabled a { + color: #cccccc; + text-shadow: white 0 1px 0; +} +.ink-navigation ul.menu.white li a { + color: #555555; + text-decoration: none; +} +.ink-navigation ul.menu.white li a:hover { + background: #f2f2f2; +} +.ink-navigation ul.menu.grey { + background: #d9d9d9; +} +.ink-navigation ul.menu.grey li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.grey li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.grey li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.grey li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.grey li.active { + background: #bfbfbf; +} +.ink-navigation ul.menu.grey li.disabled a { + color: #a6a6a6; + text-shadow: #ededed 0 1px 0; +} +.ink-navigation ul.menu.grey li a { + color: #555555; + text-decoration: none; +} +.ink-navigation ul.menu.grey li a:hover { + background: #cccccc; +} +.ink-navigation ul.menu.black { + background: #1a1a1a; +} +.ink-navigation ul.menu.black li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.black li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.black li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.black li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.black li.active { + background: #333333; +} +.ink-navigation ul.menu.black li.disabled a { + color: #666666; + text-shadow: black 0 -1px 0; +} +.ink-navigation ul.menu.black li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.menu.black li a:hover { + background: #404040; +} +.ink-navigation ul.menu.blue { + background: #1b75ce; +} +.ink-navigation ul.menu.blue li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.blue li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.blue li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.blue li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.blue li.active { + background: #0c5baa; +} +.ink-navigation ul.menu.blue li.disabled a { + color: #08427b; + text-shadow: #2289f0 0 1px 0; +} +.ink-navigation ul.menu.blue li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.menu.blue li a:hover { + background: #0d68c2; +} +.ink-navigation ul.menu.green { + background: #4c9220; +} +.ink-navigation ul.menu.green li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.green li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.green li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.green li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.green li.active { + background: #356f10; +} +.ink-navigation ul.menu.green li.disabled a { + color: #20420a; + text-shadow: #5bbf1c 0 1px 0; +} +.ink-navigation ul.menu.green li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.menu.green li a:hover { + background: #3f8514; +} +.ink-navigation ul.menu.orange { + background: #f2990d; +} +.ink-navigation ul.menu.orange li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.orange li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.orange li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.orange li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.orange li.active { + background: #cc7d00; +} +.ink-navigation ul.menu.orange li.disabled a { + color: #995e00; + text-shadow: #ffac29 0 1px 0; +} +.ink-navigation ul.menu.orange li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.menu.orange li a:hover { + background: #e68c00; +} +.ink-navigation ul.menu.red { + background: #be1c1c; +} +.ink-navigation ul.menu.red li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.red li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.red li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.red li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.red li.active { + background: #9a0d0d; +} +.ink-navigation ul.menu.red li.disabled a { + color: #6b0909; + text-shadow: #eb1717 0 1px 0; +} +.ink-navigation ul.menu.red li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.menu.red li a:hover { + background: #b10f0f; +} + +.ink-navigation ul.pagination { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.pagination li { + font-weight: 300; +} +.ink-navigation ul.pagination li.active a { + text-decoration: underline; +} +.ink-navigation ul.pagination li.disabled a { + color: #b3b3b3; + text-shadow: white 0 1px 0; +} +.ink-navigation ul.pagination li.disabled a:hover { + cursor: default; + background: none; + text-decoration: none; +} +.ink-navigation ul.pagination li:first-child, .ink-navigation ul.pagination li:first-child a { + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; +} +.ink-navigation ul.pagination li:last-child, .ink-navigation ul.pagination li:last-child a { + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; +} +.ink-navigation ul.pagination.white li { + background: white; +} +.ink-navigation ul.pagination.white li.active a { + background: #e6e6e6; +} +.ink-navigation ul.pagination.white li.disabled a { + color: #cccccc; + background: fade(black, 0%); + text-shadow: white 0 1px 0; +} +.ink-navigation ul.pagination.white li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.white li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.white li a:hover { + background: #e6e6e6; +} +.ink-navigation ul.pagination.white li { + background: white; +} +.ink-navigation ul.pagination.white li.active a { + background: #e6e6e6; +} +.ink-navigation ul.pagination.white li.disabled a { + color: #cccccc; + background: fade(black, 0%); + text-shadow: white 0 1px 0; +} +.ink-navigation ul.pagination.white li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.white li a { + color: #555555; + text-decoration: none; +} +.ink-navigation ul.pagination.white li a:hover { + background: #f2f2f2; +} +.ink-navigation ul.pagination.grey li { + background: #d9d9d9; +} +.ink-navigation ul.pagination.grey li.active a { + background: #bfbfbf; +} +.ink-navigation ul.pagination.grey li.disabled a { + color: #a6a6a6; + background: fade(black, 0%); + text-shadow: #ededed 0 1px 0; +} +.ink-navigation ul.pagination.grey li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.grey li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.grey li a:hover { + background: #bfbfbf; +} +.ink-navigation ul.pagination.grey li { + background: #d9d9d9; +} +.ink-navigation ul.pagination.grey li.active a { + background: #bfbfbf; +} +.ink-navigation ul.pagination.grey li.disabled a { + color: #a6a6a6; + background: fade(black, 0%); + text-shadow: #ededed 0 1px 0; +} +.ink-navigation ul.pagination.grey li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.grey li a { + color: #555555; + text-decoration: none; +} +.ink-navigation ul.pagination.grey li a:hover { + background: #cccccc; +} +.ink-navigation ul.pagination.black li { + background: #1a1a1a; +} +.ink-navigation ul.pagination.black li.active a { + background: black; +} +.ink-navigation ul.pagination.black li.disabled a { + color: black; + background: fade(black, 0%); + text-shadow: #2e2e2e 0 1px 0; +} +.ink-navigation ul.pagination.black li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.black li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.black li a:hover { + background: black; +} +.ink-navigation ul.pagination.black li { + background: #1a1a1a; +} +.ink-navigation ul.pagination.black li.active a { + background: #333333; +} +.ink-navigation ul.pagination.black li.disabled a { + color: #666666; + background: fade(black, 0%); + text-shadow: black 0 -1px 0; +} +.ink-navigation ul.pagination.black li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.black li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.black li a:hover { + background: #292929; +} +.ink-navigation ul.pagination.orange li { + background: #f2990d; +} +.ink-navigation ul.pagination.orange li.active a { + background: #cc7d00; +} +.ink-navigation ul.pagination.orange li.disabled a { + color: #995e00; + background: fade(black, 0%); + text-shadow: #ffac29 0 1px 0; +} +.ink-navigation ul.pagination.orange li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.orange li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.orange li a:hover { + background: #cc7d00; +} +.ink-navigation ul.pagination.orange li { + background: #f2990d; +} +.ink-navigation ul.pagination.orange li.active a { + background: #cc7d00; +} +.ink-navigation ul.pagination.orange li.disabled a { + color: #995e00; + background: fade(black, 0%); + text-shadow: #ffac29 0 1px 0; +} +.ink-navigation ul.pagination.orange li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.orange li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.orange li a:hover { + background: #e68c00; +} +.ink-navigation ul.pagination.blue li { + background: #1b75ce; +} +.ink-navigation ul.pagination.blue li.active a { + background: #0c5baa; +} +.ink-navigation ul.pagination.blue li.disabled a { + color: #08427b; + background: fade(black, 0%); + text-shadow: #2289f0 0 1px 0; +} +.ink-navigation ul.pagination.blue li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.blue li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.blue li a:hover { + background: #0c5baa; +} +.ink-navigation ul.pagination.blue li { + background: #1b75ce; +} +.ink-navigation ul.pagination.blue li.active a { + background: #0c5baa; +} +.ink-navigation ul.pagination.blue li.disabled a { + color: #08427b; + background: fade(black, 0%); + text-shadow: #2289f0 0 1px 0; +} +.ink-navigation ul.pagination.blue li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.blue li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.blue li a:hover { + background: #0d68c2; +} +.ink-navigation ul.pagination.green li { + background: #4c9220; +} +.ink-navigation ul.pagination.green li.active a { + background: #356f10; +} +.ink-navigation ul.pagination.green li.disabled a { + color: #20420a; + background: fade(black, 0%); + text-shadow: #5bbf1c 0 1px 0; +} +.ink-navigation ul.pagination.green li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.green li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.green li a:hover { + background: #356f10; +} +.ink-navigation ul.pagination.green li { + background: #4c9220; +} +.ink-navigation ul.pagination.green li.active a { + background: #356f10; +} +.ink-navigation ul.pagination.green li.disabled a { + color: #20420a; + background: fade(black, 0%); + text-shadow: #5bbf1c 0 1px 0; +} +.ink-navigation ul.pagination.green li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.green li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.green li a:hover { + background: #3f8514; +} +.ink-navigation ul.pagination.red li { + background: #be1c1c; +} +.ink-navigation ul.pagination.red li.active a { + background: #9a0d0d; +} +.ink-navigation ul.pagination.red li.disabled a { + color: #6b0909; + background: fade(black, 0%); + text-shadow: #eb1717 0 1px 0; +} +.ink-navigation ul.pagination.red li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.red li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.red li a:hover { + background: #9a0d0d; +} +.ink-navigation ul.pagination.red li { + background: #be1c1c; +} +.ink-navigation ul.pagination.red li.active a { + background: #9a0d0d; +} +.ink-navigation ul.pagination.red li.disabled a { + color: #6b0909; + background: fade(black, 0%); + text-shadow: #eb1717 0 1px 0; +} +.ink-navigation ul.pagination.red li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.red li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.red li a:hover { + background: #b10f0f; +} +.ink-navigation ul.pagination.dotted li { + background: none; +} +.ink-navigation ul.pagination.dotted li a { + background: #999999; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); + opacity: 0.5; +} +.ink-navigation ul.pagination.dotted li:hover a, .ink-navigation ul.pagination.dotted li.active a { + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); + opacity: 1; +} +.ink-navigation ul.pagination.dotted.black li a { + background: #1a1a1a; +} +.ink-navigation ul.pagination.dotted.white li a { + background: white; +} +.ink-navigation ul.pagination.dotted.blue li a { + background: #1b75ce; +} +.ink-navigation ul.pagination.dotted.green li a { + background: #4c9220; +} +.ink-navigation ul.pagination.dotted.orange li a { + background: #f2990d; +} +.ink-navigation ul.pagination.dotted.red li a { + background: #be1c1c; +} +.ink-navigation ul.pagination.chevron li.next a, .ink-navigation ul.pagination.chevron li.previous a { + color: white; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); + opacity: 0.6; +} +.ink-navigation ul.pagination.chevron li.next a:hover, .ink-navigation ul.pagination.chevron li.next a:focus, .ink-navigation ul.pagination.chevron li.next a.active, .ink-navigation ul.pagination.chevron li.previous a:hover, .ink-navigation ul.pagination.chevron li.previous a:focus, .ink-navigation ul.pagination.chevron li.previous a.active { + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); + opacity: 0.8; + text-decoration: none; + background: none; +} +.ink-navigation ul.pagination.chevron li.disabled a { + color: white; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); + opacity: 0.6; + text-shadow: none; +} +.ink-navigation ul.pagination.chevron li.disabled a:hover, .ink-navigation ul.pagination.chevron li.disabled a:focus { + color: white; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); + opacity: 0.6; +} +.ink-navigation ul.pagination.chevron.black li.next a, .ink-navigation ul.pagination.chevron.black li.previous a, .ink-navigation ul.pagination.chevron.black li.disabled a { + color: #1a1a1a; +} +.ink-navigation ul.pagination.chevron.grey li.next a, .ink-navigation ul.pagination.chevron.grey li.previous a, .ink-navigation ul.pagination.chevron.grey li.disabled a { + color: #d9d9d9; +} +.ink-navigation ul.pagination.chevron.blue li.next a, .ink-navigation ul.pagination.chevron.blue li.previous a, .ink-navigation ul.pagination.chevron.blue li.disabled a { + color: #1b75ce; +} +.ink-navigation ul.pagination.chevron.green li.next a, .ink-navigation ul.pagination.chevron.green li.previous a, .ink-navigation ul.pagination.chevron.green li.disabled a { + color: #4c9220; +} +.ink-navigation ul.pagination.chevron.orange li.next a, .ink-navigation ul.pagination.chevron.orange li.previous a, .ink-navigation ul.pagination.chevron.orange li.disabled a { + color: #f2990d; +} +.ink-navigation ul.pagination.chevron.red li.next a, .ink-navigation ul.pagination.chevron.red li.previous a, .ink-navigation ul.pagination.chevron.red li.disabled a { + color: #be1c1c; +} + +.ink-navigation ul.pills li { + background: white; + font-weight: 300; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.pills li a { + color: #555555; + background: none; +} +.ink-navigation ul.pills li a:hover { + background: #e6e6e6; +} +.ink-navigation ul.pills li.active a { + background: #e6e6e6; +} +.ink-navigation ul.pills li.disabled a { + color: #999999; + text-shadow: white 0 1px 0; +} +.ink-navigation ul.pills li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.grey li { + background: #d9d9d9; +} +.ink-navigation ul.pills.grey li.active a { + background: #bfbfbf; +} +.ink-navigation ul.pills.grey li.disabled a { + color: #a6a6a6; + text-shadow: #ededed 0 1px 0; +} +.ink-navigation ul.pills.grey li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.grey li a { + color: #555555; +} +.ink-navigation ul.pills.grey li a:hover { + background: #cccccc; +} +.ink-navigation ul.pills.black li { + background: #1a1a1a; +} +.ink-navigation ul.pills.black li.active a { + background: #333333; +} +.ink-navigation ul.pills.black li.disabled a { + color: #666666; + text-shadow: black 0 -1px 0; +} +.ink-navigation ul.pills.black li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.black li a { + color: white; +} +.ink-navigation ul.pills.black li a:hover { + background: #292929; +} +.ink-navigation ul.pills.blue li { + background: #1b75ce; +} +.ink-navigation ul.pills.blue li.active a { + background: #0c5baa; +} +.ink-navigation ul.pills.blue li.disabled a { + color: #08427b; + text-shadow: #2289f0 0 1px 0; +} +.ink-navigation ul.pills.blue li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.blue li a { + color: white; +} +.ink-navigation ul.pills.blue li a:hover { + background: #0d68c2; +} +.ink-navigation ul.pills.green li { + background: #4c9220; +} +.ink-navigation ul.pills.green li.active a { + background: #356f10; +} +.ink-navigation ul.pills.green li.disabled a { + color: #20420a; + text-shadow: #5bbf1c 0 1px 0; +} +.ink-navigation ul.pills.green li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.green li a { + color: white; +} +.ink-navigation ul.pills.green li a:hover { + background: #3f8514; +} +.ink-navigation ul.pills.orange li { + background: #f2990d; +} +.ink-navigation ul.pills.orange li.active a { + background: #cc7d00; +} +.ink-navigation ul.pills.orange li.disabled a { + color: #995e00; + text-shadow: #ffac29 0 1px 0; +} +.ink-navigation ul.pills.orange li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.orange li a { + color: white; +} +.ink-navigation ul.pills.orange li a:hover { + background: #e68c00; +} +.ink-navigation ul.pills.red li { + background: #be1c1c; +} +.ink-navigation ul.pills.red li.active a { + background: #9a0d0d; +} +.ink-navigation ul.pills.red li.disabled a { + color: #6b0909; + text-shadow: #eb1717 0 1px 0; +} +.ink-navigation ul.pills.red li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.red li a { + color: white; +} +.ink-navigation ul.pills.red li a:hover { + background: #b10f0f; +} + +table.ink-table { + background: white; +} +table.ink-table tr th, table.ink-table tr td { + border-bottom: #bbbbbb 1px solid; + background: none; +} +table.ink-table tfoot tr th, table.ink-table tfoot tr td { + border-top: #bbbbbb 1px solid; +} +table.ink-table.alternating tbody tr:nth-child(odd) { + background-color: whitesmoke; +} +table.ink-table.hover tbody tr:hover { + background: #fefbd6; + color: #555555; +} +table.ink-table.bordered { + border: #bbbbbb 1px solid; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +table.ink-table.bordered tr th { + border-left: #bbbbbb 1px solid; +} +table.ink-table.bordered tr th:first-child { + border-left: none; +} +table.ink-table.bordered tr:last-child td { + border-bottom: none; +} +table.ink-table.bordered tr td { + border-left: #bbbbbb 1px solid; +} +table.ink-table.bordered tr td:first-child { + border-left: none; +} +table.ink-table tbody > tr.red td { + background: #c91111; + color: white; +} +table.ink-table tbody > tr.green td { + background: #4a9b17; + color: white; +} +table.ink-table tbody > tr.blue td { + background: #0f75da; + color: white; +} +table.ink-table tbody > tr.orange td { + background: #ff9c00; + color: white; +} +table.ink-table tbody > tr.black td { + background: black; + color: #cccccc; +} +table.ink-table tbody > tr.yellow td { + background: #ffd500; + color: black; +} + +.animated.slow { + animation-duration: 1s; +} +.animated.medium { + animation-duration: 0.5s; +} +.animated.fast { + animation-duration: 0.2s; +} + +.ink-carousel { + width: 100%; + position: relative; + overflow: hidden; + display: block; +} +.ink-carousel .stage { + left: 0; + height: auto !important; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; + list-style-type: none; + white-space: nowrap; + position: relative; + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; +} +.ink-carousel .stage .slide { + position: relative; + display: inline-block; + vertical-align: top; + white-space: normal; + margin: 0; + float: none; + zoom: 1; + *display: inline; +} + +.ink-carousel { + width: 100%; + position: relative; + overflow: hidden; + display: block; +} +.ink-carousel .stage { + left: 0; + height: auto !important; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; + list-style-type: none; + white-space: nowrap; + position: relative; + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; +} +.ink-carousel .stage.column-group { + display: -webkit-block; + display: -moz-block; + display: block; + -webkit-flex-flow: none; + -moz-flex-flow: none; + flex-flow: none; +} +.ink-carousel .stage .slide { + position: relative; + display: inline-block; + vertical-align: top; + white-space: normal; + margin: 0; + float: none; + zoom: 1; + *display: inline; +} + +.ink-datepicker-wrapper { + position: relative; +} + +.ink-datepicker-calendar { + margin-top: 0; + position: absolute; +} +.ink-datepicker-calendar.right { + left: 100%; + top: 0; +} +.ink-datepicker-calendar.left { + right: 100%; + top: 0; +} +.ink-datepicker-calendar.bottom { + top: 100%; + left: 0; +} +.ink-datepicker-calendar.top { + bottom: 100%; + left: 0; +} + +.ink-datepicker-wrapper, .ink-datepicker-calendar { + display: inline; + display: inline-block; +} + +.ink-calendar { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + text-align: center; + padding: 0.3em; + min-width: 17.4em; + font-size: 13px; + -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0 1px 2px 0; + -moz-box-shadow: rgba(0, 0, 0, 0.4) 0 1px 2px 0; + box-shadow: rgba(0, 0, 0, 0.4) 0 1px 2px 0; + background: white; + z-index: 10; +} +.ink-calendar a { + text-decoration: none; +} +.ink-calendar li { + list-style: none inside; +} + +html.ink-modal-is-open .ink-calendar { + z-index: 101; +} + +.ink-calendar-top-options { + padding: 5px; + font-size: .813em; + cursor: pointer; +} +.ink-calendar-top-options .clean { + float: left; +} +.ink-calendar-top-options .close { + float: right; +} + +.ink-calendar-top { + line-height: 2em; + background: #e6e6e6; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-calendar-top div { + float: left; +} +.ink-calendar-top .ink-calendar-prev, +.ink-calendar-top .ink-calendar-next { + width: 10%; +} +.ink-calendar-top .ink-calendar-prev a, +.ink-calendar-top .ink-calendar-next a { + display: block; +} +.ink-calendar-top .ink-calendar-month_desc { + width: 80%; +} + +.ink-calendar-month, +.ink-calendar-year-selector, +.ink-calendar-month-selector { + margin-top: .5em; + padding-left: 0; +} +.ink-calendar-month li a, +.ink-calendar-year-selector li a, +.ink-calendar-month-selector li a { + margin: 0px; + line-height: 2em; + vertical-align: middle; + display: block; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + color: #444444; +} +.ink-calendar-month li a:hover, +.ink-calendar-year-selector li a:hover, +.ink-calendar-month-selector li a:hover { + background: #e6e6e6; +} +.ink-calendar-month li a.ink-calendar-on, .ink-calendar-month li a.ink-calendar-on:hover, +.ink-calendar-year-selector li a.ink-calendar-on, +.ink-calendar-year-selector li a.ink-calendar-on:hover, +.ink-calendar-month-selector li a.ink-calendar-on, +.ink-calendar-month-selector li a.ink-calendar-on:hover { + background: #0069d6; + color: white; +} +.ink-calendar-month li a.ink-calendar-off, .ink-calendar-month li a.ink-calendar-off:hover, +.ink-calendar-year-selector li a.ink-calendar-off, +.ink-calendar-year-selector li a.ink-calendar-off:hover, +.ink-calendar-month-selector li a.ink-calendar-off, +.ink-calendar-month-selector li a.ink-calendar-off:hover { + background: white; + color: #aaaaaa; + cursor: default; +} +.ink-calendar-month ul, +.ink-calendar-year-selector ul, +.ink-calendar-month-selector ul { + clear: both; + padding-left: 0; +} +.ink-calendar-month ul li, +.ink-calendar-year-selector ul li, +.ink-calendar-month-selector ul li { + width: 2.4em; + float: left; + text-align: center; + padding: 0; + margin: 0; +} + +.ink-calendar-year-selector ul li { + width: 25%; +} + +.ink-calendar-month-selector ul li { + width: 25%; +} + +.ink-calendar-year-selector, +.ink-calendar-month-selector { + display: none; +} + +.ink-calendar-off, .action_inactive { + color: #ddd !important; +} + +.ink-calendar-month .ink-calendar-header { + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + padding-bottom: .5em; + margin-bottom: .5em; + color: #aaa; +} + +.ink-calendar-top, +.ink-calendar-middle, +.ink-calendar-top-options, +.ink-calendar-month .ink-calendar-header, +.ink-calendar-month .ink-calendar-middle ul { + *zoom: 1; +} +.ink-calendar-top:after, +.ink-calendar-middle:after, +.ink-calendar-top-options:after, +.ink-calendar-month .ink-calendar-header:after, +.ink-calendar-month .ink-calendar-middle ul:after { + content: ""; + display: table; + clear: both; +} + +body.ink-drawer { + max-width: 100%; +} +body.ink-drawer .left-drawer, +body.ink-drawer .right-drawer, +body.ink-drawer .content-drawer { + -webkit-transition-property: translate3d; + -moz-transition-property: translate3d; + -o-transition-property: translate3d; + transition-property: translate3d; + -webkit-transition-duration: 300ms; + -moz-transition-duration: 300ms; + -o-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + -moz-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + -o-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); +} +body.ink-drawer .left-drawer { + left: -220px; +} +body.ink-drawer .right-drawer { + right: -220px; +} +body.ink-drawer .content-drawer { + width: 100%; +} +body.ink-drawer .left-drawer, +body.ink-drawer .right-drawer { + position: absolute; + top: 0; + z-index: 0; + display: none; + overflow-x: hidden; + overflow-y: auto; + width: 220px; + height: 100%; + -webkit-overflow-scrolling: touch; +} +body.ink-drawer .left-drawer.show, +body.ink-drawer .right-drawer.show { + display: block; +} +body.ink-drawer.push { + overflow: hidden; + width: 100%; + height: 100%; + position: fixed; +} +body.ink-drawer.push .content-drawer { + overflow: hidden; +} +body.ink-drawer.push.left .left-drawer, body.ink-drawer.push.left .content-drawer { + -webkit-transform: translate3d(220px, 0, 0); + -moz-transform: translate3d(220px, 0, 0); + -ms-transform: translate3d(220px, 0, 0); + -o-transform: translate3d(220px, 0, 0); + transform: translate3d(220px, 0, 0); +} +body.ink-drawer.push.right .right-drawer, body.ink-drawer.push.right .content-drawer { + -webkit-transform: translate3d(-220px, 0, 0); + -moz-transform: translate3d(-220px, 0, 0); + -ms-transform: translate3d(-220px, 0, 0); + -o-transform: translate3d(-220px, 0, 0); + transform: translate3d(-220px, 0, 0); +} +body.ink-drawer.over { + overflow: hidden; + -webkit-user-drag: none; +} +body.ink-drawer.over.left .left-drawer { + -webkit-transform: translate3d(220px, 0, 0); + -moz-transform: translate3d(220px, 0, 0); + -ms-transform: translate3d(220px, 0, 0); + -o-transform: translate3d(220px, 0, 0); + transform: translate3d(220px, 0, 0); +} +body.ink-drawer.over.right .right-drawer { + -webkit-transform: translate3d(-220px, 0, 0); + -moz-transform: translate3d(-220px, 0, 0); + -ms-transform: translate3d(-220px, 0, 0); + -o-transform: translate3d(-220px, 0, 0); + transform: translate3d(-220px, 0, 0); +} + +.ink-shade { + background: rgba(0, 0, 0, 0.8); + width: 100%; + height: 100%; + top: 0; + right: 0; + bottom: 0; + left: 0; + margin-top: 0; + position: fixed; + z-index: 100; + display: none; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); + opacity: 0; +} +.ink-shade.fade { + -webkit-transition: opacity 300ms; + -moz-transition: opacity 300ms; + -o-transition: opacity 300ms; + transition: opacity 300ms; +} +.ink-shade.visible { + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); + opacity: 1; +} + +.ink-modal { + top: 50%; + left: 50%; + width: 90%; + height: 90%; + background: white; + z-index: 100; + position: absolute; + border: 1px #666666 solid; + overflow: hidden; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); + opacity: 1; + -webkit-box-shadow: rgba(0, 0, 0, 0.8) 0 0 15px 0; + -moz-box-shadow: rgba(0, 0, 0, 0.8) 0 0 15px 0; + box-shadow: rgba(0, 0, 0, 0.8) 0 0 15px 0; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + *zoom: 1; +} +.ink-modal:after { + content: ""; + display: table; + clear: both; +} +.ink-modal > .modal-body { + padding: 1em; + overflow-y: auto; + overflow-x: hidden; + height: auto; +} +.ink-modal > .modal-body .ink-grid { + padding-left: 0; + padding-right: 0; + width: 100%; + min-width: 100%; +} +.ink-modal > .modal-header, .ink-modal > header { + border-bottom: 1px #e6e6e6 solid; + overflow: hidden; + -webkit-box-shadow: rgba(175, 175, 175, 0.2) 0 1px 2px 0; + -moz-box-shadow: rgba(175, 175, 175, 0.2) 0 1px 2px 0; + box-shadow: rgba(175, 175, 175, 0.2) 0 1px 2px 0; +} +.ink-modal > .modal-header > .modal-close, .ink-modal > header > .modal-close { + padding-top: 2px; + text-align: center; + color: white; + width: 26px; + height: 26px; + line-height: 1.2em; + border: 0; + background: #bfbfbf; + font-size: 0; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + -ms-border-radius: 50%; + -o-border-radius: 50%; + border-radius: 50%; + text-shadow: rgba(0, 0, 0, 0.6) 0 -1px 0; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); + opacity: 0.6; + float: right; +} +.ink-modal > .modal-header > .modal-close:after, .ink-modal > header > .modal-close:after { + content: "\f00d"; + font-family: FontAwesome; + font-size: medium; + line-height: 22px; +} +.ink-modal > .modal-header > .modal-close:hover, .ink-modal > header > .modal-close:hover { + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); + opacity: 1; +} +.ink-modal > .modal-footer, .ink-modal > footer { + background: #e6e6e6; + margin-bottom: 0; + zoom: 1; + -webkit-box-shadow: rgba(175, 175, 175, 0.2) 0 -1px 2px 0; + -moz-box-shadow: rgba(175, 175, 175, 0.2) 0 -1px 2px 0; + box-shadow: rgba(175, 175, 175, 0.2) 0 -1px 2px 0; +} +.ink-modal > .modal-header, .ink-modal > header, .ink-modal > .modal-footer, .ink-modal > footer { + padding: .8em 1em .65em 1em; +} +.ink-modal > .modal-header:before, .ink-modal > .modal-header:after, .ink-modal > header:before, .ink-modal > header:after, .ink-modal > .modal-footer:before, .ink-modal > .modal-footer:after, .ink-modal > footer:before, .ink-modal > footer:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.ink-modal-open { + overflow: hidden; +} + +/* Progess bars */ +.ink-progress-bar { + margin-bottom: 1em; + overflow: hidden; + background: #f2f2f2; + position: relative; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: 0, 1px, 3px, 0, rgba(0, 0, 0, 0.2), inset; + -moz-box-shadow: 0, 1px, 3px, 0, rgba(0, 0, 0, 0.2), inset; + box-shadow: 0, 1px, 3px, 0, rgba(0, 0, 0, 0.2), inset; +} +.ink-progress-bar .caption { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + line-height: 1.7; + text-align: center; + color: black; + font-size: 0.813em; + z-index: 10; +} +.ink-progress-bar .bar { + height: 1.3em; + text-shadow: rgba(0, 0, 0, 0.25), 0, 1px, 0; + -webkit-box-shadow: 0, 1px, 1px, 0, rgba(0, 0, 0, 0.1), inset; + -moz-box-shadow: 0, 1px, 1px, 0, rgba(0, 0, 0, 0.1), inset; + box-shadow: 0, 1px, 1px, 0, rgba(0, 0, 0, 0.1), inset; + -webkit-transition-property: width; + -moz-transition-property: width; + -o-transition-property: width; + transition-property: width; + -webkit-transition-duration: 0.6s; + -moz-transition-duration: 0.6s; + -o-transition-duration: 0.6s; + transition-duration: 0.6s; + -webkit-transition-timing-function: ease; + -moz-transition-timing-function: ease; + -o-transition-timing-function: ease; + transition-timing-function: ease; +} +.ink-progress-bar .bar.grey { + background: #cccccc; + color: #555555; +} +.ink-progress-bar .bar.green { + background: #4a9b17; + color: white; +} +.ink-progress-bar .bar.blue { + background: #0f75da; + color: white; +} +.ink-progress-bar .bar.red { + background: #c91111; + color: white; +} +.ink-progress-bar .bar.orange { + background: #ff9c00; + color: #555555; +} +.ink-progress-bar .bar.black { + background: black; + color: white; +} + +.dragging, .ink-sortable-list li { + cursor: move; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + -ms-user-select: none; + user-select: none; + -ms-user-drag: none; + -moz-user-drag: none; + -khtml-user-drag: none; + -webkit-user-drag: none; + -o-user-drag: none; + user-drag: none; +} + +.drag, .ink-sortable-list li.placeholder { + -webkit-box-shadow: 0, 0px, 10px, 0, rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0, 0px, 10px, 0, rgba(0, 0, 0, 0.3); + box-shadow: 0, 0px, 10px, 0, rgba(0, 0, 0, 0.3); +} + +.ink-sortable-list li { + margin: 0; + border-bottom: 1px solid #ccc; + line-height: 40px; +} +.ink-sortable-list li:hover, .ink-sortable-list li.placeholder { + background: #cccccc; + background: rgba(204, 204, 204, 0.2); +} +.ink-sortable-list li .ink-label { + margin: 0 .8em; +} + +.ink-sticky-stuck { + position: fixed; +} + +/* Tabs */ +.ink-tabs .tabs-nav { + list-style: none; + padding: 0em; + *zoom: 1; +} +.ink-tabs .tabs-nav li { + line-height: 1.7; + position: relative; + margin: 0; +} +.ink-tabs .tabs-nav li a { + padding: 0.5em 1em; + display: block; +} +.ink-tabs .tabs-nav li a:hover { + background: #f0f0f0; +} +.ink-tabs .tabs-nav li.active a { + color: #555555; + cursor: default; + text-decoration: none; + background: white; + border: 1px solid #cccccc; +} +.ink-tabs .tabs-nav:after { + content: ""; + display: table; + clear: both; +} +.ink-tabs .tabs-content { + margin-top: 1.5em; + overflow: auto; +} +.ink-tabs.top > .tabs-nav { + border-bottom: 1px solid #cccccc; +} +.ink-tabs.top > .tabs-nav li { + float: left; +} +.ink-tabs.top > .tabs-nav li a { + margin-right: .4em; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + -ms-border-radius: 4px 4px 0 0; + -o-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.ink-tabs.top > .tabs-nav li.active { + margin: 0 0 -2px 0; +} +.ink-tabs.top > .tabs-nav li.active a { + border-bottom-color: transparent; +} +.ink-tabs.bottom > .tabs-nav { + border-top: 1px solid #cccccc; +} +.ink-tabs.bottom > .tabs-nav li { + float: left; +} +.ink-tabs.bottom > .tabs-nav li a { + margin-right: .4em; + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + -ms-border-radius: 0 0 4px 4px; + -o-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.ink-tabs.bottom > .tabs-nav li.active { + margin: -2px 0 0 0; +} +.ink-tabs.bottom > .tabs-nav li.active a { + border-top-color: transparent; +} +.ink-tabs.left > .tabs-nav { + border-right: 1px solid #cccccc; + float: left; + margin-right: 2em; +} +.ink-tabs.left > .tabs-nav li { + float: none; + text-align: right; +} +.ink-tabs.left > .tabs-nav li a { + margin-bottom: .4em; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + -ms-border-radius: 4px 0 0 4px; + -o-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.ink-tabs.left > .tabs-nav li.active { + margin: 0 -2px 0 0; +} +.ink-tabs.left > .tabs-nav li.active a { + border-right-color: transparent; +} +.ink-tabs.right > .tabs-nav { + border-left: 1px solid #cccccc; + float: right; + margin-left: 2em; +} +.ink-tabs.right > .tabs-nav li { + float: none; +} +.ink-tabs.right > .tabs-nav li a { + margin-bottom: .4em; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + -ms-border-radius: 0 4px 4px 0; + -o-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.ink-tabs.right > .tabs-nav li.active { + margin: 0 0 0 -2px; +} +.ink-tabs.right > .tabs-nav li.active a { + border-left-color: transparent; +} + +.ink-tagfield input[type="text"].new-tag-input { + background-color: #fff; + border: 1px solid #ccc; + line-height: 1em; + margin: 0; + padding: 5px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-tagfield input[type="text"].new-tag-input:focus { + -webkit-box-shadow: 0px, 0px, 0px, 3px, #eaeaea; + -moz-box-shadow: 0px, 0px, 0px, 3px, #eaeaea; + box-shadow: 0px, 0px, 0px, 3px, #eaeaea; + border: 1px solid #c3c3c3; +} +.ink-tagfield span.ink-tag { + background-color: #1b1b1b; + color: #eaeaea; + text-shadow: none; + font-size: .9em; + font-weight: normal; + border: 1px solid #000; + padding: 4px 6px; +} +.ink-tagfield span.ink-tag i.icon-remove { + color: #ccc; + font-size: .9em; + font-weight: normal; + margin-left: 4px; +} +.ink-tagfield span.ink-tag i.icon-remove:hover { + cursor: pointer; + color: red; +} + +.ink-tree-view li { + list-style-type: none; +} +.ink-tree-view [data-open] > :before { + margin-left: -1.3em; + margin-right: .4em; + text-decoration: none; +} diff --git a/ajax/libs/ink/3.0.0/css/ink-flex.min.css b/ajax/libs/ink/3.0.0/css/ink-flex.min.css new file mode 100644 index 000000000..a2bf2015f --- /dev/null +++ b/ajax/libs/ink/3.0.0/css/ink-flex.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.grid-order{flex:100%}.show-all{display:inherit}.hide-all{display:none!important}.no-margin{margin:0!important}.no-padding{padding:0!important}.push-left{float:left;-webkit-justify-content:flex-start;-moz-justify-content:flex-start;justify-content:flex-start}.push-center{float:none!important;margin-left:auto;margin-right:auto;-webkit-justify-content:center;-moz-justify-content:center;justify-content:center}.push-right{float:right;-webkit-justify-content:flex-end;-moz-justify-content:flex-end;justify-content:flex-end}.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}.clearfix{overflow:hidden;*zoom:1;*zoom:1}.clearfix:after{content:"";display:table;clear:both}html{font-family:sans-serif}html *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:0}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.ink-alert.basic,.ink-alert.block{font-size:.938em;margin:1em 0;position:relative;overflow:hidden}.ink-alert.basic{padding:1em 3em 1em 1em}.ink-alert.basic p{margin:0}.ink-alert.basic .ink-close{top:.55em;*top:.2em}.ink-alert.block{font-size:1em}.ink-alert.block>h4{padding:1em 3em 1em 1em;font-size:.938em;line-height:1.5;margin:0}.ink-alert.block p{margin:1.5em 1em}.ink-alert.block ul{list-style:inside}.ink-alert .ink-dismiss{position:absolute;line-height:.56em;font-size:1.8em;padding:5px;border:0;background:0 0;top:.5em;*top:.2em;right:.4em}.ink-badge{padding:.2em .6em;font-size:.813em;margin-left:.6em}.ink-button{-webkit-appearance:menuitem;padding:8px 12px;cursor:pointer;text-decoration:none;text-align:center;display:inline-block;vertical-align:middle;white-space:nowrap;line-height:normal}.ink-button+.ink-button{margin-left:5px}.button-group{*zoom:1}.button-group>.ink-button{float:left;margin:5px 0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;border-left:0}.button-group>.ink-button:active,.button-group>.ink-button:hover{border-left:0}.button-group>.ink-button:first-child{-webkit-border-radius:2px 0 0 2px;-moz-border-radius:2px 0 0 2px;-ms-border-radius:2px 0 0 2px;-o-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px;border-left:1px solid #bfbfbf}.button-group>.ink-button:last-child{-webkit-border-radius:0 2px 2px 0;-moz-border-radius:0 2px 2px 0;-ms-border-radius:0 2px 2px 0;-o-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.button-group:after{content:"";display:table;clear:both}.button-toolbar{*zoom:1}.button-toolbar>.button-group{margin-right:10px;float:left}.button-toolbar:after{content:"";display:table;clear:both}.ink-form fieldset{border:0;padding:0;margin:0}.ink-form fieldset legend{font-size:1.438em;font-weight:700;width:100%;border-bottom:1px solid #ddd}.ink-form fieldset legend+*{-webkit-margin-top-collapse:separate;margin:2em 0}.ink-form p.tip{font-size:.875em;color:#909090;position:relative;margin:.2em 0 0 .1em}.ink-form p.label{padding:0;margin:0;color:#555;white-space:normal}.ink-form input[type=color],.ink-form input[type=date],.ink-form input[type=datetime-local],.ink-form input[type=datetime],.ink-form input[type=email],.ink-form input[type=month],.ink-form input[type=number],.ink-form input[type=password],.ink-form input[type=search],.ink-form input[type=tel],.ink-form input[type=text],.ink-form input[type=time],.ink-form input[type=url],.ink-form input[type=week],.ink-form select,.ink-form textarea{font-family:Roboto,Arial,Helvetica,sans-serif;font-weight:300;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;padding:8px 6px;border:1px solid #c6c6c6;resize:none;background:#fff;vertical-align:middle}.ink-form input[type=color]:focus,.ink-form input[type=date]:focus,.ink-form input[type=datetime-local]:focus,.ink-form input[type=datetime]:focus,.ink-form input[type=email]:focus,.ink-form input[type=month]:focus,.ink-form input[type=number]:focus,.ink-form input[type=password]:focus,.ink-form input[type=search]:focus,.ink-form input[type=tel]:focus,.ink-form input[type=text]:focus,.ink-form input[type=time]:focus,.ink-form input[type=url]:focus,.ink-form input[type=week]:focus,.ink-form select:focus,.ink-form textarea:focus{border-color:rgba(153,153,153,.9);-webkit-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;-moz-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;outline:0 none}.ink-form input[type=color]:disabled,.ink-form input[type=date]:disabled,.ink-form input[type=datetime-local]:disabled,.ink-form input[type=datetime]:disabled,.ink-form input[type=email]:disabled,.ink-form input[type=month]:disabled,.ink-form input[type=number]:disabled,.ink-form input[type=password]:disabled,.ink-form input[type=search]:disabled,.ink-form input[type=tel]:disabled,.ink-form input[type=text]:disabled,.ink-form input[type=time]:disabled,.ink-form input[type=url]:disabled,.ink-form input[type=week]:disabled,.ink-form select:disabled,.ink-form textarea:disabled{background:#f2f2f2;cursor:not-allowed}.ink-form .input-file{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;padding:6px;border:1px solid #c6c6c6;background:#fff;vertical-align:middle;line-height:1.2}.ink-form .input-file input[type=file]{-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;border:0;padding:0;background:0 0;width:100%}.ink-form .ink-button{margin:0 5px}.ink-form label{cursor:pointer}.ink-form select{line-height:2;cursor:pointer}.ink-form textarea{min-height:5em}.ink-form .control-group{line-height:2;margin-bottom:1em;*zoom:1}.ink-form .control-group:after{content:"";display:table;clear:both}.ink-form .control-group .control{position:relative;*zoom:1}.ink-form .control-group .control:after{content:"";display:table;clear:both}.ink-form .control-group .control>li{margin:0;*zoom:1}.ink-form .control-group .control>li:after{content:"";display:table;clear:both}.ink-form .control-group .control>input,.ink-form .control-group .control>select,.ink-form .control-group .control>textarea{width:100%}.ink-form .control-group .control>input+[class*=" icon-"],.ink-form .control-group .control>input+[class^=icon-],.ink-form .control-group .control>select+[class*=" icon-"],.ink-form .control-group .control>select+[class^=icon-],.ink-form .control-group .control>textarea+[class*=" icon-"],.ink-form .control-group .control>textarea+[class^=icon-]{display:none}.ink-form .control-group .control.append-button span,.ink-form .control-group .control.append-symbol span,.ink-form .control-group .control.prepend-button span,.ink-form .control-group .control.prepend-symbol span{width:100%;position:relative}.ink-form .control-group .control.append-button span>input,.ink-form .control-group .control.append-button span>select,.ink-form .control-group .control.append-button span>textarea,.ink-form .control-group .control.append-symbol span>input,.ink-form .control-group .control.append-symbol span>select,.ink-form .control-group .control.append-symbol span>textarea,.ink-form .control-group .control.prepend-button span>input,.ink-form .control-group .control.prepend-button span>select,.ink-form .control-group .control.prepend-button span>textarea,.ink-form .control-group .control.prepend-symbol span>input,.ink-form .control-group .control.prepend-symbol span>select,.ink-form .control-group .control.prepend-symbol span>textarea{width:100%}.ink-form .control-group .control.append-button>input[type=button],.ink-form .control-group .control.append-button>input[type=reset],.ink-form .control-group .control.append-button>input[type=submit],.ink-form .control-group .control.append-symbol>input[type=button],.ink-form .control-group .control.append-symbol>input[type=reset],.ink-form .control-group .control.append-symbol>input[type=submit],.ink-form .control-group .control.prepend-button>input[type=button],.ink-form .control-group .control.prepend-button>input[type=reset],.ink-form .control-group .control.prepend-button>input[type=submit],.ink-form .control-group .control.prepend-symbol>input[type=button],.ink-form .control-group .control.prepend-symbol>input[type=reset],.ink-form .control-group .control.prepend-symbol>input[type=submit]{width:auto}.ink-form .control-group .control.append-button{display:table}.ink-form .control-group .control.append-button span{display:table-cell}.ink-form .control-group .control.append-button span>input,.ink-form .control-group .control.append-button span>select,.ink-form .control-group .control.append-button span>textarea{-webkit-border-radius:2px 0 0 2px;-moz-border-radius:2px 0 0 2px;-ms-border-radius:2px 0 0 2px;-o-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.ink-form .control-group .control.append-button .ink-button{margin:0;-webkit-border-radius:0 2px 2px 0;-moz-border-radius:0 2px 2px 0;-ms-border-radius:0 2px 2px 0;-o-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0;border-left:0}.ink-form .control-group .control.prepend-button{display:table}.ink-form .control-group .control.prepend-button span{display:table-cell}.ink-form .control-group .control.prepend-button span>input,.ink-form .control-group .control.prepend-button span>select,.ink-form .control-group .control.prepend-button span>textarea{-webkit-border-radius:0 2px 2px 0;-moz-border-radius:0 2px 2px 0;-ms-border-radius:0 2px 2px 0;-o-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.ink-form .control-group .control.prepend-button .ink-button{margin:0;-webkit-border-radius:2px 0 0 2px;-moz-border-radius:2px 0 0 2px;-ms-border-radius:2px 0 0 2px;-o-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px;border-right:0}.ink-form .control-group .control.append-symbol span{display:block}.ink-form .control-group .control.append-symbol span>input,.ink-form .control-group .control.append-symbol span>select,.ink-form .control-group .control.append-symbol span>textarea{padding-right:2.5em}.ink-form .control-group .control.append-symbol span>[class*=" fa-"],.ink-form .control-group .control.append-symbol span>[class^=fa-]{position:absolute;right:1em;top:.86em;pointer-events:none}.ink-form .control-group .control.prepend-symbol span{display:block}.ink-form .control-group .control.prepend-symbol span>input,.ink-form .control-group .control.prepend-symbol span>select,.ink-form .control-group .control.prepend-symbol span>textarea{padding-left:2.5em}.ink-form .control-group .control.prepend-symbol span>[class*=" fa-"],.ink-form .control-group .control.prepend-symbol span>[class^=fa-]{position:absolute;left:1em;top:.86em;pointer-events:none}.ink-form .control-group input[type=checkbox],.ink-form .control-group input[type=radio]{padding:0;margin:.55em 0;border:0;clear:left;float:left;cursor:pointer}.ink-form .control-group input[type=checkbox]+label,.ink-form .control-group input[type=radio]+label{float:left;margin:.25em 0 .25em .4em}.ink-form .control-group .inline li{padding:0}.ink-form .control-group .inline li label{margin-right:1em}.ink-form .control-group.validation.error input,.ink-form .control-group.validation.error select,.ink-form .control-group.validation.error textarea{outline:0;-webkit-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;-moz-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;border:1px solid rgba(200,10,16,.5)}.ink-form .control-group.validation.error p.tip{color:rgba(150,7,12,.55)}.ink-form .control-group.validation.warning input,.ink-form .control-group.validation.warning select,.ink-form .control-group.validation.warning textarea{outline:0;-webkit-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;-moz-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;border:1px solid rgba(255,156,0,.6)}.ink-form .control-group.validation.warning p.tip{color:rgba(204,125,0,.6)}.ink-form .control-group.required label,.ink-form .control-group.required p.label{color:#555}.ink-form .control-group.required label:after,.ink-form .control-group.required p.label:after{content:"\f069";color:#c91111;margin-left:.6em;font-family:FontAwesome;font-size:.75em;width:1.25em}.ink-form .control-group.required ul.control label:after{content:""}.ink-grid{width:auto;max-width:1440px;margin:0 auto}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-9{order:9}.order-10{order:10}@media screen and (min-width:1261px){.ink-grid{padding:0 2em}.column-group.gutters{margin-left:-2em}.column-group.gutters>.all-auto,.column-group.gutters>[class*=all-],.column-group.gutters>[class*=xlarge-]{padding-left:2em;margin-bottom:2em}.column-group.horizontal-gutters{margin-left:-2em}.column-group.horizontal-gutters>.all-auto,.column-group.horizontal-gutters>[class*=all-],.column-group.horizontal-gutters>[class*=xlarge-]{padding-left:2em}.column-group.vertical-gutters>.all-auto,.column-group.vertical-gutters>[class*=all-],.column-group.vertical-gutters>[class*=xlarge-]{margin-bottom:2em}.column-group.double-gutters{margin-left:-4em}.column-group.double-gutters>.all-auto,.column-group.double-gutters>[class*=all-],.column-group.double-gutters>[class*=xlarge-]{padding-left:4em;margin-bottom:4em}.column-group.double-horizontal-gutters{margin-left:-4em}.column-group.double-horizontal-gutters>.all-auto,.column-group.double-horizontal-gutters>[class*=all-],.column-group.double-horizontal-gutters>[class*=xlarge-]{padding-left:4em}.column-group.double-vertical-gutters>.all-auto,.column-group.double-vertical-gutters>[class*=all-],.column-group.double-vertical-gutters>[class*=xlarge-]{margin-bottom:4em}.column-group.half-gutters{margin-left:-1em}.column-group.half-gutters>.all-auto,.column-group.half-gutters>[class*=all-],.column-group.half-gutters>[class*=xlarge-]{padding-left:1em;margin-bottom:1em}.column-group.half-horizontal-gutters{margin-left:-1em}.column-group.half-horizontal-gutters>.all-auto,.column-group.half-horizontal-gutters>[class*=all-],.column-group.half-horizontal-gutters>[class*=xlarge-]{padding-left:1em}.column-group.half-vertical-gutters>.all-auto,.column-group.half-vertical-gutters>[class*=all-],.column-group.half-vertical-gutters>[class*=xlarge-]{margin-bottom:1em}.column-group.quarter-gutters{margin-left:-.5em}.column-group.quarter-gutters>.all-auto,.column-group.quarter-gutters>[class*=all-],.column-group.quarter-gutters>[class*=xlarge-]{padding-left:.5em;margin-bottom:.5em}.column-group.quarter-horizontal-gutters{margin-left:-.5em}.column-group.quarter-horizontal-gutters>.all-auto,.column-group.quarter-horizontal-gutters>[class*=all-],.column-group.quarter-horizontal-gutters>[class*=xlarge-]{padding-left:.5em}.column-group.quarter-vertical-gutters>.all-auto,.column-group.quarter-vertical-gutters>[class*=all-],.column-group.quarter-vertical-gutters>[class*=xlarge-]{margin-bottom:.5em}.column-group.xlarge-gutters{margin-left:-2em}.column-group.xlarge-gutters>.all-auto,.column-group.xlarge-gutters>[class*=all-],.column-group.xlarge-gutters>[class*=xlarge-]{padding-left:.5em;margin-bottom:.5em}.column-group.xlarge-horizontal-gutters{margin-left:-2em}.column-group.xlarge-horizontal-gutters>.all-auto,.column-group.xlarge-horizontal-gutters>[class*=all-],.column-group.xlarge-horizontal-gutters>[class*=xlarge-]{padding-left:2em}.column-group.xlarge-vertical-gutters>.all-auto,.column-group.xlarge-vertical-gutters>[class*=all-],.column-group.xlarge-vertical-gutters>[class*=xlarge-]{margin-bottom:2em}.column-group.xlarge-double-gutters{margin-left:-4em}.column-group.xlarge-double-gutters>.all-auto,.column-group.xlarge-double-gutters>[class*=all-],.column-group.xlarge-double-gutters>[class*=xlarge-]{padding-left:4em;margin-bottom:4em}.column-group.xlarge-double-horizontal-gutters{margin-left:-4em}.column-group.xlarge-double-horizontal-gutters>.all-auto,.column-group.xlarge-double-horizontal-gutters>[class*=all-],.column-group.xlarge-double-horizontal-gutters>[class*=xlarge-]{padding-left:4em}.column-group.xlarge-double-vertical-gutters>.all-auto,.column-group.xlarge-double-vertical-gutters>[class*=all-],.column-group.xlarge-double-vertical-gutters>[class*=xlarge-]{margin-bottom:4em}.column-group.xlarge-half-gutters{margin-left:-1em}.column-group.xlarge-half-gutters>.all-auto,.column-group.xlarge-half-gutters>[class*=all-],.column-group.xlarge-half-gutters>[class*=xlarge-]{padding-left:1em;margin-bottom:1em}.column-group.xlarge-half-horizontal-gutters{margin-left:-1em}.column-group.xlarge-half-horizontal-gutters>.all-auto,.column-group.xlarge-half-horizontal-gutters>[class*=all-],.column-group.xlarge-half-horizontal-gutters>[class*=xlarge-]{padding-left:1em}.column-group.xlarge-half-vertical-gutters>.all-auto,.column-group.xlarge-half-vertical-gutters>[class*=all-],.column-group.xlarge-half-vertical-gutters>[class*=xlarge-]{margin-bottom:1em}.column-group.xlarge-quarter-gutters{margin-left:-.5em}.column-group.xlarge-quarter-gutters>.all-auto,.column-group.xlarge-quarter-gutters>[class*=all-],.column-group.xlarge-quarter-gutters>[class*=xlarge-]{padding-left:.5em;margin-bottom:.5em}.column-group.xlarge-quarter-horizontal-gutters{margin-left:-.5em}.column-group.xlarge-quarter-horizontal-gutters>.all-auto,.column-group.xlarge-quarter-horizontal-gutters>[class*=all-],.column-group.xlarge-quarter-horizontal-gutters>[class*=xlarge-]{padding-left:.5em}.column-group.xlarge-quarter-vertical-gutters>.all-auto,.column-group.xlarge-quarter-vertical-gutters>[class*=all-],.column-group.xlarge-quarter-vertical-gutters>[class*=xlarge-]{margin-bottom:.5em}.column-group.xlarge-no-gutters{margin-left:0}.column-group.xlarge-no-gutters>.all-auto,.column-group.xlarge-no-gutters>[class*=all-],.column-group.xlarge-no-gutters>[class*=xlarge-]{padding-left:0;margin-bottom:0}.all-5,.xlarge-5{width:5%;-webkit-flex-basis:5%;-moz-flex-basis:5%;flex-basis:5%;-webkit-flex-grow:0;flex-grow:0}.all-10,.xlarge-10{width:10%;-webkit-flex-basis:10%;-moz-flex-basis:10%;flex-basis:10%;-webkit-flex-grow:0;flex-grow:0}.all-15,.xlarge-15{width:15%;-webkit-flex-basis:15%;-moz-flex-basis:15%;flex-basis:15%;-webkit-flex-grow:0;flex-grow:0}.all-20,.xlarge-20{width:20%;-webkit-flex-basis:20%;-moz-flex-basis:20%;flex-basis:20%;-webkit-flex-grow:0;flex-grow:0}.all-25,.xlarge-25{width:25%;-webkit-flex-basis:25%;-moz-flex-basis:25%;flex-basis:25%;-webkit-flex-grow:0;flex-grow:0}.all-30,.xlarge-30{width:30%;-webkit-flex-basis:30%;-moz-flex-basis:30%;flex-basis:30%;-webkit-flex-grow:0;flex-grow:0}.all-33,.xlarge-33{width:33,33333%;-webkit-flex-basis:33.33333%;-moz-flex-basis:33.33333%;flex-basis:33.33333%;-webkit-flex-grow:0;flex-grow:0}.all-35,.xlarge-35{width:35%;-webkit-flex-basis:35%;-moz-flex-basis:35%;flex-basis:35%;-webkit-flex-grow:0;flex-grow:0}.all-40,.xlarge-40{width:40%;-webkit-flex-basis:40%;-moz-flex-basis:40%;flex-basis:40%;-webkit-flex-grow:0;flex-grow:0}.all-45,.xlarge-45{width:45%;-webkit-flex-basis:45%;-moz-flex-basis:45%;flex-basis:45%;-webkit-flex-grow:0;flex-grow:0}.all-50,.xlarge-50{width:50%;-webkit-flex-basis:50%;-moz-flex-basis:50%;flex-basis:50%;-webkit-flex-grow:0;flex-grow:0}.all-55,.xlarge-55{width:55%;-webkit-flex-basis:55%;-moz-flex-basis:55%;flex-basis:55%;-webkit-flex-grow:0;flex-grow:0}.all-60,.xlarge-60{width:60%;-webkit-flex-basis:60%;-moz-flex-basis:60%;flex-basis:60%;-webkit-flex-grow:0;flex-grow:0}.all-65,.xlarge-65{width:65%;-webkit-flex-basis:65%;-moz-flex-basis:65%;flex-basis:65%;-webkit-flex-grow:0;flex-grow:0}.all-66,.xlarge-66{width:66,66666%;-webkit-flex-basis:66.66666%;-moz-flex-basis:66.66666%;flex-basis:66.66666%;-webkit-flex-grow:0;flex-grow:0}.all-70,.xlarge-70{width:70%;-webkit-flex-basis:70%;-moz-flex-basis:70%;flex-basis:70%;-webkit-flex-grow:0;flex-grow:0}.all-75,.xlarge-75{width:75%;-webkit-flex-basis:75%;-moz-flex-basis:75%;flex-basis:75%;-webkit-flex-grow:0;flex-grow:0}.all-80,.xlarge-80{width:80%;-webkit-flex-basis:80%;-moz-flex-basis:80%;flex-basis:80%;-webkit-flex-grow:0;flex-grow:0}.all-85,.xlarge-85{width:85%;-webkit-flex-basis:85%;-moz-flex-basis:85%;flex-basis:85%;-webkit-flex-grow:0;flex-grow:0}.all-90,.xlarge-90{width:90%;-webkit-flex-basis:90%;-moz-flex-basis:90%;flex-basis:90%;-webkit-flex-grow:0;flex-grow:0}.all-95,.xlarge-95{width:95%;-webkit-flex-basis:95%;-moz-flex-basis:95%;flex-basis:95%;-webkit-flex-grow:0;flex-grow:0}.all-100,.xlarge-100{width:100%;-webkit-flex-basis:100%;-moz-flex-basis:100%;flex-basis:100%;-webkit-flex-grow:0;flex-grow:0}.all-auto,.xlarge-auto{width:auto;-webkit-flex-basis:auto;flex-basis:auto;-webkit-flex-grow:1;flex-grow:1}.column-group,.ink-flex{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;list-style:none}.column-group.reverse,.column-group.xlarge-reverse,.ink-flex.reverse,.ink-flex.xlarge-reverse{-webkit-flex-direction:row-reverse;-moz-flex-direction:row-reverse;flex-direction:row-reverse}.column-group.vertical,.column-group.xlarge-vertical,.ink-flex.vertical,.ink-flex.xlarge-vertical{-webkit-flex-direction:column;-moz-flex-direction:column;flex-direction:column}.column-group.vertical.reverse,.column-group.xlarge-vertical.xlarge-reverse,.ink-flex.vertical.reverse,.ink-flex.xlarge-vertical.xlarge-reverse{-webkit-flex-direction:column-reverse;-moz-flex-direction:column-reverse;flex-direction:column-reverse}.xlarge-order-1{order:1}.xlarge-order-2{order:2}.xlarge-order-3{order:3}.xlarge-order-4{order:4}.xlarge-order-5{order:5}.xlarge-order-6{order:6}.xlarge-order-7{order:7}.xlarge-order-8{order:8}.xlarge-order-9{order:9}.xlarge-order-10{order:10}.column-group .xlarge-auto{-webkit-flex-basis:auto;flex-basis:auto;-webkit-flex-grow:1;flex-grow:1}.push-top,.xlarge-push-top{-webkit-box-align:start;-webkit-align-items:flex-start;-moz-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.push-bottom,.xlarge-push-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-moz-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end}.push-middle,.xlarge-push-middle{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:flex-center;-ms-flex-item-align:center;align-self:center}.push-left,.xlarge-push-left{-webkit-justify-content:flex-start;-moz-justify-content:flex-start;justify-content:flex-start;float:left}.push-center,.xlarge-push-center{float:none!important;-webkit-justify-content:center;-moz-justify-content:center;justify-content:center;margin-left:auto;margin-right:auto}.push-right,.xlarge-push-right{-webkit-justify-content:flex-end;-moz-justify-content:flex-end;justify-content:flex-end;float:right}.xlarge-align-left{text-align:left}.xlarge-align-center{text-align:center}.xlarge-align-right{text-align:right}.space,.xlarge-space{margin:2em}.padding,.xlarge-padding{padding:2em}.double-space,.xlarge-double-space{margin:1em}.double-padding,.xlarge-double-padding{padding:1em}.half-space,.xlarge-half-space{margin:4em}.half-padding,.xlarge-half-padding{padding:4em}.quarter-space,.xlarge-quarter-space{margin:8em}.quarter-padding,.xlarge-quarter-padding{padding:8em}.vertical-space,.xlarge-vertical-space{margin-top:2em;margin-bottom:2em}.vertical-padding,.xlarge-vertical-padding{padding-top:2em;padding-bottom:2em}.double-vertical-space,.xlarge-double-vertical-space{margin-top:4em;margin-bottom:4em}.double-vertical-padding,.xlarge-double-vertical-padding{padding-top:4em;padding-bottom:4em}.half-vertical-space,.xlarge-half-vertical-space{margin-top:1em;margin-bottom:1em}.half-vertical-padding,.xlarge-half-vertical-padding{padding-top:1em;padding-bottom:1em}.quarter-vertical-space,.xlarge-quarter-vertical-space{margin-top:.5em;margin-bottom:.5em}.quarter-vertical-padding,.xlarge-quarter-vertical-padding{padding-top:.5em;padding-bottom:.5em}.horizontal-space,.xlarge-horizontal-space{margin-left:2em;margin-right:2em}.horizontal-padding,.xlarge-horizontal-padding{padding-left:2em;padding-right:2em}.double-horizontal-space,.xlarge-double-horizontal-space{margin-left:4em;margin-right:4em}.double-horizontal-padding,.xlarge-double-horizontal-padding{padding-left:4em;padding-right:4em}.half-horizontal-space,.xlarge-half-horizontal-space{margin-left:1em;margin-right:1em}.half-horizontal-padding,.xlarge-half-horizontal-padding{padding-left:1em;padding-right:1em}.quarter-horizontal-space,.xlarge-quarter-horizontal-space{margin-left:.5em;margin-right:.5em}.quarter-horizontal-padding,.xlarge-quarter-horizontal-padding{padding-left:.5em;padding-right:.5em}.top-space,.xlarge-top-space{margin-top:2em}.top-padding,.xlarge-top-padding{padding-top:2em}.double-top-space,.xlarge-double-top-space{margin-top:4em}.double-top-padding,.xlarge-double-top-padding{padding-top:4em}.half-top-space,.xlarge-half-top-space{margin-top:1em}.half-top-padding,.xlarge-half-top-padding{padding-top:1em}.quarter-top-space,.xlarge-quarter-top-space{margin-top:.5em}.quarter-top-padding,.xlarge-quarter-top-padding{padding-top:.5em}.right-space,.xlarge-right-space{margin-right:2em}.right-padding,.xlarge-right-padding{padding-right:2em}.double-right-space,.xlarge-double-right-space{margin-right:4em}.double-right-padding,.xlarge-double-right-padding{padding-right:4em}.half-right-space,.xlarge-half-right-space{margin-right:1em}.half-right-padding,.xlarge-half-right-padding{padding-right:1em}.quarter-right-space,.xlarge-quarter-right-space{margin-right:.5em}.quarter-right-padding,.xlarge-quarter-right-padding{padding-right:.5em}.bottom-space,.xlarge-bottom-space{margin-bottom:2em}.bottom-padding,.xlarge-bottom-padding{padding-bottom:2em}.double-bottom-space,.xlarge-double-bottom-space{margin-bottom:4em}.double-bottom-padding,.xlarge-double-bottom-padding{padding-bottom:4em}.half-bottom-space,.xlarge-half-bottom-space{margin-bottom:1em}.half-bottom-padding,.xlarge-half-bottom-padding{padding-bottom:1em}.quarter-bottom-space,.xlarge-quarter-bottom-space{margin-bottom:.5em}.quarter-bottom-padding,.xlarge-quarter-bottom-padding{padding-bottom:.5em}.left-space,.xlarge-left-space{margin-left:2em}.left-padding,.xlarge-left-padding{padding-left:2em}.double-left-space,.xlarge-double-left-space{margin-left:4em}.double-left-padding,.xlarge-double-left-padding{padding-left:4em}.half-left-space,.xlarge-half-left-space{margin-left:1em}.half-left-padding,.xlarge-half-left-padding{padding-left:1em}.quarter-left-space,.xlarge-quarter-left-space{margin-left:.5em}.quarter-left-padding,.xlarge-quarter-left-padding{padding-left:.5em}.hide-xlarge{display:none!important}.show-xlarge{display:inherit!important}table.show-xlarge{display:table}thead.show-xlarge{display:table-header-group}tbody.show-xlarge{display:table-row-group}tfoot.show-xlarge{display:table-footer-group}tr.show-xlarge{display:table-row}td.show-xlarge,th.show-xlarge{display:table-cell}}@media screen and (min-width:961px) and (max-width:1260px){.ink-grid{padding:0 1.75em}.column-group.gutters{margin-left:-1.75em}.column-group.gutters>.all-auto,.column-group.gutters>[class*=all-],.column-group.gutters>[class*=large-]{padding-left:1.75em;margin-bottom:1.75em}.column-group.horizontal-gutters{margin-left:-1.75em}.column-group.horizontal-gutters>.all-auto,.column-group.horizontal-gutters>[class*=all-],.column-group.horizontal-gutters>[class*=large-]{padding-left:1.75em}.column-group.vertical-gutters>.all-auto,.column-group.vertical-gutters>[class*=all-],.column-group.vertical-gutters>[class*=large-]{margin-bottom:1.75em}.column-group.double-gutters{margin-left:-3.5em}.column-group.double-gutters>.all-auto,.column-group.double-gutters>[class*=all-],.column-group.double-gutters>[class*=large-]{padding-left:3.5em;margin-bottom:3.5em}.column-group.double-horizontal-gutters{margin-left:-3.5em}.column-group.double-horizontal-gutters>.all-auto,.column-group.double-horizontal-gutters>[class*=all-],.column-group.double-horizontal-gutters>[class*=large-]{padding-left:3.5em}.column-group.double-vertical-gutters>.all-auto,.column-group.double-vertical-gutters>[class*=all-],.column-group.double-vertical-gutters>[class*=large-]{margin-bottom:3.5em}.column-group.half-gutters{margin-left:-.875em}.column-group.half-gutters>.all-auto,.column-group.half-gutters>[class*=all-],.column-group.half-gutters>[class*=large-]{padding-left:.875em;margin-bottom:.875em}.column-group.half-horizontal-gutters{margin-left:-.875em}.column-group.half-horizontal-gutters>.all-auto,.column-group.half-horizontal-gutters>[class*=all-],.column-group.half-horizontal-gutters>[class*=large-]{padding-left:.875em}.column-group.half-vertical-gutters>.all-auto,.column-group.half-vertical-gutters>[class*=all-],.column-group.half-vertical-gutters>[class*=large-]{margin-bottom:.875em}.column-group.quarter-gutters{margin-left:-.4375em}.column-group.quarter-gutters>.all-auto,.column-group.quarter-gutters>[class*=all-],.column-group.quarter-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}.column-group.quarter-horizontal-gutters{margin-left:-.4375em}.column-group.quarter-horizontal-gutters>.all-auto,.column-group.quarter-horizontal-gutters>[class*=all-],.column-group.quarter-horizontal-gutters>[class*=large-]{padding-left:.4375em}.column-group.quarter-vertical-gutters>.all-auto,.column-group.quarter-vertical-gutters>[class*=all-],.column-group.quarter-vertical-gutters>[class*=large-]{margin-bottom:.4375em}.column-group.large-gutters{margin-left:-1.75em}.column-group.large-gutters>.all-auto,.column-group.large-gutters>[class*=all-],.column-group.large-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}.column-group.large-horizontal-gutters{margin-left:-1.75em}.column-group.large-horizontal-gutters>.all-auto,.column-group.large-horizontal-gutters>[class*=all-],.column-group.large-horizontal-gutters>[class*=large-]{padding-left:1.75em}.column-group.large-vertical-gutters>.all-auto,.column-group.large-vertical-gutters>[class*=all-],.column-group.large-vertical-gutters>[class*=large-]{margin-bottom:1.75em}.column-group.large-double-gutters{margin-left:-3.5em}.column-group.large-double-gutters>.all-auto,.column-group.large-double-gutters>[class*=all-],.column-group.large-double-gutters>[class*=large-]{padding-left:3.5em;margin-bottom:3.5em}.column-group.large-double-horizontal-gutters{margin-left:-3.5em}.column-group.large-double-horizontal-gutters>.all-auto,.column-group.large-double-horizontal-gutters>[class*=all-],.column-group.large-double-horizontal-gutters>[class*=large-]{padding-left:3.5em}.column-group.large-double-vertical-gutters>.all-auto,.column-group.large-double-vertical-gutters>[class*=all-],.column-group.large-double-vertical-gutters>[class*=large-]{margin-bottom:3.5em}.column-group.large-half-gutters{margin-left:-.875em}.column-group.large-half-gutters>.all-auto,.column-group.large-half-gutters>[class*=all-],.column-group.large-half-gutters>[class*=large-]{padding-left:.875em;margin-bottom:.875em}.column-group.large-half-horizontal-gutters{margin-left:-.875em}.column-group.large-half-horizontal-gutters>.all-auto,.column-group.large-half-horizontal-gutters>[class*=all-],.column-group.large-half-horizontal-gutters>[class*=large-]{padding-left:.875em}.column-group.large-half-vertical-gutters>.all-auto,.column-group.large-half-vertical-gutters>[class*=all-],.column-group.large-half-vertical-gutters>[class*=large-]{margin-bottom:.875em}.column-group.large-quarter-gutters{margin-left:-.4375em}.column-group.large-quarter-gutters>.all-auto,.column-group.large-quarter-gutters>[class*=all-],.column-group.large-quarter-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}.column-group.large-quarter-horizontal-gutters{margin-left:-.4375em}.column-group.large-quarter-horizontal-gutters>.all-auto,.column-group.large-quarter-horizontal-gutters>[class*=all-],.column-group.large-quarter-horizontal-gutters>[class*=large-]{padding-left:.4375em}.column-group.large-quarter-vertical-gutters>.all-auto,.column-group.large-quarter-vertical-gutters>[class*=all-],.column-group.large-quarter-vertical-gutters>[class*=large-]{margin-bottom:.4375em}.column-group.large-no-gutters{margin-left:0}.column-group.large-no-gutters>.all-auto,.column-group.large-no-gutters>[class*=all-],.column-group.large-no-gutters>[class*=large-]{padding-left:0;margin-bottom:0}.all-5,.large-5{width:5%;-webkit-flex-basis:5%;-moz-flex-basis:5%;flex-basis:5%;-webkit-flex-grow:0;flex-grow:0}.all-10,.large-10{width:10%;-webkit-flex-basis:10%;-moz-flex-basis:10%;flex-basis:10%;-webkit-flex-grow:0;flex-grow:0}.all-15,.large-15{width:15%;-webkit-flex-basis:15%;-moz-flex-basis:15%;flex-basis:15%;-webkit-flex-grow:0;flex-grow:0}.all-20,.large-20{width:20%;-webkit-flex-basis:20%;-moz-flex-basis:20%;flex-basis:20%;-webkit-flex-grow:0;flex-grow:0}.all-25,.large-25{width:25%;-webkit-flex-basis:25%;-moz-flex-basis:25%;flex-basis:25%;-webkit-flex-grow:0;flex-grow:0}.all-30,.large-30{width:30%;-webkit-flex-basis:30%;-moz-flex-basis:30%;flex-basis:30%;-webkit-flex-grow:0;flex-grow:0}.all-33,.large-33{width:33,33333%;-webkit-flex-basis:33.33333%;-moz-flex-basis:33.33333%;flex-basis:33.33333%;-webkit-flex-grow:0;flex-grow:0}.all-35,.large-35{width:35%;-webkit-flex-basis:35%;-moz-flex-basis:35%;flex-basis:35%;-webkit-flex-grow:0;flex-grow:0}.all-40,.large-40{width:40%;-webkit-flex-basis:40%;-moz-flex-basis:40%;flex-basis:40%;-webkit-flex-grow:0;flex-grow:0}.all-45,.large-45{width:45%;-webkit-flex-basis:45%;-moz-flex-basis:45%;flex-basis:45%;-webkit-flex-grow:0;flex-grow:0}.all-50,.large-50{width:50%;-webkit-flex-basis:50%;-moz-flex-basis:50%;flex-basis:50%;-webkit-flex-grow:0;flex-grow:0}.all-55,.large-55{width:55%;-webkit-flex-basis:55%;-moz-flex-basis:55%;flex-basis:55%;-webkit-flex-grow:0;flex-grow:0}.all-60,.large-60{width:60%;-webkit-flex-basis:60%;-moz-flex-basis:60%;flex-basis:60%;-webkit-flex-grow:0;flex-grow:0}.all-65,.large-65{width:65%;-webkit-flex-basis:65%;-moz-flex-basis:65%;flex-basis:65%;-webkit-flex-grow:0;flex-grow:0}.all-66,.large-66{width:66,66666%;-webkit-flex-basis:66.66666%;-moz-flex-basis:66.66666%;flex-basis:66.66666%;-webkit-flex-grow:0;flex-grow:0}.all-70,.large-70{width:70%;-webkit-flex-basis:70%;-moz-flex-basis:70%;flex-basis:70%;-webkit-flex-grow:0;flex-grow:0}.all-75,.large-75{width:75%;-webkit-flex-basis:75%;-moz-flex-basis:75%;flex-basis:75%;-webkit-flex-grow:0;flex-grow:0}.all-80,.large-80{width:80%;-webkit-flex-basis:80%;-moz-flex-basis:80%;flex-basis:80%;-webkit-flex-grow:0;flex-grow:0}.all-85,.large-85{width:85%;-webkit-flex-basis:85%;-moz-flex-basis:85%;flex-basis:85%;-webkit-flex-grow:0;flex-grow:0}.all-90,.large-90{width:90%;-webkit-flex-basis:90%;-moz-flex-basis:90%;flex-basis:90%;-webkit-flex-grow:0;flex-grow:0}.all-95,.large-95{width:95%;-webkit-flex-basis:95%;-moz-flex-basis:95%;flex-basis:95%;-webkit-flex-grow:0;flex-grow:0}.all-100,.large-100{width:100%;-webkit-flex-basis:100%;-moz-flex-basis:100%;flex-basis:100%;-webkit-flex-grow:0;flex-grow:0}.all-auto,.large-auto{width:auto;-webkit-flex-basis:auto;flex-basis:auto;-webkit-flex-grow:1;flex-grow:1}.column-group,.ink-flex{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;list-style:none}.column-group.large-reverse,.column-group.reverse,.ink-flex.large-reverse,.ink-flex.reverse{-webkit-flex-direction:row-reverse;-moz-flex-direction:row-reverse;flex-direction:row-reverse}.column-group.large-vertical,.column-group.vertical,.ink-flex.large-vertical,.ink-flex.vertical{-webkit-flex-direction:column;-moz-flex-direction:column;flex-direction:column}.column-group.large-vertical.large-reverse,.column-group.vertical.reverse,.ink-flex.large-vertical.large-reverse,.ink-flex.vertical.reverse{-webkit-flex-direction:column-reverse;-moz-flex-direction:column-reverse;flex-direction:column-reverse}.large-order-1{order:1}.large-order-2{order:2}.large-order-3{order:3}.large-order-4{order:4}.large-order-5{order:5}.large-order-6{order:6}.large-order-7{order:7}.large-order-8{order:8}.large-order-9{order:9}.large-order-10{order:10}.column-group .large-auto{-webkit-flex-basis:auto;flex-basis:auto;-webkit-flex-grow:1;flex-grow:1}.large-push-top,.push-top{-webkit-box-align:start;-webkit-align-items:flex-start;-moz-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.large-push-bottom,.push-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-moz-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end}.large-push-middle,.push-middle{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:flex-center;-ms-flex-item-align:center;align-self:center}.large-push-left,.push-left{-webkit-justify-content:flex-start;-moz-justify-content:flex-start;justify-content:flex-start;float:left}.large-push-center,.push-center{float:none!important;-webkit-justify-content:center;-moz-justify-content:center;justify-content:center;margin-left:auto;margin-right:auto}.large-push-right,.push-right{-webkit-justify-content:flex-end;-moz-justify-content:flex-end;justify-content:flex-end;float:right}.large-align-left{text-align:left}.large-align-center{text-align:center}.large-align-right{text-align:right}.large-space,.space{margin:1.75em}.large-padding,.padding{padding:1.75em}.double-space,.large-double-space{margin:.875em}.double-padding,.large-double-padding{padding:.875em}.half-space,.large-half-space{margin:3.5em}.half-padding,.large-half-padding{padding:3.5em}.large-quarter-space,.quarter-space{margin:7em}.large-quarter-padding,.quarter-padding{padding:7em}.large-vertical-space,.vertical-space{margin-top:1.75em;margin-bottom:1.75em}.large-vertical-padding,.vertical-padding{padding-top:1.75em;padding-bottom:1.75em}.double-vertical-space,.large-double-vertical-space{margin-top:3.5em;margin-bottom:3.5em}.double-vertical-padding,.large-double-vertical-padding{padding-top:3.5em;padding-bottom:3.5em}.half-vertical-space,.large-half-vertical-space{margin-top:.875em;margin-bottom:.875em}.half-vertical-padding,.large-half-vertical-padding{padding-top:.875em;padding-bottom:.875em}.large-quarter-vertical-space,.quarter-vertical-space{margin-top:.4375em;margin-bottom:.4375em}.large-quarter-vertical-padding,.quarter-vertical-padding{padding-top:.4375em;padding-bottom:.4375em}.horizontal-space,.large-horizontal-space{margin-left:1.75em;margin-right:1.75em}.horizontal-padding,.large-horizontal-padding{padding-left:1.75em;padding-right:1.75em}.double-horizontal-space,.large-double-horizontal-space{margin-left:3.5em;margin-right:3.5em}.double-horizontal-padding,.large-double-horizontal-padding{padding-left:3.5em;padding-right:3.5em}.half-horizontal-space,.large-half-horizontal-space{margin-left:.875em;margin-right:.875em}.half-horizontal-padding,.large-half-horizontal-padding{padding-left:.875em;padding-right:.875em}.large-quarter-horizontal-space,.quarter-horizontal-space{margin-left:.4375em;margin-right:.4375em}.large-quarter-horizontal-padding,.quarter-horizontal-padding{padding-left:.4375em;padding-right:.4375em}.large-top-space,.top-space{margin-top:1.75em}.large-top-padding,.top-padding{padding-top:1.75em}.double-top-space,.large-double-top-space{margin-top:3.5em}.double-top-padding,.large-double-top-padding{padding-top:3.5em}.half-top-space,.large-half-top-space{margin-top:.875em}.half-top-padding,.large-half-top-padding{padding-top:.875em}.large-quarter-top-space,.quarter-top-space{margin-top:.4375em}.large-quarter-top-padding,.quarter-top-padding{padding-top:.4375em}.large-right-space,.right-space{margin-right:1.75em}.large-right-padding,.right-padding{padding-right:1.75em}.double-right-space,.large-double-right-space{margin-right:3.5em}.double-right-padding,.large-double-right-padding{padding-right:3.5em}.half-right-space,.large-half-right-space{margin-right:.875em}.half-right-padding,.large-half-right-padding{padding-right:.875em}.large-quarter-right-space,.quarter-right-space{margin-right:.4375em}.large-quarter-right-padding,.quarter-right-padding{padding-right:.4375em}.bottom-space,.large-bottom-space{margin-bottom:1.75em}.bottom-padding,.large-bottom-padding{padding-bottom:1.75em}.double-bottom-space,.large-double-bottom-space{margin-bottom:3.5em}.double-bottom-padding,.large-double-bottom-padding{padding-bottom:3.5em}.half-bottom-space,.large-half-bottom-space{margin-bottom:.875em}.half-bottom-padding,.large-half-bottom-padding{padding-bottom:.875em}.large-quarter-bottom-space,.quarter-bottom-space{margin-bottom:.4375em}.large-quarter-bottom-padding,.quarter-bottom-padding{padding-bottom:.4375em}.large-left-space,.left-space{margin-left:1.75em}.large-left-padding,.left-padding{padding-left:1.75em}.double-left-space,.large-double-left-space{margin-left:3.5em}.double-left-padding,.large-double-left-padding{padding-left:3.5em}.half-left-space,.large-half-left-space{margin-left:.875em}.half-left-padding,.large-half-left-padding{padding-left:.875em}.large-quarter-left-space,.quarter-left-space{margin-left:.4375em}.large-quarter-left-padding,.quarter-left-padding{padding-left:.4375em}.hide-large{display:none!important}.show-large{display:inherit!important}table.show-large{display:table}thead.show-large{display:table-header-group}tbody.show-large{display:table-row-group}tfoot.show-large{display:table-footer-group}tr.show-large{display:table-row}td.show-large,th.show-large{display:table-cell}}@media screen and (min-width:641px) and (max-width:960px){.ink-grid{padding:0 1.5em}.column-group.gutters{margin-left:-1.5em}.column-group.gutters>.all-auto,.column-group.gutters>[class*=all-],.column-group.gutters>[class*=medium-]{padding-left:1.5em;margin-bottom:1.5em}.column-group.horizontal-gutters{margin-left:-1.5em}.column-group.horizontal-gutters>.all-auto,.column-group.horizontal-gutters>[class*=all-],.column-group.horizontal-gutters>[class*=medium-]{padding-left:1.5em}.column-group.vertical-gutters>.all-auto,.column-group.vertical-gutters>[class*=all-],.column-group.vertical-gutters>[class*=medium-]{margin-bottom:1.5em}.column-group.double-gutters{margin-left:-3em}.column-group.double-gutters>.all-auto,.column-group.double-gutters>[class*=all-],.column-group.double-gutters>[class*=medium-]{padding-left:3em;margin-bottom:3em}.column-group.double-horizontal-gutters{margin-left:-3em}.column-group.double-horizontal-gutters>.all-auto,.column-group.double-horizontal-gutters>[class*=all-],.column-group.double-horizontal-gutters>[class*=medium-]{padding-left:3em}.column-group.double-vertical-gutters>.all-auto,.column-group.double-vertical-gutters>[class*=all-],.column-group.double-vertical-gutters>[class*=medium-]{margin-bottom:3em}.column-group.half-gutters{margin-left:-.75em}.column-group.half-gutters>.all-auto,.column-group.half-gutters>[class*=all-],.column-group.half-gutters>[class*=medium-]{padding-left:.75em;margin-bottom:.75em}.column-group.half-horizontal-gutters{margin-left:-.75em}.column-group.half-horizontal-gutters>.all-auto,.column-group.half-horizontal-gutters>[class*=all-],.column-group.half-horizontal-gutters>[class*=medium-]{padding-left:.75em}.column-group.half-vertical-gutters>.all-auto,.column-group.half-vertical-gutters>[class*=all-],.column-group.half-vertical-gutters>[class*=medium-]{margin-bottom:.75em}.column-group.quarter-gutters{margin-left:-.375em}.column-group.quarter-gutters>.all-auto,.column-group.quarter-gutters>[class*=all-],.column-group.quarter-gutters>[class*=medium-]{padding-left:.375em;margin-bottom:.375em}.column-group.quarter-horizontal-gutters{margin-left:-.375em}.column-group.quarter-horizontal-gutters>.all-auto,.column-group.quarter-horizontal-gutters>[class*=all-],.column-group.quarter-horizontal-gutters>[class*=medium-]{padding-left:.375em}.column-group.quarter-vertical-gutters>.all-auto,.column-group.quarter-vertical-gutters>[class*=all-],.column-group.quarter-vertical-gutters>[class*=medium-]{margin-bottom:.375em}.column-group.medium-gutters{margin-left:-1.5em}.column-group.medium-gutters>.all-auto,.column-group.medium-gutters>[class*=all-],.column-group.medium-gutters>[class*=medium-]{padding-left:.375em;margin-bottom:.375em}.column-group.medium-horizontal-gutters{margin-left:-1.5em}.column-group.medium-horizontal-gutters>.all-auto,.column-group.medium-horizontal-gutters>[class*=all-],.column-group.medium-horizontal-gutters>[class*=medium-]{padding-left:1.5em}.column-group.medium-vertical-gutters>.all-auto,.column-group.medium-vertical-gutters>[class*=all-],.column-group.medium-vertical-gutters>[class*=medium-]{margin-bottom:1.5em}.column-group.medium-double-gutters{margin-left:-3em}.column-group.medium-double-gutters>.all-auto,.column-group.medium-double-gutters>[class*=all-],.column-group.medium-double-gutters>[class*=medium-]{padding-left:3em;margin-bottom:3em}.column-group.medium-double-horizontal-gutters{margin-left:-3em}.column-group.medium-double-horizontal-gutters>.all-auto,.column-group.medium-double-horizontal-gutters>[class*=all-],.column-group.medium-double-horizontal-gutters>[class*=medium-]{padding-left:3em}.column-group.medium-double-vertical-gutters>.all-auto,.column-group.medium-double-vertical-gutters>[class*=all-],.column-group.medium-double-vertical-gutters>[class*=medium-]{margin-bottom:3em}.column-group.medium-half-gutters{margin-left:-.75em}.column-group.medium-half-gutters>.all-auto,.column-group.medium-half-gutters>[class*=all-],.column-group.medium-half-gutters>[class*=medium-]{padding-left:.75em;margin-bottom:.75em}.column-group.medium-half-horizontal-gutters{margin-left:-.75em}.column-group.medium-half-horizontal-gutters>.all-auto,.column-group.medium-half-horizontal-gutters>[class*=all-],.column-group.medium-half-horizontal-gutters>[class*=medium-]{padding-left:.75em}.column-group.medium-half-vertical-gutters>.all-auto,.column-group.medium-half-vertical-gutters>[class*=all-],.column-group.medium-half-vertical-gutters>[class*=medium-]{margin-bottom:.75em}.column-group.medium-quarter-gutters{margin-left:-.375em}.column-group.medium-quarter-gutters>.all-auto,.column-group.medium-quarter-gutters>[class*=all-],.column-group.medium-quarter-gutters>[class*=medium-]{padding-left:.375em;margin-bottom:.375em}.column-group.medium-quarter-horizontal-gutters{margin-left:-.375em}.column-group.medium-quarter-horizontal-gutters>.all-auto,.column-group.medium-quarter-horizontal-gutters>[class*=all-],.column-group.medium-quarter-horizontal-gutters>[class*=medium-]{padding-left:.375em}.column-group.medium-quarter-vertical-gutters>.all-auto,.column-group.medium-quarter-vertical-gutters>[class*=all-],.column-group.medium-quarter-vertical-gutters>[class*=medium-]{margin-bottom:.375em}.column-group.medium-no-gutters{margin-left:0}.column-group.medium-no-gutters>.all-auto,.column-group.medium-no-gutters>[class*=all-],.column-group.medium-no-gutters>[class*=medium-]{padding-left:0;margin-bottom:0}.all-5,.medium-5{width:5%;-webkit-flex-basis:5%;-moz-flex-basis:5%;flex-basis:5%;-webkit-flex-grow:0;flex-grow:0}.all-10,.medium-10{width:10%;-webkit-flex-basis:10%;-moz-flex-basis:10%;flex-basis:10%;-webkit-flex-grow:0;flex-grow:0}.all-15,.medium-15{width:15%;-webkit-flex-basis:15%;-moz-flex-basis:15%;flex-basis:15%;-webkit-flex-grow:0;flex-grow:0}.all-20,.medium-20{width:20%;-webkit-flex-basis:20%;-moz-flex-basis:20%;flex-basis:20%;-webkit-flex-grow:0;flex-grow:0}.all-25,.medium-25{width:25%;-webkit-flex-basis:25%;-moz-flex-basis:25%;flex-basis:25%;-webkit-flex-grow:0;flex-grow:0}.all-30,.medium-30{width:30%;-webkit-flex-basis:30%;-moz-flex-basis:30%;flex-basis:30%;-webkit-flex-grow:0;flex-grow:0}.all-33,.medium-33{width:33,33333%;-webkit-flex-basis:33.33333%;-moz-flex-basis:33.33333%;flex-basis:33.33333%;-webkit-flex-grow:0;flex-grow:0}.all-35,.medium-35{width:35%;-webkit-flex-basis:35%;-moz-flex-basis:35%;flex-basis:35%;-webkit-flex-grow:0;flex-grow:0}.all-40,.medium-40{width:40%;-webkit-flex-basis:40%;-moz-flex-basis:40%;flex-basis:40%;-webkit-flex-grow:0;flex-grow:0}.all-45,.medium-45{width:45%;-webkit-flex-basis:45%;-moz-flex-basis:45%;flex-basis:45%;-webkit-flex-grow:0;flex-grow:0}.all-50,.medium-50{width:50%;-webkit-flex-basis:50%;-moz-flex-basis:50%;flex-basis:50%;-webkit-flex-grow:0;flex-grow:0}.all-55,.medium-55{width:55%;-webkit-flex-basis:55%;-moz-flex-basis:55%;flex-basis:55%;-webkit-flex-grow:0;flex-grow:0}.all-60,.medium-60{width:60%;-webkit-flex-basis:60%;-moz-flex-basis:60%;flex-basis:60%;-webkit-flex-grow:0;flex-grow:0}.all-65,.medium-65{width:65%;-webkit-flex-basis:65%;-moz-flex-basis:65%;flex-basis:65%;-webkit-flex-grow:0;flex-grow:0}.all-66,.medium-66{width:66,66666%;-webkit-flex-basis:66.66666%;-moz-flex-basis:66.66666%;flex-basis:66.66666%;-webkit-flex-grow:0;flex-grow:0}.all-70,.medium-70{width:70%;-webkit-flex-basis:70%;-moz-flex-basis:70%;flex-basis:70%;-webkit-flex-grow:0;flex-grow:0}.all-75,.medium-75{width:75%;-webkit-flex-basis:75%;-moz-flex-basis:75%;flex-basis:75%;-webkit-flex-grow:0;flex-grow:0}.all-80,.medium-80{width:80%;-webkit-flex-basis:80%;-moz-flex-basis:80%;flex-basis:80%;-webkit-flex-grow:0;flex-grow:0}.all-85,.medium-85{width:85%;-webkit-flex-basis:85%;-moz-flex-basis:85%;flex-basis:85%;-webkit-flex-grow:0;flex-grow:0}.all-90,.medium-90{width:90%;-webkit-flex-basis:90%;-moz-flex-basis:90%;flex-basis:90%;-webkit-flex-grow:0;flex-grow:0}.all-95,.medium-95{width:95%;-webkit-flex-basis:95%;-moz-flex-basis:95%;flex-basis:95%;-webkit-flex-grow:0;flex-grow:0}.all-100,.medium-100{width:100%;-webkit-flex-basis:100%;-moz-flex-basis:100%;flex-basis:100%;-webkit-flex-grow:0;flex-grow:0}.all-auto,.medium-auto{width:auto;-webkit-flex-basis:auto;flex-basis:auto;-webkit-flex-grow:1;flex-grow:1}.column-group,.ink-flex{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;list-style:none}.column-group.medium-reverse,.column-group.reverse,.ink-flex.medium-reverse,.ink-flex.reverse{-webkit-flex-direction:row-reverse;-moz-flex-direction:row-reverse;flex-direction:row-reverse}.column-group.medium-vertical,.column-group.vertical,.ink-flex.medium-vertical,.ink-flex.vertical{-webkit-flex-direction:column;-moz-flex-direction:column;flex-direction:column}.column-group.medium-vertical.medium-reverse,.column-group.vertical.reverse,.ink-flex.medium-vertical.medium-reverse,.ink-flex.vertical.reverse{-webkit-flex-direction:column-reverse;-moz-flex-direction:column-reverse;flex-direction:column-reverse}.medium-order-1{order:1}.medium-order-2{order:2}.medium-order-3{order:3}.medium-order-4{order:4}.medium-order-5{order:5}.medium-order-6{order:6}.medium-order-7{order:7}.medium-order-8{order:8}.medium-order-9{order:9}.medium-order-10{order:10}.column-group .medium-auto{-webkit-flex-basis:auto;flex-basis:auto;-webkit-flex-grow:1;flex-grow:1}.medium-push-top,.push-top{-webkit-box-align:start;-webkit-align-items:flex-start;-moz-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.medium-push-bottom,.push-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-moz-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end}.medium-push-middle,.push-middle{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:flex-center;-ms-flex-item-align:center;align-self:center}.medium-push-left,.push-left{-webkit-justify-content:flex-start;-moz-justify-content:flex-start;justify-content:flex-start;float:left}.medium-push-center,.push-center{float:none!important;-webkit-justify-content:center;-moz-justify-content:center;justify-content:center;margin-left:auto;margin-right:auto}.medium-push-right,.push-right{-webkit-justify-content:flex-end;-moz-justify-content:flex-end;justify-content:flex-end;float:right}.medium-align-left{text-align:left}.medium-align-center{text-align:center}.medium-align-right{text-align:right}.medium-space,.space{margin:1.5em}.medium-padding,.padding{padding:1.5em}.double-space,.medium-double-space{margin:.75em}.double-padding,.medium-double-padding{padding:.75em}.half-space,.medium-half-space{margin:3em}.half-padding,.medium-half-padding{padding:3em}.medium-quarter-space,.quarter-space{margin:6em}.medium-quarter-padding,.quarter-padding{padding:6em}.medium-vertical-space,.vertical-space{margin-top:1.5em;margin-bottom:1.5em}.medium-vertical-padding,.vertical-padding{padding-top:1.5em;padding-bottom:1.5em}.double-vertical-space,.medium-double-vertical-space{margin-top:3em;margin-bottom:3em}.double-vertical-padding,.medium-double-vertical-padding{padding-top:3em;padding-bottom:3em}.half-vertical-space,.medium-half-vertical-space{margin-top:.75em;margin-bottom:.75em}.half-vertical-padding,.medium-half-vertical-padding{padding-top:.75em;padding-bottom:.75em}.medium-quarter-vertical-space,.quarter-vertical-space{margin-top:.375em;margin-bottom:.375em}.medium-quarter-vertical-padding,.quarter-vertical-padding{padding-top:.375em;padding-bottom:.375em}.horizontal-space,.medium-horizontal-space{margin-left:1.5em;margin-right:1.5em}.horizontal-padding,.medium-horizontal-padding{padding-left:1.5em;padding-right:1.5em}.double-horizontal-space,.medium-double-horizontal-space{margin-left:3em;margin-right:3em}.double-horizontal-padding,.medium-double-horizontal-padding{padding-left:3em;padding-right:3em}.half-horizontal-space,.medium-half-horizontal-space{margin-left:.75em;margin-right:.75em}.half-horizontal-padding,.medium-half-horizontal-padding{padding-left:.75em;padding-right:.75em}.medium-quarter-horizontal-space,.quarter-horizontal-space{margin-left:.375em;margin-right:.375em}.medium-quarter-horizontal-padding,.quarter-horizontal-padding{padding-left:.375em;padding-right:.375em}.medium-top-space,.top-space{margin-top:1.5em}.medium-top-padding,.top-padding{padding-top:1.5em}.double-top-space,.medium-double-top-space{margin-top:3em}.double-top-padding,.medium-double-top-padding{padding-top:3em}.half-top-space,.medium-half-top-space{margin-top:.75em}.half-top-padding,.medium-half-top-padding{padding-top:.75em}.medium-quarter-top-space,.quarter-top-space{margin-top:.375em}.medium-quarter-top-padding,.quarter-top-padding{padding-top:.375em}.medium-right-space,.right-space{margin-right:1.5em}.medium-right-padding,.right-padding{padding-right:1.5em}.double-right-space,.medium-double-right-space{margin-right:3em}.double-right-padding,.medium-double-right-padding{padding-right:3em}.half-right-space,.medium-half-right-space{margin-right:.75em}.half-right-padding,.medium-half-right-padding{padding-right:.75em}.medium-quarter-right-space,.quarter-right-space{margin-right:.375em}.medium-quarter-right-padding,.quarter-right-padding{padding-right:.375em}.bottom-space,.medium-bottom-space{margin-bottom:1.5em}.bottom-padding,.medium-bottom-padding{padding-bottom:1.5em}.double-bottom-space,.medium-double-bottom-space{margin-bottom:3em}.double-bottom-padding,.medium-double-bottom-padding{padding-bottom:3em}.half-bottom-space,.medium-half-bottom-space{margin-bottom:.75em}.half-bottom-padding,.medium-half-bottom-padding{padding-bottom:.75em}.medium-quarter-bottom-space,.quarter-bottom-space{margin-bottom:.375em}.medium-quarter-bottom-padding,.quarter-bottom-padding{padding-bottom:.375em}.left-space,.medium-left-space{margin-left:1.5em}.left-padding,.medium-left-padding{padding-left:1.5em}.double-left-space,.medium-double-left-space{margin-left:3em}.double-left-padding,.medium-double-left-padding{padding-left:3em}.half-left-space,.medium-half-left-space{margin-left:.75em}.half-left-padding,.medium-half-left-padding{padding-left:.75em}.medium-quarter-left-space,.quarter-left-space{margin-left:.375em}.medium-quarter-left-padding,.quarter-left-padding{padding-left:.375em}.hide-medium{display:none!important}.show-medium{display:inherit!important}table.show-medium{display:table}thead.show-medium{display:table-header-group}tbody.show-medium{display:table-row-group}tfoot.show-medium{display:table-footer-group}tr.show-medium{display:table-row}td.show-medium,th.show-medium{display:table-cell}}@media screen and (min-width:321px) and (max-width:640px){.ink-grid{padding:0 1.25em}.column-group.gutters{margin-left:-1.25em}.column-group.gutters>.all-auto,.column-group.gutters>[class*=all-],.column-group.gutters>[class*=small-]{padding-left:1.25em;margin-bottom:1.25em}.column-group.horizontal-gutters{margin-left:-1.25em}.column-group.horizontal-gutters>.all-auto,.column-group.horizontal-gutters>[class*=all-],.column-group.horizontal-gutters>[class*=small-]{padding-left:1.25em}.column-group.vertical-gutters>.all-auto,.column-group.vertical-gutters>[class*=all-],.column-group.vertical-gutters>[class*=small-]{margin-bottom:1.25em}.column-group.double-gutters{margin-left:-2.5em}.column-group.double-gutters>.all-auto,.column-group.double-gutters>[class*=all-],.column-group.double-gutters>[class*=small-]{padding-left:2.5em;margin-bottom:2.5em}.column-group.double-horizontal-gutters{margin-left:-2.5em}.column-group.double-horizontal-gutters>.all-auto,.column-group.double-horizontal-gutters>[class*=all-],.column-group.double-horizontal-gutters>[class*=small-]{padding-left:2.5em}.column-group.double-vertical-gutters>.all-auto,.column-group.double-vertical-gutters>[class*=all-],.column-group.double-vertical-gutters>[class*=small-]{margin-bottom:2.5em}.column-group.half-gutters{margin-left:-.625em}.column-group.half-gutters>.all-auto,.column-group.half-gutters>[class*=all-],.column-group.half-gutters>[class*=small-]{padding-left:.625em;margin-bottom:.625em}.column-group.half-horizontal-gutters{margin-left:-.625em}.column-group.half-horizontal-gutters>.all-auto,.column-group.half-horizontal-gutters>[class*=all-],.column-group.half-horizontal-gutters>[class*=small-]{padding-left:.625em}.column-group.half-vertical-gutters>.all-auto,.column-group.half-vertical-gutters>[class*=all-],.column-group.half-vertical-gutters>[class*=small-]{margin-bottom:.625em}.column-group.quarter-gutters{margin-left:-.3125em}.column-group.quarter-gutters>.all-auto,.column-group.quarter-gutters>[class*=all-],.column-group.quarter-gutters>[class*=small-]{padding-left:.3125em;margin-bottom:.3125em}.column-group.quarter-horizontal-gutters{margin-left:-.3125em}.column-group.quarter-horizontal-gutters>.all-auto,.column-group.quarter-horizontal-gutters>[class*=all-],.column-group.quarter-horizontal-gutters>[class*=small-]{padding-left:.3125em}.column-group.quarter-vertical-gutters>.all-auto,.column-group.quarter-vertical-gutters>[class*=all-],.column-group.quarter-vertical-gutters>[class*=small-]{margin-bottom:.3125em}.column-group.small-gutters{margin-left:-1.25em}.column-group.small-gutters>.all-auto,.column-group.small-gutters>[class*=all-],.column-group.small-gutters>[class*=small-]{padding-left:.3125em;margin-bottom:.3125em}.column-group.small-horizontal-gutters{margin-left:-1.25em}.column-group.small-horizontal-gutters>.all-auto,.column-group.small-horizontal-gutters>[class*=all-],.column-group.small-horizontal-gutters>[class*=small-]{padding-left:1.25em}.column-group.small-vertical-gutters>.all-auto,.column-group.small-vertical-gutters>[class*=all-],.column-group.small-vertical-gutters>[class*=small-]{margin-bottom:1.25em}.column-group.small-double-gutters{margin-left:-2.5em}.column-group.small-double-gutters>.all-auto,.column-group.small-double-gutters>[class*=all-],.column-group.small-double-gutters>[class*=small-]{padding-left:2.5em;margin-bottom:2.5em}.column-group.small-double-horizontal-gutters{margin-left:-2.5em}.column-group.small-double-horizontal-gutters>.all-auto,.column-group.small-double-horizontal-gutters>[class*=all-],.column-group.small-double-horizontal-gutters>[class*=small-]{padding-left:2.5em}.column-group.small-double-vertical-gutters>.all-auto,.column-group.small-double-vertical-gutters>[class*=all-],.column-group.small-double-vertical-gutters>[class*=small-]{margin-bottom:2.5em}.column-group.small-half-gutters{margin-left:-.625em}.column-group.small-half-gutters>.all-auto,.column-group.small-half-gutters>[class*=all-],.column-group.small-half-gutters>[class*=small-]{padding-left:.625em;margin-bottom:.625em}.column-group.small-half-horizontal-gutters{margin-left:-.625em}.column-group.small-half-horizontal-gutters>.all-auto,.column-group.small-half-horizontal-gutters>[class*=all-],.column-group.small-half-horizontal-gutters>[class*=small-]{padding-left:.625em}.column-group.small-half-vertical-gutters>.all-auto,.column-group.small-half-vertical-gutters>[class*=all-],.column-group.small-half-vertical-gutters>[class*=small-]{margin-bottom:.625em}.column-group.small-quarter-gutters{margin-left:-.3125em}.column-group.small-quarter-gutters>.all-auto,.column-group.small-quarter-gutters>[class*=all-],.column-group.small-quarter-gutters>[class*=small-]{padding-left:.3125em;margin-bottom:.3125em}.column-group.small-quarter-horizontal-gutters{margin-left:-.3125em}.column-group.small-quarter-horizontal-gutters>.all-auto,.column-group.small-quarter-horizontal-gutters>[class*=all-],.column-group.small-quarter-horizontal-gutters>[class*=small-]{padding-left:.3125em}.column-group.small-quarter-vertical-gutters>.all-auto,.column-group.small-quarter-vertical-gutters>[class*=all-],.column-group.small-quarter-vertical-gutters>[class*=small-]{margin-bottom:.3125em}.column-group.small-no-gutters{margin-left:0}.column-group.small-no-gutters>.all-auto,.column-group.small-no-gutters>[class*=all-],.column-group.small-no-gutters>[class*=small-]{padding-left:0;margin-bottom:0}.all-5,.small-5{width:5%;-webkit-flex-basis:5%;-moz-flex-basis:5%;flex-basis:5%;-webkit-flex-grow:0;flex-grow:0}.all-10,.small-10{width:10%;-webkit-flex-basis:10%;-moz-flex-basis:10%;flex-basis:10%;-webkit-flex-grow:0;flex-grow:0}.all-15,.small-15{width:15%;-webkit-flex-basis:15%;-moz-flex-basis:15%;flex-basis:15%;-webkit-flex-grow:0;flex-grow:0}.all-20,.small-20{width:20%;-webkit-flex-basis:20%;-moz-flex-basis:20%;flex-basis:20%;-webkit-flex-grow:0;flex-grow:0}.all-25,.small-25{width:25%;-webkit-flex-basis:25%;-moz-flex-basis:25%;flex-basis:25%;-webkit-flex-grow:0;flex-grow:0}.all-30,.small-30{width:30%;-webkit-flex-basis:30%;-moz-flex-basis:30%;flex-basis:30%;-webkit-flex-grow:0;flex-grow:0}.all-33,.small-33{width:33,33333%;-webkit-flex-basis:33.33333%;-moz-flex-basis:33.33333%;flex-basis:33.33333%;-webkit-flex-grow:0;flex-grow:0}.all-35,.small-35{width:35%;-webkit-flex-basis:35%;-moz-flex-basis:35%;flex-basis:35%;-webkit-flex-grow:0;flex-grow:0}.all-40,.small-40{width:40%;-webkit-flex-basis:40%;-moz-flex-basis:40%;flex-basis:40%;-webkit-flex-grow:0;flex-grow:0}.all-45,.small-45{width:45%;-webkit-flex-basis:45%;-moz-flex-basis:45%;flex-basis:45%;-webkit-flex-grow:0;flex-grow:0}.all-50,.small-50{width:50%;-webkit-flex-basis:50%;-moz-flex-basis:50%;flex-basis:50%;-webkit-flex-grow:0;flex-grow:0}.all-55,.small-55{width:55%;-webkit-flex-basis:55%;-moz-flex-basis:55%;flex-basis:55%;-webkit-flex-grow:0;flex-grow:0}.all-60,.small-60{width:60%;-webkit-flex-basis:60%;-moz-flex-basis:60%;flex-basis:60%;-webkit-flex-grow:0;flex-grow:0}.all-65,.small-65{width:65%;-webkit-flex-basis:65%;-moz-flex-basis:65%;flex-basis:65%;-webkit-flex-grow:0;flex-grow:0}.all-66,.small-66{width:66,66666%;-webkit-flex-basis:66.66666%;-moz-flex-basis:66.66666%;flex-basis:66.66666%;-webkit-flex-grow:0;flex-grow:0}.all-70,.small-70{width:70%;-webkit-flex-basis:70%;-moz-flex-basis:70%;flex-basis:70%;-webkit-flex-grow:0;flex-grow:0}.all-75,.small-75{width:75%;-webkit-flex-basis:75%;-moz-flex-basis:75%;flex-basis:75%;-webkit-flex-grow:0;flex-grow:0}.all-80,.small-80{width:80%;-webkit-flex-basis:80%;-moz-flex-basis:80%;flex-basis:80%;-webkit-flex-grow:0;flex-grow:0}.all-85,.small-85{width:85%;-webkit-flex-basis:85%;-moz-flex-basis:85%;flex-basis:85%;-webkit-flex-grow:0;flex-grow:0}.all-90,.small-90{width:90%;-webkit-flex-basis:90%;-moz-flex-basis:90%;flex-basis:90%;-webkit-flex-grow:0;flex-grow:0}.all-95,.small-95{width:95%;-webkit-flex-basis:95%;-moz-flex-basis:95%;flex-basis:95%;-webkit-flex-grow:0;flex-grow:0}.all-100,.small-100{width:100%;-webkit-flex-basis:100%;-moz-flex-basis:100%;flex-basis:100%;-webkit-flex-grow:0;flex-grow:0}.all-auto,.small-auto{width:auto;-webkit-flex-basis:auto;flex-basis:auto;-webkit-flex-grow:1;flex-grow:1}.column-group,.ink-flex{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;list-style:none}.column-group.reverse,.column-group.small-reverse,.ink-flex.reverse,.ink-flex.small-reverse{-webkit-flex-direction:row-reverse;-moz-flex-direction:row-reverse;flex-direction:row-reverse}.column-group.small-vertical,.column-group.vertical,.ink-flex.small-vertical,.ink-flex.vertical{-webkit-flex-direction:column;-moz-flex-direction:column;flex-direction:column}.column-group.small-vertical.small-reverse,.column-group.vertical.reverse,.ink-flex.small-vertical.small-reverse,.ink-flex.vertical.reverse{-webkit-flex-direction:column-reverse;-moz-flex-direction:column-reverse;flex-direction:column-reverse}.small-order-1{order:1}.small-order-2{order:2}.small-order-3{order:3}.small-order-4{order:4}.small-order-5{order:5}.small-order-6{order:6}.small-order-7{order:7}.small-order-8{order:8}.small-order-9{order:9}.small-order-10{order:10}.column-group .small-auto{-webkit-flex-basis:auto;flex-basis:auto;-webkit-flex-grow:1;flex-grow:1}.push-top,.small-push-top{-webkit-box-align:start;-webkit-align-items:flex-start;-moz-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.push-bottom,.small-push-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-moz-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end}.push-middle,.small-push-middle{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:flex-center;-ms-flex-item-align:center;align-self:center}.push-left,.small-push-left{-webkit-justify-content:flex-start;-moz-justify-content:flex-start;justify-content:flex-start;float:left}.push-center,.small-push-center{float:none!important;-webkit-justify-content:center;-moz-justify-content:center;justify-content:center;margin-left:auto;margin-right:auto}.push-right,.small-push-right{-webkit-justify-content:flex-end;-moz-justify-content:flex-end;justify-content:flex-end;float:right}.small-align-left{text-align:left}.small-align-center{text-align:center}.small-align-right{text-align:right}.small-space,.space{margin:1.25em}.padding,.small-padding{padding:1.25em}.double-space,.small-double-space{margin:.625em}.double-padding,.small-double-padding{padding:.625em}.half-space,.small-half-space{margin:2.5em}.half-padding,.small-half-padding{padding:2.5em}.quarter-space,.small-quarter-space{margin:5em}.quarter-padding,.small-quarter-padding{padding:5em}.small-vertical-space,.vertical-space{margin-top:1.25em;margin-bottom:1.25em}.small-vertical-padding,.vertical-padding{padding-top:1.25em;padding-bottom:1.25em}.double-vertical-space,.small-double-vertical-space{margin-top:2.5em;margin-bottom:2.5em}.double-vertical-padding,.small-double-vertical-padding{padding-top:2.5em;padding-bottom:2.5em}.half-vertical-space,.small-half-vertical-space{margin-top:.625em;margin-bottom:.625em}.half-vertical-padding,.small-half-vertical-padding{padding-top:.625em;padding-bottom:.625em}.quarter-vertical-space,.small-quarter-vertical-space{margin-top:.3125em;margin-bottom:.3125em}.quarter-vertical-padding,.small-quarter-vertical-padding{padding-top:.3125em;padding-bottom:.3125em}.horizontal-space,.small-horizontal-space{margin-left:1.25em;margin-right:1.25em}.horizontal-padding,.small-horizontal-padding{padding-left:1.25em;padding-right:1.25em}.double-horizontal-space,.small-double-horizontal-space{margin-left:2.5em;margin-right:2.5em}.double-horizontal-padding,.small-double-horizontal-padding{padding-left:2.5em;padding-right:2.5em}.half-horizontal-space,.small-half-horizontal-space{margin-left:.625em;margin-right:.625em}.half-horizontal-padding,.small-half-horizontal-padding{padding-left:.625em;padding-right:.625em}.quarter-horizontal-space,.small-quarter-horizontal-space{margin-left:.3125em;margin-right:.3125em}.quarter-horizontal-padding,.small-quarter-horizontal-padding{padding-left:.3125em;padding-right:.3125em}.small-top-space,.top-space{margin-top:1.25em}.small-top-padding,.top-padding{padding-top:1.25em}.double-top-space,.small-double-top-space{margin-top:2.5em}.double-top-padding,.small-double-top-padding{padding-top:2.5em}.half-top-space,.small-half-top-space{margin-top:.625em}.half-top-padding,.small-half-top-padding{padding-top:.625em}.quarter-top-space,.small-quarter-top-space{margin-top:.3125em}.quarter-top-padding,.small-quarter-top-padding{padding-top:.3125em}.right-space,.small-right-space{margin-right:1.25em}.right-padding,.small-right-padding{padding-right:1.25em}.double-right-space,.small-double-right-space{margin-right:2.5em}.double-right-padding,.small-double-right-padding{padding-right:2.5em}.half-right-space,.small-half-right-space{margin-right:.625em}.half-right-padding,.small-half-right-padding{padding-right:.625em}.quarter-right-space,.small-quarter-right-space{margin-right:.3125em}.quarter-right-padding,.small-quarter-right-padding{padding-right:.3125em}.bottom-space,.small-bottom-space{margin-bottom:1.25em}.bottom-padding,.small-bottom-padding{padding-bottom:1.25em}.double-bottom-space,.small-double-bottom-space{margin-bottom:2.5em}.double-bottom-padding,.small-double-bottom-padding{padding-bottom:2.5em}.half-bottom-space,.small-half-bottom-space{margin-bottom:.625em}.half-bottom-padding,.small-half-bottom-padding{padding-bottom:.625em}.quarter-bottom-space,.small-quarter-bottom-space{margin-bottom:.3125em}.quarter-bottom-padding,.small-quarter-bottom-padding{padding-bottom:.3125em}.left-space,.small-left-space{margin-left:1.25em}.left-padding,.small-left-padding{padding-left:1.25em}.double-left-space,.small-double-left-space{margin-left:2.5em}.double-left-padding,.small-double-left-padding{padding-left:2.5em}.half-left-space,.small-half-left-space{margin-left:.625em}.half-left-padding,.small-half-left-padding{padding-left:.625em}.quarter-left-space,.small-quarter-left-space{margin-left:.3125em}.quarter-left-padding,.small-quarter-left-padding{padding-left:.3125em}.hide-small{display:none!important}.show-small{display:inherit!important}table.show-small{display:table}thead.show-small{display:table-header-group}tbody.show-small{display:table-row-group}tfoot.show-small{display:table-footer-group}tr.show-small{display:table-row}td.show-small,th.show-small{display:table-cell}}@media screen and (max-width:320px){.ink-grid{padding:0 1em}.column-group.gutters{margin-left:-1em}.column-group.gutters>.all-auto,.column-group.gutters>[class*=all-],.column-group.gutters>[class*=tiny-]{padding-left:1em;margin-bottom:1em}.column-group.horizontal-gutters{margin-left:-1em}.column-group.horizontal-gutters>.all-auto,.column-group.horizontal-gutters>[class*=all-],.column-group.horizontal-gutters>[class*=tiny-]{padding-left:1em}.column-group.vertical-gutters>.all-auto,.column-group.vertical-gutters>[class*=all-],.column-group.vertical-gutters>[class*=tiny-]{margin-bottom:1em}.column-group.double-gutters{margin-left:-2em}.column-group.double-gutters>.all-auto,.column-group.double-gutters>[class*=all-],.column-group.double-gutters>[class*=tiny-]{padding-left:2em;margin-bottom:2em}.column-group.double-horizontal-gutters{margin-left:-2em}.column-group.double-horizontal-gutters>.all-auto,.column-group.double-horizontal-gutters>[class*=all-],.column-group.double-horizontal-gutters>[class*=tiny-]{padding-left:2em}.column-group.double-vertical-gutters>.all-auto,.column-group.double-vertical-gutters>[class*=all-],.column-group.double-vertical-gutters>[class*=tiny-]{margin-bottom:2em}.column-group.half-gutters{margin-left:-.5em}.column-group.half-gutters>.all-auto,.column-group.half-gutters>[class*=all-],.column-group.half-gutters>[class*=tiny-]{padding-left:.5em;margin-bottom:.5em}.column-group.half-horizontal-gutters{margin-left:-.5em}.column-group.half-horizontal-gutters>.all-auto,.column-group.half-horizontal-gutters>[class*=all-],.column-group.half-horizontal-gutters>[class*=tiny-]{padding-left:.5em}.column-group.half-vertical-gutters>.all-auto,.column-group.half-vertical-gutters>[class*=all-],.column-group.half-vertical-gutters>[class*=tiny-]{margin-bottom:.5em}.column-group.quarter-gutters{margin-left:-.25em}.column-group.quarter-gutters>.all-auto,.column-group.quarter-gutters>[class*=all-],.column-group.quarter-gutters>[class*=tiny-]{padding-left:.25em;margin-bottom:.25em}.column-group.quarter-horizontal-gutters{margin-left:-.25em}.column-group.quarter-horizontal-gutters>.all-auto,.column-group.quarter-horizontal-gutters>[class*=all-],.column-group.quarter-horizontal-gutters>[class*=tiny-]{padding-left:.25em}.column-group.quarter-vertical-gutters>.all-auto,.column-group.quarter-vertical-gutters>[class*=all-],.column-group.quarter-vertical-gutters>[class*=tiny-]{margin-bottom:.25em}.column-group.tiny-gutters{margin-left:-1em}.column-group.tiny-gutters>.all-auto,.column-group.tiny-gutters>[class*=all-],.column-group.tiny-gutters>[class*=tiny-]{padding-left:.25em;margin-bottom:.25em}.column-group.tiny-horizontal-gutters{margin-left:-1em}.column-group.tiny-horizontal-gutters>.all-auto,.column-group.tiny-horizontal-gutters>[class*=all-],.column-group.tiny-horizontal-gutters>[class*=tiny-]{padding-left:1em}.column-group.tiny-vertical-gutters>.all-auto,.column-group.tiny-vertical-gutters>[class*=all-],.column-group.tiny-vertical-gutters>[class*=tiny-]{margin-bottom:1em}.column-group.tiny-double-gutters{margin-left:-2em}.column-group.tiny-double-gutters>.all-auto,.column-group.tiny-double-gutters>[class*=all-],.column-group.tiny-double-gutters>[class*=tiny-]{padding-left:2em;margin-bottom:2em}.column-group.tiny-double-horizontal-gutters{margin-left:-2em}.column-group.tiny-double-horizontal-gutters>.all-auto,.column-group.tiny-double-horizontal-gutters>[class*=all-],.column-group.tiny-double-horizontal-gutters>[class*=tiny-]{padding-left:2em}.column-group.tiny-double-vertical-gutters>.all-auto,.column-group.tiny-double-vertical-gutters>[class*=all-],.column-group.tiny-double-vertical-gutters>[class*=tiny-]{margin-bottom:2em}.column-group.tiny-half-gutters{margin-left:-.5em}.column-group.tiny-half-gutters>.all-auto,.column-group.tiny-half-gutters>[class*=all-],.column-group.tiny-half-gutters>[class*=tiny-]{padding-left:.5em;margin-bottom:.5em}.column-group.tiny-half-horizontal-gutters{margin-left:-.5em}.column-group.tiny-half-horizontal-gutters>.all-auto,.column-group.tiny-half-horizontal-gutters>[class*=all-],.column-group.tiny-half-horizontal-gutters>[class*=tiny-]{padding-left:.5em}.column-group.tiny-half-vertical-gutters>.all-auto,.column-group.tiny-half-vertical-gutters>[class*=all-],.column-group.tiny-half-vertical-gutters>[class*=tiny-]{margin-bottom:.5em}.column-group.tiny-quarter-gutters{margin-left:-.25em}.column-group.tiny-quarter-gutters>.all-auto,.column-group.tiny-quarter-gutters>[class*=all-],.column-group.tiny-quarter-gutters>[class*=tiny-]{padding-left:.25em;margin-bottom:.25em}.column-group.tiny-quarter-horizontal-gutters{margin-left:-.25em}.column-group.tiny-quarter-horizontal-gutters>.all-auto,.column-group.tiny-quarter-horizontal-gutters>[class*=all-],.column-group.tiny-quarter-horizontal-gutters>[class*=tiny-]{padding-left:.25em}.column-group.tiny-quarter-vertical-gutters>.all-auto,.column-group.tiny-quarter-vertical-gutters>[class*=all-],.column-group.tiny-quarter-vertical-gutters>[class*=tiny-]{margin-bottom:.25em}.column-group.tiny-no-gutters{margin-left:0}.column-group.tiny-no-gutters>.all-auto,.column-group.tiny-no-gutters>[class*=all-],.column-group.tiny-no-gutters>[class*=tiny-]{padding-left:0;margin-bottom:0}.all-5,.tiny-5{width:5%;-webkit-flex-basis:5%;-moz-flex-basis:5%;flex-basis:5%;-webkit-flex-grow:0;flex-grow:0}.all-10,.tiny-10{width:10%;-webkit-flex-basis:10%;-moz-flex-basis:10%;flex-basis:10%;-webkit-flex-grow:0;flex-grow:0}.all-15,.tiny-15{width:15%;-webkit-flex-basis:15%;-moz-flex-basis:15%;flex-basis:15%;-webkit-flex-grow:0;flex-grow:0}.all-20,.tiny-20{width:20%;-webkit-flex-basis:20%;-moz-flex-basis:20%;flex-basis:20%;-webkit-flex-grow:0;flex-grow:0}.all-25,.tiny-25{width:25%;-webkit-flex-basis:25%;-moz-flex-basis:25%;flex-basis:25%;-webkit-flex-grow:0;flex-grow:0}.all-30,.tiny-30{width:30%;-webkit-flex-basis:30%;-moz-flex-basis:30%;flex-basis:30%;-webkit-flex-grow:0;flex-grow:0}.all-33,.tiny-33{width:33,33333%;-webkit-flex-basis:33.33333%;-moz-flex-basis:33.33333%;flex-basis:33.33333%;-webkit-flex-grow:0;flex-grow:0}.all-35,.tiny-35{width:35%;-webkit-flex-basis:35%;-moz-flex-basis:35%;flex-basis:35%;-webkit-flex-grow:0;flex-grow:0}.all-40,.tiny-40{width:40%;-webkit-flex-basis:40%;-moz-flex-basis:40%;flex-basis:40%;-webkit-flex-grow:0;flex-grow:0}.all-45,.tiny-45{width:45%;-webkit-flex-basis:45%;-moz-flex-basis:45%;flex-basis:45%;-webkit-flex-grow:0;flex-grow:0}.all-50,.tiny-50{width:50%;-webkit-flex-basis:50%;-moz-flex-basis:50%;flex-basis:50%;-webkit-flex-grow:0;flex-grow:0}.all-55,.tiny-55{width:55%;-webkit-flex-basis:55%;-moz-flex-basis:55%;flex-basis:55%;-webkit-flex-grow:0;flex-grow:0}.all-60,.tiny-60{width:60%;-webkit-flex-basis:60%;-moz-flex-basis:60%;flex-basis:60%;-webkit-flex-grow:0;flex-grow:0}.all-65,.tiny-65{width:65%;-webkit-flex-basis:65%;-moz-flex-basis:65%;flex-basis:65%;-webkit-flex-grow:0;flex-grow:0}.all-66,.tiny-66{width:66,66666%;-webkit-flex-basis:66.66666%;-moz-flex-basis:66.66666%;flex-basis:66.66666%;-webkit-flex-grow:0;flex-grow:0}.all-70,.tiny-70{width:70%;-webkit-flex-basis:70%;-moz-flex-basis:70%;flex-basis:70%;-webkit-flex-grow:0;flex-grow:0}.all-75,.tiny-75{width:75%;-webkit-flex-basis:75%;-moz-flex-basis:75%;flex-basis:75%;-webkit-flex-grow:0;flex-grow:0}.all-80,.tiny-80{width:80%;-webkit-flex-basis:80%;-moz-flex-basis:80%;flex-basis:80%;-webkit-flex-grow:0;flex-grow:0}.all-85,.tiny-85{width:85%;-webkit-flex-basis:85%;-moz-flex-basis:85%;flex-basis:85%;-webkit-flex-grow:0;flex-grow:0}.all-90,.tiny-90{width:90%;-webkit-flex-basis:90%;-moz-flex-basis:90%;flex-basis:90%;-webkit-flex-grow:0;flex-grow:0}.all-95,.tiny-95{width:95%;-webkit-flex-basis:95%;-moz-flex-basis:95%;flex-basis:95%;-webkit-flex-grow:0;flex-grow:0}.all-100,.tiny-100{width:100%;-webkit-flex-basis:100%;-moz-flex-basis:100%;flex-basis:100%;-webkit-flex-grow:0;flex-grow:0}.all-auto,.tiny-auto{width:auto;-webkit-flex-basis:auto;flex-basis:auto;-webkit-flex-grow:1;flex-grow:1}.column-group,.ink-flex{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;list-style:none}.column-group.reverse,.column-group.tiny-reverse,.ink-flex.reverse,.ink-flex.tiny-reverse{-webkit-flex-direction:row-reverse;-moz-flex-direction:row-reverse;flex-direction:row-reverse}.column-group.tiny-vertical,.column-group.vertical,.ink-flex.tiny-vertical,.ink-flex.vertical{-webkit-flex-direction:column;-moz-flex-direction:column;flex-direction:column}.column-group.tiny-vertical.tiny-reverse,.column-group.vertical.reverse,.ink-flex.tiny-vertical.tiny-reverse,.ink-flex.vertical.reverse{-webkit-flex-direction:column-reverse;-moz-flex-direction:column-reverse;flex-direction:column-reverse}.tiny-order-1{order:1}.tiny-order-2{order:2}.tiny-order-3{order:3}.tiny-order-4{order:4}.tiny-order-5{order:5}.tiny-order-6{order:6}.tiny-order-7{order:7}.tiny-order-8{order:8}.tiny-order-9{order:9}.tiny-order-10{order:10}.column-group .tiny-auto{-webkit-flex-basis:auto;flex-basis:auto;-webkit-flex-grow:1;flex-grow:1}.push-top,.tiny-push-top{-webkit-box-align:start;-webkit-align-items:flex-start;-moz-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.push-bottom,.tiny-push-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-moz-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end}.push-middle,.tiny-push-middle{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:flex-center;-ms-flex-item-align:center;align-self:center}.push-left,.tiny-push-left{-webkit-justify-content:flex-start;-moz-justify-content:flex-start;justify-content:flex-start;float:left}.push-center,.tiny-push-center{float:none!important;-webkit-justify-content:center;-moz-justify-content:center;justify-content:center;margin-left:auto;margin-right:auto}.push-right,.tiny-push-right{-webkit-justify-content:flex-end;-moz-justify-content:flex-end;justify-content:flex-end;float:right}.tiny-align-left{text-align:left}.tiny-align-center{text-align:center}.tiny-align-right{text-align:right}.space,.tiny-space{margin:1em}.padding,.tiny-padding{padding:1em}.double-space,.tiny-double-space{margin:.5em}.double-padding,.tiny-double-padding{padding:.5em}.half-space,.tiny-half-space{margin:2em}.half-padding,.tiny-half-padding{padding:2em}.quarter-space,.tiny-quarter-space{margin:4em}.quarter-padding,.tiny-quarter-padding{padding:4em}.tiny-vertical-space,.vertical-space{margin-top:1em;margin-bottom:1em}.tiny-vertical-padding,.vertical-padding{padding-top:1em;padding-bottom:1em}.double-vertical-space,.tiny-double-vertical-space{margin-top:2em;margin-bottom:2em}.double-vertical-padding,.tiny-double-vertical-padding{padding-top:2em;padding-bottom:2em}.half-vertical-space,.tiny-half-vertical-space{margin-top:.5em;margin-bottom:.5em}.half-vertical-padding,.tiny-half-vertical-padding{padding-top:.5em;padding-bottom:.5em}.quarter-vertical-space,.tiny-quarter-vertical-space{margin-top:.25em;margin-bottom:.25em}.quarter-vertical-padding,.tiny-quarter-vertical-padding{padding-top:.25em;padding-bottom:.25em}.horizontal-space,.tiny-horizontal-space{margin-left:1em;margin-right:1em}.horizontal-padding,.tiny-horizontal-padding{padding-left:1em;padding-right:1em}.double-horizontal-space,.tiny-double-horizontal-space{margin-left:2em;margin-right:2em}.double-horizontal-padding,.tiny-double-horizontal-padding{padding-left:2em;padding-right:2em}.half-horizontal-space,.tiny-half-horizontal-space{margin-left:.5em;margin-right:.5em}.half-horizontal-padding,.tiny-half-horizontal-padding{padding-left:.5em;padding-right:.5em}.quarter-horizontal-space,.tiny-quarter-horizontal-space{margin-left:.25em;margin-right:.25em}.quarter-horizontal-padding,.tiny-quarter-horizontal-padding{padding-left:.25em;padding-right:.25em}.tiny-top-space,.top-space{margin-top:1em}.tiny-top-padding,.top-padding{padding-top:1em}.double-top-space,.tiny-double-top-space{margin-top:2em}.double-top-padding,.tiny-double-top-padding{padding-top:2em}.half-top-space,.tiny-half-top-space{margin-top:.5em}.half-top-padding,.tiny-half-top-padding{padding-top:.5em}.quarter-top-space,.tiny-quarter-top-space{margin-top:.25em}.quarter-top-padding,.tiny-quarter-top-padding{padding-top:.25em}.right-space,.tiny-right-space{margin-right:1em}.right-padding,.tiny-right-padding{padding-right:1em}.double-right-space,.tiny-double-right-space{margin-right:2em}.double-right-padding,.tiny-double-right-padding{padding-right:2em}.half-right-space,.tiny-half-right-space{margin-right:.5em}.half-right-padding,.tiny-half-right-padding{padding-right:.5em}.quarter-right-space,.tiny-quarter-right-space{margin-right:.25em}.quarter-right-padding,.tiny-quarter-right-padding{padding-right:.25em}.bottom-space,.tiny-bottom-space{margin-bottom:1em}.bottom-padding,.tiny-bottom-padding{padding-bottom:1em}.double-bottom-space,.tiny-double-bottom-space{margin-bottom:2em}.double-bottom-padding,.tiny-double-bottom-padding{padding-bottom:2em}.half-bottom-space,.tiny-half-bottom-space{margin-bottom:.5em}.half-bottom-padding,.tiny-half-bottom-padding{padding-bottom:.5em}.quarter-bottom-space,.tiny-quarter-bottom-space{margin-bottom:.25em}.quarter-bottom-padding,.tiny-quarter-bottom-padding{padding-bottom:.25em}.left-space,.tiny-left-space{margin-left:1em}.left-padding,.tiny-left-padding{padding-left:1em}.double-left-space,.tiny-double-left-space{margin-left:2em}.double-left-padding,.tiny-double-left-padding{padding-left:2em}.half-left-space,.tiny-half-left-space{margin-left:.5em}.half-left-padding,.tiny-half-left-padding{padding-left:.5em}.quarter-left-space,.tiny-quarter-left-space{margin-left:.25em}.quarter-left-padding,.tiny-quarter-left-padding{padding-left:.25em}.hide-tiny{display:none!important}.show-tiny{display:inherit!important}table.show-tiny{display:table}thead.show-tiny{display:table-header-group}tbody.show-tiny{display:table-row-group}tfoot.show-tiny{display:table-footer-group}tr.show-tiny{display:table-row}td.show-tiny,th.show-tiny{display:table-cell}}@media screen and (min-width:1261px){html{font-size:1.08em}html:after{font-family:'{name:xlarge,{min:"1261px",max:""}}'}}@media screen and (min-width:961px) and (max-width:1260px){html{font-size:1.05em}html:after{font-family:'{name:large,{min:"961px",max:"1260px"}}'}}@media screen and (min-width:641px) and (max-width:960px){html{font-size:1em}html:after{font-family:'{name:medium,{min:"641px",max:"960px"}}'}}@media screen and (min-width:321px) and (max-width:640px){html{font-size:.98em}html:after{font-family:'{name:small,{min:"321px",max:"640px"}}'}}@media screen and (max-width:320px){html{font-size:.97em}html:after{font-family:'{name:tiny,{min:"",max:"320px"}}'}}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-thin-webfont.eot);src:url(../fonts/Roboto/roboto-thin-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-thin-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-thin-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-thin-webfont.svg) format('svg');font-weight:100;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-thinitalic-webfont.eot);src:url(../fonts/Roboto/roboto-thinitalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-thinitalic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-thinitalic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-thinitalic-webfont.svg) format('svg');font-weight:100;font-style:italic}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-light-webfont.eot);src:url(../fonts/Roboto/roboto-light-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-light-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-light-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-light-webfont.svg) format('svg');font-weight:300;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-lightitalic-webfont.eot);src:url(../fonts/Roboto/roboto-lightitalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-lightitalic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-lightitalic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-lightitalic-webfont.svg) format('svg');font-weight:300;font-style:italic}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-regular-webfont.eot);src:url(../fonts/Roboto/roboto-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-regular-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-regular-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-regular-webfont.svg) format('svg');font-weight:400;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-italic-webfont.eot);src:url(../fonts/Roboto/roboto-italic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-italic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-italic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-italic-webfont.svg) format('svg');font-weight:400;font-style:italic}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-medium-webfont.eot);src:url(../fonts/Roboto/roboto-medium-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-medium-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-medium-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-medium-webfont.svg) format('svg');font-weight:500;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-mediumitalic-webfont.eot);src:url(../fonts/Roboto/roboto-mediumitalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-mediumitalic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-mediumitalic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-mediumitalic-webfont.svg) format('svg');font-weight:500;font-style:italic}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-bold-webfont.eot);src:url(../fonts/Roboto/roboto-bold-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-bold-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-bold-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-bold-webfont.svg) format('svg');font-weight:700;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-bolditalic-webfont.eot);src:url(../fonts/Roboto/roboto-bolditalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-bolditalic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-bolditalic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-bolditalic-webfont.svg) format('svg');font-weight:700;font-style:italic}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-black-webfont.eot);src:url(../fonts/Roboto/roboto-black-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-black-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-black-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-black-webfont.svg) format('svg');font-weight:900;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-blackitalic-webfont.eot);src:url(../fonts/Roboto/roboto-blackitalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-blackitalic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-blackitalic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-blackitalic-webfont.svg) format('svg');font-weight:900;font-style:italic}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-light-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-light-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-light-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-light-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-light-webfont.svg) format('svg');font-weight:300;font-style:normal}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.svg) format('svg');font-weight:300;font-style:italic}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-regular-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-regular-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-regular-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-regular-webfont.svg) format('svg');font-weight:400;font-style:normal}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-italic-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-italic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-italic-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-italic-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-italic-webfont.svg) format('svg');font-weight:400;font-style:italic}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-bold-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-bold-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-bold-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-bold-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-bold-webfont.svg) format('svg');font-weight:700;font-style:normal}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.svg) format('svg');font-weight:700;font-style:italic}@font-face{font-family:Roboto_slab;src:url(../fonts/Roboto_slab/robotoslab-thin-webfont.eot);src:url(../fonts/Roboto_slab/robotoslab-thin-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_slab/robotoslab-thin-webfont.woff) format('woff'),url(../fonts/Roboto_slab/robotoslab-thin-webfont.ttf) format('truetype'),url(../fonts/Roboto_slab/robotoslab-thin-webfont.svg) format('svg');font-weight:100;font-style:normal}@font-face{font-family:Roboto_slab;src:url(../fonts/Roboto_slab/robotoslab-light-webfont.eot);src:url(../fonts/Roboto_slab/robotoslab-light-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_slab/robotoslab-light-webfont.woff) format('woff'),url(../fonts/Roboto_slab/robotoslab-light-webfont.ttf) format('truetype'),url(../fonts/Roboto_slab/robotoslab-light-webfont.svg) format('svg');font-weight:300;font-style:normal}@font-face{font-family:Roboto_slab;src:url(../fonts/Roboto_slab/robotoslab-regular-webfont.eot);src:url(../fonts/Roboto_slab/robotoslab-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_slab/robotoslab-regular-webfont.woff) format('woff'),url(../fonts/Roboto_slab/robotoslab-regular-webfont.ttf) format('truetype'),url(../fonts/Roboto_slab/robotoslab-regular-webfont.svg) format('svg');font-weight:400;font-style:normal}@font-face{font-family:Roboto_slab;src:url(../fonts/Roboto_slab/robotoslab-bold-webfont.eot);src:url(../fonts/Roboto_slab/robotoslab-bold-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_slab/robotoslab-bold-webfont.woff) format('woff'),url(../fonts/Roboto_slab/robotoslab-bold-webfont.ttf) format('truetype'),url(../fonts/Roboto_slab/robotoslab-bold-webfont.svg) format('svg');font-weight:700;font-style:normal}.ink-label{padding:0 .35em;white-space:nowrap}.ink-navigation{overflow:visible}.ink-navigation ul{list-style-type:none;padding:0;margin:0}.ink-navigation ul li{margin:0}.ink-navigation .breadcrumbs li{line-height:2.7em;display:inline}.ink-navigation .breadcrumbs li a{display:inline;padding:0}.ink-navigation .breadcrumbs li a:hover{background:0 0}.ink-navigation .breadcrumbs li.active a{cursor:default;text-decoration:none}.ink-navigation .breadcrumbs li:first-child a{padding-left:1.2em}.ink-navigation .breadcrumbs li:after{content:'/';display:inline;margin:0 .7em}.ink-navigation .breadcrumbs li:last-child:after{content:'';display:none}.ink-dropdown ul.dropdown,.ink-dropdown ul.dropdown-menu,.ink-navigation ul.dropdown,.ink-navigation ul.dropdown-menu{display:inline-block;background:#fff;z-index:30;border:1px solid #d9d9d9;height:auto;width:auto;min-width:10em;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-box-shadow:rgba(100,100,100,.3) 0 0 1px 0;-moz-box-shadow:rgba(100,100,100,.3) 0 0 1px 0;box-shadow:rgba(100,100,100,.3) 0 0 1px 0;margin-left:0;padding:.35em 0;font-size:.85em}.ink-dropdown ul.dropdown li,.ink-dropdown ul.dropdown-menu li,.ink-navigation ul.dropdown li,.ink-navigation ul.dropdown-menu li{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:none;-moz-border-radius:none;-ms-border-radius:none;-o-border-radius:none;border-radius:none;width:auto;height:auto;min-height:auto;display:list-item;float:none;margin:0;text-align:left;text-transform:none;padding:0;position:relative;list-style-type:none}.ink-dropdown ul.dropdown li.separator-above,.ink-dropdown ul.dropdown-menu li.separator-above,.ink-navigation ul.dropdown li.separator-above,.ink-navigation ul.dropdown-menu li.separator-above{padding-top:.35em;margin-top:.35em;border-top:1px solid #d9d9d9}.ink-dropdown ul.dropdown li.separator-below,.ink-dropdown ul.dropdown-menu li.separator-below,.ink-navigation ul.dropdown li.separator-below,.ink-navigation ul.dropdown-menu li.separator-below{padding-bottom:.35em;margin-bottom:.35em;border-bottom:1px solid #d9d9d9}.ink-dropdown ul.dropdown li.heading,.ink-dropdown ul.dropdown-menu li.heading,.ink-navigation ul.dropdown li.heading,.ink-navigation ul.dropdown-menu li.heading{font-weight:700;margin-bottom:.35em;padding:.5em .8em;color:#333}.ink-dropdown ul.dropdown li a,.ink-dropdown ul.dropdown-menu li a,.ink-navigation ul.dropdown li a,.ink-navigation ul.dropdown-menu li a{color:#444;padding:.5em .8em;display:block;clear:both}.ink-dropdown ul.dropdown li a:hover,.ink-dropdown ul.dropdown-menu li a:hover,.ink-navigation ul.dropdown li a:hover,.ink-navigation ul.dropdown-menu li a:hover{background:#f2f2f2;text-decoration:none}.ink-dropdown ul.dropdown li.active a,.ink-dropdown ul.dropdown-menu li.active a,.ink-navigation ul.dropdown li.active a,.ink-navigation ul.dropdown-menu li.active a{background:#999;color:#fff}.ink-dropdown ul.dropdown li.disabled a,.ink-dropdown ul.dropdown-menu li.disabled a,.ink-navigation ul.dropdown li.disabled a,.ink-navigation ul.dropdown-menu li.disabled a{color:#b3b3b3}.ink-dropdown ul.dropdown li.disabled a:hover,.ink-dropdown ul.dropdown-menu li.disabled a:hover,.ink-navigation ul.dropdown li.disabled a:hover,.ink-navigation ul.dropdown-menu li.disabled a:hover{background:0 0;cursor:default}.ink-dropdown ul.dropdown li.submenu,.ink-dropdown ul.dropdown-menu li.submenu,.ink-navigation ul.dropdown li.submenu,.ink-navigation ul.dropdown-menu li.submenu{overflow:visible}.ink-dropdown ul.dropdown li.submenu>a,.ink-dropdown ul.dropdown-menu li.submenu>a,.ink-navigation ul.dropdown li.submenu>a,.ink-navigation ul.dropdown-menu li.submenu>a{white-space:nowrap}.ink-dropdown ul.dropdown li.submenu>a:after,.ink-dropdown ul.dropdown-menu li.submenu>a:after,.ink-navigation ul.dropdown li.submenu>a:after,.ink-navigation ul.dropdown-menu li.submenu>a:after{content:"\f0da";width:auto;margin-left:.8em;font-family:FontAwesome;color:#b3b3b3}.ink-dropdown ul.dropdown li.submenu:hover>a,.ink-dropdown ul.dropdown-menu li.submenu:hover>a,.ink-navigation ul.dropdown li.submenu:hover>a,.ink-navigation ul.dropdown-menu li.submenu:hover>a{background:#f2f2f2;text-decoration:none}.ink-dropdown ul.dropdown li.submenu:hover:hover>ul.dropdown,.ink-dropdown ul.dropdown li.submenu:hover:hover>ul.dropdown-menu,.ink-dropdown ul.dropdown-menu li.submenu:hover:hover>ul.dropdown,.ink-dropdown ul.dropdown-menu li.submenu:hover:hover>ul.dropdown-menu,.ink-navigation ul.dropdown li.submenu:hover:hover>ul.dropdown,.ink-navigation ul.dropdown li.submenu:hover:hover>ul.dropdown-menu,.ink-navigation ul.dropdown-menu li.submenu:hover:hover>ul.dropdown,.ink-navigation ul.dropdown-menu li.submenu:hover:hover>ul.dropdown-menu{display:block}.ink-dropdown ul.dropdown li.submenu>ul.dropdown,.ink-dropdown ul.dropdown li.submenu>ul.dropdown-menu,.ink-dropdown ul.dropdown-menu li.submenu>ul.dropdown,.ink-dropdown ul.dropdown-menu li.submenu>ul.dropdown-menu,.ink-navigation ul.dropdown li.submenu>ul.dropdown,.ink-navigation ul.dropdown li.submenu>ul.dropdown-menu,.ink-navigation ul.dropdown-menu li.submenu>ul.dropdown,.ink-navigation ul.dropdown-menu li.submenu>ul.dropdown-menu{font-size:inherit;position:absolute;top:-.36em;left:100%;display:none}.ink-navigation ul.pagination{overflow:hidden;*zoom:1}.ink-navigation ul.pagination li{line-height:1.7;float:left}.ink-navigation ul.pagination li a{padding:.5em 1em;display:block;float:left}.ink-navigation ul.pagination.dotted li a{display:block;height:1em;width:1em;margin-right:.6em;padding:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;text-indent:99999px}.ink-navigation ul.pagination.dotted li a:first-child,.ink-navigation ul.pagination.dotted li a:last-child{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%}.ink-navigation ul.pagination.chevron li{display:none}.ink-navigation ul.pagination.chevron li.next,.ink-navigation ul.pagination.chevron li.previous{display:block}.ink-navigation ul.pagination.chevron li.next a,.ink-navigation ul.pagination.chevron li.previous a{display:block;position:absolute;top:35%;padding:0 .5em;margin:0;font-family:FontAwesome;font-size:4em}.ink-navigation ul.pagination.chevron li.next a span,.ink-navigation ul.pagination.chevron li.previous a span{text-indent:-99999px;display:inline-block}.ink-navigation ul.pagination.chevron li.previous a{left:0}.ink-navigation ul.pagination.chevron li.previous a:after{content:"\f137"}.ink-navigation ul.pagination.chevron li.next a{right:0}.ink-navigation ul.pagination.chevron li.next a:after{content:"\f138"}.ink-navigation .pills{overflow:hidden;*zoom:1}.ink-navigation .pills li{overflow:hidden;display:block;float:left;margin:0 .5em .5em 0;line-height:1.7}.ink-navigation .pills li a{display:block;padding:.5em 1em}.ink-navigation .pills li a:hover{text-decoration:none}.ink-navigation .pills li.active a,.ink-navigation .pills li.disabled a{cursor:default}.ink-navigation ul{*height:100%}.ink-navigation ul.menu{*zoom:1}.ink-navigation ul.menu:after{content:"";display:table;clear:both}.ink-navigation ul.menu li{*height:100%}.ink-navigation ul.menu li:hover ul.submenu{display:block}.ink-navigation ul.menu li ul.submenu{display:none;position:absolute;z-index:10}.ink-navigation ul.menu li ul.submenu li{overflow:hidden}.ink-navigation ul.menu li ul.submenu li a{padding:.5em 1em;display:block;float:none}.ink-navigation ul.menu.horizontal li{float:left;position:relative}.ink-navigation ul.menu.horizontal li a{padding:.5em 1em;display:block;line-height:1.7}.ink-navigation ul.menu.horizontal li .control{margin-top:.3em}.ink-navigation ul.menu.horizontal li ul.submenu{min-width:100%;left:0;z-index:50}.ink-navigation ul.menu.horizontal li ul.submenu li{float:none}.ink-navigation ul.menu.vertical li{line-height:1.7;position:relative}.ink-navigation ul.menu.vertical li a{padding:.5em 1em;display:block}.ink-navigation ul.menu.vertical li ul.submenu{position:relative;top:auto;left:auto}.ink-navigation ul.menu.vertical li ul.submenu.flyout{position:absolute;min-width:8em;top:0;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.menu.vertical li ul.submenu.flyout.left{right:100%}.ink-navigation ul.menu.vertical li ul.submenu.flyout.right{left:100%}table.ink-table{width:100%;border-collapse:collapse;border-spacing:0}table.ink-table tr th{padding:5px 10px;line-height:1.3}table.ink-table tr th[data-sortable=true]:hover{cursor:pointer;text-decoration:underline}table.ink-table tr th[data-sortable=true]:hover i{text-decoration:none}table.ink-table tr th[data-sortable=true] i{padding-left:.5em}table.ink-table tr td{padding:5px 10px;line-height:1.3}table.ink-table.hover tbody tr:hover{cursor:pointer}table.ink-table.bordered{border-collapse:separate}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{color:#555;font-family:Roboto,Arial,Helvetica,sans-serif;line-height:1.45}.fw-100,.fw-light{font-weight:100}.fw-300,.fw-thin{font-weight:300}.fw-400,.fw-regular{font-weight:400}.fw-500,.fw-medium{font-weight:500}.fw-700,.fw-bold{font-weight:700}.fw-900,.fw-black{font-weight:900}.condensed-300,.condensed-thin{font-weight:200;font-family:Roboto_condensed,Arial,Helvetica,sans-serif}.condensed-400,.condensed-regular{font-weight:400;font-family:Roboto_condensed,Arial,Helvetica,sans-serif}.condensed-700,.condensed-bold{font-weight:700;font-family:Roboto_condensed,Arial,Helvetica,sans-serif}.slab-100,.slab-light{font-weight:100;font-family:Roboto_slab,Arial,Helvetica,sans-serif}.slab-300,.slab-thin{font-weight:300;font-family:Roboto_slab,Arial,Helvetica,sans-serif}.slab-400,.slab-regular{font-weight:400;font-family:Roboto_slab,Arial,Helvetica,sans-serif}.slab-700,.slab-bold{font-weight:700;font-family:Roboto_slab,Arial,Helvetica,sans-serif}.sans{font-family:Roboto,Arial,Helvetica,sans-serif}.serif{font-family:Times,"Times New Roman",serif}.monospace{font-family:Monaco,"Andale Mono","Courier New",monospace}.condensed{font-family:Roboto_condensed,Arial,Helvetica,sans-serif}.slab{font-family:Roboto_slab,Arial,Helvetica,sans-serif}.italic{font-style:italic}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalizer{text-transform:capitalize}.fa{font-size:14px}a{color:#6998c9;text-decoration:none;cursor:pointer}a:hover{color:#007ed5;text-decoration:underline}h1{font-size:2.2em;margin-top:0;margin-bottom:.57539em}h2{font-size:1.75em;margin-top:0;margin-bottom:.72334em}h3{font-size:1.5em;margin-top:0;margin-bottom:.8439em}h4{font-size:1.25em;margin-top:0;margin-bottom:1.01268em}h5,h6{font-size:1.1em;margin-top:0;margin-bottom:1.15077em}p,table{font-size:1em;margin-top:0;margin-bottom:1.26585em}h1:first-child,h2:first-child,h3:first-child,h4:first-child,h5:first-child,h6:first-child,p:first-child{margin-top:0}h1,h2,h3,h4,h5,h6{color:#404040;font-weight:700;line-height:1.16}small{color:#888}input,textarea{color:#666}h1 small,h2 small,h3 small,h4 small{color:#bbb;font-size:.6em;font-weight:100;line-height:1}mark{background:#dae5f2}address{color:#777;font-size:1em;line-height:1.4}address p{margin-top:0}address h6{color:#555}abbr:hover{cursor:help}blockquote{border-left:4px solid #ddd;padding-left:25px;margin:1em 0;font-weight:200;font-size:1.1em}blockquote small{font-size:.9em}blockquote small::after,blockquote small::before{content:' — '}.note{font-size:.9em;color:#777}.note strong{color:#555}.small{font-size:.75em}.medium{font-size:.85em}.large{font-size:1.2em}.extralarge{font-size:1.45em!important}hr{border:0;border-top:1px solid #ddd;margin:1em 0}.lead{font-size:1.1em;font-weight:700}ol,ul{line-height:1.4;padding:0 0 0 1.45;margin:1em 0}ol li,ul li{margin:.5em 0}ul.unstyled{list-style:none;padding-left:0}ul.unstyled ul{list-style:disc outside}ul.inline{list-style:none}ul.inline li{display:inline-block;padding:0 .5em}ul.inline li:first-child{padding:0 .5em 0 0}dl{margin:1em 0}dl dt{font-weight:700;margin:.5em 0}dl dd{margin:.5em 0 .5em 25px}dl.inline dt{float:left;clear:left;text-align:right;width:180px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:0}dl.inline dd{margin:.5em 0 .5em 200px}figure.ink-image{position:relative;border:1px solid #555}figure.ink-image>img{width:100%}figure.ink-image>figcaption{padding:1em;background:#fff;line-height:1.3}figure.ink-image>figcaption.over-bottom,figure.ink-image>figcaption.over-top{position:absolute;width:100%;left:0;border:0}figure.ink-image>figcaption.over-bottom.dark,figure.ink-image>figcaption.over-top.dark{color:#fff;background:rgba(0,0,0,.6)}figure.ink-image>figcaption.over-top{top:0;background:rgba(255,255,255,.7)}figure.ink-image>figcaption.over-bottom{bottom:0;background:rgba(255,255,255,.7)}figure.ink-image>figcaption.dark{color:#fff;background:#222}img{border:0;width:auto;max-width:100%;vertical-align:top}.ink-alert.basic,.ink-alert.block{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-alert.basic{background:rgba(255,156,0,.25);color:#b87814;border:1px solid #b87814}.ink-alert.basic .ink-dismiss{color:#b87814}.ink-alert.basic.success{background:rgba(74,155,23,.25);color:#38621d;border:1px solid #38621d}.ink-alert.basic.success .ink-dismiss{color:#38621d}.ink-alert.basic.error{background:rgba(201,17,17,.25);color:#891e1e;border:1px solid #891e1e}.ink-alert.basic.error .ink-dismiss{color:#891e1e}.ink-alert.basic.info{background:rgba(15,117,218,.25);color:#1e5b98;border:1px solid #1e5b98}.ink-alert.basic.info .ink-dismiss{color:#1e5b98}.ink-alert.block{border:1px solid #b87814;background:#fff}.ink-alert.block>h4{background:rgba(255,156,0,.3);color:#b87814}.ink-alert.block .ink-dismiss{color:#b87814}.ink-alert.block.success{border:1px solid #38621d;background:#fff}.ink-alert.block.success>h4{background:rgba(74,155,23,.3);color:#38621d}.ink-alert.block.success .ink-dismiss{color:#38621d}.ink-alert.block.error{border:1px solid #891e1e;background:#fff}.ink-alert.block.error>h4{background:rgba(201,17,17,.3);color:#891e1e}.ink-alert.block.error .ink-dismiss{color:#891e1e}.ink-alert.block.info{border:1px solid #1e5b98;background:#fff}.ink-alert.block.info>h4{background:rgba(15,117,218,.3);color:#1e5b98}.ink-alert.block.info .ink-dismiss{color:#1e5b98}.ink-alert .ink-dismiss{font-family:Arial,sans-serif;font-weight:700;text-shadow:#fff 0 1px 0;filter:alpha(Opacity=25);opacity:.25}.ink-alert .ink-dismiss:hover{filter:alpha(Opacity=60);opacity:.6}.ink-badge{-webkit-border-radius:8em;-moz-border-radius:8em;-ms-border-radius:8em;-o-border-radius:8em;border-radius:8em;color:#fff}.ink-badge.white{background:#fff;color:#555}.ink-badge.black{background:#000}.ink-badge.orange{background:#ff9c00}.ink-badge.red{background:#c91111}.ink-badge.green{background:#4a9b17}.ink-badge.blue{background:#0f75da}.ink-badge.yellow{background:#ffd500;color:#555}.ink-badge.grey{background:gray}.ink-badge+.ink-badge{margin-left:.2em}.ink-button{background:#d9d9d9;color:#000;border:1px solid #bfbfbf;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-button:active,.ink-button:hover{text-decoration:none;color:#000;background:#ccc;border:1px solid #b3b3b3;-webkit-box-shadow:rgba(0,0,0,.2) 0 1px 1px;-moz-box-shadow:rgba(0,0,0,.2) 0 1px 1px;box-shadow:rgba(0,0,0,.2) 0 1px 1px}.ink-button:focus{outline:0;background:#ccc;-webkit-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;-moz-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;box-shadow:rgba(0,0,0,.2) 0 1px 1px inset}.ink-button[disabled]{background:#e6e6e6;border:0}.ink-button[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.blue{color:#fff;background:#0f75da;border-color:#0c63b9}.ink-button.blue:active,.ink-button.blue:hover{background:#0d68c2;border-color:#0a56a1;color:#fff;text-decoration:none}.ink-button.blue:focus{background:#0d68c2}.ink-button.blue[disabled]{background:rgba(15,117,218,.6);border:0}.ink-button.blue[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.green{color:#fff;background:#4a9b17;border-color:#3e8313}.ink-button.green:active,.ink-button.green:hover{background:#3f8514;border-color:#336d10;color:#fff;text-decoration:none}.ink-button.green:focus{background:#3f8514}.ink-button.green[disabled]{background:rgba(74,155,23,.6);border:0}.ink-button.green[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.orange{color:#fff;background:#ff9c00;border-color:#d88400}.ink-button.orange:active,.ink-button.orange:hover{background:#e68c00;border-color:#bf7400;color:#fff;text-decoration:none}.ink-button.orange:focus{background:#e68c00}.ink-button.orange[disabled]{background:rgba(255,156,0,.6);border:0}.ink-button.orange[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.red{color:#fff;background:#c91111;border-color:#aa0e0e}.ink-button.red:active,.ink-button.red:hover{background:#b10f0f;border-color:#920c0c;color:#fff;text-decoration:none}.ink-button.red:focus{background:#b10f0f}.ink-button.red[disabled]{background:rgba(201,17,17,.6);border:0}.ink-button.red[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.black{color:#fff;background:#1a1a1a;border-color:#161616}.ink-button.black:active,.ink-button.black:hover{background:#0d0d0d;border-color:#090909;color:#fff;text-decoration:none}.ink-button.black:focus{background:#0d0d0d}.ink-button.black[disabled]{background:rgba(26,26,26,.6);border:0}.ink-button.black[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.white{color:#555;background:#fff;border-color:#d8d8d8}.ink-button.white:active,.ink-button.white:hover{background:#f2f2f2;border-color:#cbcbcb;color:#555;text-decoration:none}.ink-button.white:focus{background:#f2f2f2}.ink-button.white[disabled]{background:rgba(255,255,255,.6);border:0}.ink-button.white[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.button-group>.ink-button.blue:first-child{border-left:#0c63b9}.button-group>.ink-button.green:first-child{border-left:#3e8313}.button-group>.ink-button.orange:first-child{border-left:#d88400}.button-group>.ink-button.red:first-child{border-left:#aa0e0e}.button-group>.ink-button.black:first-child{border-left:#161616}.button-group>.ink-button.white:first-child{border-left:#d8d8d8}.ink-label{color:#fff;font-weight:300;font-size:.938em;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-label.white{background:#fff;color:#555}.ink-label.black{background:#000}.ink-label.orange{background:#ff9c00}.ink-label.red{background:#c91111}.ink-label.green{background:#4a9b17}.ink-label.blue{background:#0f75da}.ink-label.yellow{background:#ffd500;color:#555}.ink-label.grey{background:gray}.ink-label+.ink-label{margin-left:.2em}.ink-navigation ul.breadcrumbs{font-weight:300;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.breadcrumbs li.active a{background:0 0;color:#999}.ink-navigation ul.breadcrumbs li.active a:hover{cursor:default;text-decoration:none}.ink-navigation ul.breadcrumbs li a:hover{background:0 0;text-decoration:underline}.ink-navigation ul.breadcrumbs.white{background:#fff}.ink-navigation ul.breadcrumbs.white li a,.ink-navigation ul.breadcrumbs.white li:after{color:#555}.ink-navigation ul.breadcrumbs.white li.active a{color:#ccc;text-shadow:#fff 0 1px 0}.ink-navigation ul.breadcrumbs.grey{background:#d9d9d9}.ink-navigation ul.breadcrumbs.grey li a,.ink-navigation ul.breadcrumbs.grey li:after{color:#555}.ink-navigation ul.breadcrumbs.grey li.active a{color:#a6a6a6;text-shadow:#ededed 0 1px 0}.ink-navigation ul.breadcrumbs.black{background:#1a1a1a}.ink-navigation ul.breadcrumbs.black li a,.ink-navigation ul.breadcrumbs.black li:after{color:#fff}.ink-navigation ul.breadcrumbs.black li.active a{color:#666;text-shadow:#000 0 -1px 0}.ink-navigation ul.breadcrumbs.blue{background:#1b75ce}.ink-navigation ul.breadcrumbs.blue li a,.ink-navigation ul.breadcrumbs.blue li:after{color:#fff}.ink-navigation ul.breadcrumbs.blue li.active a{color:#08427b;text-shadow:#1884ef 0 1px 0}.ink-navigation ul.breadcrumbs.orange{background:#f2990d}.ink-navigation ul.breadcrumbs.orange li a,.ink-navigation ul.breadcrumbs.orange li:after{color:#fff}.ink-navigation ul.breadcrumbs.orange li.active a{color:#995e00;text-shadow:#ffa81f 0 1px 0}.ink-navigation ul.breadcrumbs.green{background:#4c9220}.ink-navigation ul.breadcrumbs.green li a,.ink-navigation ul.breadcrumbs.green li:after{color:#fff}.ink-navigation ul.breadcrumbs.green li.active a{color:#20420a;text-shadow:#57b61b 0 1px 0}.ink-navigation ul.breadcrumbs.red{background:#be1c1c}.ink-navigation ul.breadcrumbs.red li a,.ink-navigation ul.breadcrumbs.red li:after{color:#fff}.ink-navigation ul.breadcrumbs.red li.active a{color:#6b0909;text-shadow:#e51313 0 1px 0}.ink-dropdown.green ul.dropdown-menu li.active a{background:#4a9b17;color:#fff}.ink-dropdown.orange ul.dropdown-menu li.active a{background:#ff9c00;color:#fff}.ink-dropdown.red ul.dropdown-menu li.active a{background:#c91111;color:#fff}.ink-dropdown.black ul.dropdown-menu li.active a{background:#1a1a1a;color:#fff}.ink-dropdown.blue ul.dropdown-menu li.active a{background:#0f75da;color:#fff}.ink-navigation ul.menu{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.menu>li{font-weight:300}.ink-navigation ul.menu>li.active a{text-decoration:underline}.ink-navigation ul.menu>li.heading{font-weight:500}.ink-navigation ul.menu>li.disabled a{color:#b3b3b3;text-shadow:#fff 0 1px 0}.ink-navigation ul.menu>li.disabled a:hover{cursor:default;background:0 0;text-decoration:none}.ink-navigation ul.menu>li ul.submenu li{font-size:.875em}.ink-navigation ul.menu>li ul.submenu li a{border-bottom:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.vertical li a{border-bottom:1px solid rgba(0,0,0,.15)}.ink-navigation ul.menu.vertical li:first-child,.ink-navigation ul.menu.vertical li:first-child>a{-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;-ms-border-radius:2px 2px 0 0;-o-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.ink-navigation ul.menu.vertical li:last-child{-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}.ink-navigation ul.menu.vertical li:last-child>a{border-bottom:0;-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}.ink-navigation ul.menu.vertical li:last-child .submenu{-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}.ink-navigation ul.menu.vertical li:last-child .submenu.flyout{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.menu.vertical li:last-child .submenu li:last-child,.ink-navigation ul.menu.vertical li:last-child .submenu li:last-child a{-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}.ink-navigation ul.menu.horizontal>li:first-child,.ink-navigation ul.menu.horizontal>li:first-child a{-webkit-border-radius:2px 0 0 2px;-moz-border-radius:2px 0 0 2px;-ms-border-radius:2px 0 0 2px;-o-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.ink-navigation ul.menu.horizontal>li:last-child,.ink-navigation ul.menu.horizontal>li:last-child a{-webkit-border-radius:0 2px 2px 0;-moz-border-radius:0 2px 2px 0;-ms-border-radius:0 2px 2px 0;-o-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.ink-navigation ul.menu.horizontal>li ul.submenu{-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#fff}.ink-navigation ul.menu.horizontal>li ul.submenu li:last-child{-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}.ink-navigation ul.menu.horizontal>li ul.submenu li:last-child a{border-bottom:0}.ink-navigation ul.menu.white{background:#fff}.ink-navigation ul.menu.white li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.white li ul.submenu li a{color:#555}.ink-navigation ul.menu.white li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.white li.disabled a:hover{background:0 0}.ink-navigation ul.menu.white li.active{background:#e6e6e6}.ink-navigation ul.menu.white li.disabled a{color:#ccc;text-shadow:#fff 0 1px 0}.ink-navigation ul.menu.white li a{color:#555;text-decoration:none}.ink-navigation ul.menu.white li a:hover{background:#f2f2f2}.ink-navigation ul.menu.grey{background:#d9d9d9}.ink-navigation ul.menu.grey li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.grey li ul.submenu li a{color:#555}.ink-navigation ul.menu.grey li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.grey li.disabled a:hover{background:0 0}.ink-navigation ul.menu.grey li.active{background:#bfbfbf}.ink-navigation ul.menu.grey li.disabled a{color:#a6a6a6;text-shadow:#ededed 0 1px 0}.ink-navigation ul.menu.grey li a{color:#555;text-decoration:none}.ink-navigation ul.menu.grey li a:hover{background:#ccc}.ink-navigation ul.menu.black{background:#1a1a1a}.ink-navigation ul.menu.black li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.black li ul.submenu li a{color:#555}.ink-navigation ul.menu.black li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.black li.disabled a:hover{background:0 0}.ink-navigation ul.menu.black li.active{background:#333}.ink-navigation ul.menu.black li.disabled a{color:#666;text-shadow:#000 0 -1px 0}.ink-navigation ul.menu.black li a{color:#fff;text-decoration:none}.ink-navigation ul.menu.black li a:hover{background:#404040}.ink-navigation ul.menu.blue{background:#1b75ce}.ink-navigation ul.menu.blue li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.blue li ul.submenu li a{color:#555}.ink-navigation ul.menu.blue li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.blue li.disabled a:hover{background:0 0}.ink-navigation ul.menu.blue li.active{background:#0c5baa}.ink-navigation ul.menu.blue li.disabled a{color:#08427b;text-shadow:#2289f0 0 1px 0}.ink-navigation ul.menu.blue li a{color:#fff;text-decoration:none}.ink-navigation ul.menu.blue li a:hover{background:#0d68c2}.ink-navigation ul.menu.green{background:#4c9220}.ink-navigation ul.menu.green li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.green li ul.submenu li a{color:#555}.ink-navigation ul.menu.green li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.green li.disabled a:hover{background:0 0}.ink-navigation ul.menu.green li.active{background:#356f10}.ink-navigation ul.menu.green li.disabled a{color:#20420a;text-shadow:#5bbf1c 0 1px 0}.ink-navigation ul.menu.green li a{color:#fff;text-decoration:none}.ink-navigation ul.menu.green li a:hover{background:#3f8514}.ink-navigation ul.menu.orange{background:#f2990d}.ink-navigation ul.menu.orange li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.orange li ul.submenu li a{color:#555}.ink-navigation ul.menu.orange li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.orange li.disabled a:hover{background:0 0}.ink-navigation ul.menu.orange li.active{background:#cc7d00}.ink-navigation ul.menu.orange li.disabled a{color:#995e00;text-shadow:#ffac29 0 1px 0}.ink-navigation ul.menu.orange li a{color:#fff;text-decoration:none}.ink-navigation ul.menu.orange li a:hover{background:#e68c00}.ink-navigation ul.menu.red{background:#be1c1c}.ink-navigation ul.menu.red li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.red li ul.submenu li a{color:#555}.ink-navigation ul.menu.red li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.red li.disabled a:hover{background:0 0}.ink-navigation ul.menu.red li.active{background:#9a0d0d}.ink-navigation ul.menu.red li.disabled a{color:#6b0909;text-shadow:#eb1717 0 1px 0}.ink-navigation ul.menu.red li a{color:#fff;text-decoration:none}.ink-navigation ul.menu.red li a:hover{background:#b10f0f}.ink-navigation ul.pagination{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.pagination li{font-weight:300}.ink-navigation ul.pagination li.active a{text-decoration:underline}.ink-navigation ul.pagination li.disabled a{color:#b3b3b3;text-shadow:#fff 0 1px 0}.ink-navigation ul.pagination li.disabled a:hover{cursor:default;background:0 0;text-decoration:none}.ink-navigation ul.pagination li:first-child,.ink-navigation ul.pagination li:first-child a{-webkit-border-radius:2px 0 0 2px;-moz-border-radius:2px 0 0 2px;-ms-border-radius:2px 0 0 2px;-o-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.ink-navigation ul.pagination li:last-child,.ink-navigation ul.pagination li:last-child a{-webkit-border-radius:0 2px 2px 0;-moz-border-radius:0 2px 2px 0;-ms-border-radius:0 2px 2px 0;-o-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.ink-navigation ul.pagination.white li{background:#fff}.ink-navigation ul.pagination.white li.active a{background:#e6e6e6}.ink-navigation ul.pagination.white li.disabled a{color:#ccc;background:fade(black,0);text-shadow:#fff 0 1px 0}.ink-navigation ul.pagination.white li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.white li a{color:#555;text-decoration:none}.ink-navigation ul.pagination.white li a:hover{background:#f2f2f2}.ink-navigation ul.pagination.grey li{background:#d9d9d9}.ink-navigation ul.pagination.grey li.active a{background:#bfbfbf}.ink-navigation ul.pagination.grey li.disabled a{color:#a6a6a6;background:fade(black,0);text-shadow:#ededed 0 1px 0}.ink-navigation ul.pagination.grey li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.grey li a{color:#555;text-decoration:none}.ink-navigation ul.pagination.grey li a:hover{background:#ccc}.ink-navigation ul.pagination.black li{background:#1a1a1a}.ink-navigation ul.pagination.black li.active a{background:#333}.ink-navigation ul.pagination.black li.disabled a{color:#666;background:fade(black,0);text-shadow:#000 0 -1px 0}.ink-navigation ul.pagination.black li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.black li a{color:#fff;text-decoration:none}.ink-navigation ul.pagination.black li a:hover{background:#292929}.ink-navigation ul.pagination.orange li{background:#f2990d}.ink-navigation ul.pagination.orange li.active a{background:#cc7d00}.ink-navigation ul.pagination.orange li.disabled a{color:#995e00;background:fade(black,0);text-shadow:#ffac29 0 1px 0}.ink-navigation ul.pagination.orange li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.orange li a{color:#fff;text-decoration:none}.ink-navigation ul.pagination.orange li a:hover{background:#e68c00}.ink-navigation ul.pagination.blue li{background:#1b75ce}.ink-navigation ul.pagination.blue li.active a{background:#0c5baa}.ink-navigation ul.pagination.blue li.disabled a{color:#08427b;background:fade(black,0);text-shadow:#2289f0 0 1px 0}.ink-navigation ul.pagination.blue li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.blue li a{color:#fff;text-decoration:none}.ink-navigation ul.pagination.blue li a:hover{background:#0d68c2}.ink-navigation ul.pagination.green li{background:#4c9220}.ink-navigation ul.pagination.green li.active a{background:#356f10}.ink-navigation ul.pagination.green li.disabled a{color:#20420a;background:fade(black,0);text-shadow:#5bbf1c 0 1px 0}.ink-navigation ul.pagination.green li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.green li a{color:#fff;text-decoration:none}.ink-navigation ul.pagination.green li a:hover{background:#3f8514}.ink-navigation ul.pagination.red li{background:#be1c1c}.ink-navigation ul.pagination.red li.active a{background:#9a0d0d}.ink-navigation ul.pagination.red li.disabled a{color:#6b0909;background:fade(black,0);text-shadow:#eb1717 0 1px 0}.ink-navigation ul.pagination.red li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.red li a{color:#fff;text-decoration:none}.ink-navigation ul.pagination.red li a:hover{background:#b10f0f}.ink-navigation ul.pagination.dotted li{background:0 0}.ink-navigation ul.pagination.dotted li a{background:#999;filter:alpha(Opacity=50);opacity:.5}.ink-navigation ul.pagination.dotted li.active a,.ink-navigation ul.pagination.dotted li:hover a{filter:alpha(Opacity=100);opacity:1}.ink-navigation ul.pagination.dotted.black li a{background:#1a1a1a}.ink-navigation ul.pagination.dotted.white li a{background:#fff}.ink-navigation ul.pagination.dotted.blue li a{background:#1b75ce}.ink-navigation ul.pagination.dotted.green li a{background:#4c9220}.ink-navigation ul.pagination.dotted.orange li a{background:#f2990d}.ink-navigation ul.pagination.dotted.red li a{background:#be1c1c}.ink-navigation ul.pagination.chevron li.next a,.ink-navigation ul.pagination.chevron li.previous a{color:#fff;filter:alpha(Opacity=60);opacity:.6}.ink-navigation ul.pagination.chevron li.next a.active,.ink-navigation ul.pagination.chevron li.next a:focus,.ink-navigation ul.pagination.chevron li.next a:hover,.ink-navigation ul.pagination.chevron li.previous a.active,.ink-navigation ul.pagination.chevron li.previous a:focus,.ink-navigation ul.pagination.chevron li.previous a:hover{filter:alpha(Opacity=80);opacity:.8;text-decoration:none;background:0 0}.ink-navigation ul.pagination.chevron li.disabled a{color:#fff;filter:alpha(Opacity=60);opacity:.6;text-shadow:none}.ink-navigation ul.pagination.chevron li.disabled a:focus,.ink-navigation ul.pagination.chevron li.disabled a:hover{color:#fff;filter:alpha(Opacity=60);opacity:.6}.ink-navigation ul.pagination.chevron.black li.disabled a,.ink-navigation ul.pagination.chevron.black li.next a,.ink-navigation ul.pagination.chevron.black li.previous a{color:#1a1a1a}.ink-navigation ul.pagination.chevron.grey li.disabled a,.ink-navigation ul.pagination.chevron.grey li.next a,.ink-navigation ul.pagination.chevron.grey li.previous a{color:#d9d9d9}.ink-navigation ul.pagination.chevron.blue li.disabled a,.ink-navigation ul.pagination.chevron.blue li.next a,.ink-navigation ul.pagination.chevron.blue li.previous a{color:#1b75ce}.ink-navigation ul.pagination.chevron.green li.disabled a,.ink-navigation ul.pagination.chevron.green li.next a,.ink-navigation ul.pagination.chevron.green li.previous a{color:#4c9220}.ink-navigation ul.pagination.chevron.orange li.disabled a,.ink-navigation ul.pagination.chevron.orange li.next a,.ink-navigation ul.pagination.chevron.orange li.previous a{color:#f2990d}.ink-navigation ul.pagination.chevron.red li.disabled a,.ink-navigation ul.pagination.chevron.red li.next a,.ink-navigation ul.pagination.chevron.red li.previous a{color:#be1c1c}.ink-navigation ul.pills li{background:#fff;font-weight:300;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.pills li a{color:#555;background:0 0}.ink-navigation ul.pills li a:hover,.ink-navigation ul.pills li.active a{background:#e6e6e6}.ink-navigation ul.pills li.disabled a{color:#999;text-shadow:#fff 0 1px 0}.ink-navigation ul.pills li.disabled a:hover{background:0 0}.ink-navigation ul.pills.grey li{background:#d9d9d9}.ink-navigation ul.pills.grey li.active a{background:#bfbfbf}.ink-navigation ul.pills.grey li.disabled a{color:#a6a6a6;text-shadow:#ededed 0 1px 0}.ink-navigation ul.pills.grey li.disabled a:hover{background:0 0}.ink-navigation ul.pills.grey li a{color:#555}.ink-navigation ul.pills.grey li a:hover{background:#ccc}.ink-navigation ul.pills.black li{background:#1a1a1a}.ink-navigation ul.pills.black li.active a{background:#333}.ink-navigation ul.pills.black li.disabled a{color:#666;text-shadow:#000 0 -1px 0}.ink-navigation ul.pills.black li.disabled a:hover{background:0 0}.ink-navigation ul.pills.black li a{color:#fff}.ink-navigation ul.pills.black li a:hover{background:#292929}.ink-navigation ul.pills.blue li{background:#1b75ce}.ink-navigation ul.pills.blue li.active a{background:#0c5baa}.ink-navigation ul.pills.blue li.disabled a{color:#08427b;text-shadow:#2289f0 0 1px 0}.ink-navigation ul.pills.blue li.disabled a:hover{background:0 0}.ink-navigation ul.pills.blue li a{color:#fff}.ink-navigation ul.pills.blue li a:hover{background:#0d68c2}.ink-navigation ul.pills.green li{background:#4c9220}.ink-navigation ul.pills.green li.active a{background:#356f10}.ink-navigation ul.pills.green li.disabled a{color:#20420a;text-shadow:#5bbf1c 0 1px 0}.ink-navigation ul.pills.green li.disabled a:hover{background:0 0}.ink-navigation ul.pills.green li a{color:#fff}.ink-navigation ul.pills.green li a:hover{background:#3f8514}.ink-navigation ul.pills.orange li{background:#f2990d}.ink-navigation ul.pills.orange li.active a{background:#cc7d00}.ink-navigation ul.pills.orange li.disabled a{color:#995e00;text-shadow:#ffac29 0 1px 0}.ink-navigation ul.pills.orange li.disabled a:hover{background:0 0}.ink-navigation ul.pills.orange li a{color:#fff}.ink-navigation ul.pills.orange li a:hover{background:#e68c00}.ink-navigation ul.pills.red li{background:#be1c1c}.ink-navigation ul.pills.red li.active a{background:#9a0d0d}.ink-navigation ul.pills.red li.disabled a{color:#6b0909;text-shadow:#eb1717 0 1px 0}.ink-navigation ul.pills.red li.disabled a:hover{background:0 0}.ink-navigation ul.pills.red li a{color:#fff}.ink-navigation ul.pills.red li a:hover{background:#b10f0f}table.ink-table{background:#fff}table.ink-table tr td,table.ink-table tr th{border-bottom:#bbb 1px solid;background:0 0}table.ink-table tfoot tr td,table.ink-table tfoot tr th{border-top:#bbb 1px solid}table.ink-table.alternating tbody tr:nth-child(odd){background-color:#f5f5f5}table.ink-table.hover tbody tr:hover{background:#fefbd6;color:#555}table.ink-table.bordered{border:#bbb 1px solid;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}table.ink-table.bordered tr th{border-left:#bbb 1px solid}table.ink-table.bordered tr th:first-child{border-left:0}table.ink-table.bordered tr:last-child td{border-bottom:0}table.ink-table.bordered tr td{border-left:#bbb 1px solid}table.ink-table.bordered tr td:first-child{border-left:0}table.ink-table tbody>tr.red td{background:#c91111;color:#fff}table.ink-table tbody>tr.green td{background:#4a9b17;color:#fff}table.ink-table tbody>tr.blue td{background:#0f75da;color:#fff}table.ink-table tbody>tr.orange td{background:#ff9c00;color:#fff}table.ink-table tbody>tr.black td{background:#000;color:#ccc}table.ink-table tbody>tr.yellow td{background:#ffd500;color:#000}.animated.slow{animation-duration:1s}.animated.medium{animation-duration:.5s}.animated.fast{animation-duration:.2s}.ink-carousel{width:100%;position:relative;overflow:hidden;display:block}.ink-carousel .stage{left:0;height:auto!important;margin-top:0;margin-bottom:0;padding-left:0;list-style-type:none;white-space:nowrap;position:relative;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease}.ink-carousel .stage.column-group{display:-webkit-block;display:-moz-block;display:block;-webkit-flex-flow:none;-moz-flex-flow:none;flex-flow:none}.ink-carousel .stage .slide{position:relative;display:inline-block;vertical-align:top;white-space:normal;margin:0;float:none;zoom:1;*display:inline}.ink-datepicker-wrapper{position:relative}.ink-datepicker-calendar{margin-top:0;position:absolute}.ink-datepicker-calendar.right{left:100%;top:0}.ink-datepicker-calendar.left{right:100%;top:0}.ink-datepicker-calendar.bottom{top:100%;left:0}.ink-datepicker-calendar.top{bottom:100%;left:0}.ink-datepicker-calendar,.ink-datepicker-wrapper{display:inline;display:inline-block}.ink-calendar{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;text-align:center;padding:.3em;min-width:17.4em;font-size:13px;-webkit-box-shadow:rgba(0,0,0,.4) 0 1px 2px 0;-moz-box-shadow:rgba(0,0,0,.4) 0 1px 2px 0;box-shadow:rgba(0,0,0,.4) 0 1px 2px 0;background:#fff;z-index:10}.ink-calendar a{text-decoration:none}.ink-calendar li{list-style:none inside}html.ink-modal-is-open .ink-calendar{z-index:101}.ink-calendar-top-options{padding:5px;font-size:.813em;cursor:pointer}.ink-calendar-top-options .clean{float:left}.ink-calendar-top-options .close{float:right}.ink-calendar-top{line-height:2em;background:#e6e6e6;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-calendar-top div{float:left}.ink-calendar-top .ink-calendar-next,.ink-calendar-top .ink-calendar-prev{width:10%}.ink-calendar-top .ink-calendar-next a,.ink-calendar-top .ink-calendar-prev a{display:block}.ink-calendar-top .ink-calendar-month_desc{width:80%}.ink-calendar-month,.ink-calendar-month-selector,.ink-calendar-year-selector{margin-top:.5em;padding-left:0}.ink-calendar-month li a,.ink-calendar-month-selector li a,.ink-calendar-year-selector li a{margin:0;line-height:2em;vertical-align:middle;display:block;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;color:#444}.ink-calendar-month li a:hover,.ink-calendar-month-selector li a:hover,.ink-calendar-year-selector li a:hover{background:#e6e6e6}.ink-calendar-month li a.ink-calendar-on,.ink-calendar-month li a.ink-calendar-on:hover,.ink-calendar-month-selector li a.ink-calendar-on,.ink-calendar-month-selector li a.ink-calendar-on:hover,.ink-calendar-year-selector li a.ink-calendar-on,.ink-calendar-year-selector li a.ink-calendar-on:hover{background:#0069d6;color:#fff}.ink-calendar-month li a.ink-calendar-off,.ink-calendar-month li a.ink-calendar-off:hover,.ink-calendar-month-selector li a.ink-calendar-off,.ink-calendar-month-selector li a.ink-calendar-off:hover,.ink-calendar-year-selector li a.ink-calendar-off,.ink-calendar-year-selector li a.ink-calendar-off:hover{background:#fff;color:#aaa;cursor:default}.ink-calendar-month ul,.ink-calendar-month-selector ul,.ink-calendar-year-selector ul{clear:both;padding-left:0}.ink-calendar-month ul li,.ink-calendar-month-selector ul li,.ink-calendar-year-selector ul li{width:2.4em;float:left;text-align:center;padding:0;margin:0}.ink-calendar-month-selector ul li,.ink-calendar-year-selector ul li{width:25%}.ink-calendar-month-selector,.ink-calendar-year-selector{display:none}.action_inactive,.ink-calendar-off{color:#ddd!important}.ink-calendar-month .ink-calendar-header{border-bottom:1px solid rgba(0,0,0,.1);padding-bottom:.5em;margin-bottom:.5em;color:#aaa}.ink-calendar-middle,.ink-calendar-month .ink-calendar-header,.ink-calendar-month .ink-calendar-middle ul,.ink-calendar-top,.ink-calendar-top-options{*zoom:1}.ink-calendar-middle:after,.ink-calendar-month .ink-calendar-header:after,.ink-calendar-month .ink-calendar-middle ul:after,.ink-calendar-top-options:after,.ink-calendar-top:after{content:"";display:table;clear:both}body.ink-drawer{max-width:100%}body.ink-drawer .content-drawer,body.ink-drawer .left-drawer,body.ink-drawer .right-drawer{-webkit-transition-property:translate3d;-moz-transition-property:translate3d;-o-transition-property:translate3d;transition-property:translate3d;-webkit-transition-duration:300ms;-moz-transition-duration:300ms;-o-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.86,0,.07,1);-moz-transition-timing-function:cubic-bezier(0.86,0,.07,1);-o-transition-timing-function:cubic-bezier(0.86,0,.07,1);transition-timing-function:cubic-bezier(0.86,0,.07,1)}body.ink-drawer .left-drawer{left:-220px}body.ink-drawer .right-drawer{right:-220px}body.ink-drawer .content-drawer{width:100%}body.ink-drawer .left-drawer,body.ink-drawer .right-drawer{position:absolute;top:0;z-index:0;display:none;overflow-x:hidden;overflow-y:auto;width:220px;height:100%;-webkit-overflow-scrolling:touch}body.ink-drawer .left-drawer.show,body.ink-drawer .right-drawer.show{display:block}body.ink-drawer.push{overflow:hidden;width:100%;height:100%;position:fixed}body.ink-drawer.push .content-drawer{overflow:hidden}body.ink-drawer.push.left .content-drawer,body.ink-drawer.push.left .left-drawer{-webkit-transform:translate3d(220px,0,0);-moz-transform:translate3d(220px,0,0);-ms-transform:translate3d(220px,0,0);-o-transform:translate3d(220px,0,0);transform:translate3d(220px,0,0)}body.ink-drawer.push.right .content-drawer,body.ink-drawer.push.right .right-drawer{-webkit-transform:translate3d(-220px,0,0);-moz-transform:translate3d(-220px,0,0);-ms-transform:translate3d(-220px,0,0);-o-transform:translate3d(-220px,0,0);transform:translate3d(-220px,0,0)}body.ink-drawer.over{overflow:hidden;-webkit-user-drag:none}body.ink-drawer.over.left .left-drawer{-webkit-transform:translate3d(220px,0,0);-moz-transform:translate3d(220px,0,0);-ms-transform:translate3d(220px,0,0);-o-transform:translate3d(220px,0,0);transform:translate3d(220px,0,0)}body.ink-drawer.over.right .right-drawer{-webkit-transform:translate3d(-220px,0,0);-moz-transform:translate3d(-220px,0,0);-ms-transform:translate3d(-220px,0,0);-o-transform:translate3d(-220px,0,0);transform:translate3d(-220px,0,0)}.ink-shade{background:rgba(0,0,0,.8);width:100%;height:100%;top:0;right:0;bottom:0;left:0;margin-top:0;position:fixed;z-index:100;display:none;filter:alpha(Opacity=0);opacity:0}.ink-shade.fade{-webkit-transition:opacity 300ms;-moz-transition:opacity 300ms;-o-transition:opacity 300ms;transition:opacity 300ms}.ink-shade.visible{filter:alpha(Opacity=100);opacity:1}.ink-modal{top:50%;left:50%;width:90%;height:90%;background:#fff;z-index:100;position:absolute;border:1px #666 solid;overflow:hidden;filter:alpha(Opacity=100);opacity:1;-webkit-box-shadow:rgba(0,0,0,.8) 0 0 15px 0;-moz-box-shadow:rgba(0,0,0,.8) 0 0 15px 0;box-shadow:rgba(0,0,0,.8) 0 0 15px 0;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;*zoom:1}.ink-modal:after{content:"";display:table;clear:both}.ink-modal>.modal-body{padding:1em;overflow-y:auto;overflow-x:hidden;height:auto}.ink-modal>.modal-body .ink-grid{padding-left:0;padding-right:0;width:100%;min-width:100%}.ink-modal>.modal-header,.ink-modal>header{border-bottom:1px #e6e6e6 solid;overflow:hidden;-webkit-box-shadow:rgba(175,175,175,.2) 0 1px 2px 0;-moz-box-shadow:rgba(175,175,175,.2) 0 1px 2px 0;box-shadow:rgba(175,175,175,.2) 0 1px 2px 0}.ink-modal>.modal-header>.modal-close,.ink-modal>header>.modal-close{padding-top:2px;text-align:center;color:#fff;width:26px;height:26px;line-height:1.2em;border:0;background:#bfbfbf;font-size:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;text-shadow:rgba(0,0,0,.6) 0 -1px 0;filter:alpha(Opacity=60);opacity:.6;float:right}.ink-modal>.modal-header>.modal-close:after,.ink-modal>header>.modal-close:after{content:"\f00d";font-family:FontAwesome;font-size:medium;line-height:22px}.ink-modal>.modal-header>.modal-close:hover,.ink-modal>header>.modal-close:hover{filter:alpha(Opacity=100);opacity:1}.ink-modal>.modal-footer,.ink-modal>footer{background:#e6e6e6;margin-bottom:0;zoom:1;-webkit-box-shadow:rgba(175,175,175,.2) 0 -1px 2px 0;-moz-box-shadow:rgba(175,175,175,.2) 0 -1px 2px 0;box-shadow:rgba(175,175,175,.2) 0 -1px 2px 0}.ink-modal>.modal-footer,.ink-modal>.modal-header,.ink-modal>footer,.ink-modal>header{padding:.8em 1em .65em}.ink-modal>.modal-footer:after,.ink-modal>.modal-footer:before,.ink-modal>.modal-header:after,.ink-modal>.modal-header:before,.ink-modal>footer:after,.ink-modal>footer:before,.ink-modal>header:after,.ink-modal>header:before{content:".";display:block;height:0;clear:both;visibility:hidden}.ink-modal-open{overflow:hidden}.ink-progress-bar{margin-bottom:1em;overflow:hidden;background:#f2f2f2;position:relative;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-box-shadow:0,1px,3px,0,rgba(0,0,0,.2),inset;-moz-box-shadow:0,1px,3px,0,rgba(0,0,0,.2),inset;box-shadow:0,1px,3px,0,rgba(0,0,0,.2),inset}.ink-progress-bar .caption{position:absolute;top:0;left:0;width:100%;height:100%;line-height:1.7;text-align:center;color:#000;font-size:.813em;z-index:10}.ink-progress-bar .bar{height:1.3em;text-shadow:rgba(0,0,0,.25),0,1px,0;-webkit-box-shadow:0,1px,1px,0,rgba(0,0,0,.1),inset;-moz-box-shadow:0,1px,1px,0,rgba(0,0,0,.1),inset;box-shadow:0,1px,1px,0,rgba(0,0,0,.1),inset;-webkit-transition-property:width;-moz-transition-property:width;-o-transition-property:width;transition-property:width;-webkit-transition-duration:.6s;-moz-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s;-webkit-transition-timing-function:ease;-moz-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.ink-progress-bar .bar.grey{background:#ccc;color:#555}.ink-progress-bar .bar.green{background:#4a9b17;color:#fff}.ink-progress-bar .bar.blue{background:#0f75da;color:#fff}.ink-progress-bar .bar.red{background:#c91111;color:#fff}.ink-progress-bar .bar.orange{background:#ff9c00;color:#555}.ink-progress-bar .bar.black{background:#000;color:#fff}.dragging,.ink-sortable-list li{cursor:move;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none;-ms-user-drag:none;-moz-user-drag:none;-khtml-user-drag:none;-webkit-user-drag:none;-o-user-drag:none;user-drag:none}.drag,.ink-sortable-list li.placeholder{-webkit-box-shadow:0,0,10px,0,rgba(0,0,0,.3);-moz-box-shadow:0,0,10px,0,rgba(0,0,0,.3);box-shadow:0,0,10px,0,rgba(0,0,0,.3)}.ink-sortable-list li{margin:0;border-bottom:1px solid #ccc;line-height:40px}.ink-sortable-list li.placeholder,.ink-sortable-list li:hover{background:#ccc;background:rgba(204,204,204,.2)}.ink-sortable-list li .ink-label{margin:0 .8em}.ink-sticky-stuck{position:fixed}.ink-tabs .tabs-nav{list-style:none;padding:0;*zoom:1}.ink-tabs .tabs-nav li{line-height:1.7;position:relative;margin:0}.ink-tabs .tabs-nav li a{padding:.5em 1em;display:block}.ink-tabs .tabs-nav li a:hover{background:#f0f0f0}.ink-tabs .tabs-nav li.active a{color:#555;cursor:default;text-decoration:none;background:#fff;border:1px solid #ccc}.ink-tabs .tabs-nav:after{content:"";display:table;clear:both}.ink-tabs .tabs-content{margin-top:1.5em;overflow:auto}.ink-tabs.top>.tabs-nav{border-bottom:1px solid #ccc}.ink-tabs.top>.tabs-nav li{float:left}.ink-tabs.top>.tabs-nav li a{margin-right:.4em;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.ink-tabs.top>.tabs-nav li.active{margin:0 0 -2px 0}.ink-tabs.top>.tabs-nav li.active a{border-bottom-color:transparent}.ink-tabs.bottom>.tabs-nav{border-top:1px solid #ccc}.ink-tabs.bottom>.tabs-nav li{float:left}.ink-tabs.bottom>.tabs-nav li a{margin-right:.4em;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.ink-tabs.bottom>.tabs-nav li.active{margin:-2px 0 0 0}.ink-tabs.bottom>.tabs-nav li.active a{border-top-color:transparent}.ink-tabs.left>.tabs-nav{border-right:1px solid #ccc;float:left;margin-right:2em}.ink-tabs.left>.tabs-nav li{float:none;text-align:right}.ink-tabs.left>.tabs-nav li a{margin-bottom:.4em;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;-ms-border-radius:4px 0 0 4px;-o-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.ink-tabs.left>.tabs-nav li.active{margin:0 -2px 0 0}.ink-tabs.left>.tabs-nav li.active a{border-right-color:transparent}.ink-tabs.right>.tabs-nav{border-left:1px solid #ccc;float:right;margin-left:2em}.ink-tabs.right>.tabs-nav li{float:none}.ink-tabs.right>.tabs-nav li a{margin-bottom:.4em;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-ms-border-radius:0 4px 4px 0;-o-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.ink-tabs.right>.tabs-nav li.active{margin:0 0 0 -2px}.ink-tabs.right>.tabs-nav li.active a{border-left-color:transparent}.ink-tagfield input[type=text].new-tag-input{background-color:#fff;border:1px solid #ccc;line-height:1em;margin:0;padding:5px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-tagfield input[type=text].new-tag-input:focus{-webkit-box-shadow:0,0,0,3px,#eaeaea;-moz-box-shadow:0,0,0,3px,#eaeaea;box-shadow:0,0,0,3px,#eaeaea;border:1px solid #c3c3c3}.ink-tagfield span.ink-tag{background-color:#1b1b1b;color:#eaeaea;text-shadow:none;font-size:.9em;font-weight:400;border:1px solid #000;padding:4px 6px}.ink-tagfield span.ink-tag i.icon-remove{color:#ccc;font-size:.9em;font-weight:400;margin-left:4px}.ink-tagfield span.ink-tag i.icon-remove:hover{cursor:pointer;color:red}.ink-tree-view li{list-style-type:none}.ink-tree-view [data-open]>:before{margin-left:-1.3em;margin-right:.4em;text-decoration:none} \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/css/ink-ie.css b/ajax/libs/ink/3.0.0/css/ink-ie.css new file mode 100644 index 000000000..f083fc1ec --- /dev/null +++ b/ajax/libs/ink/3.0.0/css/ink-ie.css @@ -0,0 +1,888 @@ +/** + * Ink + * + * A set of tools for quick development of web interfaces. + * + * @package Ink + * @author Sapo Ink Team + * @license http://opensource.org/licenses/MIT MIT + * @link http://ink.sapo.pt + * @version 3.0.0 + */ +/** + * Ink class names prefix + * Used in all of Inks components root elements + */ +/** + * Grid class names + */ +/** + * Alerts class names + */ +/** + * Badges class names + */ +/** + * Buttons class names + */ +/** + * Forms class names + */ +/** + * Labels class names + */ +/** + * Navigation class names + */ +/** + * Dropdown class names + */ +/** + * Tables class names + */ +/** + * Images class names + */ +/** + * Sets the grids maximum width + * @var $grid-max-width (pixels|ems|percentage) + */ +/*! + * Sets the grids breakpoint + * + * To add a new break point you'll need to add an element to the list. + * + * Here's an example: ( class-name-prefix, minimum-width, maximum-width, gutter-width, no-media-query). + * + * class-name-prefix: this is the prefix used in tons of inks classes i.e.: large-100, small-40, etc. + * minimum-width: (pixels|null) the minimum width for the breakpoint + * maximum-width: (pixels|null) the maximum width for the breakpoint + * gutter-width: (ems) the width for the gutters (space between grid columns) for the breakpoint + * no-media-query: (true|false) if you need to support IE8 set this to true on a single breakpoint. + * Since IE8 does not support the @media statement leaving one of the breakpoints + * outside a @media query let's you use the grid in IE8. + * + */ +.ink-grid { + width: auto; + max-width: 1440px; + margin: 0 auto; +} + +.ink-grid { + padding: 0 1.75em; +} + +.column-group > [class*=large-] { + float: left; + clear: none; +} + +.large-5 { + width: 5%; +} + +.large-10 { + width: 10%; +} + +.large-15 { + width: 15%; +} + +.large-20 { + width: 20%; +} + +.large-25 { + width: 25%; +} + +.large-30 { + width: 30%; +} + +.large-33 { + width: 33.33%; +} + +.large-35 { + width: 35%; +} + +.large-40 { + width: 40%; +} + +.large-45 { + width: 45%; +} + +.large-50 { + width: 50%; +} + +.large-55 { + width: 55%; +} + +.large-60 { + width: 60%; +} + +.large-65 { + width: 65%; +} + +.large-66 { + width: 66.66%; +} + +.large-70 { + width: 70%; +} + +.large-75 { + width: 75%; +} + +.large-80 { + width: 80%; +} + +.large-85 { + width: 85%; +} + +.large-90 { + width: 90%; +} + +.large-95 { + width: 95%; +} + +.large-100 { + width: 100%; +} + +[class*=large-100] { + float: none; + clear: both; +} + +.column-group { + *zoom: 1; +} +.column-group:after { + content: ""; + display: table; + clear: both; +} + +.column-group.gutters { + margin-left: -1.75em; +} +.column-group.gutters > [class*=large-], .column-group.gutters > [class*=all-] { + padding-left: 1.75em; + margin-bottom: 1.75em; +} + +.column-group.horizontal-gutters { + margin-left: -1.75em; +} +.column-group.horizontal-gutters > [class*=large-], .column-group.horizontal-gutters > [class*=all-] { + padding-left: 1.75em; +} + +.column-group.vertical-gutters > [class*=large-], .column-group.vertical-gutters > [class*=all-] { + margin-bottom: 1.75em; +} + +.column-group.double-gutters { + margin-left: -3.5em; +} +.column-group.double-gutters > [class*=large-], .column-group.double-gutters > [class*=all-] { + padding-left: 3.5em; + margin-bottom: 3.5em; +} + +.column-group.double-horizontal-gutters { + margin-left: -3.5em; +} +.column-group.double-horizontal-gutters > [class*=large-], .column-group.double-horizontal-gutters > [class*=all-] { + padding-left: 3.5em; +} + +.column-group.double-vertical-gutters > [class*=large-], .column-group.double-vertical-gutters > [class*=all-] { + margin-bottom: 3.5em; +} + +.column-group.half-gutters { + margin-left: -0.875em; +} +.column-group.half-gutters > [class*=large-], .column-group.half-gutters > [class*=all-] { + padding-left: 0.875em; + margin-bottom: 0.875em; +} + +.column-group.half-horizontal-gutters { + margin-left: -0.875em; +} +.column-group.half-horizontal-gutters > [class*=large-], .column-group.half-horizontal-gutters > [class*=all-] { + padding-left: 0.875em; +} + +.column-group.half-vertical-gutters > [class*=large-], .column-group.half-vertical-gutters > [class*=all-] { + margin-bottom: 0.875em; +} + +.column-group.quarter-gutters { + margin-left: -0.4375em; +} +.column-group.quarter-gutters > [class*=large-], .column-group.quarter-gutters > [class*=all-] { + padding-left: 0.4375em; + margin-bottom: 0.4375em; +} + +.column-group.quarter-horizontal-gutters { + margin-left: -0.4375em; +} +.column-group.quarter-horizontal-gutters > [class*=large-], .column-group.quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.4375em; +} + +.column-group.quarter-vertical-gutters > [class*=large-], .column-group.quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.4375em; +} + +.column-group.large-gutters { + margin-left: -1.75em; +} +.column-group.large-gutters > [class*=large-], .column-group.large-gutters > [class*=all-] { + padding-left: 0.4375em; + margin-bottom: 0.4375em; +} + +.column-group.large-horizontal-gutters { + margin-left: -1.75em; +} +.column-group.large-horizontal-gutters > [class*=large-], .column-group.large-horizontal-gutters > [class*=all-] { + padding-left: 1.75em; +} + +.column-group.large-vertical-gutters > [class*=large-], .column-group.large-vertical-gutters > [class*=all-] { + margin-bottom: 1.75em; +} + +.column-group.large-double-gutters { + margin-left: -3.5em; +} +.column-group.large-double-gutters > [class*=large-], .column-group.large-double-gutters > [class*=all-] { + padding-left: 3.5em; + margin-bottom: 3.5em; +} + +.column-group.large-double-horizontal-gutters { + margin-left: -3.5em; +} +.column-group.large-double-horizontal-gutters > [class*=large-], .column-group.large-double-horizontal-gutters > [class*=all-] { + padding-left: 3.5em; +} + +.column-group.large-double-vertical-gutters > [class*=large-], .column-group.large-double-vertical-gutters > [class*=all-] { + margin-bottom: 3.5em; +} + +.column-group.large-half-gutters { + margin-left: -0.875em; +} +.column-group.large-half-gutters > [class*=large-], .column-group.large-half-gutters > [class*=all-] { + padding-left: 0.875em; + margin-bottom: 0.875em; +} + +.column-group.large-half-horizontal-gutters { + margin-left: -0.875em; +} +.column-group.large-half-horizontal-gutters > [class*=large-], .column-group.large-half-horizontal-gutters > [class*=all-] { + padding-left: 0.875em; +} + +.column-group.large-half-vertical-gutters > [class*=large-], .column-group.large-half-vertical-gutters > [class*=all-] { + margin-bottom: 0.875em; +} + +.column-group.large-quarter-gutters { + margin-left: -0.4375em; +} +.column-group.large-quarter-gutters > [class*=large-], .column-group.large-quarter-gutters > [class*=all-] { + padding-left: 0.4375em; + margin-bottom: 0.4375em; +} + +.column-group.large-quarter-horizontal-gutters { + margin-left: -0.4375em; +} +.column-group.large-quarter-horizontal-gutters > [class*=large-], .column-group.large-quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.4375em; +} + +.column-group.large-quarter-vertical-gutters > [class*=large-], .column-group.large-quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.4375em; +} + +.column-group.large-no-gutters { + margin-left: 0; +} +.column-group.large-no-gutters > [class*=large-], .column-group.large-no-gutters > [class*=all-] { + padding-left: 0; + margin-bottom: 0; +} + +.ink-table td[class*=large-], .ink-table th[class*=large-], .ink-table tr[class*=large-], .ink-table thead[class*=large-], .ink-table tbody[class*=large-], .ink-table tfoot[class*=large-] { + float: none; +} + +.large-push-left { + float: left; +} + +.large-push-center { + float: none; + margin-left: auto; + margin-right: auto; +} + +.large-push-right { + float: right; +} + +.large-align-left { + text-align: left; +} + +.large-align-center { + text-align: center; +} + +.large-align-right { + text-align: right; +} + +.large-no-margin { + margin: 0 !important; +} + +.space { + margin: 1.75em; +} + +.large-space { + margin: 1.75em; +} + +.padding { + padding: 1.75em; +} + +.large-padding { + padding: 1.75em; +} + +.double-space { + margin: 3.5em; +} + +.large-double-space { + margin: 3.5em; +} + +.double-padding { + padding: 3.5em; +} + +.large-double-padding { + padding: 3.5em; +} + +.half-space { + margin: 0.875em; +} + +.large-half-space { + margin: 0.875em; +} + +.half-padding { + padding: 0.875em; +} + +.large-half-padding { + padding: 0.875em; +} + +.quarter-space { + margin: 0.4375em; +} + +.large-quarter-space { + margin: 0.4375em; +} + +.quarter-padding { + padding: 0.4375em; +} + +.large-quarter-padding { + padding: 0.4375em; +} + +.vertical-space { + margin-top: 1.75em; + margin-bottom: 1.75em; +} + +.large-vertical-space { + margin-top: 1.75em; + margin-bottom: 1.75em; +} + +.vertical-padding { + padding-top: 1.75em; + padding-bottom: 1.75em; +} + +.large-vertical-padding { + padding-top: 1.75em; + padding-bottom: 1.75em; +} + +.double-vertical-space { + margin-top: 3.5em; + margin-bottom: 3.5em; +} + +.large-double-vertical-space { + margin-top: 3.5em; + margin-bottom: 3.5em; +} + +.double-vertical-padding { + padding-top: 3.5em; + padding-bottom: 3.5em; +} + +.large-double-vertical-padding { + padding-top: 3.5em; + padding-bottom: 3.5em; +} + +.half-vertical-space { + margin-top: 0.875em; + margin-bottom: 0.875em; +} + +.large-half-vertical-space { + margin-top: 0.875em; + margin-bottom: 0.875em; +} + +.half-vertical-padding { + padding-top: 0.875em; + padding-bottom: 0.875em; +} + +.large-half-vertical-padding { + padding-top: 0.875em; + padding-bottom: 0.875em; +} + +.quarter-vertical-space { + margin-top: 0.4375em; + margin-bottom: 0.4375em; +} + +.large-quarter-vertical-space { + margin-top: 0.4375em; + margin-bottom: 0.4375em; +} + +.quarter-vertical-padding { + padding-top: 0.4375em; + padding-bottom: 0.4375em; +} + +.large-quarter-vertical-padding { + padding-top: 0.4375em; + padding-bottom: 0.4375em; +} + +.horizontal-space { + margin-left: 1.75em; + margin-right: 1.75em; +} + +.large-horizontal-space { + margin-left: 1.75em; + margin-right: 1.75em; +} + +.horizontal-padding { + padding-left: 1.75em; + padding-right: 1.75em; +} + +.large-horizontal-padding { + padding-left: 1.75em; + padding-right: 1.75em; +} + +.double-horizontal-space { + margin-left: 3.5em; + margin-right: 3.5em; +} + +.large-double-horizontal-space { + margin-left: 3.5em; + margin-right: 3.5em; +} + +.double-horizontal-padding { + padding-left: 3.5em; + padding-right: 3.5em; +} + +.large-double-horizontal-padding { + padding-left: 3.5em; + padding-right: 3.5em; +} + +.half-horizontal-space { + margin-left: 0.875em; + margin-right: 0.875em; +} + +.large-half-horizontal-space { + margin-left: 0.875em; + margin-right: 0.875em; +} + +.half-horizontal-padding { + padding-left: 0.875em; + padding-right: 0.875em; +} + +.large-half-horizontal-padding { + padding-left: 0.875em; + padding-right: 0.875em; +} + +.quarter-horizontal-space { + margin-left: 0.4375em; + margin-right: 0.4375em; +} + +.large-quarter-horizontal-space { + margin-left: 0.4375em; + margin-right: 0.4375em; +} + +.quarter-horizontal-padding { + padding-left: 0.4375em; + padding-right: 0.4375em; +} + +.large-quarter-horizontal-padding { + padding-left: 0.4375em; + padding-right: 0.4375em; +} + +.top-space { + margin-top: 1.75em; +} + +.large-top-space { + margin-top: 1.75em; +} + +.top-padding { + padding-top: 1.75em; +} + +.large-top-padding { + padding-top: 1.75em; +} + +.double-top-space { + margin-top: 3.5em; +} + +.large-double-top-space { + margin-top: 3.5em; +} + +.double-top-padding { + padding-top: 3.5em; +} + +.large-double-top-padding { + padding-top: 3.5em; +} + +.half-top-space { + margin-top: 0.875em; +} + +.large-half-top-space { + margin-top: 0.875em; +} + +.half-top-padding { + padding-top: 0.875em; +} + +.large-half-top-padding { + padding-top: 0.875em; +} + +.quarter-top-space { + margin-top: 0.4375em; +} + +.large-quarter-top-space { + margin-top: 0.4375em; +} + +.quarter-top-padding { + padding-top: 0.4375em; +} + +.large-quarter-top-padding { + padding-top: 0.4375em; +} + +.right-space { + margin-right: 1.75em; +} + +.large-right-space { + margin-right: 1.75em; +} + +.right-padding { + padding-right: 1.75em; +} + +.large-right-padding { + padding-right: 1.75em; +} + +.double-right-space { + margin-right: 3.5em; +} + +.large-double-right-space { + margin-right: 3.5em; +} + +.double-right-padding { + padding-right: 3.5em; +} + +.large-double-right-padding { + padding-right: 3.5em; +} + +.half-right-space { + margin-right: 0.875em; +} + +.large-half-right-space { + margin-right: 0.875em; +} + +.half-right-padding { + padding-right: 0.875em; +} + +.large-half-right-padding { + padding-right: 0.875em; +} + +.quarter-right-space { + margin-right: 0.4375em; +} + +.large-quarter-right-space { + margin-right: 0.4375em; +} + +.quarter-right-padding { + padding-right: 0.4375em; +} + +.large-quarter-right-padding { + padding-right: 0.4375em; +} + +.bottom-space { + margin-bottom: 1.75em; +} + +.large-bottom-space { + margin-bottom: 1.75em; +} + +.bottom-padding { + padding-bottom: 1.75em; +} + +.large-bottom-padding { + padding-bottom: 1.75em; +} + +.double-bottom-space { + margin-bottom: 3.5em; +} + +.large-double-bottom-space { + margin-bottom: 3.5em; +} + +.double-bottom-padding { + padding-bottom: 3.5em; +} + +.large-double-bottom-padding { + padding-bottom: 3.5em; +} + +.half-bottom-space { + margin-bottom: 0.875em; +} + +.large-half-bottom-space { + margin-bottom: 0.875em; +} + +.half-bottom-padding { + padding-bottom: 0.875em; +} + +.large-half-bottom-padding { + padding-bottom: 0.875em; +} + +.quarter-bottom-space { + margin-bottom: 0.4375em; +} + +.large-quarter-bottom-space { + margin-bottom: 0.4375em; +} + +.quarter-bottom-padding { + padding-bottom: 0.4375em; +} + +.large-quarter-bottom-padding { + padding-bottom: 0.4375em; +} + +.left-space { + margin-left: 1.75em; +} + +.large-left-space { + margin-left: 1.75em; +} + +.left-padding { + padding-left: 1.75em; +} + +.large-left-padding { + padding-left: 1.75em; +} + +.double-left-space { + margin-left: 3.5em; +} + +.large-double-left-space { + margin-left: 3.5em; +} + +.double-left-padding { + padding-left: 3.5em; +} + +.large-double-left-padding { + padding-left: 3.5em; +} + +.half-left-space { + margin-left: 0.875em; +} + +.large-half-left-space { + margin-left: 0.875em; +} + +.half-left-padding { + padding-left: 0.875em; +} + +.large-half-left-padding { + padding-left: 0.875em; +} + +.quarter-left-space { + margin-left: 0.4375em; +} + +.large-quarter-left-space { + margin-left: 0.4375em; +} + +.quarter-left-padding { + padding-left: 0.4375em; +} + +.large-quarter-left-padding { + padding-left: 0.4375em; +} + +.hide-large { + display: none !important; +} + +.show-large { + display: inherit !important; +} + +table.show-large { + display: table; +} + +thead.show-large { + display: table-header-group; +} + +tbody.show-large { + display: table-row-group; +} + +tfoot.show-large { + display: table-footer-group; +} + +tr.show-large { + display: table-row; +} + +th.show-large, +td.show-large { + display: table-cell; +} diff --git a/ajax/libs/ink/3.0.0/css/ink-ie.min.css b/ajax/libs/ink/3.0.0/css/ink-ie.min.css new file mode 100644 index 000000000..7a8590b81 --- /dev/null +++ b/ajax/libs/ink/3.0.0/css/ink-ie.min.css @@ -0,0 +1 @@ +.ink-grid{width:auto;max-width:1440px;margin:0 auto;padding:0 1.75em}.column-group>[class*=large-]{float:left;clear:none}.large-5{width:5%}.large-10{width:10%}.large-15{width:15%}.large-20{width:20%}.large-25{width:25%}.large-30{width:30%}.large-33{width:33.33%}.large-35{width:35%}.large-40{width:40%}.large-45{width:45%}.large-50{width:50%}.large-55{width:55%}.large-60{width:60%}.large-65{width:65%}.large-66{width:66.66%}.large-70{width:70%}.large-75{width:75%}.large-80{width:80%}.large-85{width:85%}.large-90{width:90%}.large-95{width:95%}.large-100{width:100%}[class*=large-100]{float:none;clear:both}.column-group{*zoom:1}.column-group:after{content:"";display:table;clear:both}.column-group.gutters{margin-left:-1.75em}.column-group.gutters>[class*=all-],.column-group.gutters>[class*=large-]{padding-left:1.75em;margin-bottom:1.75em}.column-group.horizontal-gutters{margin-left:-1.75em}.column-group.horizontal-gutters>[class*=all-],.column-group.horizontal-gutters>[class*=large-]{padding-left:1.75em}.column-group.vertical-gutters>[class*=all-],.column-group.vertical-gutters>[class*=large-]{margin-bottom:1.75em}.column-group.double-gutters{margin-left:-3.5em}.column-group.double-gutters>[class*=all-],.column-group.double-gutters>[class*=large-]{padding-left:3.5em;margin-bottom:3.5em}.column-group.double-horizontal-gutters{margin-left:-3.5em}.column-group.double-horizontal-gutters>[class*=all-],.column-group.double-horizontal-gutters>[class*=large-]{padding-left:3.5em}.column-group.double-vertical-gutters>[class*=all-],.column-group.double-vertical-gutters>[class*=large-]{margin-bottom:3.5em}.column-group.half-gutters{margin-left:-.875em}.column-group.half-gutters>[class*=all-],.column-group.half-gutters>[class*=large-]{padding-left:.875em;margin-bottom:.875em}.column-group.half-horizontal-gutters{margin-left:-.875em}.column-group.half-horizontal-gutters>[class*=all-],.column-group.half-horizontal-gutters>[class*=large-]{padding-left:.875em}.column-group.half-vertical-gutters>[class*=all-],.column-group.half-vertical-gutters>[class*=large-]{margin-bottom:.875em}.column-group.quarter-gutters{margin-left:-.4375em}.column-group.quarter-gutters>[class*=all-],.column-group.quarter-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}.column-group.quarter-horizontal-gutters{margin-left:-.4375em}.column-group.quarter-horizontal-gutters>[class*=all-],.column-group.quarter-horizontal-gutters>[class*=large-]{padding-left:.4375em}.column-group.quarter-vertical-gutters>[class*=all-],.column-group.quarter-vertical-gutters>[class*=large-]{margin-bottom:.4375em}.column-group.large-gutters{margin-left:-1.75em}.column-group.large-gutters>[class*=all-],.column-group.large-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}.column-group.large-horizontal-gutters{margin-left:-1.75em}.column-group.large-horizontal-gutters>[class*=all-],.column-group.large-horizontal-gutters>[class*=large-]{padding-left:1.75em}.column-group.large-vertical-gutters>[class*=all-],.column-group.large-vertical-gutters>[class*=large-]{margin-bottom:1.75em}.column-group.large-double-gutters{margin-left:-3.5em}.column-group.large-double-gutters>[class*=all-],.column-group.large-double-gutters>[class*=large-]{padding-left:3.5em;margin-bottom:3.5em}.column-group.large-double-horizontal-gutters{margin-left:-3.5em}.column-group.large-double-horizontal-gutters>[class*=all-],.column-group.large-double-horizontal-gutters>[class*=large-]{padding-left:3.5em}.column-group.large-double-vertical-gutters>[class*=all-],.column-group.large-double-vertical-gutters>[class*=large-]{margin-bottom:3.5em}.column-group.large-half-gutters{margin-left:-.875em}.column-group.large-half-gutters>[class*=all-],.column-group.large-half-gutters>[class*=large-]{padding-left:.875em;margin-bottom:.875em}.column-group.large-half-horizontal-gutters{margin-left:-.875em}.column-group.large-half-horizontal-gutters>[class*=all-],.column-group.large-half-horizontal-gutters>[class*=large-]{padding-left:.875em}.column-group.large-half-vertical-gutters>[class*=all-],.column-group.large-half-vertical-gutters>[class*=large-]{margin-bottom:.875em}.column-group.large-quarter-gutters{margin-left:-.4375em}.column-group.large-quarter-gutters>[class*=all-],.column-group.large-quarter-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}.column-group.large-quarter-horizontal-gutters{margin-left:-.4375em}.column-group.large-quarter-horizontal-gutters>[class*=all-],.column-group.large-quarter-horizontal-gutters>[class*=large-]{padding-left:.4375em}.column-group.large-quarter-vertical-gutters>[class*=all-],.column-group.large-quarter-vertical-gutters>[class*=large-]{margin-bottom:.4375em}.column-group.large-no-gutters{margin-left:0}.column-group.large-no-gutters>[class*=all-],.column-group.large-no-gutters>[class*=large-]{padding-left:0;margin-bottom:0}.ink-table tbody[class*=large-],.ink-table td[class*=large-],.ink-table tfoot[class*=large-],.ink-table th[class*=large-],.ink-table thead[class*=large-],.ink-table tr[class*=large-]{float:none}.large-push-left{float:left}.large-push-center{float:none;margin-left:auto;margin-right:auto}.large-push-right{float:right}.large-align-left{text-align:left}.large-align-center{text-align:center}.large-align-right{text-align:right}.large-no-margin{margin:0!important}.large-space,.space{margin:1.75em}.large-padding,.padding{padding:1.75em}.double-space,.large-double-space{margin:3.5em}.double-padding,.large-double-padding{padding:3.5em}.half-space,.large-half-space{margin:.875em}.half-padding,.large-half-padding{padding:.875em}.large-quarter-space,.quarter-space{margin:.4375em}.large-quarter-padding,.quarter-padding{padding:.4375em}.large-vertical-space,.vertical-space{margin-top:1.75em;margin-bottom:1.75em}.large-vertical-padding,.vertical-padding{padding-top:1.75em;padding-bottom:1.75em}.double-vertical-space,.large-double-vertical-space{margin-top:3.5em;margin-bottom:3.5em}.double-vertical-padding,.large-double-vertical-padding{padding-top:3.5em;padding-bottom:3.5em}.half-vertical-space,.large-half-vertical-space{margin-top:.875em;margin-bottom:.875em}.half-vertical-padding,.large-half-vertical-padding{padding-top:.875em;padding-bottom:.875em}.large-quarter-vertical-space,.quarter-vertical-space{margin-top:.4375em;margin-bottom:.4375em}.large-quarter-vertical-padding,.quarter-vertical-padding{padding-top:.4375em;padding-bottom:.4375em}.horizontal-space,.large-horizontal-space{margin-left:1.75em;margin-right:1.75em}.horizontal-padding,.large-horizontal-padding{padding-left:1.75em;padding-right:1.75em}.double-horizontal-space,.large-double-horizontal-space{margin-left:3.5em;margin-right:3.5em}.double-horizontal-padding,.large-double-horizontal-padding{padding-left:3.5em;padding-right:3.5em}.half-horizontal-space,.large-half-horizontal-space{margin-left:.875em;margin-right:.875em}.half-horizontal-padding,.large-half-horizontal-padding{padding-left:.875em;padding-right:.875em}.large-quarter-horizontal-space,.quarter-horizontal-space{margin-left:.4375em;margin-right:.4375em}.large-quarter-horizontal-padding,.quarter-horizontal-padding{padding-left:.4375em;padding-right:.4375em}.large-top-space,.top-space{margin-top:1.75em}.large-top-padding,.top-padding{padding-top:1.75em}.double-top-space,.large-double-top-space{margin-top:3.5em}.double-top-padding,.large-double-top-padding{padding-top:3.5em}.half-top-space,.large-half-top-space{margin-top:.875em}.half-top-padding,.large-half-top-padding{padding-top:.875em}.large-quarter-top-space,.quarter-top-space{margin-top:.4375em}.large-quarter-top-padding,.quarter-top-padding{padding-top:.4375em}.large-right-space,.right-space{margin-right:1.75em}.large-right-padding,.right-padding{padding-right:1.75em}.double-right-space,.large-double-right-space{margin-right:3.5em}.double-right-padding,.large-double-right-padding{padding-right:3.5em}.half-right-space,.large-half-right-space{margin-right:.875em}.half-right-padding,.large-half-right-padding{padding-right:.875em}.large-quarter-right-space,.quarter-right-space{margin-right:.4375em}.large-quarter-right-padding,.quarter-right-padding{padding-right:.4375em}.bottom-space,.large-bottom-space{margin-bottom:1.75em}.bottom-padding,.large-bottom-padding{padding-bottom:1.75em}.double-bottom-space,.large-double-bottom-space{margin-bottom:3.5em}.double-bottom-padding,.large-double-bottom-padding{padding-bottom:3.5em}.half-bottom-space,.large-half-bottom-space{margin-bottom:.875em}.half-bottom-padding,.large-half-bottom-padding{padding-bottom:.875em}.large-quarter-bottom-space,.quarter-bottom-space{margin-bottom:.4375em}.large-quarter-bottom-padding,.quarter-bottom-padding{padding-bottom:.4375em}.large-left-space,.left-space{margin-left:1.75em}.large-left-padding,.left-padding{padding-left:1.75em}.double-left-space,.large-double-left-space{margin-left:3.5em}.double-left-padding,.large-double-left-padding{padding-left:3.5em}.half-left-space,.large-half-left-space{margin-left:.875em}.half-left-padding,.large-half-left-padding{padding-left:.875em}.large-quarter-left-space,.quarter-left-space{margin-left:.4375em}.large-quarter-left-padding,.quarter-left-padding{padding-left:.4375em}.hide-large{display:none!important}.show-large{display:inherit!important}table.show-large{display:table}thead.show-large{display:table-header-group}tbody.show-large{display:table-row-group}tfoot.show-large{display:table-footer-group}tr.show-large{display:table-row}td.show-large,th.show-large{display:table-cell} \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/css/ink-legacy.css b/ajax/libs/ink/3.0.0/css/ink-legacy.css new file mode 100644 index 000000000..6e284e61f --- /dev/null +++ b/ajax/libs/ink/3.0.0/css/ink-legacy.css @@ -0,0 +1,4692 @@ +/** + * Ink + * + * A set of tools for quick development of web interfaces. + * + * @package Ink + * @author Sapo Ink Team + * @license http://opensource.org/licenses/MIT MIT + * @link http://ink.sapo.pt + * @version 3.0.0 + */ +/** + * Ink class names prefix + * Used in all of Inks components root elements + */ +/** + * Grid class names + */ +/** + * Alerts class names + */ +/** + * Badges class names + */ +/** + * Buttons class names + */ +/** + * Forms class names + */ +/** + * Labels class names + */ +/** + * Navigation class names + */ +/** + * Dropdown class names + */ +/** + * Tables class names + */ +/** + * Images class names + */ +/** + * Sets the grids maximum width + * @var $grid-max-width (pixels|ems|percentage) + */ +/*! + * Sets the grids breakpoint + * + * To add a new break point you'll need to add an element to the list. + * + * Here's an example: ( class-name-prefix, minimum-width, maximum-width, gutter-width, no-media-query). + * + * class-name-prefix: this is the prefix used in tons of inks classes i.e.: large-100, small-40, etc. + * minimum-width: (pixels|null) the minimum width for the breakpoint + * maximum-width: (pixels|null) the maximum width for the breakpoint + * gutter-width: (ems) the width for the gutters (space between grid columns) for the breakpoint + * no-media-query: (true|false) if you need to support IE8 set this to true on a single breakpoint. + * Since IE8 does not support the @media statement leaving one of the breakpoints + * outside a @media query let's you use the grid in IE8. + * + */ +.show-all { + display: inherit; +} + +.hide-all { + display: none !important; +} + +.no-margin { + margin: 0 !important; +} + +.no-padding { + padding: 0 !important; +} + +.push-left { + float: left; +} + +.push-center { + float: none !important; + margin-left: auto; + margin-right: auto; +} + +.push-right { + float: right; + -webkit-justify-content: flex-end; + -moz-justify-content: flex-end; + justify-content: flex-end; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +.clearfix { + *zoom: 1; + overflow: hidden; + *zoom: 1; +} +.clearfix:after { + content: ""; + display: table; + clear: both; +} + +html.no-flexbox .ink-grid, +html.no-flexboxlegacy .ink-grid { + width: auto; + max-width: 1440px; + margin: 0 auto; +} +html.no-flexbox .all-5, +html.no-flexboxlegacy .all-5 { + width: 5%; + float: left; + clear: none; +} +html.no-flexbox .all-10, +html.no-flexboxlegacy .all-10 { + width: 10%; + float: left; + clear: none; +} +html.no-flexbox .all-15, +html.no-flexboxlegacy .all-15 { + width: 15%; + float: left; + clear: none; +} +html.no-flexbox .all-20, +html.no-flexboxlegacy .all-20 { + width: 20%; + float: left; + clear: none; +} +html.no-flexbox .all-25, +html.no-flexboxlegacy .all-25 { + width: 25%; + float: left; + clear: none; +} +html.no-flexbox .all-30, +html.no-flexboxlegacy .all-30 { + width: 30%; + float: left; + clear: none; +} +html.no-flexbox .all-33, +html.no-flexboxlegacy .all-33 { + width: 33.33%; + float: left; + clear: none; +} +html.no-flexbox .all-35, +html.no-flexboxlegacy .all-35 { + width: 35%; + float: left; + clear: none; +} +html.no-flexbox .all-40, +html.no-flexboxlegacy .all-40 { + width: 40%; + float: left; + clear: none; +} +html.no-flexbox .all-45, +html.no-flexboxlegacy .all-45 { + width: 45%; + float: left; + clear: none; +} +html.no-flexbox .all-50, +html.no-flexboxlegacy .all-50 { + width: 50%; + float: left; + clear: none; +} +html.no-flexbox .all-55, +html.no-flexboxlegacy .all-55 { + width: 55%; + float: left; + clear: none; +} +html.no-flexbox .all-60, +html.no-flexboxlegacy .all-60 { + width: 60%; + float: left; + clear: none; +} +html.no-flexbox .all-65, +html.no-flexboxlegacy .all-65 { + width: 65%; + float: left; + clear: none; +} +html.no-flexbox .all-66, +html.no-flexboxlegacy .all-66 { + width: 66.66%; + float: left; + clear: none; +} +html.no-flexbox .all-70, +html.no-flexboxlegacy .all-70 { + width: 70%; + float: left; + clear: none; +} +html.no-flexbox .all-75, +html.no-flexboxlegacy .all-75 { + width: 75%; + float: left; + clear: none; +} +html.no-flexbox .all-80, +html.no-flexboxlegacy .all-80 { + width: 80%; + float: left; + clear: none; +} +html.no-flexbox .all-85, +html.no-flexboxlegacy .all-85 { + width: 85%; + float: left; + clear: none; +} +html.no-flexbox .all-90, +html.no-flexboxlegacy .all-90 { + width: 90%; + float: left; + clear: none; +} +html.no-flexbox .all-95, +html.no-flexboxlegacy .all-95 { + width: 95%; + float: left; + clear: none; +} +html.no-flexbox .all-100, +html.no-flexboxlegacy .all-100 { + width: 100%; + float: left; + clear: none; +} +html.no-flexbox [class~=all-100], +html.no-flexboxlegacy [class~=all-100] { + float: none; + clear: both; +} +@media screen and (min-width: 1261px) { + html.no-flexbox .ink-grid, + html.no-flexboxlegacy .ink-grid { + padding: 0 2em; + } + html.no-flexbox .column-group > [class*=xlarge-], + html.no-flexboxlegacy .column-group > [class*=xlarge-] { + float: left; + clear: none; + } + html.no-flexbox .xlarge-5, + html.no-flexboxlegacy .xlarge-5 { + width: 5%; + } + html.no-flexbox .xlarge-10, + html.no-flexboxlegacy .xlarge-10 { + width: 10%; + } + html.no-flexbox .xlarge-15, + html.no-flexboxlegacy .xlarge-15 { + width: 15%; + } + html.no-flexbox .xlarge-20, + html.no-flexboxlegacy .xlarge-20 { + width: 20%; + } + html.no-flexbox .xlarge-25, + html.no-flexboxlegacy .xlarge-25 { + width: 25%; + } + html.no-flexbox .xlarge-30, + html.no-flexboxlegacy .xlarge-30 { + width: 30%; + } + html.no-flexbox .xlarge-33, + html.no-flexboxlegacy .xlarge-33 { + width: 33.33%; + } + html.no-flexbox .xlarge-35, + html.no-flexboxlegacy .xlarge-35 { + width: 35%; + } + html.no-flexbox .xlarge-40, + html.no-flexboxlegacy .xlarge-40 { + width: 40%; + } + html.no-flexbox .xlarge-45, + html.no-flexboxlegacy .xlarge-45 { + width: 45%; + } + html.no-flexbox .xlarge-50, + html.no-flexboxlegacy .xlarge-50 { + width: 50%; + } + html.no-flexbox .xlarge-55, + html.no-flexboxlegacy .xlarge-55 { + width: 55%; + } + html.no-flexbox .xlarge-60, + html.no-flexboxlegacy .xlarge-60 { + width: 60%; + } + html.no-flexbox .xlarge-65, + html.no-flexboxlegacy .xlarge-65 { + width: 65%; + } + html.no-flexbox .xlarge-66, + html.no-flexboxlegacy .xlarge-66 { + width: 66.66%; + } + html.no-flexbox .xlarge-70, + html.no-flexboxlegacy .xlarge-70 { + width: 70%; + } + html.no-flexbox .xlarge-75, + html.no-flexboxlegacy .xlarge-75 { + width: 75%; + } + html.no-flexbox .xlarge-80, + html.no-flexboxlegacy .xlarge-80 { + width: 80%; + } + html.no-flexbox .xlarge-85, + html.no-flexboxlegacy .xlarge-85 { + width: 85%; + } + html.no-flexbox .xlarge-90, + html.no-flexboxlegacy .xlarge-90 { + width: 90%; + } + html.no-flexbox .xlarge-95, + html.no-flexboxlegacy .xlarge-95 { + width: 95%; + } + html.no-flexbox .xlarge-100, + html.no-flexboxlegacy .xlarge-100 { + width: 100%; + } + html.no-flexbox [class*=xlarge-100], + html.no-flexboxlegacy [class*=xlarge-100] { + float: none; + clear: both; + } + html.no-flexbox .column-group, + html.no-flexboxlegacy .column-group { + *zoom: 1; + } + html.no-flexbox .column-group:after, + html.no-flexboxlegacy .column-group:after { + content: ""; + display: table; + clear: both; + } + html.no-flexbox .column-group.gutters, + html.no-flexboxlegacy .column-group.gutters { + margin-left: -2em; + } + html.no-flexbox .column-group.gutters > [class*=xlarge-], html.no-flexbox .column-group.gutters > [class*=all-], + html.no-flexboxlegacy .column-group.gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.gutters > [class*=all-] { + padding-left: 2em; + margin-bottom: 2em; + } + html.no-flexbox .column-group.horizontal-gutters, + html.no-flexboxlegacy .column-group.horizontal-gutters { + margin-left: -2em; + } + html.no-flexbox .column-group.horizontal-gutters > [class*=xlarge-], html.no-flexbox .column-group.horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.horizontal-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.horizontal-gutters > [class*=all-] { + padding-left: 2em; + } + html.no-flexbox .column-group.vertical-gutters > [class*=xlarge-], html.no-flexbox .column-group.vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.vertical-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.vertical-gutters > [class*=all-] { + margin-bottom: 2em; + } + html.no-flexbox .column-group.double-gutters, + html.no-flexboxlegacy .column-group.double-gutters { + margin-left: -4em; + } + html.no-flexbox .column-group.double-gutters > [class*=xlarge-], html.no-flexbox .column-group.double-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.double-gutters > [class*=all-] { + padding-left: 4em; + margin-bottom: 4em; + } + html.no-flexbox .column-group.double-horizontal-gutters, + html.no-flexboxlegacy .column-group.double-horizontal-gutters { + margin-left: -4em; + } + html.no-flexbox .column-group.double-horizontal-gutters > [class*=xlarge-], html.no-flexbox .column-group.double-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-horizontal-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.double-horizontal-gutters > [class*=all-] { + padding-left: 4em; + } + html.no-flexbox .column-group.double-vertical-gutters > [class*=xlarge-], html.no-flexbox .column-group.double-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-vertical-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.double-vertical-gutters > [class*=all-] { + margin-bottom: 4em; + } + html.no-flexbox .column-group.half-gutters, + html.no-flexboxlegacy .column-group.half-gutters { + margin-left: -1em; + } + html.no-flexbox .column-group.half-gutters > [class*=xlarge-], html.no-flexbox .column-group.half-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.half-gutters > [class*=all-] { + padding-left: 1em; + margin-bottom: 1em; + } + html.no-flexbox .column-group.half-horizontal-gutters, + html.no-flexboxlegacy .column-group.half-horizontal-gutters { + margin-left: -1em; + } + html.no-flexbox .column-group.half-horizontal-gutters > [class*=xlarge-], html.no-flexbox .column-group.half-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-horizontal-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.half-horizontal-gutters > [class*=all-] { + padding-left: 1em; + } + html.no-flexbox .column-group.half-vertical-gutters > [class*=xlarge-], html.no-flexbox .column-group.half-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-vertical-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.half-vertical-gutters > [class*=all-] { + margin-bottom: 1em; + } + html.no-flexbox .column-group.quarter-gutters, + html.no-flexboxlegacy .column-group.quarter-gutters { + margin-left: -0.5em; + } + html.no-flexbox .column-group.quarter-gutters > [class*=xlarge-], html.no-flexbox .column-group.quarter-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.quarter-gutters > [class*=all-] { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + html.no-flexbox .column-group.quarter-horizontal-gutters, + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters { + margin-left: -0.5em; + } + html.no-flexbox .column-group.quarter-horizontal-gutters > [class*=xlarge-], html.no-flexbox .column-group.quarter-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.5em; + } + html.no-flexbox .column-group.quarter-vertical-gutters > [class*=xlarge-], html.no-flexbox .column-group.quarter-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-vertical-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.5em; + } + html.no-flexbox .column-group.xlarge-gutters, + html.no-flexboxlegacy .column-group.xlarge-gutters { + margin-left: -2em; + } + html.no-flexbox .column-group.xlarge-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-gutters > [class*=all-] { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + html.no-flexbox .column-group.xlarge-horizontal-gutters, + html.no-flexboxlegacy .column-group.xlarge-horizontal-gutters { + margin-left: -2em; + } + html.no-flexbox .column-group.xlarge-horizontal-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-horizontal-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-horizontal-gutters > [class*=all-] { + padding-left: 2em; + } + html.no-flexbox .column-group.xlarge-vertical-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-vertical-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-vertical-gutters > [class*=all-] { + margin-bottom: 2em; + } + html.no-flexbox .column-group.xlarge-double-gutters, + html.no-flexboxlegacy .column-group.xlarge-double-gutters { + margin-left: -4em; + } + html.no-flexbox .column-group.xlarge-double-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-double-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-double-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-double-gutters > [class*=all-] { + padding-left: 4em; + margin-bottom: 4em; + } + html.no-flexbox .column-group.xlarge-double-horizontal-gutters, + html.no-flexboxlegacy .column-group.xlarge-double-horizontal-gutters { + margin-left: -4em; + } + html.no-flexbox .column-group.xlarge-double-horizontal-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-double-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-double-horizontal-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-double-horizontal-gutters > [class*=all-] { + padding-left: 4em; + } + html.no-flexbox .column-group.xlarge-double-vertical-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-double-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-double-vertical-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-double-vertical-gutters > [class*=all-] { + margin-bottom: 4em; + } + html.no-flexbox .column-group.xlarge-half-gutters, + html.no-flexboxlegacy .column-group.xlarge-half-gutters { + margin-left: -1em; + } + html.no-flexbox .column-group.xlarge-half-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-half-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-half-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-half-gutters > [class*=all-] { + padding-left: 1em; + margin-bottom: 1em; + } + html.no-flexbox .column-group.xlarge-half-horizontal-gutters, + html.no-flexboxlegacy .column-group.xlarge-half-horizontal-gutters { + margin-left: -1em; + } + html.no-flexbox .column-group.xlarge-half-horizontal-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-half-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-half-horizontal-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-half-horizontal-gutters > [class*=all-] { + padding-left: 1em; + } + html.no-flexbox .column-group.xlarge-half-vertical-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-half-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-half-vertical-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-half-vertical-gutters > [class*=all-] { + margin-bottom: 1em; + } + html.no-flexbox .column-group.xlarge-quarter-gutters, + html.no-flexboxlegacy .column-group.xlarge-quarter-gutters { + margin-left: -0.5em; + } + html.no-flexbox .column-group.xlarge-quarter-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-quarter-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-quarter-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-quarter-gutters > [class*=all-] { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + html.no-flexbox .column-group.xlarge-quarter-horizontal-gutters, + html.no-flexboxlegacy .column-group.xlarge-quarter-horizontal-gutters { + margin-left: -0.5em; + } + html.no-flexbox .column-group.xlarge-quarter-horizontal-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-quarter-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-quarter-horizontal-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.5em; + } + html.no-flexbox .column-group.xlarge-quarter-vertical-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-quarter-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-quarter-vertical-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.5em; + } + html.no-flexbox .column-group.xlarge-no-gutters, + html.no-flexboxlegacy .column-group.xlarge-no-gutters { + margin-left: 0; + } + html.no-flexbox .column-group.xlarge-no-gutters > [class*=xlarge-], html.no-flexbox .column-group.xlarge-no-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.xlarge-no-gutters > [class*=xlarge-], + html.no-flexboxlegacy .column-group.xlarge-no-gutters > [class*=all-] { + padding-left: 0; + margin-bottom: 0; + } + html.no-flexbox .ink-table td[class*=xlarge-], html.no-flexbox .ink-table th[class*=xlarge-], html.no-flexbox .ink-table tr[class*=xlarge-], html.no-flexbox .ink-table thead[class*=xlarge-], html.no-flexbox .ink-table tbody[class*=xlarge-], html.no-flexbox .ink-table tfoot[class*=xlarge-], + html.no-flexboxlegacy .ink-table td[class*=xlarge-], + html.no-flexboxlegacy .ink-table th[class*=xlarge-], + html.no-flexboxlegacy .ink-table tr[class*=xlarge-], + html.no-flexboxlegacy .ink-table thead[class*=xlarge-], + html.no-flexboxlegacy .ink-table tbody[class*=xlarge-], + html.no-flexboxlegacy .ink-table tfoot[class*=xlarge-] { + float: none; + } + html.no-flexbox .xlarge-push-left, + html.no-flexboxlegacy .xlarge-push-left { + float: left; + } + html.no-flexbox .xlarge-push-center, + html.no-flexboxlegacy .xlarge-push-center { + float: none; + margin-left: auto; + margin-right: auto; + } + html.no-flexbox .xlarge-push-right, + html.no-flexboxlegacy .xlarge-push-right { + float: right; + } + html.no-flexbox .xlarge-align-left, + html.no-flexboxlegacy .xlarge-align-left { + text-align: left; + } + html.no-flexbox .xlarge-align-center, + html.no-flexboxlegacy .xlarge-align-center { + text-align: center; + } + html.no-flexbox .xlarge-align-right, + html.no-flexboxlegacy .xlarge-align-right { + text-align: right; + } + html.no-flexbox .xlarge-no-margin, + html.no-flexboxlegacy .xlarge-no-margin { + margin: 0 !important; + } + html.no-flexbox .space, + html.no-flexboxlegacy .space { + margin: 2em; + } + html.no-flexbox .xlarge-space, + html.no-flexboxlegacy .xlarge-space { + margin: 2em; + } + html.no-flexbox .padding, + html.no-flexboxlegacy .padding { + padding: 2em; + } + html.no-flexbox .xlarge-padding, + html.no-flexboxlegacy .xlarge-padding { + padding: 2em; + } + html.no-flexbox .double-space, + html.no-flexboxlegacy .double-space { + margin: 4em; + } + html.no-flexbox .xlarge-double-space, + html.no-flexboxlegacy .xlarge-double-space { + margin: 4em; + } + html.no-flexbox .double-padding, + html.no-flexboxlegacy .double-padding { + padding: 4em; + } + html.no-flexbox .xlarge-double-padding, + html.no-flexboxlegacy .xlarge-double-padding { + padding: 4em; + } + html.no-flexbox .half-space, + html.no-flexboxlegacy .half-space { + margin: 1em; + } + html.no-flexbox .xlarge-half-space, + html.no-flexboxlegacy .xlarge-half-space { + margin: 1em; + } + html.no-flexbox .half-padding, + html.no-flexboxlegacy .half-padding { + padding: 1em; + } + html.no-flexbox .xlarge-half-padding, + html.no-flexboxlegacy .xlarge-half-padding { + padding: 1em; + } + html.no-flexbox .quarter-space, + html.no-flexboxlegacy .quarter-space { + margin: 0.5em; + } + html.no-flexbox .xlarge-quarter-space, + html.no-flexboxlegacy .xlarge-quarter-space { + margin: 0.5em; + } + html.no-flexbox .quarter-padding, + html.no-flexboxlegacy .quarter-padding { + padding: 0.5em; + } + html.no-flexbox .xlarge-quarter-padding, + html.no-flexboxlegacy .xlarge-quarter-padding { + padding: 0.5em; + } + html.no-flexbox .vertical-space, + html.no-flexboxlegacy .vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + html.no-flexbox .xlarge-vertical-space, + html.no-flexboxlegacy .xlarge-vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + html.no-flexbox .vertical-padding, + html.no-flexboxlegacy .vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + html.no-flexbox .xlarge-vertical-padding, + html.no-flexboxlegacy .xlarge-vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + html.no-flexbox .double-vertical-space, + html.no-flexboxlegacy .double-vertical-space { + margin-top: 4em; + margin-bottom: 4em; + } + html.no-flexbox .xlarge-double-vertical-space, + html.no-flexboxlegacy .xlarge-double-vertical-space { + margin-top: 4em; + margin-bottom: 4em; + } + html.no-flexbox .double-vertical-padding, + html.no-flexboxlegacy .double-vertical-padding { + padding-top: 4em; + padding-bottom: 4em; + } + html.no-flexbox .xlarge-double-vertical-padding, + html.no-flexboxlegacy .xlarge-double-vertical-padding { + padding-top: 4em; + padding-bottom: 4em; + } + html.no-flexbox .half-vertical-space, + html.no-flexboxlegacy .half-vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + html.no-flexbox .xlarge-half-vertical-space, + html.no-flexboxlegacy .xlarge-half-vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + html.no-flexbox .half-vertical-padding, + html.no-flexboxlegacy .half-vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + html.no-flexbox .xlarge-half-vertical-padding, + html.no-flexboxlegacy .xlarge-half-vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + html.no-flexbox .quarter-vertical-space, + html.no-flexboxlegacy .quarter-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + html.no-flexbox .xlarge-quarter-vertical-space, + html.no-flexboxlegacy .xlarge-quarter-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + html.no-flexbox .quarter-vertical-padding, + html.no-flexboxlegacy .quarter-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + html.no-flexbox .xlarge-quarter-vertical-padding, + html.no-flexboxlegacy .xlarge-quarter-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + html.no-flexbox .horizontal-space, + html.no-flexboxlegacy .horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + html.no-flexbox .xlarge-horizontal-space, + html.no-flexboxlegacy .xlarge-horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + html.no-flexbox .horizontal-padding, + html.no-flexboxlegacy .horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + html.no-flexbox .xlarge-horizontal-padding, + html.no-flexboxlegacy .xlarge-horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + html.no-flexbox .double-horizontal-space, + html.no-flexboxlegacy .double-horizontal-space { + margin-left: 4em; + margin-right: 4em; + } + html.no-flexbox .xlarge-double-horizontal-space, + html.no-flexboxlegacy .xlarge-double-horizontal-space { + margin-left: 4em; + margin-right: 4em; + } + html.no-flexbox .double-horizontal-padding, + html.no-flexboxlegacy .double-horizontal-padding { + padding-left: 4em; + padding-right: 4em; + } + html.no-flexbox .xlarge-double-horizontal-padding, + html.no-flexboxlegacy .xlarge-double-horizontal-padding { + padding-left: 4em; + padding-right: 4em; + } + html.no-flexbox .half-horizontal-space, + html.no-flexboxlegacy .half-horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + html.no-flexbox .xlarge-half-horizontal-space, + html.no-flexboxlegacy .xlarge-half-horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + html.no-flexbox .half-horizontal-padding, + html.no-flexboxlegacy .half-horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + html.no-flexbox .xlarge-half-horizontal-padding, + html.no-flexboxlegacy .xlarge-half-horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + html.no-flexbox .quarter-horizontal-space, + html.no-flexboxlegacy .quarter-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + html.no-flexbox .xlarge-quarter-horizontal-space, + html.no-flexboxlegacy .xlarge-quarter-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + html.no-flexbox .quarter-horizontal-padding, + html.no-flexboxlegacy .quarter-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + html.no-flexbox .xlarge-quarter-horizontal-padding, + html.no-flexboxlegacy .xlarge-quarter-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + html.no-flexbox .top-space, + html.no-flexboxlegacy .top-space { + margin-top: 2em; + } + html.no-flexbox .xlarge-top-space, + html.no-flexboxlegacy .xlarge-top-space { + margin-top: 2em; + } + html.no-flexbox .top-padding, + html.no-flexboxlegacy .top-padding { + padding-top: 2em; + } + html.no-flexbox .xlarge-top-padding, + html.no-flexboxlegacy .xlarge-top-padding { + padding-top: 2em; + } + html.no-flexbox .double-top-space, + html.no-flexboxlegacy .double-top-space { + margin-top: 4em; + } + html.no-flexbox .xlarge-double-top-space, + html.no-flexboxlegacy .xlarge-double-top-space { + margin-top: 4em; + } + html.no-flexbox .double-top-padding, + html.no-flexboxlegacy .double-top-padding { + padding-top: 4em; + } + html.no-flexbox .xlarge-double-top-padding, + html.no-flexboxlegacy .xlarge-double-top-padding { + padding-top: 4em; + } + html.no-flexbox .half-top-space, + html.no-flexboxlegacy .half-top-space { + margin-top: 1em; + } + html.no-flexbox .xlarge-half-top-space, + html.no-flexboxlegacy .xlarge-half-top-space { + margin-top: 1em; + } + html.no-flexbox .half-top-padding, + html.no-flexboxlegacy .half-top-padding { + padding-top: 1em; + } + html.no-flexbox .xlarge-half-top-padding, + html.no-flexboxlegacy .xlarge-half-top-padding { + padding-top: 1em; + } + html.no-flexbox .quarter-top-space, + html.no-flexboxlegacy .quarter-top-space { + margin-top: 0.5em; + } + html.no-flexbox .xlarge-quarter-top-space, + html.no-flexboxlegacy .xlarge-quarter-top-space { + margin-top: 0.5em; + } + html.no-flexbox .quarter-top-padding, + html.no-flexboxlegacy .quarter-top-padding { + padding-top: 0.5em; + } + html.no-flexbox .xlarge-quarter-top-padding, + html.no-flexboxlegacy .xlarge-quarter-top-padding { + padding-top: 0.5em; + } + html.no-flexbox .right-space, + html.no-flexboxlegacy .right-space { + margin-right: 2em; + } + html.no-flexbox .xlarge-right-space, + html.no-flexboxlegacy .xlarge-right-space { + margin-right: 2em; + } + html.no-flexbox .right-padding, + html.no-flexboxlegacy .right-padding { + padding-right: 2em; + } + html.no-flexbox .xlarge-right-padding, + html.no-flexboxlegacy .xlarge-right-padding { + padding-right: 2em; + } + html.no-flexbox .double-right-space, + html.no-flexboxlegacy .double-right-space { + margin-right: 4em; + } + html.no-flexbox .xlarge-double-right-space, + html.no-flexboxlegacy .xlarge-double-right-space { + margin-right: 4em; + } + html.no-flexbox .double-right-padding, + html.no-flexboxlegacy .double-right-padding { + padding-right: 4em; + } + html.no-flexbox .xlarge-double-right-padding, + html.no-flexboxlegacy .xlarge-double-right-padding { + padding-right: 4em; + } + html.no-flexbox .half-right-space, + html.no-flexboxlegacy .half-right-space { + margin-right: 1em; + } + html.no-flexbox .xlarge-half-right-space, + html.no-flexboxlegacy .xlarge-half-right-space { + margin-right: 1em; + } + html.no-flexbox .half-right-padding, + html.no-flexboxlegacy .half-right-padding { + padding-right: 1em; + } + html.no-flexbox .xlarge-half-right-padding, + html.no-flexboxlegacy .xlarge-half-right-padding { + padding-right: 1em; + } + html.no-flexbox .quarter-right-space, + html.no-flexboxlegacy .quarter-right-space { + margin-right: 0.5em; + } + html.no-flexbox .xlarge-quarter-right-space, + html.no-flexboxlegacy .xlarge-quarter-right-space { + margin-right: 0.5em; + } + html.no-flexbox .quarter-right-padding, + html.no-flexboxlegacy .quarter-right-padding { + padding-right: 0.5em; + } + html.no-flexbox .xlarge-quarter-right-padding, + html.no-flexboxlegacy .xlarge-quarter-right-padding { + padding-right: 0.5em; + } + html.no-flexbox .bottom-space, + html.no-flexboxlegacy .bottom-space { + margin-bottom: 2em; + } + html.no-flexbox .xlarge-bottom-space, + html.no-flexboxlegacy .xlarge-bottom-space { + margin-bottom: 2em; + } + html.no-flexbox .bottom-padding, + html.no-flexboxlegacy .bottom-padding { + padding-bottom: 2em; + } + html.no-flexbox .xlarge-bottom-padding, + html.no-flexboxlegacy .xlarge-bottom-padding { + padding-bottom: 2em; + } + html.no-flexbox .double-bottom-space, + html.no-flexboxlegacy .double-bottom-space { + margin-bottom: 4em; + } + html.no-flexbox .xlarge-double-bottom-space, + html.no-flexboxlegacy .xlarge-double-bottom-space { + margin-bottom: 4em; + } + html.no-flexbox .double-bottom-padding, + html.no-flexboxlegacy .double-bottom-padding { + padding-bottom: 4em; + } + html.no-flexbox .xlarge-double-bottom-padding, + html.no-flexboxlegacy .xlarge-double-bottom-padding { + padding-bottom: 4em; + } + html.no-flexbox .half-bottom-space, + html.no-flexboxlegacy .half-bottom-space { + margin-bottom: 1em; + } + html.no-flexbox .xlarge-half-bottom-space, + html.no-flexboxlegacy .xlarge-half-bottom-space { + margin-bottom: 1em; + } + html.no-flexbox .half-bottom-padding, + html.no-flexboxlegacy .half-bottom-padding { + padding-bottom: 1em; + } + html.no-flexbox .xlarge-half-bottom-padding, + html.no-flexboxlegacy .xlarge-half-bottom-padding { + padding-bottom: 1em; + } + html.no-flexbox .quarter-bottom-space, + html.no-flexboxlegacy .quarter-bottom-space { + margin-bottom: 0.5em; + } + html.no-flexbox .xlarge-quarter-bottom-space, + html.no-flexboxlegacy .xlarge-quarter-bottom-space { + margin-bottom: 0.5em; + } + html.no-flexbox .quarter-bottom-padding, + html.no-flexboxlegacy .quarter-bottom-padding { + padding-bottom: 0.5em; + } + html.no-flexbox .xlarge-quarter-bottom-padding, + html.no-flexboxlegacy .xlarge-quarter-bottom-padding { + padding-bottom: 0.5em; + } + html.no-flexbox .left-space, + html.no-flexboxlegacy .left-space { + margin-left: 2em; + } + html.no-flexbox .xlarge-left-space, + html.no-flexboxlegacy .xlarge-left-space { + margin-left: 2em; + } + html.no-flexbox .left-padding, + html.no-flexboxlegacy .left-padding { + padding-left: 2em; + } + html.no-flexbox .xlarge-left-padding, + html.no-flexboxlegacy .xlarge-left-padding { + padding-left: 2em; + } + html.no-flexbox .double-left-space, + html.no-flexboxlegacy .double-left-space { + margin-left: 4em; + } + html.no-flexbox .xlarge-double-left-space, + html.no-flexboxlegacy .xlarge-double-left-space { + margin-left: 4em; + } + html.no-flexbox .double-left-padding, + html.no-flexboxlegacy .double-left-padding { + padding-left: 4em; + } + html.no-flexbox .xlarge-double-left-padding, + html.no-flexboxlegacy .xlarge-double-left-padding { + padding-left: 4em; + } + html.no-flexbox .half-left-space, + html.no-flexboxlegacy .half-left-space { + margin-left: 1em; + } + html.no-flexbox .xlarge-half-left-space, + html.no-flexboxlegacy .xlarge-half-left-space { + margin-left: 1em; + } + html.no-flexbox .half-left-padding, + html.no-flexboxlegacy .half-left-padding { + padding-left: 1em; + } + html.no-flexbox .xlarge-half-left-padding, + html.no-flexboxlegacy .xlarge-half-left-padding { + padding-left: 1em; + } + html.no-flexbox .quarter-left-space, + html.no-flexboxlegacy .quarter-left-space { + margin-left: 0.5em; + } + html.no-flexbox .xlarge-quarter-left-space, + html.no-flexboxlegacy .xlarge-quarter-left-space { + margin-left: 0.5em; + } + html.no-flexbox .quarter-left-padding, + html.no-flexboxlegacy .quarter-left-padding { + padding-left: 0.5em; + } + html.no-flexbox .xlarge-quarter-left-padding, + html.no-flexboxlegacy .xlarge-quarter-left-padding { + padding-left: 0.5em; + } + html.no-flexbox .hide-xlarge, + html.no-flexboxlegacy .hide-xlarge { + display: none !important; + } + html.no-flexbox .show-xlarge, + html.no-flexboxlegacy .show-xlarge { + display: inherit !important; + } + html.no-flexbox table.show-xlarge, + html.no-flexboxlegacy table.show-xlarge { + display: table; + } + html.no-flexbox thead.show-xlarge, + html.no-flexboxlegacy thead.show-xlarge { + display: table-header-group; + } + html.no-flexbox tbody.show-xlarge, + html.no-flexboxlegacy tbody.show-xlarge { + display: table-row-group; + } + html.no-flexbox tfoot.show-xlarge, + html.no-flexboxlegacy tfoot.show-xlarge { + display: table-footer-group; + } + html.no-flexbox tr.show-xlarge, + html.no-flexboxlegacy tr.show-xlarge { + display: table-row; + } + html.no-flexbox th.show-xlarge, + html.no-flexbox td.show-xlarge, + html.no-flexboxlegacy th.show-xlarge, + html.no-flexboxlegacy td.show-xlarge { + display: table-cell; + } +} +@media screen and (min-width: 961px) and (max-width: 1260px) { + html.no-flexbox .ink-grid, + html.no-flexboxlegacy .ink-grid { + padding: 0 1.75em; + } + html.no-flexbox .column-group > [class*=large-], + html.no-flexboxlegacy .column-group > [class*=large-] { + float: left; + clear: none; + } + html.no-flexbox .large-5, + html.no-flexboxlegacy .large-5 { + width: 5%; + } + html.no-flexbox .large-10, + html.no-flexboxlegacy .large-10 { + width: 10%; + } + html.no-flexbox .large-15, + html.no-flexboxlegacy .large-15 { + width: 15%; + } + html.no-flexbox .large-20, + html.no-flexboxlegacy .large-20 { + width: 20%; + } + html.no-flexbox .large-25, + html.no-flexboxlegacy .large-25 { + width: 25%; + } + html.no-flexbox .large-30, + html.no-flexboxlegacy .large-30 { + width: 30%; + } + html.no-flexbox .large-33, + html.no-flexboxlegacy .large-33 { + width: 33.33%; + } + html.no-flexbox .large-35, + html.no-flexboxlegacy .large-35 { + width: 35%; + } + html.no-flexbox .large-40, + html.no-flexboxlegacy .large-40 { + width: 40%; + } + html.no-flexbox .large-45, + html.no-flexboxlegacy .large-45 { + width: 45%; + } + html.no-flexbox .large-50, + html.no-flexboxlegacy .large-50 { + width: 50%; + } + html.no-flexbox .large-55, + html.no-flexboxlegacy .large-55 { + width: 55%; + } + html.no-flexbox .large-60, + html.no-flexboxlegacy .large-60 { + width: 60%; + } + html.no-flexbox .large-65, + html.no-flexboxlegacy .large-65 { + width: 65%; + } + html.no-flexbox .large-66, + html.no-flexboxlegacy .large-66 { + width: 66.66%; + } + html.no-flexbox .large-70, + html.no-flexboxlegacy .large-70 { + width: 70%; + } + html.no-flexbox .large-75, + html.no-flexboxlegacy .large-75 { + width: 75%; + } + html.no-flexbox .large-80, + html.no-flexboxlegacy .large-80 { + width: 80%; + } + html.no-flexbox .large-85, + html.no-flexboxlegacy .large-85 { + width: 85%; + } + html.no-flexbox .large-90, + html.no-flexboxlegacy .large-90 { + width: 90%; + } + html.no-flexbox .large-95, + html.no-flexboxlegacy .large-95 { + width: 95%; + } + html.no-flexbox .large-100, + html.no-flexboxlegacy .large-100 { + width: 100%; + } + html.no-flexbox [class*=large-100], + html.no-flexboxlegacy [class*=large-100] { + float: none; + clear: both; + } + html.no-flexbox .column-group, + html.no-flexboxlegacy .column-group { + *zoom: 1; + } + html.no-flexbox .column-group:after, + html.no-flexboxlegacy .column-group:after { + content: ""; + display: table; + clear: both; + } + html.no-flexbox .column-group.gutters, + html.no-flexboxlegacy .column-group.gutters { + margin-left: -1.75em; + } + html.no-flexbox .column-group.gutters > [class*=large-], html.no-flexbox .column-group.gutters > [class*=all-], + html.no-flexboxlegacy .column-group.gutters > [class*=large-], + html.no-flexboxlegacy .column-group.gutters > [class*=all-] { + padding-left: 1.75em; + margin-bottom: 1.75em; + } + html.no-flexbox .column-group.horizontal-gutters, + html.no-flexboxlegacy .column-group.horizontal-gutters { + margin-left: -1.75em; + } + html.no-flexbox .column-group.horizontal-gutters > [class*=large-], html.no-flexbox .column-group.horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.horizontal-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.horizontal-gutters > [class*=all-] { + padding-left: 1.75em; + } + html.no-flexbox .column-group.vertical-gutters > [class*=large-], html.no-flexbox .column-group.vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.vertical-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.vertical-gutters > [class*=all-] { + margin-bottom: 1.75em; + } + html.no-flexbox .column-group.double-gutters, + html.no-flexboxlegacy .column-group.double-gutters { + margin-left: -3.5em; + } + html.no-flexbox .column-group.double-gutters > [class*=large-], html.no-flexbox .column-group.double-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.double-gutters > [class*=all-] { + padding-left: 3.5em; + margin-bottom: 3.5em; + } + html.no-flexbox .column-group.double-horizontal-gutters, + html.no-flexboxlegacy .column-group.double-horizontal-gutters { + margin-left: -3.5em; + } + html.no-flexbox .column-group.double-horizontal-gutters > [class*=large-], html.no-flexbox .column-group.double-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-horizontal-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.double-horizontal-gutters > [class*=all-] { + padding-left: 3.5em; + } + html.no-flexbox .column-group.double-vertical-gutters > [class*=large-], html.no-flexbox .column-group.double-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-vertical-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.double-vertical-gutters > [class*=all-] { + margin-bottom: 3.5em; + } + html.no-flexbox .column-group.half-gutters, + html.no-flexboxlegacy .column-group.half-gutters { + margin-left: -0.875em; + } + html.no-flexbox .column-group.half-gutters > [class*=large-], html.no-flexbox .column-group.half-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.half-gutters > [class*=all-] { + padding-left: 0.875em; + margin-bottom: 0.875em; + } + html.no-flexbox .column-group.half-horizontal-gutters, + html.no-flexboxlegacy .column-group.half-horizontal-gutters { + margin-left: -0.875em; + } + html.no-flexbox .column-group.half-horizontal-gutters > [class*=large-], html.no-flexbox .column-group.half-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-horizontal-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.half-horizontal-gutters > [class*=all-] { + padding-left: 0.875em; + } + html.no-flexbox .column-group.half-vertical-gutters > [class*=large-], html.no-flexbox .column-group.half-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-vertical-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.half-vertical-gutters > [class*=all-] { + margin-bottom: 0.875em; + } + html.no-flexbox .column-group.quarter-gutters, + html.no-flexboxlegacy .column-group.quarter-gutters { + margin-left: -0.4375em; + } + html.no-flexbox .column-group.quarter-gutters > [class*=large-], html.no-flexbox .column-group.quarter-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.quarter-gutters > [class*=all-] { + padding-left: 0.4375em; + margin-bottom: 0.4375em; + } + html.no-flexbox .column-group.quarter-horizontal-gutters, + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters { + margin-left: -0.4375em; + } + html.no-flexbox .column-group.quarter-horizontal-gutters > [class*=large-], html.no-flexbox .column-group.quarter-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.4375em; + } + html.no-flexbox .column-group.quarter-vertical-gutters > [class*=large-], html.no-flexbox .column-group.quarter-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-vertical-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.4375em; + } + html.no-flexbox .column-group.large-gutters, + html.no-flexboxlegacy .column-group.large-gutters { + margin-left: -1.75em; + } + html.no-flexbox .column-group.large-gutters > [class*=large-], html.no-flexbox .column-group.large-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-gutters > [class*=all-] { + padding-left: 0.4375em; + margin-bottom: 0.4375em; + } + html.no-flexbox .column-group.large-horizontal-gutters, + html.no-flexboxlegacy .column-group.large-horizontal-gutters { + margin-left: -1.75em; + } + html.no-flexbox .column-group.large-horizontal-gutters > [class*=large-], html.no-flexbox .column-group.large-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-horizontal-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-horizontal-gutters > [class*=all-] { + padding-left: 1.75em; + } + html.no-flexbox .column-group.large-vertical-gutters > [class*=large-], html.no-flexbox .column-group.large-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-vertical-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-vertical-gutters > [class*=all-] { + margin-bottom: 1.75em; + } + html.no-flexbox .column-group.large-double-gutters, + html.no-flexboxlegacy .column-group.large-double-gutters { + margin-left: -3.5em; + } + html.no-flexbox .column-group.large-double-gutters > [class*=large-], html.no-flexbox .column-group.large-double-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-double-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-double-gutters > [class*=all-] { + padding-left: 3.5em; + margin-bottom: 3.5em; + } + html.no-flexbox .column-group.large-double-horizontal-gutters, + html.no-flexboxlegacy .column-group.large-double-horizontal-gutters { + margin-left: -3.5em; + } + html.no-flexbox .column-group.large-double-horizontal-gutters > [class*=large-], html.no-flexbox .column-group.large-double-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-double-horizontal-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-double-horizontal-gutters > [class*=all-] { + padding-left: 3.5em; + } + html.no-flexbox .column-group.large-double-vertical-gutters > [class*=large-], html.no-flexbox .column-group.large-double-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-double-vertical-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-double-vertical-gutters > [class*=all-] { + margin-bottom: 3.5em; + } + html.no-flexbox .column-group.large-half-gutters, + html.no-flexboxlegacy .column-group.large-half-gutters { + margin-left: -0.875em; + } + html.no-flexbox .column-group.large-half-gutters > [class*=large-], html.no-flexbox .column-group.large-half-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-half-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-half-gutters > [class*=all-] { + padding-left: 0.875em; + margin-bottom: 0.875em; + } + html.no-flexbox .column-group.large-half-horizontal-gutters, + html.no-flexboxlegacy .column-group.large-half-horizontal-gutters { + margin-left: -0.875em; + } + html.no-flexbox .column-group.large-half-horizontal-gutters > [class*=large-], html.no-flexbox .column-group.large-half-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-half-horizontal-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-half-horizontal-gutters > [class*=all-] { + padding-left: 0.875em; + } + html.no-flexbox .column-group.large-half-vertical-gutters > [class*=large-], html.no-flexbox .column-group.large-half-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-half-vertical-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-half-vertical-gutters > [class*=all-] { + margin-bottom: 0.875em; + } + html.no-flexbox .column-group.large-quarter-gutters, + html.no-flexboxlegacy .column-group.large-quarter-gutters { + margin-left: -0.4375em; + } + html.no-flexbox .column-group.large-quarter-gutters > [class*=large-], html.no-flexbox .column-group.large-quarter-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-quarter-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-quarter-gutters > [class*=all-] { + padding-left: 0.4375em; + margin-bottom: 0.4375em; + } + html.no-flexbox .column-group.large-quarter-horizontal-gutters, + html.no-flexboxlegacy .column-group.large-quarter-horizontal-gutters { + margin-left: -0.4375em; + } + html.no-flexbox .column-group.large-quarter-horizontal-gutters > [class*=large-], html.no-flexbox .column-group.large-quarter-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-quarter-horizontal-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.4375em; + } + html.no-flexbox .column-group.large-quarter-vertical-gutters > [class*=large-], html.no-flexbox .column-group.large-quarter-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-quarter-vertical-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.4375em; + } + html.no-flexbox .column-group.large-no-gutters, + html.no-flexboxlegacy .column-group.large-no-gutters { + margin-left: 0; + } + html.no-flexbox .column-group.large-no-gutters > [class*=large-], html.no-flexbox .column-group.large-no-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.large-no-gutters > [class*=large-], + html.no-flexboxlegacy .column-group.large-no-gutters > [class*=all-] { + padding-left: 0; + margin-bottom: 0; + } + html.no-flexbox .ink-table td[class*=large-], html.no-flexbox .ink-table th[class*=large-], html.no-flexbox .ink-table tr[class*=large-], html.no-flexbox .ink-table thead[class*=large-], html.no-flexbox .ink-table tbody[class*=large-], html.no-flexbox .ink-table tfoot[class*=large-], + html.no-flexboxlegacy .ink-table td[class*=large-], + html.no-flexboxlegacy .ink-table th[class*=large-], + html.no-flexboxlegacy .ink-table tr[class*=large-], + html.no-flexboxlegacy .ink-table thead[class*=large-], + html.no-flexboxlegacy .ink-table tbody[class*=large-], + html.no-flexboxlegacy .ink-table tfoot[class*=large-] { + float: none; + } + html.no-flexbox .large-push-left, + html.no-flexboxlegacy .large-push-left { + float: left; + } + html.no-flexbox .large-push-center, + html.no-flexboxlegacy .large-push-center { + float: none; + margin-left: auto; + margin-right: auto; + } + html.no-flexbox .large-push-right, + html.no-flexboxlegacy .large-push-right { + float: right; + } + html.no-flexbox .large-align-left, + html.no-flexboxlegacy .large-align-left { + text-align: left; + } + html.no-flexbox .large-align-center, + html.no-flexboxlegacy .large-align-center { + text-align: center; + } + html.no-flexbox .large-align-right, + html.no-flexboxlegacy .large-align-right { + text-align: right; + } + html.no-flexbox .large-no-margin, + html.no-flexboxlegacy .large-no-margin { + margin: 0 !important; + } + html.no-flexbox .space, + html.no-flexboxlegacy .space { + margin: 1.75em; + } + html.no-flexbox .large-space, + html.no-flexboxlegacy .large-space { + margin: 1.75em; + } + html.no-flexbox .padding, + html.no-flexboxlegacy .padding { + padding: 1.75em; + } + html.no-flexbox .large-padding, + html.no-flexboxlegacy .large-padding { + padding: 1.75em; + } + html.no-flexbox .double-space, + html.no-flexboxlegacy .double-space { + margin: 3.5em; + } + html.no-flexbox .large-double-space, + html.no-flexboxlegacy .large-double-space { + margin: 3.5em; + } + html.no-flexbox .double-padding, + html.no-flexboxlegacy .double-padding { + padding: 3.5em; + } + html.no-flexbox .large-double-padding, + html.no-flexboxlegacy .large-double-padding { + padding: 3.5em; + } + html.no-flexbox .half-space, + html.no-flexboxlegacy .half-space { + margin: 0.875em; + } + html.no-flexbox .large-half-space, + html.no-flexboxlegacy .large-half-space { + margin: 0.875em; + } + html.no-flexbox .half-padding, + html.no-flexboxlegacy .half-padding { + padding: 0.875em; + } + html.no-flexbox .large-half-padding, + html.no-flexboxlegacy .large-half-padding { + padding: 0.875em; + } + html.no-flexbox .quarter-space, + html.no-flexboxlegacy .quarter-space { + margin: 0.4375em; + } + html.no-flexbox .large-quarter-space, + html.no-flexboxlegacy .large-quarter-space { + margin: 0.4375em; + } + html.no-flexbox .quarter-padding, + html.no-flexboxlegacy .quarter-padding { + padding: 0.4375em; + } + html.no-flexbox .large-quarter-padding, + html.no-flexboxlegacy .large-quarter-padding { + padding: 0.4375em; + } + html.no-flexbox .vertical-space, + html.no-flexboxlegacy .vertical-space { + margin-top: 1.75em; + margin-bottom: 1.75em; + } + html.no-flexbox .large-vertical-space, + html.no-flexboxlegacy .large-vertical-space { + margin-top: 1.75em; + margin-bottom: 1.75em; + } + html.no-flexbox .vertical-padding, + html.no-flexboxlegacy .vertical-padding { + padding-top: 1.75em; + padding-bottom: 1.75em; + } + html.no-flexbox .large-vertical-padding, + html.no-flexboxlegacy .large-vertical-padding { + padding-top: 1.75em; + padding-bottom: 1.75em; + } + html.no-flexbox .double-vertical-space, + html.no-flexboxlegacy .double-vertical-space { + margin-top: 3.5em; + margin-bottom: 3.5em; + } + html.no-flexbox .large-double-vertical-space, + html.no-flexboxlegacy .large-double-vertical-space { + margin-top: 3.5em; + margin-bottom: 3.5em; + } + html.no-flexbox .double-vertical-padding, + html.no-flexboxlegacy .double-vertical-padding { + padding-top: 3.5em; + padding-bottom: 3.5em; + } + html.no-flexbox .large-double-vertical-padding, + html.no-flexboxlegacy .large-double-vertical-padding { + padding-top: 3.5em; + padding-bottom: 3.5em; + } + html.no-flexbox .half-vertical-space, + html.no-flexboxlegacy .half-vertical-space { + margin-top: 0.875em; + margin-bottom: 0.875em; + } + html.no-flexbox .large-half-vertical-space, + html.no-flexboxlegacy .large-half-vertical-space { + margin-top: 0.875em; + margin-bottom: 0.875em; + } + html.no-flexbox .half-vertical-padding, + html.no-flexboxlegacy .half-vertical-padding { + padding-top: 0.875em; + padding-bottom: 0.875em; + } + html.no-flexbox .large-half-vertical-padding, + html.no-flexboxlegacy .large-half-vertical-padding { + padding-top: 0.875em; + padding-bottom: 0.875em; + } + html.no-flexbox .quarter-vertical-space, + html.no-flexboxlegacy .quarter-vertical-space { + margin-top: 0.4375em; + margin-bottom: 0.4375em; + } + html.no-flexbox .large-quarter-vertical-space, + html.no-flexboxlegacy .large-quarter-vertical-space { + margin-top: 0.4375em; + margin-bottom: 0.4375em; + } + html.no-flexbox .quarter-vertical-padding, + html.no-flexboxlegacy .quarter-vertical-padding { + padding-top: 0.4375em; + padding-bottom: 0.4375em; + } + html.no-flexbox .large-quarter-vertical-padding, + html.no-flexboxlegacy .large-quarter-vertical-padding { + padding-top: 0.4375em; + padding-bottom: 0.4375em; + } + html.no-flexbox .horizontal-space, + html.no-flexboxlegacy .horizontal-space { + margin-left: 1.75em; + margin-right: 1.75em; + } + html.no-flexbox .large-horizontal-space, + html.no-flexboxlegacy .large-horizontal-space { + margin-left: 1.75em; + margin-right: 1.75em; + } + html.no-flexbox .horizontal-padding, + html.no-flexboxlegacy .horizontal-padding { + padding-left: 1.75em; + padding-right: 1.75em; + } + html.no-flexbox .large-horizontal-padding, + html.no-flexboxlegacy .large-horizontal-padding { + padding-left: 1.75em; + padding-right: 1.75em; + } + html.no-flexbox .double-horizontal-space, + html.no-flexboxlegacy .double-horizontal-space { + margin-left: 3.5em; + margin-right: 3.5em; + } + html.no-flexbox .large-double-horizontal-space, + html.no-flexboxlegacy .large-double-horizontal-space { + margin-left: 3.5em; + margin-right: 3.5em; + } + html.no-flexbox .double-horizontal-padding, + html.no-flexboxlegacy .double-horizontal-padding { + padding-left: 3.5em; + padding-right: 3.5em; + } + html.no-flexbox .large-double-horizontal-padding, + html.no-flexboxlegacy .large-double-horizontal-padding { + padding-left: 3.5em; + padding-right: 3.5em; + } + html.no-flexbox .half-horizontal-space, + html.no-flexboxlegacy .half-horizontal-space { + margin-left: 0.875em; + margin-right: 0.875em; + } + html.no-flexbox .large-half-horizontal-space, + html.no-flexboxlegacy .large-half-horizontal-space { + margin-left: 0.875em; + margin-right: 0.875em; + } + html.no-flexbox .half-horizontal-padding, + html.no-flexboxlegacy .half-horizontal-padding { + padding-left: 0.875em; + padding-right: 0.875em; + } + html.no-flexbox .large-half-horizontal-padding, + html.no-flexboxlegacy .large-half-horizontal-padding { + padding-left: 0.875em; + padding-right: 0.875em; + } + html.no-flexbox .quarter-horizontal-space, + html.no-flexboxlegacy .quarter-horizontal-space { + margin-left: 0.4375em; + margin-right: 0.4375em; + } + html.no-flexbox .large-quarter-horizontal-space, + html.no-flexboxlegacy .large-quarter-horizontal-space { + margin-left: 0.4375em; + margin-right: 0.4375em; + } + html.no-flexbox .quarter-horizontal-padding, + html.no-flexboxlegacy .quarter-horizontal-padding { + padding-left: 0.4375em; + padding-right: 0.4375em; + } + html.no-flexbox .large-quarter-horizontal-padding, + html.no-flexboxlegacy .large-quarter-horizontal-padding { + padding-left: 0.4375em; + padding-right: 0.4375em; + } + html.no-flexbox .top-space, + html.no-flexboxlegacy .top-space { + margin-top: 1.75em; + } + html.no-flexbox .large-top-space, + html.no-flexboxlegacy .large-top-space { + margin-top: 1.75em; + } + html.no-flexbox .top-padding, + html.no-flexboxlegacy .top-padding { + padding-top: 1.75em; + } + html.no-flexbox .large-top-padding, + html.no-flexboxlegacy .large-top-padding { + padding-top: 1.75em; + } + html.no-flexbox .double-top-space, + html.no-flexboxlegacy .double-top-space { + margin-top: 3.5em; + } + html.no-flexbox .large-double-top-space, + html.no-flexboxlegacy .large-double-top-space { + margin-top: 3.5em; + } + html.no-flexbox .double-top-padding, + html.no-flexboxlegacy .double-top-padding { + padding-top: 3.5em; + } + html.no-flexbox .large-double-top-padding, + html.no-flexboxlegacy .large-double-top-padding { + padding-top: 3.5em; + } + html.no-flexbox .half-top-space, + html.no-flexboxlegacy .half-top-space { + margin-top: 0.875em; + } + html.no-flexbox .large-half-top-space, + html.no-flexboxlegacy .large-half-top-space { + margin-top: 0.875em; + } + html.no-flexbox .half-top-padding, + html.no-flexboxlegacy .half-top-padding { + padding-top: 0.875em; + } + html.no-flexbox .large-half-top-padding, + html.no-flexboxlegacy .large-half-top-padding { + padding-top: 0.875em; + } + html.no-flexbox .quarter-top-space, + html.no-flexboxlegacy .quarter-top-space { + margin-top: 0.4375em; + } + html.no-flexbox .large-quarter-top-space, + html.no-flexboxlegacy .large-quarter-top-space { + margin-top: 0.4375em; + } + html.no-flexbox .quarter-top-padding, + html.no-flexboxlegacy .quarter-top-padding { + padding-top: 0.4375em; + } + html.no-flexbox .large-quarter-top-padding, + html.no-flexboxlegacy .large-quarter-top-padding { + padding-top: 0.4375em; + } + html.no-flexbox .right-space, + html.no-flexboxlegacy .right-space { + margin-right: 1.75em; + } + html.no-flexbox .large-right-space, + html.no-flexboxlegacy .large-right-space { + margin-right: 1.75em; + } + html.no-flexbox .right-padding, + html.no-flexboxlegacy .right-padding { + padding-right: 1.75em; + } + html.no-flexbox .large-right-padding, + html.no-flexboxlegacy .large-right-padding { + padding-right: 1.75em; + } + html.no-flexbox .double-right-space, + html.no-flexboxlegacy .double-right-space { + margin-right: 3.5em; + } + html.no-flexbox .large-double-right-space, + html.no-flexboxlegacy .large-double-right-space { + margin-right: 3.5em; + } + html.no-flexbox .double-right-padding, + html.no-flexboxlegacy .double-right-padding { + padding-right: 3.5em; + } + html.no-flexbox .large-double-right-padding, + html.no-flexboxlegacy .large-double-right-padding { + padding-right: 3.5em; + } + html.no-flexbox .half-right-space, + html.no-flexboxlegacy .half-right-space { + margin-right: 0.875em; + } + html.no-flexbox .large-half-right-space, + html.no-flexboxlegacy .large-half-right-space { + margin-right: 0.875em; + } + html.no-flexbox .half-right-padding, + html.no-flexboxlegacy .half-right-padding { + padding-right: 0.875em; + } + html.no-flexbox .large-half-right-padding, + html.no-flexboxlegacy .large-half-right-padding { + padding-right: 0.875em; + } + html.no-flexbox .quarter-right-space, + html.no-flexboxlegacy .quarter-right-space { + margin-right: 0.4375em; + } + html.no-flexbox .large-quarter-right-space, + html.no-flexboxlegacy .large-quarter-right-space { + margin-right: 0.4375em; + } + html.no-flexbox .quarter-right-padding, + html.no-flexboxlegacy .quarter-right-padding { + padding-right: 0.4375em; + } + html.no-flexbox .large-quarter-right-padding, + html.no-flexboxlegacy .large-quarter-right-padding { + padding-right: 0.4375em; + } + html.no-flexbox .bottom-space, + html.no-flexboxlegacy .bottom-space { + margin-bottom: 1.75em; + } + html.no-flexbox .large-bottom-space, + html.no-flexboxlegacy .large-bottom-space { + margin-bottom: 1.75em; + } + html.no-flexbox .bottom-padding, + html.no-flexboxlegacy .bottom-padding { + padding-bottom: 1.75em; + } + html.no-flexbox .large-bottom-padding, + html.no-flexboxlegacy .large-bottom-padding { + padding-bottom: 1.75em; + } + html.no-flexbox .double-bottom-space, + html.no-flexboxlegacy .double-bottom-space { + margin-bottom: 3.5em; + } + html.no-flexbox .large-double-bottom-space, + html.no-flexboxlegacy .large-double-bottom-space { + margin-bottom: 3.5em; + } + html.no-flexbox .double-bottom-padding, + html.no-flexboxlegacy .double-bottom-padding { + padding-bottom: 3.5em; + } + html.no-flexbox .large-double-bottom-padding, + html.no-flexboxlegacy .large-double-bottom-padding { + padding-bottom: 3.5em; + } + html.no-flexbox .half-bottom-space, + html.no-flexboxlegacy .half-bottom-space { + margin-bottom: 0.875em; + } + html.no-flexbox .large-half-bottom-space, + html.no-flexboxlegacy .large-half-bottom-space { + margin-bottom: 0.875em; + } + html.no-flexbox .half-bottom-padding, + html.no-flexboxlegacy .half-bottom-padding { + padding-bottom: 0.875em; + } + html.no-flexbox .large-half-bottom-padding, + html.no-flexboxlegacy .large-half-bottom-padding { + padding-bottom: 0.875em; + } + html.no-flexbox .quarter-bottom-space, + html.no-flexboxlegacy .quarter-bottom-space { + margin-bottom: 0.4375em; + } + html.no-flexbox .large-quarter-bottom-space, + html.no-flexboxlegacy .large-quarter-bottom-space { + margin-bottom: 0.4375em; + } + html.no-flexbox .quarter-bottom-padding, + html.no-flexboxlegacy .quarter-bottom-padding { + padding-bottom: 0.4375em; + } + html.no-flexbox .large-quarter-bottom-padding, + html.no-flexboxlegacy .large-quarter-bottom-padding { + padding-bottom: 0.4375em; + } + html.no-flexbox .left-space, + html.no-flexboxlegacy .left-space { + margin-left: 1.75em; + } + html.no-flexbox .large-left-space, + html.no-flexboxlegacy .large-left-space { + margin-left: 1.75em; + } + html.no-flexbox .left-padding, + html.no-flexboxlegacy .left-padding { + padding-left: 1.75em; + } + html.no-flexbox .large-left-padding, + html.no-flexboxlegacy .large-left-padding { + padding-left: 1.75em; + } + html.no-flexbox .double-left-space, + html.no-flexboxlegacy .double-left-space { + margin-left: 3.5em; + } + html.no-flexbox .large-double-left-space, + html.no-flexboxlegacy .large-double-left-space { + margin-left: 3.5em; + } + html.no-flexbox .double-left-padding, + html.no-flexboxlegacy .double-left-padding { + padding-left: 3.5em; + } + html.no-flexbox .large-double-left-padding, + html.no-flexboxlegacy .large-double-left-padding { + padding-left: 3.5em; + } + html.no-flexbox .half-left-space, + html.no-flexboxlegacy .half-left-space { + margin-left: 0.875em; + } + html.no-flexbox .large-half-left-space, + html.no-flexboxlegacy .large-half-left-space { + margin-left: 0.875em; + } + html.no-flexbox .half-left-padding, + html.no-flexboxlegacy .half-left-padding { + padding-left: 0.875em; + } + html.no-flexbox .large-half-left-padding, + html.no-flexboxlegacy .large-half-left-padding { + padding-left: 0.875em; + } + html.no-flexbox .quarter-left-space, + html.no-flexboxlegacy .quarter-left-space { + margin-left: 0.4375em; + } + html.no-flexbox .large-quarter-left-space, + html.no-flexboxlegacy .large-quarter-left-space { + margin-left: 0.4375em; + } + html.no-flexbox .quarter-left-padding, + html.no-flexboxlegacy .quarter-left-padding { + padding-left: 0.4375em; + } + html.no-flexbox .large-quarter-left-padding, + html.no-flexboxlegacy .large-quarter-left-padding { + padding-left: 0.4375em; + } + html.no-flexbox .hide-large, + html.no-flexboxlegacy .hide-large { + display: none !important; + } + html.no-flexbox .show-large, + html.no-flexboxlegacy .show-large { + display: inherit !important; + } + html.no-flexbox table.show-large, + html.no-flexboxlegacy table.show-large { + display: table; + } + html.no-flexbox thead.show-large, + html.no-flexboxlegacy thead.show-large { + display: table-header-group; + } + html.no-flexbox tbody.show-large, + html.no-flexboxlegacy tbody.show-large { + display: table-row-group; + } + html.no-flexbox tfoot.show-large, + html.no-flexboxlegacy tfoot.show-large { + display: table-footer-group; + } + html.no-flexbox tr.show-large, + html.no-flexboxlegacy tr.show-large { + display: table-row; + } + html.no-flexbox th.show-large, + html.no-flexbox td.show-large, + html.no-flexboxlegacy th.show-large, + html.no-flexboxlegacy td.show-large { + display: table-cell; + } +} +@media screen and (min-width: 641px) and (max-width: 960px) { + html.no-flexbox .ink-grid, + html.no-flexboxlegacy .ink-grid { + padding: 0 1.5em; + } + html.no-flexbox .column-group > [class*=medium-], + html.no-flexboxlegacy .column-group > [class*=medium-] { + float: left; + clear: none; + } + html.no-flexbox .medium-5, + html.no-flexboxlegacy .medium-5 { + width: 5%; + } + html.no-flexbox .medium-10, + html.no-flexboxlegacy .medium-10 { + width: 10%; + } + html.no-flexbox .medium-15, + html.no-flexboxlegacy .medium-15 { + width: 15%; + } + html.no-flexbox .medium-20, + html.no-flexboxlegacy .medium-20 { + width: 20%; + } + html.no-flexbox .medium-25, + html.no-flexboxlegacy .medium-25 { + width: 25%; + } + html.no-flexbox .medium-30, + html.no-flexboxlegacy .medium-30 { + width: 30%; + } + html.no-flexbox .medium-33, + html.no-flexboxlegacy .medium-33 { + width: 33.33%; + } + html.no-flexbox .medium-35, + html.no-flexboxlegacy .medium-35 { + width: 35%; + } + html.no-flexbox .medium-40, + html.no-flexboxlegacy .medium-40 { + width: 40%; + } + html.no-flexbox .medium-45, + html.no-flexboxlegacy .medium-45 { + width: 45%; + } + html.no-flexbox .medium-50, + html.no-flexboxlegacy .medium-50 { + width: 50%; + } + html.no-flexbox .medium-55, + html.no-flexboxlegacy .medium-55 { + width: 55%; + } + html.no-flexbox .medium-60, + html.no-flexboxlegacy .medium-60 { + width: 60%; + } + html.no-flexbox .medium-65, + html.no-flexboxlegacy .medium-65 { + width: 65%; + } + html.no-flexbox .medium-66, + html.no-flexboxlegacy .medium-66 { + width: 66.66%; + } + html.no-flexbox .medium-70, + html.no-flexboxlegacy .medium-70 { + width: 70%; + } + html.no-flexbox .medium-75, + html.no-flexboxlegacy .medium-75 { + width: 75%; + } + html.no-flexbox .medium-80, + html.no-flexboxlegacy .medium-80 { + width: 80%; + } + html.no-flexbox .medium-85, + html.no-flexboxlegacy .medium-85 { + width: 85%; + } + html.no-flexbox .medium-90, + html.no-flexboxlegacy .medium-90 { + width: 90%; + } + html.no-flexbox .medium-95, + html.no-flexboxlegacy .medium-95 { + width: 95%; + } + html.no-flexbox .medium-100, + html.no-flexboxlegacy .medium-100 { + width: 100%; + } + html.no-flexbox [class*=medium-100], + html.no-flexboxlegacy [class*=medium-100] { + float: none; + clear: both; + } + html.no-flexbox .column-group, + html.no-flexboxlegacy .column-group { + *zoom: 1; + } + html.no-flexbox .column-group:after, + html.no-flexboxlegacy .column-group:after { + content: ""; + display: table; + clear: both; + } + html.no-flexbox .column-group.gutters, + html.no-flexboxlegacy .column-group.gutters { + margin-left: -1.5em; + } + html.no-flexbox .column-group.gutters > [class*=medium-], html.no-flexbox .column-group.gutters > [class*=all-], + html.no-flexboxlegacy .column-group.gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.gutters > [class*=all-] { + padding-left: 1.5em; + margin-bottom: 1.5em; + } + html.no-flexbox .column-group.horizontal-gutters, + html.no-flexboxlegacy .column-group.horizontal-gutters { + margin-left: -1.5em; + } + html.no-flexbox .column-group.horizontal-gutters > [class*=medium-], html.no-flexbox .column-group.horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.horizontal-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.horizontal-gutters > [class*=all-] { + padding-left: 1.5em; + } + html.no-flexbox .column-group.vertical-gutters > [class*=medium-], html.no-flexbox .column-group.vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.vertical-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.vertical-gutters > [class*=all-] { + margin-bottom: 1.5em; + } + html.no-flexbox .column-group.double-gutters, + html.no-flexboxlegacy .column-group.double-gutters { + margin-left: -3em; + } + html.no-flexbox .column-group.double-gutters > [class*=medium-], html.no-flexbox .column-group.double-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.double-gutters > [class*=all-] { + padding-left: 3em; + margin-bottom: 3em; + } + html.no-flexbox .column-group.double-horizontal-gutters, + html.no-flexboxlegacy .column-group.double-horizontal-gutters { + margin-left: -3em; + } + html.no-flexbox .column-group.double-horizontal-gutters > [class*=medium-], html.no-flexbox .column-group.double-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-horizontal-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.double-horizontal-gutters > [class*=all-] { + padding-left: 3em; + } + html.no-flexbox .column-group.double-vertical-gutters > [class*=medium-], html.no-flexbox .column-group.double-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-vertical-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.double-vertical-gutters > [class*=all-] { + margin-bottom: 3em; + } + html.no-flexbox .column-group.half-gutters, + html.no-flexboxlegacy .column-group.half-gutters { + margin-left: -0.75em; + } + html.no-flexbox .column-group.half-gutters > [class*=medium-], html.no-flexbox .column-group.half-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.half-gutters > [class*=all-] { + padding-left: 0.75em; + margin-bottom: 0.75em; + } + html.no-flexbox .column-group.half-horizontal-gutters, + html.no-flexboxlegacy .column-group.half-horizontal-gutters { + margin-left: -0.75em; + } + html.no-flexbox .column-group.half-horizontal-gutters > [class*=medium-], html.no-flexbox .column-group.half-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-horizontal-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.half-horizontal-gutters > [class*=all-] { + padding-left: 0.75em; + } + html.no-flexbox .column-group.half-vertical-gutters > [class*=medium-], html.no-flexbox .column-group.half-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-vertical-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.half-vertical-gutters > [class*=all-] { + margin-bottom: 0.75em; + } + html.no-flexbox .column-group.quarter-gutters, + html.no-flexboxlegacy .column-group.quarter-gutters { + margin-left: -0.375em; + } + html.no-flexbox .column-group.quarter-gutters > [class*=medium-], html.no-flexbox .column-group.quarter-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.quarter-gutters > [class*=all-] { + padding-left: 0.375em; + margin-bottom: 0.375em; + } + html.no-flexbox .column-group.quarter-horizontal-gutters, + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters { + margin-left: -0.375em; + } + html.no-flexbox .column-group.quarter-horizontal-gutters > [class*=medium-], html.no-flexbox .column-group.quarter-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.375em; + } + html.no-flexbox .column-group.quarter-vertical-gutters > [class*=medium-], html.no-flexbox .column-group.quarter-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-vertical-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.375em; + } + html.no-flexbox .column-group.medium-gutters, + html.no-flexboxlegacy .column-group.medium-gutters { + margin-left: -1.5em; + } + html.no-flexbox .column-group.medium-gutters > [class*=medium-], html.no-flexbox .column-group.medium-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-gutters > [class*=all-] { + padding-left: 0.375em; + margin-bottom: 0.375em; + } + html.no-flexbox .column-group.medium-horizontal-gutters, + html.no-flexboxlegacy .column-group.medium-horizontal-gutters { + margin-left: -1.5em; + } + html.no-flexbox .column-group.medium-horizontal-gutters > [class*=medium-], html.no-flexbox .column-group.medium-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-horizontal-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-horizontal-gutters > [class*=all-] { + padding-left: 1.5em; + } + html.no-flexbox .column-group.medium-vertical-gutters > [class*=medium-], html.no-flexbox .column-group.medium-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-vertical-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-vertical-gutters > [class*=all-] { + margin-bottom: 1.5em; + } + html.no-flexbox .column-group.medium-double-gutters, + html.no-flexboxlegacy .column-group.medium-double-gutters { + margin-left: -3em; + } + html.no-flexbox .column-group.medium-double-gutters > [class*=medium-], html.no-flexbox .column-group.medium-double-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-double-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-double-gutters > [class*=all-] { + padding-left: 3em; + margin-bottom: 3em; + } + html.no-flexbox .column-group.medium-double-horizontal-gutters, + html.no-flexboxlegacy .column-group.medium-double-horizontal-gutters { + margin-left: -3em; + } + html.no-flexbox .column-group.medium-double-horizontal-gutters > [class*=medium-], html.no-flexbox .column-group.medium-double-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-double-horizontal-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-double-horizontal-gutters > [class*=all-] { + padding-left: 3em; + } + html.no-flexbox .column-group.medium-double-vertical-gutters > [class*=medium-], html.no-flexbox .column-group.medium-double-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-double-vertical-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-double-vertical-gutters > [class*=all-] { + margin-bottom: 3em; + } + html.no-flexbox .column-group.medium-half-gutters, + html.no-flexboxlegacy .column-group.medium-half-gutters { + margin-left: -0.75em; + } + html.no-flexbox .column-group.medium-half-gutters > [class*=medium-], html.no-flexbox .column-group.medium-half-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-half-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-half-gutters > [class*=all-] { + padding-left: 0.75em; + margin-bottom: 0.75em; + } + html.no-flexbox .column-group.medium-half-horizontal-gutters, + html.no-flexboxlegacy .column-group.medium-half-horizontal-gutters { + margin-left: -0.75em; + } + html.no-flexbox .column-group.medium-half-horizontal-gutters > [class*=medium-], html.no-flexbox .column-group.medium-half-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-half-horizontal-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-half-horizontal-gutters > [class*=all-] { + padding-left: 0.75em; + } + html.no-flexbox .column-group.medium-half-vertical-gutters > [class*=medium-], html.no-flexbox .column-group.medium-half-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-half-vertical-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-half-vertical-gutters > [class*=all-] { + margin-bottom: 0.75em; + } + html.no-flexbox .column-group.medium-quarter-gutters, + html.no-flexboxlegacy .column-group.medium-quarter-gutters { + margin-left: -0.375em; + } + html.no-flexbox .column-group.medium-quarter-gutters > [class*=medium-], html.no-flexbox .column-group.medium-quarter-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-quarter-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-quarter-gutters > [class*=all-] { + padding-left: 0.375em; + margin-bottom: 0.375em; + } + html.no-flexbox .column-group.medium-quarter-horizontal-gutters, + html.no-flexboxlegacy .column-group.medium-quarter-horizontal-gutters { + margin-left: -0.375em; + } + html.no-flexbox .column-group.medium-quarter-horizontal-gutters > [class*=medium-], html.no-flexbox .column-group.medium-quarter-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-quarter-horizontal-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.375em; + } + html.no-flexbox .column-group.medium-quarter-vertical-gutters > [class*=medium-], html.no-flexbox .column-group.medium-quarter-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-quarter-vertical-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.375em; + } + html.no-flexbox .column-group.medium-no-gutters, + html.no-flexboxlegacy .column-group.medium-no-gutters { + margin-left: 0; + } + html.no-flexbox .column-group.medium-no-gutters > [class*=medium-], html.no-flexbox .column-group.medium-no-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.medium-no-gutters > [class*=medium-], + html.no-flexboxlegacy .column-group.medium-no-gutters > [class*=all-] { + padding-left: 0; + margin-bottom: 0; + } + html.no-flexbox .ink-table td[class*=medium-], html.no-flexbox .ink-table th[class*=medium-], html.no-flexbox .ink-table tr[class*=medium-], html.no-flexbox .ink-table thead[class*=medium-], html.no-flexbox .ink-table tbody[class*=medium-], html.no-flexbox .ink-table tfoot[class*=medium-], + html.no-flexboxlegacy .ink-table td[class*=medium-], + html.no-flexboxlegacy .ink-table th[class*=medium-], + html.no-flexboxlegacy .ink-table tr[class*=medium-], + html.no-flexboxlegacy .ink-table thead[class*=medium-], + html.no-flexboxlegacy .ink-table tbody[class*=medium-], + html.no-flexboxlegacy .ink-table tfoot[class*=medium-] { + float: none; + } + html.no-flexbox .medium-push-left, + html.no-flexboxlegacy .medium-push-left { + float: left; + } + html.no-flexbox .medium-push-center, + html.no-flexboxlegacy .medium-push-center { + float: none; + margin-left: auto; + margin-right: auto; + } + html.no-flexbox .medium-push-right, + html.no-flexboxlegacy .medium-push-right { + float: right; + } + html.no-flexbox .medium-align-left, + html.no-flexboxlegacy .medium-align-left { + text-align: left; + } + html.no-flexbox .medium-align-center, + html.no-flexboxlegacy .medium-align-center { + text-align: center; + } + html.no-flexbox .medium-align-right, + html.no-flexboxlegacy .medium-align-right { + text-align: right; + } + html.no-flexbox .medium-no-margin, + html.no-flexboxlegacy .medium-no-margin { + margin: 0 !important; + } + html.no-flexbox .space, + html.no-flexboxlegacy .space { + margin: 1.5em; + } + html.no-flexbox .medium-space, + html.no-flexboxlegacy .medium-space { + margin: 1.5em; + } + html.no-flexbox .padding, + html.no-flexboxlegacy .padding { + padding: 1.5em; + } + html.no-flexbox .medium-padding, + html.no-flexboxlegacy .medium-padding { + padding: 1.5em; + } + html.no-flexbox .double-space, + html.no-flexboxlegacy .double-space { + margin: 3em; + } + html.no-flexbox .medium-double-space, + html.no-flexboxlegacy .medium-double-space { + margin: 3em; + } + html.no-flexbox .double-padding, + html.no-flexboxlegacy .double-padding { + padding: 3em; + } + html.no-flexbox .medium-double-padding, + html.no-flexboxlegacy .medium-double-padding { + padding: 3em; + } + html.no-flexbox .half-space, + html.no-flexboxlegacy .half-space { + margin: 0.75em; + } + html.no-flexbox .medium-half-space, + html.no-flexboxlegacy .medium-half-space { + margin: 0.75em; + } + html.no-flexbox .half-padding, + html.no-flexboxlegacy .half-padding { + padding: 0.75em; + } + html.no-flexbox .medium-half-padding, + html.no-flexboxlegacy .medium-half-padding { + padding: 0.75em; + } + html.no-flexbox .quarter-space, + html.no-flexboxlegacy .quarter-space { + margin: 0.375em; + } + html.no-flexbox .medium-quarter-space, + html.no-flexboxlegacy .medium-quarter-space { + margin: 0.375em; + } + html.no-flexbox .quarter-padding, + html.no-flexboxlegacy .quarter-padding { + padding: 0.375em; + } + html.no-flexbox .medium-quarter-padding, + html.no-flexboxlegacy .medium-quarter-padding { + padding: 0.375em; + } + html.no-flexbox .vertical-space, + html.no-flexboxlegacy .vertical-space { + margin-top: 1.5em; + margin-bottom: 1.5em; + } + html.no-flexbox .medium-vertical-space, + html.no-flexboxlegacy .medium-vertical-space { + margin-top: 1.5em; + margin-bottom: 1.5em; + } + html.no-flexbox .vertical-padding, + html.no-flexboxlegacy .vertical-padding { + padding-top: 1.5em; + padding-bottom: 1.5em; + } + html.no-flexbox .medium-vertical-padding, + html.no-flexboxlegacy .medium-vertical-padding { + padding-top: 1.5em; + padding-bottom: 1.5em; + } + html.no-flexbox .double-vertical-space, + html.no-flexboxlegacy .double-vertical-space { + margin-top: 3em; + margin-bottom: 3em; + } + html.no-flexbox .medium-double-vertical-space, + html.no-flexboxlegacy .medium-double-vertical-space { + margin-top: 3em; + margin-bottom: 3em; + } + html.no-flexbox .double-vertical-padding, + html.no-flexboxlegacy .double-vertical-padding { + padding-top: 3em; + padding-bottom: 3em; + } + html.no-flexbox .medium-double-vertical-padding, + html.no-flexboxlegacy .medium-double-vertical-padding { + padding-top: 3em; + padding-bottom: 3em; + } + html.no-flexbox .half-vertical-space, + html.no-flexboxlegacy .half-vertical-space { + margin-top: 0.75em; + margin-bottom: 0.75em; + } + html.no-flexbox .medium-half-vertical-space, + html.no-flexboxlegacy .medium-half-vertical-space { + margin-top: 0.75em; + margin-bottom: 0.75em; + } + html.no-flexbox .half-vertical-padding, + html.no-flexboxlegacy .half-vertical-padding { + padding-top: 0.75em; + padding-bottom: 0.75em; + } + html.no-flexbox .medium-half-vertical-padding, + html.no-flexboxlegacy .medium-half-vertical-padding { + padding-top: 0.75em; + padding-bottom: 0.75em; + } + html.no-flexbox .quarter-vertical-space, + html.no-flexboxlegacy .quarter-vertical-space { + margin-top: 0.375em; + margin-bottom: 0.375em; + } + html.no-flexbox .medium-quarter-vertical-space, + html.no-flexboxlegacy .medium-quarter-vertical-space { + margin-top: 0.375em; + margin-bottom: 0.375em; + } + html.no-flexbox .quarter-vertical-padding, + html.no-flexboxlegacy .quarter-vertical-padding { + padding-top: 0.375em; + padding-bottom: 0.375em; + } + html.no-flexbox .medium-quarter-vertical-padding, + html.no-flexboxlegacy .medium-quarter-vertical-padding { + padding-top: 0.375em; + padding-bottom: 0.375em; + } + html.no-flexbox .horizontal-space, + html.no-flexboxlegacy .horizontal-space { + margin-left: 1.5em; + margin-right: 1.5em; + } + html.no-flexbox .medium-horizontal-space, + html.no-flexboxlegacy .medium-horizontal-space { + margin-left: 1.5em; + margin-right: 1.5em; + } + html.no-flexbox .horizontal-padding, + html.no-flexboxlegacy .horizontal-padding { + padding-left: 1.5em; + padding-right: 1.5em; + } + html.no-flexbox .medium-horizontal-padding, + html.no-flexboxlegacy .medium-horizontal-padding { + padding-left: 1.5em; + padding-right: 1.5em; + } + html.no-flexbox .double-horizontal-space, + html.no-flexboxlegacy .double-horizontal-space { + margin-left: 3em; + margin-right: 3em; + } + html.no-flexbox .medium-double-horizontal-space, + html.no-flexboxlegacy .medium-double-horizontal-space { + margin-left: 3em; + margin-right: 3em; + } + html.no-flexbox .double-horizontal-padding, + html.no-flexboxlegacy .double-horizontal-padding { + padding-left: 3em; + padding-right: 3em; + } + html.no-flexbox .medium-double-horizontal-padding, + html.no-flexboxlegacy .medium-double-horizontal-padding { + padding-left: 3em; + padding-right: 3em; + } + html.no-flexbox .half-horizontal-space, + html.no-flexboxlegacy .half-horizontal-space { + margin-left: 0.75em; + margin-right: 0.75em; + } + html.no-flexbox .medium-half-horizontal-space, + html.no-flexboxlegacy .medium-half-horizontal-space { + margin-left: 0.75em; + margin-right: 0.75em; + } + html.no-flexbox .half-horizontal-padding, + html.no-flexboxlegacy .half-horizontal-padding { + padding-left: 0.75em; + padding-right: 0.75em; + } + html.no-flexbox .medium-half-horizontal-padding, + html.no-flexboxlegacy .medium-half-horizontal-padding { + padding-left: 0.75em; + padding-right: 0.75em; + } + html.no-flexbox .quarter-horizontal-space, + html.no-flexboxlegacy .quarter-horizontal-space { + margin-left: 0.375em; + margin-right: 0.375em; + } + html.no-flexbox .medium-quarter-horizontal-space, + html.no-flexboxlegacy .medium-quarter-horizontal-space { + margin-left: 0.375em; + margin-right: 0.375em; + } + html.no-flexbox .quarter-horizontal-padding, + html.no-flexboxlegacy .quarter-horizontal-padding { + padding-left: 0.375em; + padding-right: 0.375em; + } + html.no-flexbox .medium-quarter-horizontal-padding, + html.no-flexboxlegacy .medium-quarter-horizontal-padding { + padding-left: 0.375em; + padding-right: 0.375em; + } + html.no-flexbox .top-space, + html.no-flexboxlegacy .top-space { + margin-top: 1.5em; + } + html.no-flexbox .medium-top-space, + html.no-flexboxlegacy .medium-top-space { + margin-top: 1.5em; + } + html.no-flexbox .top-padding, + html.no-flexboxlegacy .top-padding { + padding-top: 1.5em; + } + html.no-flexbox .medium-top-padding, + html.no-flexboxlegacy .medium-top-padding { + padding-top: 1.5em; + } + html.no-flexbox .double-top-space, + html.no-flexboxlegacy .double-top-space { + margin-top: 3em; + } + html.no-flexbox .medium-double-top-space, + html.no-flexboxlegacy .medium-double-top-space { + margin-top: 3em; + } + html.no-flexbox .double-top-padding, + html.no-flexboxlegacy .double-top-padding { + padding-top: 3em; + } + html.no-flexbox .medium-double-top-padding, + html.no-flexboxlegacy .medium-double-top-padding { + padding-top: 3em; + } + html.no-flexbox .half-top-space, + html.no-flexboxlegacy .half-top-space { + margin-top: 0.75em; + } + html.no-flexbox .medium-half-top-space, + html.no-flexboxlegacy .medium-half-top-space { + margin-top: 0.75em; + } + html.no-flexbox .half-top-padding, + html.no-flexboxlegacy .half-top-padding { + padding-top: 0.75em; + } + html.no-flexbox .medium-half-top-padding, + html.no-flexboxlegacy .medium-half-top-padding { + padding-top: 0.75em; + } + html.no-flexbox .quarter-top-space, + html.no-flexboxlegacy .quarter-top-space { + margin-top: 0.375em; + } + html.no-flexbox .medium-quarter-top-space, + html.no-flexboxlegacy .medium-quarter-top-space { + margin-top: 0.375em; + } + html.no-flexbox .quarter-top-padding, + html.no-flexboxlegacy .quarter-top-padding { + padding-top: 0.375em; + } + html.no-flexbox .medium-quarter-top-padding, + html.no-flexboxlegacy .medium-quarter-top-padding { + padding-top: 0.375em; + } + html.no-flexbox .right-space, + html.no-flexboxlegacy .right-space { + margin-right: 1.5em; + } + html.no-flexbox .medium-right-space, + html.no-flexboxlegacy .medium-right-space { + margin-right: 1.5em; + } + html.no-flexbox .right-padding, + html.no-flexboxlegacy .right-padding { + padding-right: 1.5em; + } + html.no-flexbox .medium-right-padding, + html.no-flexboxlegacy .medium-right-padding { + padding-right: 1.5em; + } + html.no-flexbox .double-right-space, + html.no-flexboxlegacy .double-right-space { + margin-right: 3em; + } + html.no-flexbox .medium-double-right-space, + html.no-flexboxlegacy .medium-double-right-space { + margin-right: 3em; + } + html.no-flexbox .double-right-padding, + html.no-flexboxlegacy .double-right-padding { + padding-right: 3em; + } + html.no-flexbox .medium-double-right-padding, + html.no-flexboxlegacy .medium-double-right-padding { + padding-right: 3em; + } + html.no-flexbox .half-right-space, + html.no-flexboxlegacy .half-right-space { + margin-right: 0.75em; + } + html.no-flexbox .medium-half-right-space, + html.no-flexboxlegacy .medium-half-right-space { + margin-right: 0.75em; + } + html.no-flexbox .half-right-padding, + html.no-flexboxlegacy .half-right-padding { + padding-right: 0.75em; + } + html.no-flexbox .medium-half-right-padding, + html.no-flexboxlegacy .medium-half-right-padding { + padding-right: 0.75em; + } + html.no-flexbox .quarter-right-space, + html.no-flexboxlegacy .quarter-right-space { + margin-right: 0.375em; + } + html.no-flexbox .medium-quarter-right-space, + html.no-flexboxlegacy .medium-quarter-right-space { + margin-right: 0.375em; + } + html.no-flexbox .quarter-right-padding, + html.no-flexboxlegacy .quarter-right-padding { + padding-right: 0.375em; + } + html.no-flexbox .medium-quarter-right-padding, + html.no-flexboxlegacy .medium-quarter-right-padding { + padding-right: 0.375em; + } + html.no-flexbox .bottom-space, + html.no-flexboxlegacy .bottom-space { + margin-bottom: 1.5em; + } + html.no-flexbox .medium-bottom-space, + html.no-flexboxlegacy .medium-bottom-space { + margin-bottom: 1.5em; + } + html.no-flexbox .bottom-padding, + html.no-flexboxlegacy .bottom-padding { + padding-bottom: 1.5em; + } + html.no-flexbox .medium-bottom-padding, + html.no-flexboxlegacy .medium-bottom-padding { + padding-bottom: 1.5em; + } + html.no-flexbox .double-bottom-space, + html.no-flexboxlegacy .double-bottom-space { + margin-bottom: 3em; + } + html.no-flexbox .medium-double-bottom-space, + html.no-flexboxlegacy .medium-double-bottom-space { + margin-bottom: 3em; + } + html.no-flexbox .double-bottom-padding, + html.no-flexboxlegacy .double-bottom-padding { + padding-bottom: 3em; + } + html.no-flexbox .medium-double-bottom-padding, + html.no-flexboxlegacy .medium-double-bottom-padding { + padding-bottom: 3em; + } + html.no-flexbox .half-bottom-space, + html.no-flexboxlegacy .half-bottom-space { + margin-bottom: 0.75em; + } + html.no-flexbox .medium-half-bottom-space, + html.no-flexboxlegacy .medium-half-bottom-space { + margin-bottom: 0.75em; + } + html.no-flexbox .half-bottom-padding, + html.no-flexboxlegacy .half-bottom-padding { + padding-bottom: 0.75em; + } + html.no-flexbox .medium-half-bottom-padding, + html.no-flexboxlegacy .medium-half-bottom-padding { + padding-bottom: 0.75em; + } + html.no-flexbox .quarter-bottom-space, + html.no-flexboxlegacy .quarter-bottom-space { + margin-bottom: 0.375em; + } + html.no-flexbox .medium-quarter-bottom-space, + html.no-flexboxlegacy .medium-quarter-bottom-space { + margin-bottom: 0.375em; + } + html.no-flexbox .quarter-bottom-padding, + html.no-flexboxlegacy .quarter-bottom-padding { + padding-bottom: 0.375em; + } + html.no-flexbox .medium-quarter-bottom-padding, + html.no-flexboxlegacy .medium-quarter-bottom-padding { + padding-bottom: 0.375em; + } + html.no-flexbox .left-space, + html.no-flexboxlegacy .left-space { + margin-left: 1.5em; + } + html.no-flexbox .medium-left-space, + html.no-flexboxlegacy .medium-left-space { + margin-left: 1.5em; + } + html.no-flexbox .left-padding, + html.no-flexboxlegacy .left-padding { + padding-left: 1.5em; + } + html.no-flexbox .medium-left-padding, + html.no-flexboxlegacy .medium-left-padding { + padding-left: 1.5em; + } + html.no-flexbox .double-left-space, + html.no-flexboxlegacy .double-left-space { + margin-left: 3em; + } + html.no-flexbox .medium-double-left-space, + html.no-flexboxlegacy .medium-double-left-space { + margin-left: 3em; + } + html.no-flexbox .double-left-padding, + html.no-flexboxlegacy .double-left-padding { + padding-left: 3em; + } + html.no-flexbox .medium-double-left-padding, + html.no-flexboxlegacy .medium-double-left-padding { + padding-left: 3em; + } + html.no-flexbox .half-left-space, + html.no-flexboxlegacy .half-left-space { + margin-left: 0.75em; + } + html.no-flexbox .medium-half-left-space, + html.no-flexboxlegacy .medium-half-left-space { + margin-left: 0.75em; + } + html.no-flexbox .half-left-padding, + html.no-flexboxlegacy .half-left-padding { + padding-left: 0.75em; + } + html.no-flexbox .medium-half-left-padding, + html.no-flexboxlegacy .medium-half-left-padding { + padding-left: 0.75em; + } + html.no-flexbox .quarter-left-space, + html.no-flexboxlegacy .quarter-left-space { + margin-left: 0.375em; + } + html.no-flexbox .medium-quarter-left-space, + html.no-flexboxlegacy .medium-quarter-left-space { + margin-left: 0.375em; + } + html.no-flexbox .quarter-left-padding, + html.no-flexboxlegacy .quarter-left-padding { + padding-left: 0.375em; + } + html.no-flexbox .medium-quarter-left-padding, + html.no-flexboxlegacy .medium-quarter-left-padding { + padding-left: 0.375em; + } + html.no-flexbox .hide-medium, + html.no-flexboxlegacy .hide-medium { + display: none !important; + } + html.no-flexbox .show-medium, + html.no-flexboxlegacy .show-medium { + display: inherit !important; + } + html.no-flexbox table.show-medium, + html.no-flexboxlegacy table.show-medium { + display: table; + } + html.no-flexbox thead.show-medium, + html.no-flexboxlegacy thead.show-medium { + display: table-header-group; + } + html.no-flexbox tbody.show-medium, + html.no-flexboxlegacy tbody.show-medium { + display: table-row-group; + } + html.no-flexbox tfoot.show-medium, + html.no-flexboxlegacy tfoot.show-medium { + display: table-footer-group; + } + html.no-flexbox tr.show-medium, + html.no-flexboxlegacy tr.show-medium { + display: table-row; + } + html.no-flexbox th.show-medium, + html.no-flexbox td.show-medium, + html.no-flexboxlegacy th.show-medium, + html.no-flexboxlegacy td.show-medium { + display: table-cell; + } +} +@media screen and (min-width: 321px) and (max-width: 640px) { + html.no-flexbox .ink-grid, + html.no-flexboxlegacy .ink-grid { + padding: 0 1.25em; + } + html.no-flexbox .column-group > [class*=small-], + html.no-flexboxlegacy .column-group > [class*=small-] { + float: left; + clear: none; + } + html.no-flexbox .small-5, + html.no-flexboxlegacy .small-5 { + width: 5%; + } + html.no-flexbox .small-10, + html.no-flexboxlegacy .small-10 { + width: 10%; + } + html.no-flexbox .small-15, + html.no-flexboxlegacy .small-15 { + width: 15%; + } + html.no-flexbox .small-20, + html.no-flexboxlegacy .small-20 { + width: 20%; + } + html.no-flexbox .small-25, + html.no-flexboxlegacy .small-25 { + width: 25%; + } + html.no-flexbox .small-30, + html.no-flexboxlegacy .small-30 { + width: 30%; + } + html.no-flexbox .small-33, + html.no-flexboxlegacy .small-33 { + width: 33.33%; + } + html.no-flexbox .small-35, + html.no-flexboxlegacy .small-35 { + width: 35%; + } + html.no-flexbox .small-40, + html.no-flexboxlegacy .small-40 { + width: 40%; + } + html.no-flexbox .small-45, + html.no-flexboxlegacy .small-45 { + width: 45%; + } + html.no-flexbox .small-50, + html.no-flexboxlegacy .small-50 { + width: 50%; + } + html.no-flexbox .small-55, + html.no-flexboxlegacy .small-55 { + width: 55%; + } + html.no-flexbox .small-60, + html.no-flexboxlegacy .small-60 { + width: 60%; + } + html.no-flexbox .small-65, + html.no-flexboxlegacy .small-65 { + width: 65%; + } + html.no-flexbox .small-66, + html.no-flexboxlegacy .small-66 { + width: 66.66%; + } + html.no-flexbox .small-70, + html.no-flexboxlegacy .small-70 { + width: 70%; + } + html.no-flexbox .small-75, + html.no-flexboxlegacy .small-75 { + width: 75%; + } + html.no-flexbox .small-80, + html.no-flexboxlegacy .small-80 { + width: 80%; + } + html.no-flexbox .small-85, + html.no-flexboxlegacy .small-85 { + width: 85%; + } + html.no-flexbox .small-90, + html.no-flexboxlegacy .small-90 { + width: 90%; + } + html.no-flexbox .small-95, + html.no-flexboxlegacy .small-95 { + width: 95%; + } + html.no-flexbox .small-100, + html.no-flexboxlegacy .small-100 { + width: 100%; + } + html.no-flexbox [class*=small-100], + html.no-flexboxlegacy [class*=small-100] { + float: none; + clear: both; + } + html.no-flexbox .column-group, + html.no-flexboxlegacy .column-group { + *zoom: 1; + } + html.no-flexbox .column-group:after, + html.no-flexboxlegacy .column-group:after { + content: ""; + display: table; + clear: both; + } + html.no-flexbox .column-group.gutters, + html.no-flexboxlegacy .column-group.gutters { + margin-left: -1.25em; + } + html.no-flexbox .column-group.gutters > [class*=small-], html.no-flexbox .column-group.gutters > [class*=all-], + html.no-flexboxlegacy .column-group.gutters > [class*=small-], + html.no-flexboxlegacy .column-group.gutters > [class*=all-] { + padding-left: 1.25em; + margin-bottom: 1.25em; + } + html.no-flexbox .column-group.horizontal-gutters, + html.no-flexboxlegacy .column-group.horizontal-gutters { + margin-left: -1.25em; + } + html.no-flexbox .column-group.horizontal-gutters > [class*=small-], html.no-flexbox .column-group.horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.horizontal-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.horizontal-gutters > [class*=all-] { + padding-left: 1.25em; + } + html.no-flexbox .column-group.vertical-gutters > [class*=small-], html.no-flexbox .column-group.vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.vertical-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.vertical-gutters > [class*=all-] { + margin-bottom: 1.25em; + } + html.no-flexbox .column-group.double-gutters, + html.no-flexboxlegacy .column-group.double-gutters { + margin-left: -2.5em; + } + html.no-flexbox .column-group.double-gutters > [class*=small-], html.no-flexbox .column-group.double-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.double-gutters > [class*=all-] { + padding-left: 2.5em; + margin-bottom: 2.5em; + } + html.no-flexbox .column-group.double-horizontal-gutters, + html.no-flexboxlegacy .column-group.double-horizontal-gutters { + margin-left: -2.5em; + } + html.no-flexbox .column-group.double-horizontal-gutters > [class*=small-], html.no-flexbox .column-group.double-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-horizontal-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.double-horizontal-gutters > [class*=all-] { + padding-left: 2.5em; + } + html.no-flexbox .column-group.double-vertical-gutters > [class*=small-], html.no-flexbox .column-group.double-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-vertical-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.double-vertical-gutters > [class*=all-] { + margin-bottom: 2.5em; + } + html.no-flexbox .column-group.half-gutters, + html.no-flexboxlegacy .column-group.half-gutters { + margin-left: -0.625em; + } + html.no-flexbox .column-group.half-gutters > [class*=small-], html.no-flexbox .column-group.half-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.half-gutters > [class*=all-] { + padding-left: 0.625em; + margin-bottom: 0.625em; + } + html.no-flexbox .column-group.half-horizontal-gutters, + html.no-flexboxlegacy .column-group.half-horizontal-gutters { + margin-left: -0.625em; + } + html.no-flexbox .column-group.half-horizontal-gutters > [class*=small-], html.no-flexbox .column-group.half-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-horizontal-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.half-horizontal-gutters > [class*=all-] { + padding-left: 0.625em; + } + html.no-flexbox .column-group.half-vertical-gutters > [class*=small-], html.no-flexbox .column-group.half-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-vertical-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.half-vertical-gutters > [class*=all-] { + margin-bottom: 0.625em; + } + html.no-flexbox .column-group.quarter-gutters, + html.no-flexboxlegacy .column-group.quarter-gutters { + margin-left: -0.3125em; + } + html.no-flexbox .column-group.quarter-gutters > [class*=small-], html.no-flexbox .column-group.quarter-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.quarter-gutters > [class*=all-] { + padding-left: 0.3125em; + margin-bottom: 0.3125em; + } + html.no-flexbox .column-group.quarter-horizontal-gutters, + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters { + margin-left: -0.3125em; + } + html.no-flexbox .column-group.quarter-horizontal-gutters > [class*=small-], html.no-flexbox .column-group.quarter-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.3125em; + } + html.no-flexbox .column-group.quarter-vertical-gutters > [class*=small-], html.no-flexbox .column-group.quarter-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-vertical-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.3125em; + } + html.no-flexbox .column-group.small-gutters, + html.no-flexboxlegacy .column-group.small-gutters { + margin-left: -1.25em; + } + html.no-flexbox .column-group.small-gutters > [class*=small-], html.no-flexbox .column-group.small-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-gutters > [class*=all-] { + padding-left: 0.3125em; + margin-bottom: 0.3125em; + } + html.no-flexbox .column-group.small-horizontal-gutters, + html.no-flexboxlegacy .column-group.small-horizontal-gutters { + margin-left: -1.25em; + } + html.no-flexbox .column-group.small-horizontal-gutters > [class*=small-], html.no-flexbox .column-group.small-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-horizontal-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-horizontal-gutters > [class*=all-] { + padding-left: 1.25em; + } + html.no-flexbox .column-group.small-vertical-gutters > [class*=small-], html.no-flexbox .column-group.small-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-vertical-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-vertical-gutters > [class*=all-] { + margin-bottom: 1.25em; + } + html.no-flexbox .column-group.small-double-gutters, + html.no-flexboxlegacy .column-group.small-double-gutters { + margin-left: -2.5em; + } + html.no-flexbox .column-group.small-double-gutters > [class*=small-], html.no-flexbox .column-group.small-double-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-double-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-double-gutters > [class*=all-] { + padding-left: 2.5em; + margin-bottom: 2.5em; + } + html.no-flexbox .column-group.small-double-horizontal-gutters, + html.no-flexboxlegacy .column-group.small-double-horizontal-gutters { + margin-left: -2.5em; + } + html.no-flexbox .column-group.small-double-horizontal-gutters > [class*=small-], html.no-flexbox .column-group.small-double-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-double-horizontal-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-double-horizontal-gutters > [class*=all-] { + padding-left: 2.5em; + } + html.no-flexbox .column-group.small-double-vertical-gutters > [class*=small-], html.no-flexbox .column-group.small-double-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-double-vertical-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-double-vertical-gutters > [class*=all-] { + margin-bottom: 2.5em; + } + html.no-flexbox .column-group.small-half-gutters, + html.no-flexboxlegacy .column-group.small-half-gutters { + margin-left: -0.625em; + } + html.no-flexbox .column-group.small-half-gutters > [class*=small-], html.no-flexbox .column-group.small-half-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-half-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-half-gutters > [class*=all-] { + padding-left: 0.625em; + margin-bottom: 0.625em; + } + html.no-flexbox .column-group.small-half-horizontal-gutters, + html.no-flexboxlegacy .column-group.small-half-horizontal-gutters { + margin-left: -0.625em; + } + html.no-flexbox .column-group.small-half-horizontal-gutters > [class*=small-], html.no-flexbox .column-group.small-half-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-half-horizontal-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-half-horizontal-gutters > [class*=all-] { + padding-left: 0.625em; + } + html.no-flexbox .column-group.small-half-vertical-gutters > [class*=small-], html.no-flexbox .column-group.small-half-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-half-vertical-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-half-vertical-gutters > [class*=all-] { + margin-bottom: 0.625em; + } + html.no-flexbox .column-group.small-quarter-gutters, + html.no-flexboxlegacy .column-group.small-quarter-gutters { + margin-left: -0.3125em; + } + html.no-flexbox .column-group.small-quarter-gutters > [class*=small-], html.no-flexbox .column-group.small-quarter-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-quarter-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-quarter-gutters > [class*=all-] { + padding-left: 0.3125em; + margin-bottom: 0.3125em; + } + html.no-flexbox .column-group.small-quarter-horizontal-gutters, + html.no-flexboxlegacy .column-group.small-quarter-horizontal-gutters { + margin-left: -0.3125em; + } + html.no-flexbox .column-group.small-quarter-horizontal-gutters > [class*=small-], html.no-flexbox .column-group.small-quarter-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-quarter-horizontal-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.3125em; + } + html.no-flexbox .column-group.small-quarter-vertical-gutters > [class*=small-], html.no-flexbox .column-group.small-quarter-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-quarter-vertical-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.3125em; + } + html.no-flexbox .column-group.small-no-gutters, + html.no-flexboxlegacy .column-group.small-no-gutters { + margin-left: 0; + } + html.no-flexbox .column-group.small-no-gutters > [class*=small-], html.no-flexbox .column-group.small-no-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.small-no-gutters > [class*=small-], + html.no-flexboxlegacy .column-group.small-no-gutters > [class*=all-] { + padding-left: 0; + margin-bottom: 0; + } + html.no-flexbox .ink-table td[class*=small-], html.no-flexbox .ink-table th[class*=small-], html.no-flexbox .ink-table tr[class*=small-], html.no-flexbox .ink-table thead[class*=small-], html.no-flexbox .ink-table tbody[class*=small-], html.no-flexbox .ink-table tfoot[class*=small-], + html.no-flexboxlegacy .ink-table td[class*=small-], + html.no-flexboxlegacy .ink-table th[class*=small-], + html.no-flexboxlegacy .ink-table tr[class*=small-], + html.no-flexboxlegacy .ink-table thead[class*=small-], + html.no-flexboxlegacy .ink-table tbody[class*=small-], + html.no-flexboxlegacy .ink-table tfoot[class*=small-] { + float: none; + } + html.no-flexbox .small-push-left, + html.no-flexboxlegacy .small-push-left { + float: left; + } + html.no-flexbox .small-push-center, + html.no-flexboxlegacy .small-push-center { + float: none; + margin-left: auto; + margin-right: auto; + } + html.no-flexbox .small-push-right, + html.no-flexboxlegacy .small-push-right { + float: right; + } + html.no-flexbox .small-align-left, + html.no-flexboxlegacy .small-align-left { + text-align: left; + } + html.no-flexbox .small-align-center, + html.no-flexboxlegacy .small-align-center { + text-align: center; + } + html.no-flexbox .small-align-right, + html.no-flexboxlegacy .small-align-right { + text-align: right; + } + html.no-flexbox .small-no-margin, + html.no-flexboxlegacy .small-no-margin { + margin: 0 !important; + } + html.no-flexbox .space, + html.no-flexboxlegacy .space { + margin: 1.25em; + } + html.no-flexbox .small-space, + html.no-flexboxlegacy .small-space { + margin: 1.25em; + } + html.no-flexbox .padding, + html.no-flexboxlegacy .padding { + padding: 1.25em; + } + html.no-flexbox .small-padding, + html.no-flexboxlegacy .small-padding { + padding: 1.25em; + } + html.no-flexbox .double-space, + html.no-flexboxlegacy .double-space { + margin: 2.5em; + } + html.no-flexbox .small-double-space, + html.no-flexboxlegacy .small-double-space { + margin: 2.5em; + } + html.no-flexbox .double-padding, + html.no-flexboxlegacy .double-padding { + padding: 2.5em; + } + html.no-flexbox .small-double-padding, + html.no-flexboxlegacy .small-double-padding { + padding: 2.5em; + } + html.no-flexbox .half-space, + html.no-flexboxlegacy .half-space { + margin: 0.625em; + } + html.no-flexbox .small-half-space, + html.no-flexboxlegacy .small-half-space { + margin: 0.625em; + } + html.no-flexbox .half-padding, + html.no-flexboxlegacy .half-padding { + padding: 0.625em; + } + html.no-flexbox .small-half-padding, + html.no-flexboxlegacy .small-half-padding { + padding: 0.625em; + } + html.no-flexbox .quarter-space, + html.no-flexboxlegacy .quarter-space { + margin: 0.3125em; + } + html.no-flexbox .small-quarter-space, + html.no-flexboxlegacy .small-quarter-space { + margin: 0.3125em; + } + html.no-flexbox .quarter-padding, + html.no-flexboxlegacy .quarter-padding { + padding: 0.3125em; + } + html.no-flexbox .small-quarter-padding, + html.no-flexboxlegacy .small-quarter-padding { + padding: 0.3125em; + } + html.no-flexbox .vertical-space, + html.no-flexboxlegacy .vertical-space { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + html.no-flexbox .small-vertical-space, + html.no-flexboxlegacy .small-vertical-space { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + html.no-flexbox .vertical-padding, + html.no-flexboxlegacy .vertical-padding { + padding-top: 1.25em; + padding-bottom: 1.25em; + } + html.no-flexbox .small-vertical-padding, + html.no-flexboxlegacy .small-vertical-padding { + padding-top: 1.25em; + padding-bottom: 1.25em; + } + html.no-flexbox .double-vertical-space, + html.no-flexboxlegacy .double-vertical-space { + margin-top: 2.5em; + margin-bottom: 2.5em; + } + html.no-flexbox .small-double-vertical-space, + html.no-flexboxlegacy .small-double-vertical-space { + margin-top: 2.5em; + margin-bottom: 2.5em; + } + html.no-flexbox .double-vertical-padding, + html.no-flexboxlegacy .double-vertical-padding { + padding-top: 2.5em; + padding-bottom: 2.5em; + } + html.no-flexbox .small-double-vertical-padding, + html.no-flexboxlegacy .small-double-vertical-padding { + padding-top: 2.5em; + padding-bottom: 2.5em; + } + html.no-flexbox .half-vertical-space, + html.no-flexboxlegacy .half-vertical-space { + margin-top: 0.625em; + margin-bottom: 0.625em; + } + html.no-flexbox .small-half-vertical-space, + html.no-flexboxlegacy .small-half-vertical-space { + margin-top: 0.625em; + margin-bottom: 0.625em; + } + html.no-flexbox .half-vertical-padding, + html.no-flexboxlegacy .half-vertical-padding { + padding-top: 0.625em; + padding-bottom: 0.625em; + } + html.no-flexbox .small-half-vertical-padding, + html.no-flexboxlegacy .small-half-vertical-padding { + padding-top: 0.625em; + padding-bottom: 0.625em; + } + html.no-flexbox .quarter-vertical-space, + html.no-flexboxlegacy .quarter-vertical-space { + margin-top: 0.3125em; + margin-bottom: 0.3125em; + } + html.no-flexbox .small-quarter-vertical-space, + html.no-flexboxlegacy .small-quarter-vertical-space { + margin-top: 0.3125em; + margin-bottom: 0.3125em; + } + html.no-flexbox .quarter-vertical-padding, + html.no-flexboxlegacy .quarter-vertical-padding { + padding-top: 0.3125em; + padding-bottom: 0.3125em; + } + html.no-flexbox .small-quarter-vertical-padding, + html.no-flexboxlegacy .small-quarter-vertical-padding { + padding-top: 0.3125em; + padding-bottom: 0.3125em; + } + html.no-flexbox .horizontal-space, + html.no-flexboxlegacy .horizontal-space { + margin-left: 1.25em; + margin-right: 1.25em; + } + html.no-flexbox .small-horizontal-space, + html.no-flexboxlegacy .small-horizontal-space { + margin-left: 1.25em; + margin-right: 1.25em; + } + html.no-flexbox .horizontal-padding, + html.no-flexboxlegacy .horizontal-padding { + padding-left: 1.25em; + padding-right: 1.25em; + } + html.no-flexbox .small-horizontal-padding, + html.no-flexboxlegacy .small-horizontal-padding { + padding-left: 1.25em; + padding-right: 1.25em; + } + html.no-flexbox .double-horizontal-space, + html.no-flexboxlegacy .double-horizontal-space { + margin-left: 2.5em; + margin-right: 2.5em; + } + html.no-flexbox .small-double-horizontal-space, + html.no-flexboxlegacy .small-double-horizontal-space { + margin-left: 2.5em; + margin-right: 2.5em; + } + html.no-flexbox .double-horizontal-padding, + html.no-flexboxlegacy .double-horizontal-padding { + padding-left: 2.5em; + padding-right: 2.5em; + } + html.no-flexbox .small-double-horizontal-padding, + html.no-flexboxlegacy .small-double-horizontal-padding { + padding-left: 2.5em; + padding-right: 2.5em; + } + html.no-flexbox .half-horizontal-space, + html.no-flexboxlegacy .half-horizontal-space { + margin-left: 0.625em; + margin-right: 0.625em; + } + html.no-flexbox .small-half-horizontal-space, + html.no-flexboxlegacy .small-half-horizontal-space { + margin-left: 0.625em; + margin-right: 0.625em; + } + html.no-flexbox .half-horizontal-padding, + html.no-flexboxlegacy .half-horizontal-padding { + padding-left: 0.625em; + padding-right: 0.625em; + } + html.no-flexbox .small-half-horizontal-padding, + html.no-flexboxlegacy .small-half-horizontal-padding { + padding-left: 0.625em; + padding-right: 0.625em; + } + html.no-flexbox .quarter-horizontal-space, + html.no-flexboxlegacy .quarter-horizontal-space { + margin-left: 0.3125em; + margin-right: 0.3125em; + } + html.no-flexbox .small-quarter-horizontal-space, + html.no-flexboxlegacy .small-quarter-horizontal-space { + margin-left: 0.3125em; + margin-right: 0.3125em; + } + html.no-flexbox .quarter-horizontal-padding, + html.no-flexboxlegacy .quarter-horizontal-padding { + padding-left: 0.3125em; + padding-right: 0.3125em; + } + html.no-flexbox .small-quarter-horizontal-padding, + html.no-flexboxlegacy .small-quarter-horizontal-padding { + padding-left: 0.3125em; + padding-right: 0.3125em; + } + html.no-flexbox .top-space, + html.no-flexboxlegacy .top-space { + margin-top: 1.25em; + } + html.no-flexbox .small-top-space, + html.no-flexboxlegacy .small-top-space { + margin-top: 1.25em; + } + html.no-flexbox .top-padding, + html.no-flexboxlegacy .top-padding { + padding-top: 1.25em; + } + html.no-flexbox .small-top-padding, + html.no-flexboxlegacy .small-top-padding { + padding-top: 1.25em; + } + html.no-flexbox .double-top-space, + html.no-flexboxlegacy .double-top-space { + margin-top: 2.5em; + } + html.no-flexbox .small-double-top-space, + html.no-flexboxlegacy .small-double-top-space { + margin-top: 2.5em; + } + html.no-flexbox .double-top-padding, + html.no-flexboxlegacy .double-top-padding { + padding-top: 2.5em; + } + html.no-flexbox .small-double-top-padding, + html.no-flexboxlegacy .small-double-top-padding { + padding-top: 2.5em; + } + html.no-flexbox .half-top-space, + html.no-flexboxlegacy .half-top-space { + margin-top: 0.625em; + } + html.no-flexbox .small-half-top-space, + html.no-flexboxlegacy .small-half-top-space { + margin-top: 0.625em; + } + html.no-flexbox .half-top-padding, + html.no-flexboxlegacy .half-top-padding { + padding-top: 0.625em; + } + html.no-flexbox .small-half-top-padding, + html.no-flexboxlegacy .small-half-top-padding { + padding-top: 0.625em; + } + html.no-flexbox .quarter-top-space, + html.no-flexboxlegacy .quarter-top-space { + margin-top: 0.3125em; + } + html.no-flexbox .small-quarter-top-space, + html.no-flexboxlegacy .small-quarter-top-space { + margin-top: 0.3125em; + } + html.no-flexbox .quarter-top-padding, + html.no-flexboxlegacy .quarter-top-padding { + padding-top: 0.3125em; + } + html.no-flexbox .small-quarter-top-padding, + html.no-flexboxlegacy .small-quarter-top-padding { + padding-top: 0.3125em; + } + html.no-flexbox .right-space, + html.no-flexboxlegacy .right-space { + margin-right: 1.25em; + } + html.no-flexbox .small-right-space, + html.no-flexboxlegacy .small-right-space { + margin-right: 1.25em; + } + html.no-flexbox .right-padding, + html.no-flexboxlegacy .right-padding { + padding-right: 1.25em; + } + html.no-flexbox .small-right-padding, + html.no-flexboxlegacy .small-right-padding { + padding-right: 1.25em; + } + html.no-flexbox .double-right-space, + html.no-flexboxlegacy .double-right-space { + margin-right: 2.5em; + } + html.no-flexbox .small-double-right-space, + html.no-flexboxlegacy .small-double-right-space { + margin-right: 2.5em; + } + html.no-flexbox .double-right-padding, + html.no-flexboxlegacy .double-right-padding { + padding-right: 2.5em; + } + html.no-flexbox .small-double-right-padding, + html.no-flexboxlegacy .small-double-right-padding { + padding-right: 2.5em; + } + html.no-flexbox .half-right-space, + html.no-flexboxlegacy .half-right-space { + margin-right: 0.625em; + } + html.no-flexbox .small-half-right-space, + html.no-flexboxlegacy .small-half-right-space { + margin-right: 0.625em; + } + html.no-flexbox .half-right-padding, + html.no-flexboxlegacy .half-right-padding { + padding-right: 0.625em; + } + html.no-flexbox .small-half-right-padding, + html.no-flexboxlegacy .small-half-right-padding { + padding-right: 0.625em; + } + html.no-flexbox .quarter-right-space, + html.no-flexboxlegacy .quarter-right-space { + margin-right: 0.3125em; + } + html.no-flexbox .small-quarter-right-space, + html.no-flexboxlegacy .small-quarter-right-space { + margin-right: 0.3125em; + } + html.no-flexbox .quarter-right-padding, + html.no-flexboxlegacy .quarter-right-padding { + padding-right: 0.3125em; + } + html.no-flexbox .small-quarter-right-padding, + html.no-flexboxlegacy .small-quarter-right-padding { + padding-right: 0.3125em; + } + html.no-flexbox .bottom-space, + html.no-flexboxlegacy .bottom-space { + margin-bottom: 1.25em; + } + html.no-flexbox .small-bottom-space, + html.no-flexboxlegacy .small-bottom-space { + margin-bottom: 1.25em; + } + html.no-flexbox .bottom-padding, + html.no-flexboxlegacy .bottom-padding { + padding-bottom: 1.25em; + } + html.no-flexbox .small-bottom-padding, + html.no-flexboxlegacy .small-bottom-padding { + padding-bottom: 1.25em; + } + html.no-flexbox .double-bottom-space, + html.no-flexboxlegacy .double-bottom-space { + margin-bottom: 2.5em; + } + html.no-flexbox .small-double-bottom-space, + html.no-flexboxlegacy .small-double-bottom-space { + margin-bottom: 2.5em; + } + html.no-flexbox .double-bottom-padding, + html.no-flexboxlegacy .double-bottom-padding { + padding-bottom: 2.5em; + } + html.no-flexbox .small-double-bottom-padding, + html.no-flexboxlegacy .small-double-bottom-padding { + padding-bottom: 2.5em; + } + html.no-flexbox .half-bottom-space, + html.no-flexboxlegacy .half-bottom-space { + margin-bottom: 0.625em; + } + html.no-flexbox .small-half-bottom-space, + html.no-flexboxlegacy .small-half-bottom-space { + margin-bottom: 0.625em; + } + html.no-flexbox .half-bottom-padding, + html.no-flexboxlegacy .half-bottom-padding { + padding-bottom: 0.625em; + } + html.no-flexbox .small-half-bottom-padding, + html.no-flexboxlegacy .small-half-bottom-padding { + padding-bottom: 0.625em; + } + html.no-flexbox .quarter-bottom-space, + html.no-flexboxlegacy .quarter-bottom-space { + margin-bottom: 0.3125em; + } + html.no-flexbox .small-quarter-bottom-space, + html.no-flexboxlegacy .small-quarter-bottom-space { + margin-bottom: 0.3125em; + } + html.no-flexbox .quarter-bottom-padding, + html.no-flexboxlegacy .quarter-bottom-padding { + padding-bottom: 0.3125em; + } + html.no-flexbox .small-quarter-bottom-padding, + html.no-flexboxlegacy .small-quarter-bottom-padding { + padding-bottom: 0.3125em; + } + html.no-flexbox .left-space, + html.no-flexboxlegacy .left-space { + margin-left: 1.25em; + } + html.no-flexbox .small-left-space, + html.no-flexboxlegacy .small-left-space { + margin-left: 1.25em; + } + html.no-flexbox .left-padding, + html.no-flexboxlegacy .left-padding { + padding-left: 1.25em; + } + html.no-flexbox .small-left-padding, + html.no-flexboxlegacy .small-left-padding { + padding-left: 1.25em; + } + html.no-flexbox .double-left-space, + html.no-flexboxlegacy .double-left-space { + margin-left: 2.5em; + } + html.no-flexbox .small-double-left-space, + html.no-flexboxlegacy .small-double-left-space { + margin-left: 2.5em; + } + html.no-flexbox .double-left-padding, + html.no-flexboxlegacy .double-left-padding { + padding-left: 2.5em; + } + html.no-flexbox .small-double-left-padding, + html.no-flexboxlegacy .small-double-left-padding { + padding-left: 2.5em; + } + html.no-flexbox .half-left-space, + html.no-flexboxlegacy .half-left-space { + margin-left: 0.625em; + } + html.no-flexbox .small-half-left-space, + html.no-flexboxlegacy .small-half-left-space { + margin-left: 0.625em; + } + html.no-flexbox .half-left-padding, + html.no-flexboxlegacy .half-left-padding { + padding-left: 0.625em; + } + html.no-flexbox .small-half-left-padding, + html.no-flexboxlegacy .small-half-left-padding { + padding-left: 0.625em; + } + html.no-flexbox .quarter-left-space, + html.no-flexboxlegacy .quarter-left-space { + margin-left: 0.3125em; + } + html.no-flexbox .small-quarter-left-space, + html.no-flexboxlegacy .small-quarter-left-space { + margin-left: 0.3125em; + } + html.no-flexbox .quarter-left-padding, + html.no-flexboxlegacy .quarter-left-padding { + padding-left: 0.3125em; + } + html.no-flexbox .small-quarter-left-padding, + html.no-flexboxlegacy .small-quarter-left-padding { + padding-left: 0.3125em; + } + html.no-flexbox .hide-small, + html.no-flexboxlegacy .hide-small { + display: none !important; + } + html.no-flexbox .show-small, + html.no-flexboxlegacy .show-small { + display: inherit !important; + } + html.no-flexbox table.show-small, + html.no-flexboxlegacy table.show-small { + display: table; + } + html.no-flexbox thead.show-small, + html.no-flexboxlegacy thead.show-small { + display: table-header-group; + } + html.no-flexbox tbody.show-small, + html.no-flexboxlegacy tbody.show-small { + display: table-row-group; + } + html.no-flexbox tfoot.show-small, + html.no-flexboxlegacy tfoot.show-small { + display: table-footer-group; + } + html.no-flexbox tr.show-small, + html.no-flexboxlegacy tr.show-small { + display: table-row; + } + html.no-flexbox th.show-small, + html.no-flexbox td.show-small, + html.no-flexboxlegacy th.show-small, + html.no-flexboxlegacy td.show-small { + display: table-cell; + } +} +@media screen and (max-width: 320px) { + html.no-flexbox .ink-grid, + html.no-flexboxlegacy .ink-grid { + padding: 0 1em; + } + html.no-flexbox .column-group > [class*=tiny-], + html.no-flexboxlegacy .column-group > [class*=tiny-] { + float: left; + clear: none; + } + html.no-flexbox .tiny-5, + html.no-flexboxlegacy .tiny-5 { + width: 5%; + } + html.no-flexbox .tiny-10, + html.no-flexboxlegacy .tiny-10 { + width: 10%; + } + html.no-flexbox .tiny-15, + html.no-flexboxlegacy .tiny-15 { + width: 15%; + } + html.no-flexbox .tiny-20, + html.no-flexboxlegacy .tiny-20 { + width: 20%; + } + html.no-flexbox .tiny-25, + html.no-flexboxlegacy .tiny-25 { + width: 25%; + } + html.no-flexbox .tiny-30, + html.no-flexboxlegacy .tiny-30 { + width: 30%; + } + html.no-flexbox .tiny-33, + html.no-flexboxlegacy .tiny-33 { + width: 33.33%; + } + html.no-flexbox .tiny-35, + html.no-flexboxlegacy .tiny-35 { + width: 35%; + } + html.no-flexbox .tiny-40, + html.no-flexboxlegacy .tiny-40 { + width: 40%; + } + html.no-flexbox .tiny-45, + html.no-flexboxlegacy .tiny-45 { + width: 45%; + } + html.no-flexbox .tiny-50, + html.no-flexboxlegacy .tiny-50 { + width: 50%; + } + html.no-flexbox .tiny-55, + html.no-flexboxlegacy .tiny-55 { + width: 55%; + } + html.no-flexbox .tiny-60, + html.no-flexboxlegacy .tiny-60 { + width: 60%; + } + html.no-flexbox .tiny-65, + html.no-flexboxlegacy .tiny-65 { + width: 65%; + } + html.no-flexbox .tiny-66, + html.no-flexboxlegacy .tiny-66 { + width: 66.66%; + } + html.no-flexbox .tiny-70, + html.no-flexboxlegacy .tiny-70 { + width: 70%; + } + html.no-flexbox .tiny-75, + html.no-flexboxlegacy .tiny-75 { + width: 75%; + } + html.no-flexbox .tiny-80, + html.no-flexboxlegacy .tiny-80 { + width: 80%; + } + html.no-flexbox .tiny-85, + html.no-flexboxlegacy .tiny-85 { + width: 85%; + } + html.no-flexbox .tiny-90, + html.no-flexboxlegacy .tiny-90 { + width: 90%; + } + html.no-flexbox .tiny-95, + html.no-flexboxlegacy .tiny-95 { + width: 95%; + } + html.no-flexbox .tiny-100, + html.no-flexboxlegacy .tiny-100 { + width: 100%; + } + html.no-flexbox [class*=tiny-100], + html.no-flexboxlegacy [class*=tiny-100] { + float: none; + clear: both; + } + html.no-flexbox .column-group, + html.no-flexboxlegacy .column-group { + *zoom: 1; + } + html.no-flexbox .column-group:after, + html.no-flexboxlegacy .column-group:after { + content: ""; + display: table; + clear: both; + } + html.no-flexbox .column-group.gutters, + html.no-flexboxlegacy .column-group.gutters { + margin-left: -1em; + } + html.no-flexbox .column-group.gutters > [class*=tiny-], html.no-flexbox .column-group.gutters > [class*=all-], + html.no-flexboxlegacy .column-group.gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.gutters > [class*=all-] { + padding-left: 1em; + margin-bottom: 1em; + } + html.no-flexbox .column-group.horizontal-gutters, + html.no-flexboxlegacy .column-group.horizontal-gutters { + margin-left: -1em; + } + html.no-flexbox .column-group.horizontal-gutters > [class*=tiny-], html.no-flexbox .column-group.horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.horizontal-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.horizontal-gutters > [class*=all-] { + padding-left: 1em; + } + html.no-flexbox .column-group.vertical-gutters > [class*=tiny-], html.no-flexbox .column-group.vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.vertical-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.vertical-gutters > [class*=all-] { + margin-bottom: 1em; + } + html.no-flexbox .column-group.double-gutters, + html.no-flexboxlegacy .column-group.double-gutters { + margin-left: -2em; + } + html.no-flexbox .column-group.double-gutters > [class*=tiny-], html.no-flexbox .column-group.double-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.double-gutters > [class*=all-] { + padding-left: 2em; + margin-bottom: 2em; + } + html.no-flexbox .column-group.double-horizontal-gutters, + html.no-flexboxlegacy .column-group.double-horizontal-gutters { + margin-left: -2em; + } + html.no-flexbox .column-group.double-horizontal-gutters > [class*=tiny-], html.no-flexbox .column-group.double-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-horizontal-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.double-horizontal-gutters > [class*=all-] { + padding-left: 2em; + } + html.no-flexbox .column-group.double-vertical-gutters > [class*=tiny-], html.no-flexbox .column-group.double-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.double-vertical-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.double-vertical-gutters > [class*=all-] { + margin-bottom: 2em; + } + html.no-flexbox .column-group.half-gutters, + html.no-flexboxlegacy .column-group.half-gutters { + margin-left: -0.5em; + } + html.no-flexbox .column-group.half-gutters > [class*=tiny-], html.no-flexbox .column-group.half-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.half-gutters > [class*=all-] { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + html.no-flexbox .column-group.half-horizontal-gutters, + html.no-flexboxlegacy .column-group.half-horizontal-gutters { + margin-left: -0.5em; + } + html.no-flexbox .column-group.half-horizontal-gutters > [class*=tiny-], html.no-flexbox .column-group.half-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-horizontal-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.half-horizontal-gutters > [class*=all-] { + padding-left: 0.5em; + } + html.no-flexbox .column-group.half-vertical-gutters > [class*=tiny-], html.no-flexbox .column-group.half-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.half-vertical-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.half-vertical-gutters > [class*=all-] { + margin-bottom: 0.5em; + } + html.no-flexbox .column-group.quarter-gutters, + html.no-flexboxlegacy .column-group.quarter-gutters { + margin-left: -0.25em; + } + html.no-flexbox .column-group.quarter-gutters > [class*=tiny-], html.no-flexbox .column-group.quarter-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.quarter-gutters > [class*=all-] { + padding-left: 0.25em; + margin-bottom: 0.25em; + } + html.no-flexbox .column-group.quarter-horizontal-gutters, + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters { + margin-left: -0.25em; + } + html.no-flexbox .column-group.quarter-horizontal-gutters > [class*=tiny-], html.no-flexbox .column-group.quarter-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.25em; + } + html.no-flexbox .column-group.quarter-vertical-gutters > [class*=tiny-], html.no-flexbox .column-group.quarter-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.quarter-vertical-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.25em; + } + html.no-flexbox .column-group.tiny-gutters, + html.no-flexboxlegacy .column-group.tiny-gutters { + margin-left: -1em; + } + html.no-flexbox .column-group.tiny-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-gutters > [class*=all-] { + padding-left: 0.25em; + margin-bottom: 0.25em; + } + html.no-flexbox .column-group.tiny-horizontal-gutters, + html.no-flexboxlegacy .column-group.tiny-horizontal-gutters { + margin-left: -1em; + } + html.no-flexbox .column-group.tiny-horizontal-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-horizontal-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-horizontal-gutters > [class*=all-] { + padding-left: 1em; + } + html.no-flexbox .column-group.tiny-vertical-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-vertical-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-vertical-gutters > [class*=all-] { + margin-bottom: 1em; + } + html.no-flexbox .column-group.tiny-double-gutters, + html.no-flexboxlegacy .column-group.tiny-double-gutters { + margin-left: -2em; + } + html.no-flexbox .column-group.tiny-double-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-double-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-double-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-double-gutters > [class*=all-] { + padding-left: 2em; + margin-bottom: 2em; + } + html.no-flexbox .column-group.tiny-double-horizontal-gutters, + html.no-flexboxlegacy .column-group.tiny-double-horizontal-gutters { + margin-left: -2em; + } + html.no-flexbox .column-group.tiny-double-horizontal-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-double-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-double-horizontal-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-double-horizontal-gutters > [class*=all-] { + padding-left: 2em; + } + html.no-flexbox .column-group.tiny-double-vertical-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-double-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-double-vertical-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-double-vertical-gutters > [class*=all-] { + margin-bottom: 2em; + } + html.no-flexbox .column-group.tiny-half-gutters, + html.no-flexboxlegacy .column-group.tiny-half-gutters { + margin-left: -0.5em; + } + html.no-flexbox .column-group.tiny-half-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-half-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-half-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-half-gutters > [class*=all-] { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + html.no-flexbox .column-group.tiny-half-horizontal-gutters, + html.no-flexboxlegacy .column-group.tiny-half-horizontal-gutters { + margin-left: -0.5em; + } + html.no-flexbox .column-group.tiny-half-horizontal-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-half-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-half-horizontal-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-half-horizontal-gutters > [class*=all-] { + padding-left: 0.5em; + } + html.no-flexbox .column-group.tiny-half-vertical-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-half-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-half-vertical-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-half-vertical-gutters > [class*=all-] { + margin-bottom: 0.5em; + } + html.no-flexbox .column-group.tiny-quarter-gutters, + html.no-flexboxlegacy .column-group.tiny-quarter-gutters { + margin-left: -0.25em; + } + html.no-flexbox .column-group.tiny-quarter-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-quarter-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-quarter-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-quarter-gutters > [class*=all-] { + padding-left: 0.25em; + margin-bottom: 0.25em; + } + html.no-flexbox .column-group.tiny-quarter-horizontal-gutters, + html.no-flexboxlegacy .column-group.tiny-quarter-horizontal-gutters { + margin-left: -0.25em; + } + html.no-flexbox .column-group.tiny-quarter-horizontal-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-quarter-horizontal-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-quarter-horizontal-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.25em; + } + html.no-flexbox .column-group.tiny-quarter-vertical-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-quarter-vertical-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-quarter-vertical-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.25em; + } + html.no-flexbox .column-group.tiny-no-gutters, + html.no-flexboxlegacy .column-group.tiny-no-gutters { + margin-left: 0; + } + html.no-flexbox .column-group.tiny-no-gutters > [class*=tiny-], html.no-flexbox .column-group.tiny-no-gutters > [class*=all-], + html.no-flexboxlegacy .column-group.tiny-no-gutters > [class*=tiny-], + html.no-flexboxlegacy .column-group.tiny-no-gutters > [class*=all-] { + padding-left: 0; + margin-bottom: 0; + } + html.no-flexbox .ink-table td[class*=tiny-], html.no-flexbox .ink-table th[class*=tiny-], html.no-flexbox .ink-table tr[class*=tiny-], html.no-flexbox .ink-table thead[class*=tiny-], html.no-flexbox .ink-table tbody[class*=tiny-], html.no-flexbox .ink-table tfoot[class*=tiny-], + html.no-flexboxlegacy .ink-table td[class*=tiny-], + html.no-flexboxlegacy .ink-table th[class*=tiny-], + html.no-flexboxlegacy .ink-table tr[class*=tiny-], + html.no-flexboxlegacy .ink-table thead[class*=tiny-], + html.no-flexboxlegacy .ink-table tbody[class*=tiny-], + html.no-flexboxlegacy .ink-table tfoot[class*=tiny-] { + float: none; + } + html.no-flexbox .tiny-push-left, + html.no-flexboxlegacy .tiny-push-left { + float: left; + } + html.no-flexbox .tiny-push-center, + html.no-flexboxlegacy .tiny-push-center { + float: none; + margin-left: auto; + margin-right: auto; + } + html.no-flexbox .tiny-push-right, + html.no-flexboxlegacy .tiny-push-right { + float: right; + } + html.no-flexbox .tiny-align-left, + html.no-flexboxlegacy .tiny-align-left { + text-align: left; + } + html.no-flexbox .tiny-align-center, + html.no-flexboxlegacy .tiny-align-center { + text-align: center; + } + html.no-flexbox .tiny-align-right, + html.no-flexboxlegacy .tiny-align-right { + text-align: right; + } + html.no-flexbox .tiny-no-margin, + html.no-flexboxlegacy .tiny-no-margin { + margin: 0 !important; + } + html.no-flexbox .space, + html.no-flexboxlegacy .space { + margin: 1em; + } + html.no-flexbox .tiny-space, + html.no-flexboxlegacy .tiny-space { + margin: 1em; + } + html.no-flexbox .padding, + html.no-flexboxlegacy .padding { + padding: 1em; + } + html.no-flexbox .tiny-padding, + html.no-flexboxlegacy .tiny-padding { + padding: 1em; + } + html.no-flexbox .double-space, + html.no-flexboxlegacy .double-space { + margin: 2em; + } + html.no-flexbox .tiny-double-space, + html.no-flexboxlegacy .tiny-double-space { + margin: 2em; + } + html.no-flexbox .double-padding, + html.no-flexboxlegacy .double-padding { + padding: 2em; + } + html.no-flexbox .tiny-double-padding, + html.no-flexboxlegacy .tiny-double-padding { + padding: 2em; + } + html.no-flexbox .half-space, + html.no-flexboxlegacy .half-space { + margin: 0.5em; + } + html.no-flexbox .tiny-half-space, + html.no-flexboxlegacy .tiny-half-space { + margin: 0.5em; + } + html.no-flexbox .half-padding, + html.no-flexboxlegacy .half-padding { + padding: 0.5em; + } + html.no-flexbox .tiny-half-padding, + html.no-flexboxlegacy .tiny-half-padding { + padding: 0.5em; + } + html.no-flexbox .quarter-space, + html.no-flexboxlegacy .quarter-space { + margin: 0.25em; + } + html.no-flexbox .tiny-quarter-space, + html.no-flexboxlegacy .tiny-quarter-space { + margin: 0.25em; + } + html.no-flexbox .quarter-padding, + html.no-flexboxlegacy .quarter-padding { + padding: 0.25em; + } + html.no-flexbox .tiny-quarter-padding, + html.no-flexboxlegacy .tiny-quarter-padding { + padding: 0.25em; + } + html.no-flexbox .vertical-space, + html.no-flexboxlegacy .vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + html.no-flexbox .tiny-vertical-space, + html.no-flexboxlegacy .tiny-vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + html.no-flexbox .vertical-padding, + html.no-flexboxlegacy .vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + html.no-flexbox .tiny-vertical-padding, + html.no-flexboxlegacy .tiny-vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + html.no-flexbox .double-vertical-space, + html.no-flexboxlegacy .double-vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + html.no-flexbox .tiny-double-vertical-space, + html.no-flexboxlegacy .tiny-double-vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + html.no-flexbox .double-vertical-padding, + html.no-flexboxlegacy .double-vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + html.no-flexbox .tiny-double-vertical-padding, + html.no-flexboxlegacy .tiny-double-vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + html.no-flexbox .half-vertical-space, + html.no-flexboxlegacy .half-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + html.no-flexbox .tiny-half-vertical-space, + html.no-flexboxlegacy .tiny-half-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + html.no-flexbox .half-vertical-padding, + html.no-flexboxlegacy .half-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + html.no-flexbox .tiny-half-vertical-padding, + html.no-flexboxlegacy .tiny-half-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + html.no-flexbox .quarter-vertical-space, + html.no-flexboxlegacy .quarter-vertical-space { + margin-top: 0.25em; + margin-bottom: 0.25em; + } + html.no-flexbox .tiny-quarter-vertical-space, + html.no-flexboxlegacy .tiny-quarter-vertical-space { + margin-top: 0.25em; + margin-bottom: 0.25em; + } + html.no-flexbox .quarter-vertical-padding, + html.no-flexboxlegacy .quarter-vertical-padding { + padding-top: 0.25em; + padding-bottom: 0.25em; + } + html.no-flexbox .tiny-quarter-vertical-padding, + html.no-flexboxlegacy .tiny-quarter-vertical-padding { + padding-top: 0.25em; + padding-bottom: 0.25em; + } + html.no-flexbox .horizontal-space, + html.no-flexboxlegacy .horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + html.no-flexbox .tiny-horizontal-space, + html.no-flexboxlegacy .tiny-horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + html.no-flexbox .horizontal-padding, + html.no-flexboxlegacy .horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + html.no-flexbox .tiny-horizontal-padding, + html.no-flexboxlegacy .tiny-horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + html.no-flexbox .double-horizontal-space, + html.no-flexboxlegacy .double-horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + html.no-flexbox .tiny-double-horizontal-space, + html.no-flexboxlegacy .tiny-double-horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + html.no-flexbox .double-horizontal-padding, + html.no-flexboxlegacy .double-horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + html.no-flexbox .tiny-double-horizontal-padding, + html.no-flexboxlegacy .tiny-double-horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + html.no-flexbox .half-horizontal-space, + html.no-flexboxlegacy .half-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + html.no-flexbox .tiny-half-horizontal-space, + html.no-flexboxlegacy .tiny-half-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + html.no-flexbox .half-horizontal-padding, + html.no-flexboxlegacy .half-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + html.no-flexbox .tiny-half-horizontal-padding, + html.no-flexboxlegacy .tiny-half-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + html.no-flexbox .quarter-horizontal-space, + html.no-flexboxlegacy .quarter-horizontal-space { + margin-left: 0.25em; + margin-right: 0.25em; + } + html.no-flexbox .tiny-quarter-horizontal-space, + html.no-flexboxlegacy .tiny-quarter-horizontal-space { + margin-left: 0.25em; + margin-right: 0.25em; + } + html.no-flexbox .quarter-horizontal-padding, + html.no-flexboxlegacy .quarter-horizontal-padding { + padding-left: 0.25em; + padding-right: 0.25em; + } + html.no-flexbox .tiny-quarter-horizontal-padding, + html.no-flexboxlegacy .tiny-quarter-horizontal-padding { + padding-left: 0.25em; + padding-right: 0.25em; + } + html.no-flexbox .top-space, + html.no-flexboxlegacy .top-space { + margin-top: 1em; + } + html.no-flexbox .tiny-top-space, + html.no-flexboxlegacy .tiny-top-space { + margin-top: 1em; + } + html.no-flexbox .top-padding, + html.no-flexboxlegacy .top-padding { + padding-top: 1em; + } + html.no-flexbox .tiny-top-padding, + html.no-flexboxlegacy .tiny-top-padding { + padding-top: 1em; + } + html.no-flexbox .double-top-space, + html.no-flexboxlegacy .double-top-space { + margin-top: 2em; + } + html.no-flexbox .tiny-double-top-space, + html.no-flexboxlegacy .tiny-double-top-space { + margin-top: 2em; + } + html.no-flexbox .double-top-padding, + html.no-flexboxlegacy .double-top-padding { + padding-top: 2em; + } + html.no-flexbox .tiny-double-top-padding, + html.no-flexboxlegacy .tiny-double-top-padding { + padding-top: 2em; + } + html.no-flexbox .half-top-space, + html.no-flexboxlegacy .half-top-space { + margin-top: 0.5em; + } + html.no-flexbox .tiny-half-top-space, + html.no-flexboxlegacy .tiny-half-top-space { + margin-top: 0.5em; + } + html.no-flexbox .half-top-padding, + html.no-flexboxlegacy .half-top-padding { + padding-top: 0.5em; + } + html.no-flexbox .tiny-half-top-padding, + html.no-flexboxlegacy .tiny-half-top-padding { + padding-top: 0.5em; + } + html.no-flexbox .quarter-top-space, + html.no-flexboxlegacy .quarter-top-space { + margin-top: 0.25em; + } + html.no-flexbox .tiny-quarter-top-space, + html.no-flexboxlegacy .tiny-quarter-top-space { + margin-top: 0.25em; + } + html.no-flexbox .quarter-top-padding, + html.no-flexboxlegacy .quarter-top-padding { + padding-top: 0.25em; + } + html.no-flexbox .tiny-quarter-top-padding, + html.no-flexboxlegacy .tiny-quarter-top-padding { + padding-top: 0.25em; + } + html.no-flexbox .right-space, + html.no-flexboxlegacy .right-space { + margin-right: 1em; + } + html.no-flexbox .tiny-right-space, + html.no-flexboxlegacy .tiny-right-space { + margin-right: 1em; + } + html.no-flexbox .right-padding, + html.no-flexboxlegacy .right-padding { + padding-right: 1em; + } + html.no-flexbox .tiny-right-padding, + html.no-flexboxlegacy .tiny-right-padding { + padding-right: 1em; + } + html.no-flexbox .double-right-space, + html.no-flexboxlegacy .double-right-space { + margin-right: 2em; + } + html.no-flexbox .tiny-double-right-space, + html.no-flexboxlegacy .tiny-double-right-space { + margin-right: 2em; + } + html.no-flexbox .double-right-padding, + html.no-flexboxlegacy .double-right-padding { + padding-right: 2em; + } + html.no-flexbox .tiny-double-right-padding, + html.no-flexboxlegacy .tiny-double-right-padding { + padding-right: 2em; + } + html.no-flexbox .half-right-space, + html.no-flexboxlegacy .half-right-space { + margin-right: 0.5em; + } + html.no-flexbox .tiny-half-right-space, + html.no-flexboxlegacy .tiny-half-right-space { + margin-right: 0.5em; + } + html.no-flexbox .half-right-padding, + html.no-flexboxlegacy .half-right-padding { + padding-right: 0.5em; + } + html.no-flexbox .tiny-half-right-padding, + html.no-flexboxlegacy .tiny-half-right-padding { + padding-right: 0.5em; + } + html.no-flexbox .quarter-right-space, + html.no-flexboxlegacy .quarter-right-space { + margin-right: 0.25em; + } + html.no-flexbox .tiny-quarter-right-space, + html.no-flexboxlegacy .tiny-quarter-right-space { + margin-right: 0.25em; + } + html.no-flexbox .quarter-right-padding, + html.no-flexboxlegacy .quarter-right-padding { + padding-right: 0.25em; + } + html.no-flexbox .tiny-quarter-right-padding, + html.no-flexboxlegacy .tiny-quarter-right-padding { + padding-right: 0.25em; + } + html.no-flexbox .bottom-space, + html.no-flexboxlegacy .bottom-space { + margin-bottom: 1em; + } + html.no-flexbox .tiny-bottom-space, + html.no-flexboxlegacy .tiny-bottom-space { + margin-bottom: 1em; + } + html.no-flexbox .bottom-padding, + html.no-flexboxlegacy .bottom-padding { + padding-bottom: 1em; + } + html.no-flexbox .tiny-bottom-padding, + html.no-flexboxlegacy .tiny-bottom-padding { + padding-bottom: 1em; + } + html.no-flexbox .double-bottom-space, + html.no-flexboxlegacy .double-bottom-space { + margin-bottom: 2em; + } + html.no-flexbox .tiny-double-bottom-space, + html.no-flexboxlegacy .tiny-double-bottom-space { + margin-bottom: 2em; + } + html.no-flexbox .double-bottom-padding, + html.no-flexboxlegacy .double-bottom-padding { + padding-bottom: 2em; + } + html.no-flexbox .tiny-double-bottom-padding, + html.no-flexboxlegacy .tiny-double-bottom-padding { + padding-bottom: 2em; + } + html.no-flexbox .half-bottom-space, + html.no-flexboxlegacy .half-bottom-space { + margin-bottom: 0.5em; + } + html.no-flexbox .tiny-half-bottom-space, + html.no-flexboxlegacy .tiny-half-bottom-space { + margin-bottom: 0.5em; + } + html.no-flexbox .half-bottom-padding, + html.no-flexboxlegacy .half-bottom-padding { + padding-bottom: 0.5em; + } + html.no-flexbox .tiny-half-bottom-padding, + html.no-flexboxlegacy .tiny-half-bottom-padding { + padding-bottom: 0.5em; + } + html.no-flexbox .quarter-bottom-space, + html.no-flexboxlegacy .quarter-bottom-space { + margin-bottom: 0.25em; + } + html.no-flexbox .tiny-quarter-bottom-space, + html.no-flexboxlegacy .tiny-quarter-bottom-space { + margin-bottom: 0.25em; + } + html.no-flexbox .quarter-bottom-padding, + html.no-flexboxlegacy .quarter-bottom-padding { + padding-bottom: 0.25em; + } + html.no-flexbox .tiny-quarter-bottom-padding, + html.no-flexboxlegacy .tiny-quarter-bottom-padding { + padding-bottom: 0.25em; + } + html.no-flexbox .left-space, + html.no-flexboxlegacy .left-space { + margin-left: 1em; + } + html.no-flexbox .tiny-left-space, + html.no-flexboxlegacy .tiny-left-space { + margin-left: 1em; + } + html.no-flexbox .left-padding, + html.no-flexboxlegacy .left-padding { + padding-left: 1em; + } + html.no-flexbox .tiny-left-padding, + html.no-flexboxlegacy .tiny-left-padding { + padding-left: 1em; + } + html.no-flexbox .double-left-space, + html.no-flexboxlegacy .double-left-space { + margin-left: 2em; + } + html.no-flexbox .tiny-double-left-space, + html.no-flexboxlegacy .tiny-double-left-space { + margin-left: 2em; + } + html.no-flexbox .double-left-padding, + html.no-flexboxlegacy .double-left-padding { + padding-left: 2em; + } + html.no-flexbox .tiny-double-left-padding, + html.no-flexboxlegacy .tiny-double-left-padding { + padding-left: 2em; + } + html.no-flexbox .half-left-space, + html.no-flexboxlegacy .half-left-space { + margin-left: 0.5em; + } + html.no-flexbox .tiny-half-left-space, + html.no-flexboxlegacy .tiny-half-left-space { + margin-left: 0.5em; + } + html.no-flexbox .half-left-padding, + html.no-flexboxlegacy .half-left-padding { + padding-left: 0.5em; + } + html.no-flexbox .tiny-half-left-padding, + html.no-flexboxlegacy .tiny-half-left-padding { + padding-left: 0.5em; + } + html.no-flexbox .quarter-left-space, + html.no-flexboxlegacy .quarter-left-space { + margin-left: 0.25em; + } + html.no-flexbox .tiny-quarter-left-space, + html.no-flexboxlegacy .tiny-quarter-left-space { + margin-left: 0.25em; + } + html.no-flexbox .quarter-left-padding, + html.no-flexboxlegacy .quarter-left-padding { + padding-left: 0.25em; + } + html.no-flexbox .tiny-quarter-left-padding, + html.no-flexboxlegacy .tiny-quarter-left-padding { + padding-left: 0.25em; + } + html.no-flexbox .hide-tiny, + html.no-flexboxlegacy .hide-tiny { + display: none !important; + } + html.no-flexbox .show-tiny, + html.no-flexboxlegacy .show-tiny { + display: inherit !important; + } + html.no-flexbox table.show-tiny, + html.no-flexboxlegacy table.show-tiny { + display: table; + } + html.no-flexbox thead.show-tiny, + html.no-flexboxlegacy thead.show-tiny { + display: table-header-group; + } + html.no-flexbox tbody.show-tiny, + html.no-flexboxlegacy tbody.show-tiny { + display: table-row-group; + } + html.no-flexbox tfoot.show-tiny, + html.no-flexboxlegacy tfoot.show-tiny { + display: table-footer-group; + } + html.no-flexbox tr.show-tiny, + html.no-flexboxlegacy tr.show-tiny { + display: table-row; + } + html.no-flexbox th.show-tiny, + html.no-flexbox td.show-tiny, + html.no-flexboxlegacy th.show-tiny, + html.no-flexboxlegacy td.show-tiny { + display: table-cell; + } +} +@media screen and (min-width: 1261px) { + html.no-flexbox html, + html.no-flexboxlegacy html { + font-size: 1.08em; + } + html.no-flexbox html:after, + html.no-flexboxlegacy html:after { + font-family: '{"name":"xlarge",{"min":"1261px","max":""}}'; + } +} +@media screen and (min-width: 961px) and (max-width: 1260px) { + html.no-flexbox html, + html.no-flexboxlegacy html { + font-size: 1.05em; + } + html.no-flexbox html:after, + html.no-flexboxlegacy html:after { + font-family: '{"name":"large",{"min":"961px","max":"1260px"}}'; + } +} +@media screen and (min-width: 641px) and (max-width: 960px) { + html.no-flexbox html, + html.no-flexboxlegacy html { + font-size: 1em; + } + html.no-flexbox html:after, + html.no-flexboxlegacy html:after { + font-family: '{"name":"medium",{"min":"641px","max":"960px"}}'; + } +} +@media screen and (min-width: 321px) and (max-width: 640px) { + html.no-flexbox html, + html.no-flexboxlegacy html { + font-size: 0.98em; + } + html.no-flexbox html:after, + html.no-flexboxlegacy html:after { + font-family: '{"name":"small",{"min":"321px","max":"640px"}}'; + } +} +@media screen and (max-width: 320px) { + html.no-flexbox html, + html.no-flexboxlegacy html { + font-size: 0.97em; + } + html.no-flexbox html:after, + html.no-flexboxlegacy html:after { + font-family: '{"name":"tiny",{"min":"","max":"320px"}}'; + } +} +html.no-flexbox .ink-carousel, +html.no-flexboxlegacy .ink-carousel { + width: 100%; + position: relative; + overflow: hidden; + display: block; +} +html.no-flexbox .ink-carousel .stage, +html.no-flexboxlegacy .ink-carousel .stage { + left: 0; + height: auto !important; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; + list-style-type: none; + white-space: nowrap; + position: relative; + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; +} +html.no-flexbox .ink-carousel .stage .slide, +html.no-flexboxlegacy .ink-carousel .stage .slide { + position: relative; + display: inline-block; + vertical-align: top; + white-space: normal; + margin: 0; + float: none; + zoom: 1; + *display: inline; +} diff --git a/ajax/libs/ink/3.0.0/css/ink-legacy.min.css b/ajax/libs/ink/3.0.0/css/ink-legacy.min.css new file mode 100644 index 000000000..34c8a89d3 --- /dev/null +++ b/ajax/libs/ink/3.0.0/css/ink-legacy.min.css @@ -0,0 +1 @@ +.show-all{display:inherit}.hide-all{display:none!important}.no-margin{margin:0!important}.no-padding{padding:0!important}.push-left{float:left}.push-center{float:none!important;margin-left:auto;margin-right:auto}.push-right{float:right;-webkit-justify-content:flex-end;-moz-justify-content:flex-end;justify-content:flex-end}.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}.clearfix{overflow:hidden;*zoom:1}.clearfix:after{content:"";display:table;clear:both}html.no-flexbox .ink-grid,html.no-flexboxlegacy .ink-grid{width:auto;max-width:1440px;margin:0 auto}html.no-flexbox .all-5,html.no-flexboxlegacy .all-5{width:5%;float:left;clear:none}html.no-flexbox .all-10,html.no-flexboxlegacy .all-10{width:10%;float:left;clear:none}html.no-flexbox .all-15,html.no-flexboxlegacy .all-15{width:15%;float:left;clear:none}html.no-flexbox .all-20,html.no-flexboxlegacy .all-20{width:20%;float:left;clear:none}html.no-flexbox .all-25,html.no-flexboxlegacy .all-25{width:25%;float:left;clear:none}html.no-flexbox .all-30,html.no-flexboxlegacy .all-30{width:30%;float:left;clear:none}html.no-flexbox .all-33,html.no-flexboxlegacy .all-33{width:33.33%;float:left;clear:none}html.no-flexbox .all-35,html.no-flexboxlegacy .all-35{width:35%;float:left;clear:none}html.no-flexbox .all-40,html.no-flexboxlegacy .all-40{width:40%;float:left;clear:none}html.no-flexbox .all-45,html.no-flexboxlegacy .all-45{width:45%;float:left;clear:none}html.no-flexbox .all-50,html.no-flexboxlegacy .all-50{width:50%;float:left;clear:none}html.no-flexbox .all-55,html.no-flexboxlegacy .all-55{width:55%;float:left;clear:none}html.no-flexbox .all-60,html.no-flexboxlegacy .all-60{width:60%;float:left;clear:none}html.no-flexbox .all-65,html.no-flexboxlegacy .all-65{width:65%;float:left;clear:none}html.no-flexbox .all-66,html.no-flexboxlegacy .all-66{width:66.66%;float:left;clear:none}html.no-flexbox .all-70,html.no-flexboxlegacy .all-70{width:70%;float:left;clear:none}html.no-flexbox .all-75,html.no-flexboxlegacy .all-75{width:75%;float:left;clear:none}html.no-flexbox .all-80,html.no-flexboxlegacy .all-80{width:80%;float:left;clear:none}html.no-flexbox .all-85,html.no-flexboxlegacy .all-85{width:85%;float:left;clear:none}html.no-flexbox .all-90,html.no-flexboxlegacy .all-90{width:90%;float:left;clear:none}html.no-flexbox .all-95,html.no-flexboxlegacy .all-95{width:95%;float:left;clear:none}html.no-flexbox .all-100,html.no-flexboxlegacy .all-100{width:100%;float:left;clear:none}html.no-flexbox [class~=all-100],html.no-flexboxlegacy [class~=all-100]{float:none;clear:both}@media screen and (min-width:1261px){html.no-flexbox .ink-grid,html.no-flexboxlegacy .ink-grid{padding:0 2em}html.no-flexbox .column-group>[class*=xlarge-],html.no-flexboxlegacy .column-group>[class*=xlarge-]{float:left;clear:none}html.no-flexbox .xlarge-5,html.no-flexboxlegacy .xlarge-5{width:5%}html.no-flexbox .xlarge-10,html.no-flexboxlegacy .xlarge-10{width:10%}html.no-flexbox .xlarge-15,html.no-flexboxlegacy .xlarge-15{width:15%}html.no-flexbox .xlarge-20,html.no-flexboxlegacy .xlarge-20{width:20%}html.no-flexbox .xlarge-25,html.no-flexboxlegacy .xlarge-25{width:25%}html.no-flexbox .xlarge-30,html.no-flexboxlegacy .xlarge-30{width:30%}html.no-flexbox .xlarge-33,html.no-flexboxlegacy .xlarge-33{width:33.33%}html.no-flexbox .xlarge-35,html.no-flexboxlegacy .xlarge-35{width:35%}html.no-flexbox .xlarge-40,html.no-flexboxlegacy .xlarge-40{width:40%}html.no-flexbox .xlarge-45,html.no-flexboxlegacy .xlarge-45{width:45%}html.no-flexbox .xlarge-50,html.no-flexboxlegacy .xlarge-50{width:50%}html.no-flexbox .xlarge-55,html.no-flexboxlegacy .xlarge-55{width:55%}html.no-flexbox .xlarge-60,html.no-flexboxlegacy .xlarge-60{width:60%}html.no-flexbox .xlarge-65,html.no-flexboxlegacy .xlarge-65{width:65%}html.no-flexbox .xlarge-66,html.no-flexboxlegacy .xlarge-66{width:66.66%}html.no-flexbox .xlarge-70,html.no-flexboxlegacy .xlarge-70{width:70%}html.no-flexbox .xlarge-75,html.no-flexboxlegacy .xlarge-75{width:75%}html.no-flexbox .xlarge-80,html.no-flexboxlegacy .xlarge-80{width:80%}html.no-flexbox .xlarge-85,html.no-flexboxlegacy .xlarge-85{width:85%}html.no-flexbox .xlarge-90,html.no-flexboxlegacy .xlarge-90{width:90%}html.no-flexbox .xlarge-95,html.no-flexboxlegacy .xlarge-95{width:95%}html.no-flexbox .xlarge-100,html.no-flexboxlegacy .xlarge-100{width:100%}html.no-flexbox [class*=xlarge-100],html.no-flexboxlegacy [class*=xlarge-100]{float:none;clear:both}html.no-flexbox .column-group,html.no-flexboxlegacy .column-group{*zoom:1}html.no-flexbox .column-group:after,html.no-flexboxlegacy .column-group:after{content:"";display:table;clear:both}html.no-flexbox .column-group.gutters,html.no-flexboxlegacy .column-group.gutters{margin-left:-2em}html.no-flexbox .column-group.gutters>[class*=all-],html.no-flexbox .column-group.gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.gutters>[class*=all-],html.no-flexboxlegacy .column-group.gutters>[class*=xlarge-]{padding-left:2em;margin-bottom:2em}html.no-flexbox .column-group.horizontal-gutters,html.no-flexboxlegacy .column-group.horizontal-gutters{margin-left:-2em}html.no-flexbox .column-group.horizontal-gutters>[class*=all-],html.no-flexbox .column-group.horizontal-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.horizontal-gutters>[class*=xlarge-]{padding-left:2em}html.no-flexbox .column-group.vertical-gutters>[class*=all-],html.no-flexbox .column-group.vertical-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.vertical-gutters>[class*=xlarge-]{margin-bottom:2em}html.no-flexbox .column-group.double-gutters,html.no-flexboxlegacy .column-group.double-gutters{margin-left:-4em}html.no-flexbox .column-group.double-gutters>[class*=all-],html.no-flexbox .column-group.double-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.double-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-gutters>[class*=xlarge-]{padding-left:4em;margin-bottom:4em}html.no-flexbox .column-group.double-horizontal-gutters,html.no-flexboxlegacy .column-group.double-horizontal-gutters{margin-left:-4em}html.no-flexbox .column-group.double-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.double-horizontal-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.double-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-horizontal-gutters>[class*=xlarge-]{padding-left:4em}html.no-flexbox .column-group.double-vertical-gutters>[class*=all-],html.no-flexbox .column-group.double-vertical-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.double-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-vertical-gutters>[class*=xlarge-]{margin-bottom:4em}html.no-flexbox .column-group.half-gutters,html.no-flexboxlegacy .column-group.half-gutters{margin-left:-1em}html.no-flexbox .column-group.half-gutters>[class*=all-],html.no-flexbox .column-group.half-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.half-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-gutters>[class*=xlarge-]{padding-left:1em;margin-bottom:1em}html.no-flexbox .column-group.half-horizontal-gutters,html.no-flexboxlegacy .column-group.half-horizontal-gutters{margin-left:-1em}html.no-flexbox .column-group.half-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.half-horizontal-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.half-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-horizontal-gutters>[class*=xlarge-]{padding-left:1em}html.no-flexbox .column-group.half-vertical-gutters>[class*=all-],html.no-flexbox .column-group.half-vertical-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.half-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-vertical-gutters>[class*=xlarge-]{margin-bottom:1em}html.no-flexbox .column-group.quarter-gutters,html.no-flexboxlegacy .column-group.quarter-gutters{margin-left:-.5em}html.no-flexbox .column-group.quarter-gutters>[class*=all-],html.no-flexbox .column-group.quarter-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.quarter-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-gutters>[class*=xlarge-]{padding-left:.5em;margin-bottom:.5em}html.no-flexbox .column-group.quarter-horizontal-gutters,html.no-flexboxlegacy .column-group.quarter-horizontal-gutters{margin-left:-.5em}html.no-flexbox .column-group.quarter-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.quarter-horizontal-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.quarter-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-horizontal-gutters>[class*=xlarge-]{padding-left:.5em}html.no-flexbox .column-group.quarter-vertical-gutters>[class*=all-],html.no-flexbox .column-group.quarter-vertical-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.quarter-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-vertical-gutters>[class*=xlarge-]{margin-bottom:.5em}html.no-flexbox .column-group.xlarge-gutters,html.no-flexboxlegacy .column-group.xlarge-gutters{margin-left:-2em}html.no-flexbox .column-group.xlarge-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-gutters>[class*=xlarge-]{padding-left:.5em;margin-bottom:.5em}html.no-flexbox .column-group.xlarge-horizontal-gutters,html.no-flexboxlegacy .column-group.xlarge-horizontal-gutters{margin-left:-2em}html.no-flexbox .column-group.xlarge-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-horizontal-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-horizontal-gutters>[class*=xlarge-]{padding-left:2em}html.no-flexbox .column-group.xlarge-vertical-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-vertical-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-vertical-gutters>[class*=xlarge-]{margin-bottom:2em}html.no-flexbox .column-group.xlarge-double-gutters,html.no-flexboxlegacy .column-group.xlarge-double-gutters{margin-left:-4em}html.no-flexbox .column-group.xlarge-double-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-double-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-double-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-double-gutters>[class*=xlarge-]{padding-left:4em;margin-bottom:4em}html.no-flexbox .column-group.xlarge-double-horizontal-gutters,html.no-flexboxlegacy .column-group.xlarge-double-horizontal-gutters{margin-left:-4em}html.no-flexbox .column-group.xlarge-double-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-double-horizontal-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-double-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-double-horizontal-gutters>[class*=xlarge-]{padding-left:4em}html.no-flexbox .column-group.xlarge-double-vertical-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-double-vertical-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-double-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-double-vertical-gutters>[class*=xlarge-]{margin-bottom:4em}html.no-flexbox .column-group.xlarge-half-gutters,html.no-flexboxlegacy .column-group.xlarge-half-gutters{margin-left:-1em}html.no-flexbox .column-group.xlarge-half-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-half-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-half-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-half-gutters>[class*=xlarge-]{padding-left:1em;margin-bottom:1em}html.no-flexbox .column-group.xlarge-half-horizontal-gutters,html.no-flexboxlegacy .column-group.xlarge-half-horizontal-gutters{margin-left:-1em}html.no-flexbox .column-group.xlarge-half-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-half-horizontal-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-half-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-half-horizontal-gutters>[class*=xlarge-]{padding-left:1em}html.no-flexbox .column-group.xlarge-half-vertical-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-half-vertical-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-half-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-half-vertical-gutters>[class*=xlarge-]{margin-bottom:1em}html.no-flexbox .column-group.xlarge-quarter-gutters,html.no-flexboxlegacy .column-group.xlarge-quarter-gutters{margin-left:-.5em}html.no-flexbox .column-group.xlarge-quarter-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-quarter-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-quarter-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-quarter-gutters>[class*=xlarge-]{padding-left:.5em;margin-bottom:.5em}html.no-flexbox .column-group.xlarge-quarter-horizontal-gutters,html.no-flexboxlegacy .column-group.xlarge-quarter-horizontal-gutters{margin-left:-.5em}html.no-flexbox .column-group.xlarge-quarter-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-quarter-horizontal-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-quarter-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-quarter-horizontal-gutters>[class*=xlarge-]{padding-left:.5em}html.no-flexbox .column-group.xlarge-quarter-vertical-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-quarter-vertical-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-quarter-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-quarter-vertical-gutters>[class*=xlarge-]{margin-bottom:.5em}html.no-flexbox .column-group.xlarge-no-gutters,html.no-flexboxlegacy .column-group.xlarge-no-gutters{margin-left:0}html.no-flexbox .column-group.xlarge-no-gutters>[class*=all-],html.no-flexbox .column-group.xlarge-no-gutters>[class*=xlarge-],html.no-flexboxlegacy .column-group.xlarge-no-gutters>[class*=all-],html.no-flexboxlegacy .column-group.xlarge-no-gutters>[class*=xlarge-]{padding-left:0;margin-bottom:0}html.no-flexbox .ink-table tbody[class*=xlarge-],html.no-flexbox .ink-table td[class*=xlarge-],html.no-flexbox .ink-table tfoot[class*=xlarge-],html.no-flexbox .ink-table th[class*=xlarge-],html.no-flexbox .ink-table thead[class*=xlarge-],html.no-flexbox .ink-table tr[class*=xlarge-],html.no-flexboxlegacy .ink-table tbody[class*=xlarge-],html.no-flexboxlegacy .ink-table td[class*=xlarge-],html.no-flexboxlegacy .ink-table tfoot[class*=xlarge-],html.no-flexboxlegacy .ink-table th[class*=xlarge-],html.no-flexboxlegacy .ink-table thead[class*=xlarge-],html.no-flexboxlegacy .ink-table tr[class*=xlarge-]{float:none}html.no-flexbox .xlarge-push-left,html.no-flexboxlegacy .xlarge-push-left{float:left}html.no-flexbox .xlarge-push-center,html.no-flexboxlegacy .xlarge-push-center{float:none;margin-left:auto;margin-right:auto}html.no-flexbox .xlarge-push-right,html.no-flexboxlegacy .xlarge-push-right{float:right}html.no-flexbox .xlarge-align-left,html.no-flexboxlegacy .xlarge-align-left{text-align:left}html.no-flexbox .xlarge-align-center,html.no-flexboxlegacy .xlarge-align-center{text-align:center}html.no-flexbox .xlarge-align-right,html.no-flexboxlegacy .xlarge-align-right{text-align:right}html.no-flexbox .xlarge-no-margin,html.no-flexboxlegacy .xlarge-no-margin{margin:0!important}html.no-flexbox .space,html.no-flexbox .xlarge-space,html.no-flexboxlegacy .space,html.no-flexboxlegacy .xlarge-space{margin:2em}html.no-flexbox .padding,html.no-flexbox .xlarge-padding,html.no-flexboxlegacy .padding,html.no-flexboxlegacy .xlarge-padding{padding:2em}html.no-flexbox .double-space,html.no-flexbox .xlarge-double-space,html.no-flexboxlegacy .double-space,html.no-flexboxlegacy .xlarge-double-space{margin:4em}html.no-flexbox .double-padding,html.no-flexbox .xlarge-double-padding,html.no-flexboxlegacy .double-padding,html.no-flexboxlegacy .xlarge-double-padding{padding:4em}html.no-flexbox .half-space,html.no-flexbox .xlarge-half-space,html.no-flexboxlegacy .half-space,html.no-flexboxlegacy .xlarge-half-space{margin:1em}html.no-flexbox .half-padding,html.no-flexbox .xlarge-half-padding,html.no-flexboxlegacy .half-padding,html.no-flexboxlegacy .xlarge-half-padding{padding:1em}html.no-flexbox .quarter-space,html.no-flexbox .xlarge-quarter-space,html.no-flexboxlegacy .quarter-space,html.no-flexboxlegacy .xlarge-quarter-space{margin:.5em}html.no-flexbox .quarter-padding,html.no-flexbox .xlarge-quarter-padding,html.no-flexboxlegacy .quarter-padding,html.no-flexboxlegacy .xlarge-quarter-padding{padding:.5em}html.no-flexbox .vertical-space,html.no-flexbox .xlarge-vertical-space,html.no-flexboxlegacy .vertical-space,html.no-flexboxlegacy .xlarge-vertical-space{margin-top:2em;margin-bottom:2em}html.no-flexbox .vertical-padding,html.no-flexbox .xlarge-vertical-padding,html.no-flexboxlegacy .vertical-padding,html.no-flexboxlegacy .xlarge-vertical-padding{padding-top:2em;padding-bottom:2em}html.no-flexbox .double-vertical-space,html.no-flexbox .xlarge-double-vertical-space,html.no-flexboxlegacy .double-vertical-space,html.no-flexboxlegacy .xlarge-double-vertical-space{margin-top:4em;margin-bottom:4em}html.no-flexbox .double-vertical-padding,html.no-flexbox .xlarge-double-vertical-padding,html.no-flexboxlegacy .double-vertical-padding,html.no-flexboxlegacy .xlarge-double-vertical-padding{padding-top:4em;padding-bottom:4em}html.no-flexbox .half-vertical-space,html.no-flexbox .xlarge-half-vertical-space,html.no-flexboxlegacy .half-vertical-space,html.no-flexboxlegacy .xlarge-half-vertical-space{margin-top:1em;margin-bottom:1em}html.no-flexbox .half-vertical-padding,html.no-flexbox .xlarge-half-vertical-padding,html.no-flexboxlegacy .half-vertical-padding,html.no-flexboxlegacy .xlarge-half-vertical-padding{padding-top:1em;padding-bottom:1em}html.no-flexbox .quarter-vertical-space,html.no-flexbox .xlarge-quarter-vertical-space,html.no-flexboxlegacy .quarter-vertical-space,html.no-flexboxlegacy .xlarge-quarter-vertical-space{margin-top:.5em;margin-bottom:.5em}html.no-flexbox .quarter-vertical-padding,html.no-flexbox .xlarge-quarter-vertical-padding,html.no-flexboxlegacy .quarter-vertical-padding,html.no-flexboxlegacy .xlarge-quarter-vertical-padding{padding-top:.5em;padding-bottom:.5em}html.no-flexbox .horizontal-space,html.no-flexbox .xlarge-horizontal-space,html.no-flexboxlegacy .horizontal-space,html.no-flexboxlegacy .xlarge-horizontal-space{margin-left:2em;margin-right:2em}html.no-flexbox .horizontal-padding,html.no-flexbox .xlarge-horizontal-padding,html.no-flexboxlegacy .horizontal-padding,html.no-flexboxlegacy .xlarge-horizontal-padding{padding-left:2em;padding-right:2em}html.no-flexbox .double-horizontal-space,html.no-flexbox .xlarge-double-horizontal-space,html.no-flexboxlegacy .double-horizontal-space,html.no-flexboxlegacy .xlarge-double-horizontal-space{margin-left:4em;margin-right:4em}html.no-flexbox .double-horizontal-padding,html.no-flexbox .xlarge-double-horizontal-padding,html.no-flexboxlegacy .double-horizontal-padding,html.no-flexboxlegacy .xlarge-double-horizontal-padding{padding-left:4em;padding-right:4em}html.no-flexbox .half-horizontal-space,html.no-flexbox .xlarge-half-horizontal-space,html.no-flexboxlegacy .half-horizontal-space,html.no-flexboxlegacy .xlarge-half-horizontal-space{margin-left:1em;margin-right:1em}html.no-flexbox .half-horizontal-padding,html.no-flexbox .xlarge-half-horizontal-padding,html.no-flexboxlegacy .half-horizontal-padding,html.no-flexboxlegacy .xlarge-half-horizontal-padding{padding-left:1em;padding-right:1em}html.no-flexbox .quarter-horizontal-space,html.no-flexbox .xlarge-quarter-horizontal-space,html.no-flexboxlegacy .quarter-horizontal-space,html.no-flexboxlegacy .xlarge-quarter-horizontal-space{margin-left:.5em;margin-right:.5em}html.no-flexbox .quarter-horizontal-padding,html.no-flexbox .xlarge-quarter-horizontal-padding,html.no-flexboxlegacy .quarter-horizontal-padding,html.no-flexboxlegacy .xlarge-quarter-horizontal-padding{padding-left:.5em;padding-right:.5em}html.no-flexbox .top-space,html.no-flexbox .xlarge-top-space,html.no-flexboxlegacy .top-space,html.no-flexboxlegacy .xlarge-top-space{margin-top:2em}html.no-flexbox .top-padding,html.no-flexbox .xlarge-top-padding,html.no-flexboxlegacy .top-padding,html.no-flexboxlegacy .xlarge-top-padding{padding-top:2em}html.no-flexbox .double-top-space,html.no-flexbox .xlarge-double-top-space,html.no-flexboxlegacy .double-top-space,html.no-flexboxlegacy .xlarge-double-top-space{margin-top:4em}html.no-flexbox .double-top-padding,html.no-flexbox .xlarge-double-top-padding,html.no-flexboxlegacy .double-top-padding,html.no-flexboxlegacy .xlarge-double-top-padding{padding-top:4em}html.no-flexbox .half-top-space,html.no-flexbox .xlarge-half-top-space,html.no-flexboxlegacy .half-top-space,html.no-flexboxlegacy .xlarge-half-top-space{margin-top:1em}html.no-flexbox .half-top-padding,html.no-flexbox .xlarge-half-top-padding,html.no-flexboxlegacy .half-top-padding,html.no-flexboxlegacy .xlarge-half-top-padding{padding-top:1em}html.no-flexbox .quarter-top-space,html.no-flexbox .xlarge-quarter-top-space,html.no-flexboxlegacy .quarter-top-space,html.no-flexboxlegacy .xlarge-quarter-top-space{margin-top:.5em}html.no-flexbox .quarter-top-padding,html.no-flexbox .xlarge-quarter-top-padding,html.no-flexboxlegacy .quarter-top-padding,html.no-flexboxlegacy .xlarge-quarter-top-padding{padding-top:.5em}html.no-flexbox .right-space,html.no-flexbox .xlarge-right-space,html.no-flexboxlegacy .right-space,html.no-flexboxlegacy .xlarge-right-space{margin-right:2em}html.no-flexbox .right-padding,html.no-flexbox .xlarge-right-padding,html.no-flexboxlegacy .right-padding,html.no-flexboxlegacy .xlarge-right-padding{padding-right:2em}html.no-flexbox .double-right-space,html.no-flexbox .xlarge-double-right-space,html.no-flexboxlegacy .double-right-space,html.no-flexboxlegacy .xlarge-double-right-space{margin-right:4em}html.no-flexbox .double-right-padding,html.no-flexbox .xlarge-double-right-padding,html.no-flexboxlegacy .double-right-padding,html.no-flexboxlegacy .xlarge-double-right-padding{padding-right:4em}html.no-flexbox .half-right-space,html.no-flexbox .xlarge-half-right-space,html.no-flexboxlegacy .half-right-space,html.no-flexboxlegacy .xlarge-half-right-space{margin-right:1em}html.no-flexbox .half-right-padding,html.no-flexbox .xlarge-half-right-padding,html.no-flexboxlegacy .half-right-padding,html.no-flexboxlegacy .xlarge-half-right-padding{padding-right:1em}html.no-flexbox .quarter-right-space,html.no-flexbox .xlarge-quarter-right-space,html.no-flexboxlegacy .quarter-right-space,html.no-flexboxlegacy .xlarge-quarter-right-space{margin-right:.5em}html.no-flexbox .quarter-right-padding,html.no-flexbox .xlarge-quarter-right-padding,html.no-flexboxlegacy .quarter-right-padding,html.no-flexboxlegacy .xlarge-quarter-right-padding{padding-right:.5em}html.no-flexbox .bottom-space,html.no-flexbox .xlarge-bottom-space,html.no-flexboxlegacy .bottom-space,html.no-flexboxlegacy .xlarge-bottom-space{margin-bottom:2em}html.no-flexbox .bottom-padding,html.no-flexbox .xlarge-bottom-padding,html.no-flexboxlegacy .bottom-padding,html.no-flexboxlegacy .xlarge-bottom-padding{padding-bottom:2em}html.no-flexbox .double-bottom-space,html.no-flexbox .xlarge-double-bottom-space,html.no-flexboxlegacy .double-bottom-space,html.no-flexboxlegacy .xlarge-double-bottom-space{margin-bottom:4em}html.no-flexbox .double-bottom-padding,html.no-flexbox .xlarge-double-bottom-padding,html.no-flexboxlegacy .double-bottom-padding,html.no-flexboxlegacy .xlarge-double-bottom-padding{padding-bottom:4em}html.no-flexbox .half-bottom-space,html.no-flexbox .xlarge-half-bottom-space,html.no-flexboxlegacy .half-bottom-space,html.no-flexboxlegacy .xlarge-half-bottom-space{margin-bottom:1em}html.no-flexbox .half-bottom-padding,html.no-flexbox .xlarge-half-bottom-padding,html.no-flexboxlegacy .half-bottom-padding,html.no-flexboxlegacy .xlarge-half-bottom-padding{padding-bottom:1em}html.no-flexbox .quarter-bottom-space,html.no-flexbox .xlarge-quarter-bottom-space,html.no-flexboxlegacy .quarter-bottom-space,html.no-flexboxlegacy .xlarge-quarter-bottom-space{margin-bottom:.5em}html.no-flexbox .quarter-bottom-padding,html.no-flexbox .xlarge-quarter-bottom-padding,html.no-flexboxlegacy .quarter-bottom-padding,html.no-flexboxlegacy .xlarge-quarter-bottom-padding{padding-bottom:.5em}html.no-flexbox .left-space,html.no-flexbox .xlarge-left-space,html.no-flexboxlegacy .left-space,html.no-flexboxlegacy .xlarge-left-space{margin-left:2em}html.no-flexbox .left-padding,html.no-flexbox .xlarge-left-padding,html.no-flexboxlegacy .left-padding,html.no-flexboxlegacy .xlarge-left-padding{padding-left:2em}html.no-flexbox .double-left-space,html.no-flexbox .xlarge-double-left-space,html.no-flexboxlegacy .double-left-space,html.no-flexboxlegacy .xlarge-double-left-space{margin-left:4em}html.no-flexbox .double-left-padding,html.no-flexbox .xlarge-double-left-padding,html.no-flexboxlegacy .double-left-padding,html.no-flexboxlegacy .xlarge-double-left-padding{padding-left:4em}html.no-flexbox .half-left-space,html.no-flexbox .xlarge-half-left-space,html.no-flexboxlegacy .half-left-space,html.no-flexboxlegacy .xlarge-half-left-space{margin-left:1em}html.no-flexbox .half-left-padding,html.no-flexbox .xlarge-half-left-padding,html.no-flexboxlegacy .half-left-padding,html.no-flexboxlegacy .xlarge-half-left-padding{padding-left:1em}html.no-flexbox .quarter-left-space,html.no-flexbox .xlarge-quarter-left-space,html.no-flexboxlegacy .quarter-left-space,html.no-flexboxlegacy .xlarge-quarter-left-space{margin-left:.5em}html.no-flexbox .quarter-left-padding,html.no-flexbox .xlarge-quarter-left-padding,html.no-flexboxlegacy .quarter-left-padding,html.no-flexboxlegacy .xlarge-quarter-left-padding{padding-left:.5em}html.no-flexbox .hide-xlarge,html.no-flexboxlegacy .hide-xlarge{display:none!important}html.no-flexbox .show-xlarge,html.no-flexboxlegacy .show-xlarge{display:inherit!important}html.no-flexbox table.show-xlarge,html.no-flexboxlegacy table.show-xlarge{display:table}html.no-flexbox thead.show-xlarge,html.no-flexboxlegacy thead.show-xlarge{display:table-header-group}html.no-flexbox tbody.show-xlarge,html.no-flexboxlegacy tbody.show-xlarge{display:table-row-group}html.no-flexbox tfoot.show-xlarge,html.no-flexboxlegacy tfoot.show-xlarge{display:table-footer-group}html.no-flexbox tr.show-xlarge,html.no-flexboxlegacy tr.show-xlarge{display:table-row}html.no-flexbox td.show-xlarge,html.no-flexbox th.show-xlarge,html.no-flexboxlegacy td.show-xlarge,html.no-flexboxlegacy th.show-xlarge{display:table-cell}}@media screen and (min-width:961px) and (max-width:1260px){html.no-flexbox .ink-grid,html.no-flexboxlegacy .ink-grid{padding:0 1.75em}html.no-flexbox .column-group>[class*=large-],html.no-flexboxlegacy .column-group>[class*=large-]{float:left;clear:none}html.no-flexbox .large-5,html.no-flexboxlegacy .large-5{width:5%}html.no-flexbox .large-10,html.no-flexboxlegacy .large-10{width:10%}html.no-flexbox .large-15,html.no-flexboxlegacy .large-15{width:15%}html.no-flexbox .large-20,html.no-flexboxlegacy .large-20{width:20%}html.no-flexbox .large-25,html.no-flexboxlegacy .large-25{width:25%}html.no-flexbox .large-30,html.no-flexboxlegacy .large-30{width:30%}html.no-flexbox .large-33,html.no-flexboxlegacy .large-33{width:33.33%}html.no-flexbox .large-35,html.no-flexboxlegacy .large-35{width:35%}html.no-flexbox .large-40,html.no-flexboxlegacy .large-40{width:40%}html.no-flexbox .large-45,html.no-flexboxlegacy .large-45{width:45%}html.no-flexbox .large-50,html.no-flexboxlegacy .large-50{width:50%}html.no-flexbox .large-55,html.no-flexboxlegacy .large-55{width:55%}html.no-flexbox .large-60,html.no-flexboxlegacy .large-60{width:60%}html.no-flexbox .large-65,html.no-flexboxlegacy .large-65{width:65%}html.no-flexbox .large-66,html.no-flexboxlegacy .large-66{width:66.66%}html.no-flexbox .large-70,html.no-flexboxlegacy .large-70{width:70%}html.no-flexbox .large-75,html.no-flexboxlegacy .large-75{width:75%}html.no-flexbox .large-80,html.no-flexboxlegacy .large-80{width:80%}html.no-flexbox .large-85,html.no-flexboxlegacy .large-85{width:85%}html.no-flexbox .large-90,html.no-flexboxlegacy .large-90{width:90%}html.no-flexbox .large-95,html.no-flexboxlegacy .large-95{width:95%}html.no-flexbox .large-100,html.no-flexboxlegacy .large-100{width:100%}html.no-flexbox [class*=large-100],html.no-flexboxlegacy [class*=large-100]{float:none;clear:both}html.no-flexbox .column-group,html.no-flexboxlegacy .column-group{*zoom:1}html.no-flexbox .column-group:after,html.no-flexboxlegacy .column-group:after{content:"";display:table;clear:both}html.no-flexbox .column-group.gutters,html.no-flexboxlegacy .column-group.gutters{margin-left:-1.75em}html.no-flexbox .column-group.gutters>[class*=all-],html.no-flexbox .column-group.gutters>[class*=large-],html.no-flexboxlegacy .column-group.gutters>[class*=all-],html.no-flexboxlegacy .column-group.gutters>[class*=large-]{padding-left:1.75em;margin-bottom:1.75em}html.no-flexbox .column-group.horizontal-gutters,html.no-flexboxlegacy .column-group.horizontal-gutters{margin-left:-1.75em}html.no-flexbox .column-group.horizontal-gutters>[class*=all-],html.no-flexbox .column-group.horizontal-gutters>[class*=large-],html.no-flexboxlegacy .column-group.horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.horizontal-gutters>[class*=large-]{padding-left:1.75em}html.no-flexbox .column-group.vertical-gutters>[class*=all-],html.no-flexbox .column-group.vertical-gutters>[class*=large-],html.no-flexboxlegacy .column-group.vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.vertical-gutters>[class*=large-]{margin-bottom:1.75em}html.no-flexbox .column-group.double-gutters,html.no-flexboxlegacy .column-group.double-gutters{margin-left:-3.5em}html.no-flexbox .column-group.double-gutters>[class*=all-],html.no-flexbox .column-group.double-gutters>[class*=large-],html.no-flexboxlegacy .column-group.double-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-gutters>[class*=large-]{padding-left:3.5em;margin-bottom:3.5em}html.no-flexbox .column-group.double-horizontal-gutters,html.no-flexboxlegacy .column-group.double-horizontal-gutters{margin-left:-3.5em}html.no-flexbox .column-group.double-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.double-horizontal-gutters>[class*=large-],html.no-flexboxlegacy .column-group.double-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-horizontal-gutters>[class*=large-]{padding-left:3.5em}html.no-flexbox .column-group.double-vertical-gutters>[class*=all-],html.no-flexbox .column-group.double-vertical-gutters>[class*=large-],html.no-flexboxlegacy .column-group.double-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-vertical-gutters>[class*=large-]{margin-bottom:3.5em}html.no-flexbox .column-group.half-gutters,html.no-flexboxlegacy .column-group.half-gutters{margin-left:-.875em}html.no-flexbox .column-group.half-gutters>[class*=all-],html.no-flexbox .column-group.half-gutters>[class*=large-],html.no-flexboxlegacy .column-group.half-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-gutters>[class*=large-]{padding-left:.875em;margin-bottom:.875em}html.no-flexbox .column-group.half-horizontal-gutters,html.no-flexboxlegacy .column-group.half-horizontal-gutters{margin-left:-.875em}html.no-flexbox .column-group.half-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.half-horizontal-gutters>[class*=large-],html.no-flexboxlegacy .column-group.half-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-horizontal-gutters>[class*=large-]{padding-left:.875em}html.no-flexbox .column-group.half-vertical-gutters>[class*=all-],html.no-flexbox .column-group.half-vertical-gutters>[class*=large-],html.no-flexboxlegacy .column-group.half-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-vertical-gutters>[class*=large-]{margin-bottom:.875em}html.no-flexbox .column-group.quarter-gutters,html.no-flexboxlegacy .column-group.quarter-gutters{margin-left:-.4375em}html.no-flexbox .column-group.quarter-gutters>[class*=all-],html.no-flexbox .column-group.quarter-gutters>[class*=large-],html.no-flexboxlegacy .column-group.quarter-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}html.no-flexbox .column-group.quarter-horizontal-gutters,html.no-flexboxlegacy .column-group.quarter-horizontal-gutters{margin-left:-.4375em}html.no-flexbox .column-group.quarter-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.quarter-horizontal-gutters>[class*=large-],html.no-flexboxlegacy .column-group.quarter-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-horizontal-gutters>[class*=large-]{padding-left:.4375em}html.no-flexbox .column-group.quarter-vertical-gutters>[class*=all-],html.no-flexbox .column-group.quarter-vertical-gutters>[class*=large-],html.no-flexboxlegacy .column-group.quarter-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-vertical-gutters>[class*=large-]{margin-bottom:.4375em}html.no-flexbox .column-group.large-gutters,html.no-flexboxlegacy .column-group.large-gutters{margin-left:-1.75em}html.no-flexbox .column-group.large-gutters>[class*=all-],html.no-flexbox .column-group.large-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}html.no-flexbox .column-group.large-horizontal-gutters,html.no-flexboxlegacy .column-group.large-horizontal-gutters{margin-left:-1.75em}html.no-flexbox .column-group.large-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.large-horizontal-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-horizontal-gutters>[class*=large-]{padding-left:1.75em}html.no-flexbox .column-group.large-vertical-gutters>[class*=all-],html.no-flexbox .column-group.large-vertical-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-vertical-gutters>[class*=large-]{margin-bottom:1.75em}html.no-flexbox .column-group.large-double-gutters,html.no-flexboxlegacy .column-group.large-double-gutters{margin-left:-3.5em}html.no-flexbox .column-group.large-double-gutters>[class*=all-],html.no-flexbox .column-group.large-double-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-double-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-double-gutters>[class*=large-]{padding-left:3.5em;margin-bottom:3.5em}html.no-flexbox .column-group.large-double-horizontal-gutters,html.no-flexboxlegacy .column-group.large-double-horizontal-gutters{margin-left:-3.5em}html.no-flexbox .column-group.large-double-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.large-double-horizontal-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-double-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-double-horizontal-gutters>[class*=large-]{padding-left:3.5em}html.no-flexbox .column-group.large-double-vertical-gutters>[class*=all-],html.no-flexbox .column-group.large-double-vertical-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-double-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-double-vertical-gutters>[class*=large-]{margin-bottom:3.5em}html.no-flexbox .column-group.large-half-gutters,html.no-flexboxlegacy .column-group.large-half-gutters{margin-left:-.875em}html.no-flexbox .column-group.large-half-gutters>[class*=all-],html.no-flexbox .column-group.large-half-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-half-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-half-gutters>[class*=large-]{padding-left:.875em;margin-bottom:.875em}html.no-flexbox .column-group.large-half-horizontal-gutters,html.no-flexboxlegacy .column-group.large-half-horizontal-gutters{margin-left:-.875em}html.no-flexbox .column-group.large-half-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.large-half-horizontal-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-half-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-half-horizontal-gutters>[class*=large-]{padding-left:.875em}html.no-flexbox .column-group.large-half-vertical-gutters>[class*=all-],html.no-flexbox .column-group.large-half-vertical-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-half-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-half-vertical-gutters>[class*=large-]{margin-bottom:.875em}html.no-flexbox .column-group.large-quarter-gutters,html.no-flexboxlegacy .column-group.large-quarter-gutters{margin-left:-.4375em}html.no-flexbox .column-group.large-quarter-gutters>[class*=all-],html.no-flexbox .column-group.large-quarter-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-quarter-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-quarter-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}html.no-flexbox .column-group.large-quarter-horizontal-gutters,html.no-flexboxlegacy .column-group.large-quarter-horizontal-gutters{margin-left:-.4375em}html.no-flexbox .column-group.large-quarter-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.large-quarter-horizontal-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-quarter-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-quarter-horizontal-gutters>[class*=large-]{padding-left:.4375em}html.no-flexbox .column-group.large-quarter-vertical-gutters>[class*=all-],html.no-flexbox .column-group.large-quarter-vertical-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-quarter-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-quarter-vertical-gutters>[class*=large-]{margin-bottom:.4375em}html.no-flexbox .column-group.large-no-gutters,html.no-flexboxlegacy .column-group.large-no-gutters{margin-left:0}html.no-flexbox .column-group.large-no-gutters>[class*=all-],html.no-flexbox .column-group.large-no-gutters>[class*=large-],html.no-flexboxlegacy .column-group.large-no-gutters>[class*=all-],html.no-flexboxlegacy .column-group.large-no-gutters>[class*=large-]{padding-left:0;margin-bottom:0}html.no-flexbox .ink-table tbody[class*=large-],html.no-flexbox .ink-table td[class*=large-],html.no-flexbox .ink-table tfoot[class*=large-],html.no-flexbox .ink-table th[class*=large-],html.no-flexbox .ink-table thead[class*=large-],html.no-flexbox .ink-table tr[class*=large-],html.no-flexboxlegacy .ink-table tbody[class*=large-],html.no-flexboxlegacy .ink-table td[class*=large-],html.no-flexboxlegacy .ink-table tfoot[class*=large-],html.no-flexboxlegacy .ink-table th[class*=large-],html.no-flexboxlegacy .ink-table thead[class*=large-],html.no-flexboxlegacy .ink-table tr[class*=large-]{float:none}html.no-flexbox .large-push-left,html.no-flexboxlegacy .large-push-left{float:left}html.no-flexbox .large-push-center,html.no-flexboxlegacy .large-push-center{float:none;margin-left:auto;margin-right:auto}html.no-flexbox .large-push-right,html.no-flexboxlegacy .large-push-right{float:right}html.no-flexbox .large-align-left,html.no-flexboxlegacy .large-align-left{text-align:left}html.no-flexbox .large-align-center,html.no-flexboxlegacy .large-align-center{text-align:center}html.no-flexbox .large-align-right,html.no-flexboxlegacy .large-align-right{text-align:right}html.no-flexbox .large-no-margin,html.no-flexboxlegacy .large-no-margin{margin:0!important}html.no-flexbox .large-space,html.no-flexbox .space,html.no-flexboxlegacy .large-space,html.no-flexboxlegacy .space{margin:1.75em}html.no-flexbox .large-padding,html.no-flexbox .padding,html.no-flexboxlegacy .large-padding,html.no-flexboxlegacy .padding{padding:1.75em}html.no-flexbox .double-space,html.no-flexbox .large-double-space,html.no-flexboxlegacy .double-space,html.no-flexboxlegacy .large-double-space{margin:3.5em}html.no-flexbox .double-padding,html.no-flexbox .large-double-padding,html.no-flexboxlegacy .double-padding,html.no-flexboxlegacy .large-double-padding{padding:3.5em}html.no-flexbox .half-space,html.no-flexbox .large-half-space,html.no-flexboxlegacy .half-space,html.no-flexboxlegacy .large-half-space{margin:.875em}html.no-flexbox .half-padding,html.no-flexbox .large-half-padding,html.no-flexboxlegacy .half-padding,html.no-flexboxlegacy .large-half-padding{padding:.875em}html.no-flexbox .large-quarter-space,html.no-flexbox .quarter-space,html.no-flexboxlegacy .large-quarter-space,html.no-flexboxlegacy .quarter-space{margin:.4375em}html.no-flexbox .large-quarter-padding,html.no-flexbox .quarter-padding,html.no-flexboxlegacy .large-quarter-padding,html.no-flexboxlegacy .quarter-padding{padding:.4375em}html.no-flexbox .large-vertical-space,html.no-flexbox .vertical-space,html.no-flexboxlegacy .large-vertical-space,html.no-flexboxlegacy .vertical-space{margin-top:1.75em;margin-bottom:1.75em}html.no-flexbox .large-vertical-padding,html.no-flexbox .vertical-padding,html.no-flexboxlegacy .large-vertical-padding,html.no-flexboxlegacy .vertical-padding{padding-top:1.75em;padding-bottom:1.75em}html.no-flexbox .double-vertical-space,html.no-flexbox .large-double-vertical-space,html.no-flexboxlegacy .double-vertical-space,html.no-flexboxlegacy .large-double-vertical-space{margin-top:3.5em;margin-bottom:3.5em}html.no-flexbox .double-vertical-padding,html.no-flexbox .large-double-vertical-padding,html.no-flexboxlegacy .double-vertical-padding,html.no-flexboxlegacy .large-double-vertical-padding{padding-top:3.5em;padding-bottom:3.5em}html.no-flexbox .half-vertical-space,html.no-flexbox .large-half-vertical-space,html.no-flexboxlegacy .half-vertical-space,html.no-flexboxlegacy .large-half-vertical-space{margin-top:.875em;margin-bottom:.875em}html.no-flexbox .half-vertical-padding,html.no-flexbox .large-half-vertical-padding,html.no-flexboxlegacy .half-vertical-padding,html.no-flexboxlegacy .large-half-vertical-padding{padding-top:.875em;padding-bottom:.875em}html.no-flexbox .large-quarter-vertical-space,html.no-flexbox .quarter-vertical-space,html.no-flexboxlegacy .large-quarter-vertical-space,html.no-flexboxlegacy .quarter-vertical-space{margin-top:.4375em;margin-bottom:.4375em}html.no-flexbox .large-quarter-vertical-padding,html.no-flexbox .quarter-vertical-padding,html.no-flexboxlegacy .large-quarter-vertical-padding,html.no-flexboxlegacy .quarter-vertical-padding{padding-top:.4375em;padding-bottom:.4375em}html.no-flexbox .horizontal-space,html.no-flexbox .large-horizontal-space,html.no-flexboxlegacy .horizontal-space,html.no-flexboxlegacy .large-horizontal-space{margin-left:1.75em;margin-right:1.75em}html.no-flexbox .horizontal-padding,html.no-flexbox .large-horizontal-padding,html.no-flexboxlegacy .horizontal-padding,html.no-flexboxlegacy .large-horizontal-padding{padding-left:1.75em;padding-right:1.75em}html.no-flexbox .double-horizontal-space,html.no-flexbox .large-double-horizontal-space,html.no-flexboxlegacy .double-horizontal-space,html.no-flexboxlegacy .large-double-horizontal-space{margin-left:3.5em;margin-right:3.5em}html.no-flexbox .double-horizontal-padding,html.no-flexbox .large-double-horizontal-padding,html.no-flexboxlegacy .double-horizontal-padding,html.no-flexboxlegacy .large-double-horizontal-padding{padding-left:3.5em;padding-right:3.5em}html.no-flexbox .half-horizontal-space,html.no-flexbox .large-half-horizontal-space,html.no-flexboxlegacy .half-horizontal-space,html.no-flexboxlegacy .large-half-horizontal-space{margin-left:.875em;margin-right:.875em}html.no-flexbox .half-horizontal-padding,html.no-flexbox .large-half-horizontal-padding,html.no-flexboxlegacy .half-horizontal-padding,html.no-flexboxlegacy .large-half-horizontal-padding{padding-left:.875em;padding-right:.875em}html.no-flexbox .large-quarter-horizontal-space,html.no-flexbox .quarter-horizontal-space,html.no-flexboxlegacy .large-quarter-horizontal-space,html.no-flexboxlegacy .quarter-horizontal-space{margin-left:.4375em;margin-right:.4375em}html.no-flexbox .large-quarter-horizontal-padding,html.no-flexbox .quarter-horizontal-padding,html.no-flexboxlegacy .large-quarter-horizontal-padding,html.no-flexboxlegacy .quarter-horizontal-padding{padding-left:.4375em;padding-right:.4375em}html.no-flexbox .large-top-space,html.no-flexbox .top-space,html.no-flexboxlegacy .large-top-space,html.no-flexboxlegacy .top-space{margin-top:1.75em}html.no-flexbox .large-top-padding,html.no-flexbox .top-padding,html.no-flexboxlegacy .large-top-padding,html.no-flexboxlegacy .top-padding{padding-top:1.75em}html.no-flexbox .double-top-space,html.no-flexbox .large-double-top-space,html.no-flexboxlegacy .double-top-space,html.no-flexboxlegacy .large-double-top-space{margin-top:3.5em}html.no-flexbox .double-top-padding,html.no-flexbox .large-double-top-padding,html.no-flexboxlegacy .double-top-padding,html.no-flexboxlegacy .large-double-top-padding{padding-top:3.5em}html.no-flexbox .half-top-space,html.no-flexbox .large-half-top-space,html.no-flexboxlegacy .half-top-space,html.no-flexboxlegacy .large-half-top-space{margin-top:.875em}html.no-flexbox .half-top-padding,html.no-flexbox .large-half-top-padding,html.no-flexboxlegacy .half-top-padding,html.no-flexboxlegacy .large-half-top-padding{padding-top:.875em}html.no-flexbox .large-quarter-top-space,html.no-flexbox .quarter-top-space,html.no-flexboxlegacy .large-quarter-top-space,html.no-flexboxlegacy .quarter-top-space{margin-top:.4375em}html.no-flexbox .large-quarter-top-padding,html.no-flexbox .quarter-top-padding,html.no-flexboxlegacy .large-quarter-top-padding,html.no-flexboxlegacy .quarter-top-padding{padding-top:.4375em}html.no-flexbox .large-right-space,html.no-flexbox .right-space,html.no-flexboxlegacy .large-right-space,html.no-flexboxlegacy .right-space{margin-right:1.75em}html.no-flexbox .large-right-padding,html.no-flexbox .right-padding,html.no-flexboxlegacy .large-right-padding,html.no-flexboxlegacy .right-padding{padding-right:1.75em}html.no-flexbox .double-right-space,html.no-flexbox .large-double-right-space,html.no-flexboxlegacy .double-right-space,html.no-flexboxlegacy .large-double-right-space{margin-right:3.5em}html.no-flexbox .double-right-padding,html.no-flexbox .large-double-right-padding,html.no-flexboxlegacy .double-right-padding,html.no-flexboxlegacy .large-double-right-padding{padding-right:3.5em}html.no-flexbox .half-right-space,html.no-flexbox .large-half-right-space,html.no-flexboxlegacy .half-right-space,html.no-flexboxlegacy .large-half-right-space{margin-right:.875em}html.no-flexbox .half-right-padding,html.no-flexbox .large-half-right-padding,html.no-flexboxlegacy .half-right-padding,html.no-flexboxlegacy .large-half-right-padding{padding-right:.875em}html.no-flexbox .large-quarter-right-space,html.no-flexbox .quarter-right-space,html.no-flexboxlegacy .large-quarter-right-space,html.no-flexboxlegacy .quarter-right-space{margin-right:.4375em}html.no-flexbox .large-quarter-right-padding,html.no-flexbox .quarter-right-padding,html.no-flexboxlegacy .large-quarter-right-padding,html.no-flexboxlegacy .quarter-right-padding{padding-right:.4375em}html.no-flexbox .bottom-space,html.no-flexbox .large-bottom-space,html.no-flexboxlegacy .bottom-space,html.no-flexboxlegacy .large-bottom-space{margin-bottom:1.75em}html.no-flexbox .bottom-padding,html.no-flexbox .large-bottom-padding,html.no-flexboxlegacy .bottom-padding,html.no-flexboxlegacy .large-bottom-padding{padding-bottom:1.75em}html.no-flexbox .double-bottom-space,html.no-flexbox .large-double-bottom-space,html.no-flexboxlegacy .double-bottom-space,html.no-flexboxlegacy .large-double-bottom-space{margin-bottom:3.5em}html.no-flexbox .double-bottom-padding,html.no-flexbox .large-double-bottom-padding,html.no-flexboxlegacy .double-bottom-padding,html.no-flexboxlegacy .large-double-bottom-padding{padding-bottom:3.5em}html.no-flexbox .half-bottom-space,html.no-flexbox .large-half-bottom-space,html.no-flexboxlegacy .half-bottom-space,html.no-flexboxlegacy .large-half-bottom-space{margin-bottom:.875em}html.no-flexbox .half-bottom-padding,html.no-flexbox .large-half-bottom-padding,html.no-flexboxlegacy .half-bottom-padding,html.no-flexboxlegacy .large-half-bottom-padding{padding-bottom:.875em}html.no-flexbox .large-quarter-bottom-space,html.no-flexbox .quarter-bottom-space,html.no-flexboxlegacy .large-quarter-bottom-space,html.no-flexboxlegacy .quarter-bottom-space{margin-bottom:.4375em}html.no-flexbox .large-quarter-bottom-padding,html.no-flexbox .quarter-bottom-padding,html.no-flexboxlegacy .large-quarter-bottom-padding,html.no-flexboxlegacy .quarter-bottom-padding{padding-bottom:.4375em}html.no-flexbox .large-left-space,html.no-flexbox .left-space,html.no-flexboxlegacy .large-left-space,html.no-flexboxlegacy .left-space{margin-left:1.75em}html.no-flexbox .large-left-padding,html.no-flexbox .left-padding,html.no-flexboxlegacy .large-left-padding,html.no-flexboxlegacy .left-padding{padding-left:1.75em}html.no-flexbox .double-left-space,html.no-flexbox .large-double-left-space,html.no-flexboxlegacy .double-left-space,html.no-flexboxlegacy .large-double-left-space{margin-left:3.5em}html.no-flexbox .double-left-padding,html.no-flexbox .large-double-left-padding,html.no-flexboxlegacy .double-left-padding,html.no-flexboxlegacy .large-double-left-padding{padding-left:3.5em}html.no-flexbox .half-left-space,html.no-flexbox .large-half-left-space,html.no-flexboxlegacy .half-left-space,html.no-flexboxlegacy .large-half-left-space{margin-left:.875em}html.no-flexbox .half-left-padding,html.no-flexbox .large-half-left-padding,html.no-flexboxlegacy .half-left-padding,html.no-flexboxlegacy .large-half-left-padding{padding-left:.875em}html.no-flexbox .large-quarter-left-space,html.no-flexbox .quarter-left-space,html.no-flexboxlegacy .large-quarter-left-space,html.no-flexboxlegacy .quarter-left-space{margin-left:.4375em}html.no-flexbox .large-quarter-left-padding,html.no-flexbox .quarter-left-padding,html.no-flexboxlegacy .large-quarter-left-padding,html.no-flexboxlegacy .quarter-left-padding{padding-left:.4375em}html.no-flexbox .hide-large,html.no-flexboxlegacy .hide-large{display:none!important}html.no-flexbox .show-large,html.no-flexboxlegacy .show-large{display:inherit!important}html.no-flexbox table.show-large,html.no-flexboxlegacy table.show-large{display:table}html.no-flexbox thead.show-large,html.no-flexboxlegacy thead.show-large{display:table-header-group}html.no-flexbox tbody.show-large,html.no-flexboxlegacy tbody.show-large{display:table-row-group}html.no-flexbox tfoot.show-large,html.no-flexboxlegacy tfoot.show-large{display:table-footer-group}html.no-flexbox tr.show-large,html.no-flexboxlegacy tr.show-large{display:table-row}html.no-flexbox td.show-large,html.no-flexbox th.show-large,html.no-flexboxlegacy td.show-large,html.no-flexboxlegacy th.show-large{display:table-cell}}@media screen and (min-width:641px) and (max-width:960px){html.no-flexbox .ink-grid,html.no-flexboxlegacy .ink-grid{padding:0 1.5em}html.no-flexbox .column-group>[class*=medium-],html.no-flexboxlegacy .column-group>[class*=medium-]{float:left;clear:none}html.no-flexbox .medium-5,html.no-flexboxlegacy .medium-5{width:5%}html.no-flexbox .medium-10,html.no-flexboxlegacy .medium-10{width:10%}html.no-flexbox .medium-15,html.no-flexboxlegacy .medium-15{width:15%}html.no-flexbox .medium-20,html.no-flexboxlegacy .medium-20{width:20%}html.no-flexbox .medium-25,html.no-flexboxlegacy .medium-25{width:25%}html.no-flexbox .medium-30,html.no-flexboxlegacy .medium-30{width:30%}html.no-flexbox .medium-33,html.no-flexboxlegacy .medium-33{width:33.33%}html.no-flexbox .medium-35,html.no-flexboxlegacy .medium-35{width:35%}html.no-flexbox .medium-40,html.no-flexboxlegacy .medium-40{width:40%}html.no-flexbox .medium-45,html.no-flexboxlegacy .medium-45{width:45%}html.no-flexbox .medium-50,html.no-flexboxlegacy .medium-50{width:50%}html.no-flexbox .medium-55,html.no-flexboxlegacy .medium-55{width:55%}html.no-flexbox .medium-60,html.no-flexboxlegacy .medium-60{width:60%}html.no-flexbox .medium-65,html.no-flexboxlegacy .medium-65{width:65%}html.no-flexbox .medium-66,html.no-flexboxlegacy .medium-66{width:66.66%}html.no-flexbox .medium-70,html.no-flexboxlegacy .medium-70{width:70%}html.no-flexbox .medium-75,html.no-flexboxlegacy .medium-75{width:75%}html.no-flexbox .medium-80,html.no-flexboxlegacy .medium-80{width:80%}html.no-flexbox .medium-85,html.no-flexboxlegacy .medium-85{width:85%}html.no-flexbox .medium-90,html.no-flexboxlegacy .medium-90{width:90%}html.no-flexbox .medium-95,html.no-flexboxlegacy .medium-95{width:95%}html.no-flexbox .medium-100,html.no-flexboxlegacy .medium-100{width:100%}html.no-flexbox [class*=medium-100],html.no-flexboxlegacy [class*=medium-100]{float:none;clear:both}html.no-flexbox .column-group,html.no-flexboxlegacy .column-group{*zoom:1}html.no-flexbox .column-group:after,html.no-flexboxlegacy .column-group:after{content:"";display:table;clear:both}html.no-flexbox .column-group.gutters,html.no-flexboxlegacy .column-group.gutters{margin-left:-1.5em}html.no-flexbox .column-group.gutters>[class*=all-],html.no-flexbox .column-group.gutters>[class*=medium-],html.no-flexboxlegacy .column-group.gutters>[class*=all-],html.no-flexboxlegacy .column-group.gutters>[class*=medium-]{padding-left:1.5em;margin-bottom:1.5em}html.no-flexbox .column-group.horizontal-gutters,html.no-flexboxlegacy .column-group.horizontal-gutters{margin-left:-1.5em}html.no-flexbox .column-group.horizontal-gutters>[class*=all-],html.no-flexbox .column-group.horizontal-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.horizontal-gutters>[class*=medium-]{padding-left:1.5em}html.no-flexbox .column-group.vertical-gutters>[class*=all-],html.no-flexbox .column-group.vertical-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.vertical-gutters>[class*=medium-]{margin-bottom:1.5em}html.no-flexbox .column-group.double-gutters,html.no-flexboxlegacy .column-group.double-gutters{margin-left:-3em}html.no-flexbox .column-group.double-gutters>[class*=all-],html.no-flexbox .column-group.double-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.double-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-gutters>[class*=medium-]{padding-left:3em;margin-bottom:3em}html.no-flexbox .column-group.double-horizontal-gutters,html.no-flexboxlegacy .column-group.double-horizontal-gutters{margin-left:-3em}html.no-flexbox .column-group.double-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.double-horizontal-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.double-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-horizontal-gutters>[class*=medium-]{padding-left:3em}html.no-flexbox .column-group.double-vertical-gutters>[class*=all-],html.no-flexbox .column-group.double-vertical-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.double-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-vertical-gutters>[class*=medium-]{margin-bottom:3em}html.no-flexbox .column-group.half-gutters,html.no-flexboxlegacy .column-group.half-gutters{margin-left:-.75em}html.no-flexbox .column-group.half-gutters>[class*=all-],html.no-flexbox .column-group.half-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.half-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-gutters>[class*=medium-]{padding-left:.75em;margin-bottom:.75em}html.no-flexbox .column-group.half-horizontal-gutters,html.no-flexboxlegacy .column-group.half-horizontal-gutters{margin-left:-.75em}html.no-flexbox .column-group.half-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.half-horizontal-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.half-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-horizontal-gutters>[class*=medium-]{padding-left:.75em}html.no-flexbox .column-group.half-vertical-gutters>[class*=all-],html.no-flexbox .column-group.half-vertical-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.half-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-vertical-gutters>[class*=medium-]{margin-bottom:.75em}html.no-flexbox .column-group.quarter-gutters,html.no-flexboxlegacy .column-group.quarter-gutters{margin-left:-.375em}html.no-flexbox .column-group.quarter-gutters>[class*=all-],html.no-flexbox .column-group.quarter-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.quarter-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-gutters>[class*=medium-]{padding-left:.375em;margin-bottom:.375em}html.no-flexbox .column-group.quarter-horizontal-gutters,html.no-flexboxlegacy .column-group.quarter-horizontal-gutters{margin-left:-.375em}html.no-flexbox .column-group.quarter-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.quarter-horizontal-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.quarter-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-horizontal-gutters>[class*=medium-]{padding-left:.375em}html.no-flexbox .column-group.quarter-vertical-gutters>[class*=all-],html.no-flexbox .column-group.quarter-vertical-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.quarter-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-vertical-gutters>[class*=medium-]{margin-bottom:.375em}html.no-flexbox .column-group.medium-gutters,html.no-flexboxlegacy .column-group.medium-gutters{margin-left:-1.5em}html.no-flexbox .column-group.medium-gutters>[class*=all-],html.no-flexbox .column-group.medium-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-gutters>[class*=medium-]{padding-left:.375em;margin-bottom:.375em}html.no-flexbox .column-group.medium-horizontal-gutters,html.no-flexboxlegacy .column-group.medium-horizontal-gutters{margin-left:-1.5em}html.no-flexbox .column-group.medium-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.medium-horizontal-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-horizontal-gutters>[class*=medium-]{padding-left:1.5em}html.no-flexbox .column-group.medium-vertical-gutters>[class*=all-],html.no-flexbox .column-group.medium-vertical-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-vertical-gutters>[class*=medium-]{margin-bottom:1.5em}html.no-flexbox .column-group.medium-double-gutters,html.no-flexboxlegacy .column-group.medium-double-gutters{margin-left:-3em}html.no-flexbox .column-group.medium-double-gutters>[class*=all-],html.no-flexbox .column-group.medium-double-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-double-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-double-gutters>[class*=medium-]{padding-left:3em;margin-bottom:3em}html.no-flexbox .column-group.medium-double-horizontal-gutters,html.no-flexboxlegacy .column-group.medium-double-horizontal-gutters{margin-left:-3em}html.no-flexbox .column-group.medium-double-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.medium-double-horizontal-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-double-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-double-horizontal-gutters>[class*=medium-]{padding-left:3em}html.no-flexbox .column-group.medium-double-vertical-gutters>[class*=all-],html.no-flexbox .column-group.medium-double-vertical-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-double-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-double-vertical-gutters>[class*=medium-]{margin-bottom:3em}html.no-flexbox .column-group.medium-half-gutters,html.no-flexboxlegacy .column-group.medium-half-gutters{margin-left:-.75em}html.no-flexbox .column-group.medium-half-gutters>[class*=all-],html.no-flexbox .column-group.medium-half-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-half-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-half-gutters>[class*=medium-]{padding-left:.75em;margin-bottom:.75em}html.no-flexbox .column-group.medium-half-horizontal-gutters,html.no-flexboxlegacy .column-group.medium-half-horizontal-gutters{margin-left:-.75em}html.no-flexbox .column-group.medium-half-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.medium-half-horizontal-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-half-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-half-horizontal-gutters>[class*=medium-]{padding-left:.75em}html.no-flexbox .column-group.medium-half-vertical-gutters>[class*=all-],html.no-flexbox .column-group.medium-half-vertical-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-half-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-half-vertical-gutters>[class*=medium-]{margin-bottom:.75em}html.no-flexbox .column-group.medium-quarter-gutters,html.no-flexboxlegacy .column-group.medium-quarter-gutters{margin-left:-.375em}html.no-flexbox .column-group.medium-quarter-gutters>[class*=all-],html.no-flexbox .column-group.medium-quarter-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-quarter-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-quarter-gutters>[class*=medium-]{padding-left:.375em;margin-bottom:.375em}html.no-flexbox .column-group.medium-quarter-horizontal-gutters,html.no-flexboxlegacy .column-group.medium-quarter-horizontal-gutters{margin-left:-.375em}html.no-flexbox .column-group.medium-quarter-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.medium-quarter-horizontal-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-quarter-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-quarter-horizontal-gutters>[class*=medium-]{padding-left:.375em}html.no-flexbox .column-group.medium-quarter-vertical-gutters>[class*=all-],html.no-flexbox .column-group.medium-quarter-vertical-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-quarter-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-quarter-vertical-gutters>[class*=medium-]{margin-bottom:.375em}html.no-flexbox .column-group.medium-no-gutters,html.no-flexboxlegacy .column-group.medium-no-gutters{margin-left:0}html.no-flexbox .column-group.medium-no-gutters>[class*=all-],html.no-flexbox .column-group.medium-no-gutters>[class*=medium-],html.no-flexboxlegacy .column-group.medium-no-gutters>[class*=all-],html.no-flexboxlegacy .column-group.medium-no-gutters>[class*=medium-]{padding-left:0;margin-bottom:0}html.no-flexbox .ink-table tbody[class*=medium-],html.no-flexbox .ink-table td[class*=medium-],html.no-flexbox .ink-table tfoot[class*=medium-],html.no-flexbox .ink-table th[class*=medium-],html.no-flexbox .ink-table thead[class*=medium-],html.no-flexbox .ink-table tr[class*=medium-],html.no-flexboxlegacy .ink-table tbody[class*=medium-],html.no-flexboxlegacy .ink-table td[class*=medium-],html.no-flexboxlegacy .ink-table tfoot[class*=medium-],html.no-flexboxlegacy .ink-table th[class*=medium-],html.no-flexboxlegacy .ink-table thead[class*=medium-],html.no-flexboxlegacy .ink-table tr[class*=medium-]{float:none}html.no-flexbox .medium-push-left,html.no-flexboxlegacy .medium-push-left{float:left}html.no-flexbox .medium-push-center,html.no-flexboxlegacy .medium-push-center{float:none;margin-left:auto;margin-right:auto}html.no-flexbox .medium-push-right,html.no-flexboxlegacy .medium-push-right{float:right}html.no-flexbox .medium-align-left,html.no-flexboxlegacy .medium-align-left{text-align:left}html.no-flexbox .medium-align-center,html.no-flexboxlegacy .medium-align-center{text-align:center}html.no-flexbox .medium-align-right,html.no-flexboxlegacy .medium-align-right{text-align:right}html.no-flexbox .medium-no-margin,html.no-flexboxlegacy .medium-no-margin{margin:0!important}html.no-flexbox .medium-space,html.no-flexbox .space,html.no-flexboxlegacy .medium-space,html.no-flexboxlegacy .space{margin:1.5em}html.no-flexbox .medium-padding,html.no-flexbox .padding,html.no-flexboxlegacy .medium-padding,html.no-flexboxlegacy .padding{padding:1.5em}html.no-flexbox .double-space,html.no-flexbox .medium-double-space,html.no-flexboxlegacy .double-space,html.no-flexboxlegacy .medium-double-space{margin:3em}html.no-flexbox .double-padding,html.no-flexbox .medium-double-padding,html.no-flexboxlegacy .double-padding,html.no-flexboxlegacy .medium-double-padding{padding:3em}html.no-flexbox .half-space,html.no-flexbox .medium-half-space,html.no-flexboxlegacy .half-space,html.no-flexboxlegacy .medium-half-space{margin:.75em}html.no-flexbox .half-padding,html.no-flexbox .medium-half-padding,html.no-flexboxlegacy .half-padding,html.no-flexboxlegacy .medium-half-padding{padding:.75em}html.no-flexbox .medium-quarter-space,html.no-flexbox .quarter-space,html.no-flexboxlegacy .medium-quarter-space,html.no-flexboxlegacy .quarter-space{margin:.375em}html.no-flexbox .medium-quarter-padding,html.no-flexbox .quarter-padding,html.no-flexboxlegacy .medium-quarter-padding,html.no-flexboxlegacy .quarter-padding{padding:.375em}html.no-flexbox .medium-vertical-space,html.no-flexbox .vertical-space,html.no-flexboxlegacy .medium-vertical-space,html.no-flexboxlegacy .vertical-space{margin-top:1.5em;margin-bottom:1.5em}html.no-flexbox .medium-vertical-padding,html.no-flexbox .vertical-padding,html.no-flexboxlegacy .medium-vertical-padding,html.no-flexboxlegacy .vertical-padding{padding-top:1.5em;padding-bottom:1.5em}html.no-flexbox .double-vertical-space,html.no-flexbox .medium-double-vertical-space,html.no-flexboxlegacy .double-vertical-space,html.no-flexboxlegacy .medium-double-vertical-space{margin-top:3em;margin-bottom:3em}html.no-flexbox .double-vertical-padding,html.no-flexbox .medium-double-vertical-padding,html.no-flexboxlegacy .double-vertical-padding,html.no-flexboxlegacy .medium-double-vertical-padding{padding-top:3em;padding-bottom:3em}html.no-flexbox .half-vertical-space,html.no-flexbox .medium-half-vertical-space,html.no-flexboxlegacy .half-vertical-space,html.no-flexboxlegacy .medium-half-vertical-space{margin-top:.75em;margin-bottom:.75em}html.no-flexbox .half-vertical-padding,html.no-flexbox .medium-half-vertical-padding,html.no-flexboxlegacy .half-vertical-padding,html.no-flexboxlegacy .medium-half-vertical-padding{padding-top:.75em;padding-bottom:.75em}html.no-flexbox .medium-quarter-vertical-space,html.no-flexbox .quarter-vertical-space,html.no-flexboxlegacy .medium-quarter-vertical-space,html.no-flexboxlegacy .quarter-vertical-space{margin-top:.375em;margin-bottom:.375em}html.no-flexbox .medium-quarter-vertical-padding,html.no-flexbox .quarter-vertical-padding,html.no-flexboxlegacy .medium-quarter-vertical-padding,html.no-flexboxlegacy .quarter-vertical-padding{padding-top:.375em;padding-bottom:.375em}html.no-flexbox .horizontal-space,html.no-flexbox .medium-horizontal-space,html.no-flexboxlegacy .horizontal-space,html.no-flexboxlegacy .medium-horizontal-space{margin-left:1.5em;margin-right:1.5em}html.no-flexbox .horizontal-padding,html.no-flexbox .medium-horizontal-padding,html.no-flexboxlegacy .horizontal-padding,html.no-flexboxlegacy .medium-horizontal-padding{padding-left:1.5em;padding-right:1.5em}html.no-flexbox .double-horizontal-space,html.no-flexbox .medium-double-horizontal-space,html.no-flexboxlegacy .double-horizontal-space,html.no-flexboxlegacy .medium-double-horizontal-space{margin-left:3em;margin-right:3em}html.no-flexbox .double-horizontal-padding,html.no-flexbox .medium-double-horizontal-padding,html.no-flexboxlegacy .double-horizontal-padding,html.no-flexboxlegacy .medium-double-horizontal-padding{padding-left:3em;padding-right:3em}html.no-flexbox .half-horizontal-space,html.no-flexbox .medium-half-horizontal-space,html.no-flexboxlegacy .half-horizontal-space,html.no-flexboxlegacy .medium-half-horizontal-space{margin-left:.75em;margin-right:.75em}html.no-flexbox .half-horizontal-padding,html.no-flexbox .medium-half-horizontal-padding,html.no-flexboxlegacy .half-horizontal-padding,html.no-flexboxlegacy .medium-half-horizontal-padding{padding-left:.75em;padding-right:.75em}html.no-flexbox .medium-quarter-horizontal-space,html.no-flexbox .quarter-horizontal-space,html.no-flexboxlegacy .medium-quarter-horizontal-space,html.no-flexboxlegacy .quarter-horizontal-space{margin-left:.375em;margin-right:.375em}html.no-flexbox .medium-quarter-horizontal-padding,html.no-flexbox .quarter-horizontal-padding,html.no-flexboxlegacy .medium-quarter-horizontal-padding,html.no-flexboxlegacy .quarter-horizontal-padding{padding-left:.375em;padding-right:.375em}html.no-flexbox .medium-top-space,html.no-flexbox .top-space,html.no-flexboxlegacy .medium-top-space,html.no-flexboxlegacy .top-space{margin-top:1.5em}html.no-flexbox .medium-top-padding,html.no-flexbox .top-padding,html.no-flexboxlegacy .medium-top-padding,html.no-flexboxlegacy .top-padding{padding-top:1.5em}html.no-flexbox .double-top-space,html.no-flexbox .medium-double-top-space,html.no-flexboxlegacy .double-top-space,html.no-flexboxlegacy .medium-double-top-space{margin-top:3em}html.no-flexbox .double-top-padding,html.no-flexbox .medium-double-top-padding,html.no-flexboxlegacy .double-top-padding,html.no-flexboxlegacy .medium-double-top-padding{padding-top:3em}html.no-flexbox .half-top-space,html.no-flexbox .medium-half-top-space,html.no-flexboxlegacy .half-top-space,html.no-flexboxlegacy .medium-half-top-space{margin-top:.75em}html.no-flexbox .half-top-padding,html.no-flexbox .medium-half-top-padding,html.no-flexboxlegacy .half-top-padding,html.no-flexboxlegacy .medium-half-top-padding{padding-top:.75em}html.no-flexbox .medium-quarter-top-space,html.no-flexbox .quarter-top-space,html.no-flexboxlegacy .medium-quarter-top-space,html.no-flexboxlegacy .quarter-top-space{margin-top:.375em}html.no-flexbox .medium-quarter-top-padding,html.no-flexbox .quarter-top-padding,html.no-flexboxlegacy .medium-quarter-top-padding,html.no-flexboxlegacy .quarter-top-padding{padding-top:.375em}html.no-flexbox .medium-right-space,html.no-flexbox .right-space,html.no-flexboxlegacy .medium-right-space,html.no-flexboxlegacy .right-space{margin-right:1.5em}html.no-flexbox .medium-right-padding,html.no-flexbox .right-padding,html.no-flexboxlegacy .medium-right-padding,html.no-flexboxlegacy .right-padding{padding-right:1.5em}html.no-flexbox .double-right-space,html.no-flexbox .medium-double-right-space,html.no-flexboxlegacy .double-right-space,html.no-flexboxlegacy .medium-double-right-space{margin-right:3em}html.no-flexbox .double-right-padding,html.no-flexbox .medium-double-right-padding,html.no-flexboxlegacy .double-right-padding,html.no-flexboxlegacy .medium-double-right-padding{padding-right:3em}html.no-flexbox .half-right-space,html.no-flexbox .medium-half-right-space,html.no-flexboxlegacy .half-right-space,html.no-flexboxlegacy .medium-half-right-space{margin-right:.75em}html.no-flexbox .half-right-padding,html.no-flexbox .medium-half-right-padding,html.no-flexboxlegacy .half-right-padding,html.no-flexboxlegacy .medium-half-right-padding{padding-right:.75em}html.no-flexbox .medium-quarter-right-space,html.no-flexbox .quarter-right-space,html.no-flexboxlegacy .medium-quarter-right-space,html.no-flexboxlegacy .quarter-right-space{margin-right:.375em}html.no-flexbox .medium-quarter-right-padding,html.no-flexbox .quarter-right-padding,html.no-flexboxlegacy .medium-quarter-right-padding,html.no-flexboxlegacy .quarter-right-padding{padding-right:.375em}html.no-flexbox .bottom-space,html.no-flexbox .medium-bottom-space,html.no-flexboxlegacy .bottom-space,html.no-flexboxlegacy .medium-bottom-space{margin-bottom:1.5em}html.no-flexbox .bottom-padding,html.no-flexbox .medium-bottom-padding,html.no-flexboxlegacy .bottom-padding,html.no-flexboxlegacy .medium-bottom-padding{padding-bottom:1.5em}html.no-flexbox .double-bottom-space,html.no-flexbox .medium-double-bottom-space,html.no-flexboxlegacy .double-bottom-space,html.no-flexboxlegacy .medium-double-bottom-space{margin-bottom:3em}html.no-flexbox .double-bottom-padding,html.no-flexbox .medium-double-bottom-padding,html.no-flexboxlegacy .double-bottom-padding,html.no-flexboxlegacy .medium-double-bottom-padding{padding-bottom:3em}html.no-flexbox .half-bottom-space,html.no-flexbox .medium-half-bottom-space,html.no-flexboxlegacy .half-bottom-space,html.no-flexboxlegacy .medium-half-bottom-space{margin-bottom:.75em}html.no-flexbox .half-bottom-padding,html.no-flexbox .medium-half-bottom-padding,html.no-flexboxlegacy .half-bottom-padding,html.no-flexboxlegacy .medium-half-bottom-padding{padding-bottom:.75em}html.no-flexbox .medium-quarter-bottom-space,html.no-flexbox .quarter-bottom-space,html.no-flexboxlegacy .medium-quarter-bottom-space,html.no-flexboxlegacy .quarter-bottom-space{margin-bottom:.375em}html.no-flexbox .medium-quarter-bottom-padding,html.no-flexbox .quarter-bottom-padding,html.no-flexboxlegacy .medium-quarter-bottom-padding,html.no-flexboxlegacy .quarter-bottom-padding{padding-bottom:.375em}html.no-flexbox .left-space,html.no-flexbox .medium-left-space,html.no-flexboxlegacy .left-space,html.no-flexboxlegacy .medium-left-space{margin-left:1.5em}html.no-flexbox .left-padding,html.no-flexbox .medium-left-padding,html.no-flexboxlegacy .left-padding,html.no-flexboxlegacy .medium-left-padding{padding-left:1.5em}html.no-flexbox .double-left-space,html.no-flexbox .medium-double-left-space,html.no-flexboxlegacy .double-left-space,html.no-flexboxlegacy .medium-double-left-space{margin-left:3em}html.no-flexbox .double-left-padding,html.no-flexbox .medium-double-left-padding,html.no-flexboxlegacy .double-left-padding,html.no-flexboxlegacy .medium-double-left-padding{padding-left:3em}html.no-flexbox .half-left-space,html.no-flexbox .medium-half-left-space,html.no-flexboxlegacy .half-left-space,html.no-flexboxlegacy .medium-half-left-space{margin-left:.75em}html.no-flexbox .half-left-padding,html.no-flexbox .medium-half-left-padding,html.no-flexboxlegacy .half-left-padding,html.no-flexboxlegacy .medium-half-left-padding{padding-left:.75em}html.no-flexbox .medium-quarter-left-space,html.no-flexbox .quarter-left-space,html.no-flexboxlegacy .medium-quarter-left-space,html.no-flexboxlegacy .quarter-left-space{margin-left:.375em}html.no-flexbox .medium-quarter-left-padding,html.no-flexbox .quarter-left-padding,html.no-flexboxlegacy .medium-quarter-left-padding,html.no-flexboxlegacy .quarter-left-padding{padding-left:.375em}html.no-flexbox .hide-medium,html.no-flexboxlegacy .hide-medium{display:none!important}html.no-flexbox .show-medium,html.no-flexboxlegacy .show-medium{display:inherit!important}html.no-flexbox table.show-medium,html.no-flexboxlegacy table.show-medium{display:table}html.no-flexbox thead.show-medium,html.no-flexboxlegacy thead.show-medium{display:table-header-group}html.no-flexbox tbody.show-medium,html.no-flexboxlegacy tbody.show-medium{display:table-row-group}html.no-flexbox tfoot.show-medium,html.no-flexboxlegacy tfoot.show-medium{display:table-footer-group}html.no-flexbox tr.show-medium,html.no-flexboxlegacy tr.show-medium{display:table-row}html.no-flexbox td.show-medium,html.no-flexbox th.show-medium,html.no-flexboxlegacy td.show-medium,html.no-flexboxlegacy th.show-medium{display:table-cell}}@media screen and (min-width:321px) and (max-width:640px){html.no-flexbox .ink-grid,html.no-flexboxlegacy .ink-grid{padding:0 1.25em}html.no-flexbox .column-group>[class*=small-],html.no-flexboxlegacy .column-group>[class*=small-]{float:left;clear:none}html.no-flexbox .small-5,html.no-flexboxlegacy .small-5{width:5%}html.no-flexbox .small-10,html.no-flexboxlegacy .small-10{width:10%}html.no-flexbox .small-15,html.no-flexboxlegacy .small-15{width:15%}html.no-flexbox .small-20,html.no-flexboxlegacy .small-20{width:20%}html.no-flexbox .small-25,html.no-flexboxlegacy .small-25{width:25%}html.no-flexbox .small-30,html.no-flexboxlegacy .small-30{width:30%}html.no-flexbox .small-33,html.no-flexboxlegacy .small-33{width:33.33%}html.no-flexbox .small-35,html.no-flexboxlegacy .small-35{width:35%}html.no-flexbox .small-40,html.no-flexboxlegacy .small-40{width:40%}html.no-flexbox .small-45,html.no-flexboxlegacy .small-45{width:45%}html.no-flexbox .small-50,html.no-flexboxlegacy .small-50{width:50%}html.no-flexbox .small-55,html.no-flexboxlegacy .small-55{width:55%}html.no-flexbox .small-60,html.no-flexboxlegacy .small-60{width:60%}html.no-flexbox .small-65,html.no-flexboxlegacy .small-65{width:65%}html.no-flexbox .small-66,html.no-flexboxlegacy .small-66{width:66.66%}html.no-flexbox .small-70,html.no-flexboxlegacy .small-70{width:70%}html.no-flexbox .small-75,html.no-flexboxlegacy .small-75{width:75%}html.no-flexbox .small-80,html.no-flexboxlegacy .small-80{width:80%}html.no-flexbox .small-85,html.no-flexboxlegacy .small-85{width:85%}html.no-flexbox .small-90,html.no-flexboxlegacy .small-90{width:90%}html.no-flexbox .small-95,html.no-flexboxlegacy .small-95{width:95%}html.no-flexbox .small-100,html.no-flexboxlegacy .small-100{width:100%}html.no-flexbox [class*=small-100],html.no-flexboxlegacy [class*=small-100]{float:none;clear:both}html.no-flexbox .column-group,html.no-flexboxlegacy .column-group{*zoom:1}html.no-flexbox .column-group:after,html.no-flexboxlegacy .column-group:after{content:"";display:table;clear:both}html.no-flexbox .column-group.gutters,html.no-flexboxlegacy .column-group.gutters{margin-left:-1.25em}html.no-flexbox .column-group.gutters>[class*=all-],html.no-flexbox .column-group.gutters>[class*=small-],html.no-flexboxlegacy .column-group.gutters>[class*=all-],html.no-flexboxlegacy .column-group.gutters>[class*=small-]{padding-left:1.25em;margin-bottom:1.25em}html.no-flexbox .column-group.horizontal-gutters,html.no-flexboxlegacy .column-group.horizontal-gutters{margin-left:-1.25em}html.no-flexbox .column-group.horizontal-gutters>[class*=all-],html.no-flexbox .column-group.horizontal-gutters>[class*=small-],html.no-flexboxlegacy .column-group.horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.horizontal-gutters>[class*=small-]{padding-left:1.25em}html.no-flexbox .column-group.vertical-gutters>[class*=all-],html.no-flexbox .column-group.vertical-gutters>[class*=small-],html.no-flexboxlegacy .column-group.vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.vertical-gutters>[class*=small-]{margin-bottom:1.25em}html.no-flexbox .column-group.double-gutters,html.no-flexboxlegacy .column-group.double-gutters{margin-left:-2.5em}html.no-flexbox .column-group.double-gutters>[class*=all-],html.no-flexbox .column-group.double-gutters>[class*=small-],html.no-flexboxlegacy .column-group.double-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-gutters>[class*=small-]{padding-left:2.5em;margin-bottom:2.5em}html.no-flexbox .column-group.double-horizontal-gutters,html.no-flexboxlegacy .column-group.double-horizontal-gutters{margin-left:-2.5em}html.no-flexbox .column-group.double-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.double-horizontal-gutters>[class*=small-],html.no-flexboxlegacy .column-group.double-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-horizontal-gutters>[class*=small-]{padding-left:2.5em}html.no-flexbox .column-group.double-vertical-gutters>[class*=all-],html.no-flexbox .column-group.double-vertical-gutters>[class*=small-],html.no-flexboxlegacy .column-group.double-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-vertical-gutters>[class*=small-]{margin-bottom:2.5em}html.no-flexbox .column-group.half-gutters,html.no-flexboxlegacy .column-group.half-gutters{margin-left:-.625em}html.no-flexbox .column-group.half-gutters>[class*=all-],html.no-flexbox .column-group.half-gutters>[class*=small-],html.no-flexboxlegacy .column-group.half-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-gutters>[class*=small-]{padding-left:.625em;margin-bottom:.625em}html.no-flexbox .column-group.half-horizontal-gutters,html.no-flexboxlegacy .column-group.half-horizontal-gutters{margin-left:-.625em}html.no-flexbox .column-group.half-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.half-horizontal-gutters>[class*=small-],html.no-flexboxlegacy .column-group.half-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-horizontal-gutters>[class*=small-]{padding-left:.625em}html.no-flexbox .column-group.half-vertical-gutters>[class*=all-],html.no-flexbox .column-group.half-vertical-gutters>[class*=small-],html.no-flexboxlegacy .column-group.half-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-vertical-gutters>[class*=small-]{margin-bottom:.625em}html.no-flexbox .column-group.quarter-gutters,html.no-flexboxlegacy .column-group.quarter-gutters{margin-left:-.3125em}html.no-flexbox .column-group.quarter-gutters>[class*=all-],html.no-flexbox .column-group.quarter-gutters>[class*=small-],html.no-flexboxlegacy .column-group.quarter-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-gutters>[class*=small-]{padding-left:.3125em;margin-bottom:.3125em}html.no-flexbox .column-group.quarter-horizontal-gutters,html.no-flexboxlegacy .column-group.quarter-horizontal-gutters{margin-left:-.3125em}html.no-flexbox .column-group.quarter-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.quarter-horizontal-gutters>[class*=small-],html.no-flexboxlegacy .column-group.quarter-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-horizontal-gutters>[class*=small-]{padding-left:.3125em}html.no-flexbox .column-group.quarter-vertical-gutters>[class*=all-],html.no-flexbox .column-group.quarter-vertical-gutters>[class*=small-],html.no-flexboxlegacy .column-group.quarter-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-vertical-gutters>[class*=small-]{margin-bottom:.3125em}html.no-flexbox .column-group.small-gutters,html.no-flexboxlegacy .column-group.small-gutters{margin-left:-1.25em}html.no-flexbox .column-group.small-gutters>[class*=all-],html.no-flexbox .column-group.small-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-gutters>[class*=small-]{padding-left:.3125em;margin-bottom:.3125em}html.no-flexbox .column-group.small-horizontal-gutters,html.no-flexboxlegacy .column-group.small-horizontal-gutters{margin-left:-1.25em}html.no-flexbox .column-group.small-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.small-horizontal-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-horizontal-gutters>[class*=small-]{padding-left:1.25em}html.no-flexbox .column-group.small-vertical-gutters>[class*=all-],html.no-flexbox .column-group.small-vertical-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-vertical-gutters>[class*=small-]{margin-bottom:1.25em}html.no-flexbox .column-group.small-double-gutters,html.no-flexboxlegacy .column-group.small-double-gutters{margin-left:-2.5em}html.no-flexbox .column-group.small-double-gutters>[class*=all-],html.no-flexbox .column-group.small-double-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-double-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-double-gutters>[class*=small-]{padding-left:2.5em;margin-bottom:2.5em}html.no-flexbox .column-group.small-double-horizontal-gutters,html.no-flexboxlegacy .column-group.small-double-horizontal-gutters{margin-left:-2.5em}html.no-flexbox .column-group.small-double-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.small-double-horizontal-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-double-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-double-horizontal-gutters>[class*=small-]{padding-left:2.5em}html.no-flexbox .column-group.small-double-vertical-gutters>[class*=all-],html.no-flexbox .column-group.small-double-vertical-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-double-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-double-vertical-gutters>[class*=small-]{margin-bottom:2.5em}html.no-flexbox .column-group.small-half-gutters,html.no-flexboxlegacy .column-group.small-half-gutters{margin-left:-.625em}html.no-flexbox .column-group.small-half-gutters>[class*=all-],html.no-flexbox .column-group.small-half-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-half-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-half-gutters>[class*=small-]{padding-left:.625em;margin-bottom:.625em}html.no-flexbox .column-group.small-half-horizontal-gutters,html.no-flexboxlegacy .column-group.small-half-horizontal-gutters{margin-left:-.625em}html.no-flexbox .column-group.small-half-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.small-half-horizontal-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-half-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-half-horizontal-gutters>[class*=small-]{padding-left:.625em}html.no-flexbox .column-group.small-half-vertical-gutters>[class*=all-],html.no-flexbox .column-group.small-half-vertical-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-half-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-half-vertical-gutters>[class*=small-]{margin-bottom:.625em}html.no-flexbox .column-group.small-quarter-gutters,html.no-flexboxlegacy .column-group.small-quarter-gutters{margin-left:-.3125em}html.no-flexbox .column-group.small-quarter-gutters>[class*=all-],html.no-flexbox .column-group.small-quarter-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-quarter-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-quarter-gutters>[class*=small-]{padding-left:.3125em;margin-bottom:.3125em}html.no-flexbox .column-group.small-quarter-horizontal-gutters,html.no-flexboxlegacy .column-group.small-quarter-horizontal-gutters{margin-left:-.3125em}html.no-flexbox .column-group.small-quarter-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.small-quarter-horizontal-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-quarter-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-quarter-horizontal-gutters>[class*=small-]{padding-left:.3125em}html.no-flexbox .column-group.small-quarter-vertical-gutters>[class*=all-],html.no-flexbox .column-group.small-quarter-vertical-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-quarter-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-quarter-vertical-gutters>[class*=small-]{margin-bottom:.3125em}html.no-flexbox .column-group.small-no-gutters,html.no-flexboxlegacy .column-group.small-no-gutters{margin-left:0}html.no-flexbox .column-group.small-no-gutters>[class*=all-],html.no-flexbox .column-group.small-no-gutters>[class*=small-],html.no-flexboxlegacy .column-group.small-no-gutters>[class*=all-],html.no-flexboxlegacy .column-group.small-no-gutters>[class*=small-]{padding-left:0;margin-bottom:0}html.no-flexbox .ink-table tbody[class*=small-],html.no-flexbox .ink-table td[class*=small-],html.no-flexbox .ink-table tfoot[class*=small-],html.no-flexbox .ink-table th[class*=small-],html.no-flexbox .ink-table thead[class*=small-],html.no-flexbox .ink-table tr[class*=small-],html.no-flexboxlegacy .ink-table tbody[class*=small-],html.no-flexboxlegacy .ink-table td[class*=small-],html.no-flexboxlegacy .ink-table tfoot[class*=small-],html.no-flexboxlegacy .ink-table th[class*=small-],html.no-flexboxlegacy .ink-table thead[class*=small-],html.no-flexboxlegacy .ink-table tr[class*=small-]{float:none}html.no-flexbox .small-push-left,html.no-flexboxlegacy .small-push-left{float:left}html.no-flexbox .small-push-center,html.no-flexboxlegacy .small-push-center{float:none;margin-left:auto;margin-right:auto}html.no-flexbox .small-push-right,html.no-flexboxlegacy .small-push-right{float:right}html.no-flexbox .small-align-left,html.no-flexboxlegacy .small-align-left{text-align:left}html.no-flexbox .small-align-center,html.no-flexboxlegacy .small-align-center{text-align:center}html.no-flexbox .small-align-right,html.no-flexboxlegacy .small-align-right{text-align:right}html.no-flexbox .small-no-margin,html.no-flexboxlegacy .small-no-margin{margin:0!important}html.no-flexbox .small-space,html.no-flexbox .space,html.no-flexboxlegacy .small-space,html.no-flexboxlegacy .space{margin:1.25em}html.no-flexbox .padding,html.no-flexbox .small-padding,html.no-flexboxlegacy .padding,html.no-flexboxlegacy .small-padding{padding:1.25em}html.no-flexbox .double-space,html.no-flexbox .small-double-space,html.no-flexboxlegacy .double-space,html.no-flexboxlegacy .small-double-space{margin:2.5em}html.no-flexbox .double-padding,html.no-flexbox .small-double-padding,html.no-flexboxlegacy .double-padding,html.no-flexboxlegacy .small-double-padding{padding:2.5em}html.no-flexbox .half-space,html.no-flexbox .small-half-space,html.no-flexboxlegacy .half-space,html.no-flexboxlegacy .small-half-space{margin:.625em}html.no-flexbox .half-padding,html.no-flexbox .small-half-padding,html.no-flexboxlegacy .half-padding,html.no-flexboxlegacy .small-half-padding{padding:.625em}html.no-flexbox .quarter-space,html.no-flexbox .small-quarter-space,html.no-flexboxlegacy .quarter-space,html.no-flexboxlegacy .small-quarter-space{margin:.3125em}html.no-flexbox .quarter-padding,html.no-flexbox .small-quarter-padding,html.no-flexboxlegacy .quarter-padding,html.no-flexboxlegacy .small-quarter-padding{padding:.3125em}html.no-flexbox .small-vertical-space,html.no-flexbox .vertical-space,html.no-flexboxlegacy .small-vertical-space,html.no-flexboxlegacy .vertical-space{margin-top:1.25em;margin-bottom:1.25em}html.no-flexbox .small-vertical-padding,html.no-flexbox .vertical-padding,html.no-flexboxlegacy .small-vertical-padding,html.no-flexboxlegacy .vertical-padding{padding-top:1.25em;padding-bottom:1.25em}html.no-flexbox .double-vertical-space,html.no-flexbox .small-double-vertical-space,html.no-flexboxlegacy .double-vertical-space,html.no-flexboxlegacy .small-double-vertical-space{margin-top:2.5em;margin-bottom:2.5em}html.no-flexbox .double-vertical-padding,html.no-flexbox .small-double-vertical-padding,html.no-flexboxlegacy .double-vertical-padding,html.no-flexboxlegacy .small-double-vertical-padding{padding-top:2.5em;padding-bottom:2.5em}html.no-flexbox .half-vertical-space,html.no-flexbox .small-half-vertical-space,html.no-flexboxlegacy .half-vertical-space,html.no-flexboxlegacy .small-half-vertical-space{margin-top:.625em;margin-bottom:.625em}html.no-flexbox .half-vertical-padding,html.no-flexbox .small-half-vertical-padding,html.no-flexboxlegacy .half-vertical-padding,html.no-flexboxlegacy .small-half-vertical-padding{padding-top:.625em;padding-bottom:.625em}html.no-flexbox .quarter-vertical-space,html.no-flexbox .small-quarter-vertical-space,html.no-flexboxlegacy .quarter-vertical-space,html.no-flexboxlegacy .small-quarter-vertical-space{margin-top:.3125em;margin-bottom:.3125em}html.no-flexbox .quarter-vertical-padding,html.no-flexbox .small-quarter-vertical-padding,html.no-flexboxlegacy .quarter-vertical-padding,html.no-flexboxlegacy .small-quarter-vertical-padding{padding-top:.3125em;padding-bottom:.3125em}html.no-flexbox .horizontal-space,html.no-flexbox .small-horizontal-space,html.no-flexboxlegacy .horizontal-space,html.no-flexboxlegacy .small-horizontal-space{margin-left:1.25em;margin-right:1.25em}html.no-flexbox .horizontal-padding,html.no-flexbox .small-horizontal-padding,html.no-flexboxlegacy .horizontal-padding,html.no-flexboxlegacy .small-horizontal-padding{padding-left:1.25em;padding-right:1.25em}html.no-flexbox .double-horizontal-space,html.no-flexbox .small-double-horizontal-space,html.no-flexboxlegacy .double-horizontal-space,html.no-flexboxlegacy .small-double-horizontal-space{margin-left:2.5em;margin-right:2.5em}html.no-flexbox .double-horizontal-padding,html.no-flexbox .small-double-horizontal-padding,html.no-flexboxlegacy .double-horizontal-padding,html.no-flexboxlegacy .small-double-horizontal-padding{padding-left:2.5em;padding-right:2.5em}html.no-flexbox .half-horizontal-space,html.no-flexbox .small-half-horizontal-space,html.no-flexboxlegacy .half-horizontal-space,html.no-flexboxlegacy .small-half-horizontal-space{margin-left:.625em;margin-right:.625em}html.no-flexbox .half-horizontal-padding,html.no-flexbox .small-half-horizontal-padding,html.no-flexboxlegacy .half-horizontal-padding,html.no-flexboxlegacy .small-half-horizontal-padding{padding-left:.625em;padding-right:.625em}html.no-flexbox .quarter-horizontal-space,html.no-flexbox .small-quarter-horizontal-space,html.no-flexboxlegacy .quarter-horizontal-space,html.no-flexboxlegacy .small-quarter-horizontal-space{margin-left:.3125em;margin-right:.3125em}html.no-flexbox .quarter-horizontal-padding,html.no-flexbox .small-quarter-horizontal-padding,html.no-flexboxlegacy .quarter-horizontal-padding,html.no-flexboxlegacy .small-quarter-horizontal-padding{padding-left:.3125em;padding-right:.3125em}html.no-flexbox .small-top-space,html.no-flexbox .top-space,html.no-flexboxlegacy .small-top-space,html.no-flexboxlegacy .top-space{margin-top:1.25em}html.no-flexbox .small-top-padding,html.no-flexbox .top-padding,html.no-flexboxlegacy .small-top-padding,html.no-flexboxlegacy .top-padding{padding-top:1.25em}html.no-flexbox .double-top-space,html.no-flexbox .small-double-top-space,html.no-flexboxlegacy .double-top-space,html.no-flexboxlegacy .small-double-top-space{margin-top:2.5em}html.no-flexbox .double-top-padding,html.no-flexbox .small-double-top-padding,html.no-flexboxlegacy .double-top-padding,html.no-flexboxlegacy .small-double-top-padding{padding-top:2.5em}html.no-flexbox .half-top-space,html.no-flexbox .small-half-top-space,html.no-flexboxlegacy .half-top-space,html.no-flexboxlegacy .small-half-top-space{margin-top:.625em}html.no-flexbox .half-top-padding,html.no-flexbox .small-half-top-padding,html.no-flexboxlegacy .half-top-padding,html.no-flexboxlegacy .small-half-top-padding{padding-top:.625em}html.no-flexbox .quarter-top-space,html.no-flexbox .small-quarter-top-space,html.no-flexboxlegacy .quarter-top-space,html.no-flexboxlegacy .small-quarter-top-space{margin-top:.3125em}html.no-flexbox .quarter-top-padding,html.no-flexbox .small-quarter-top-padding,html.no-flexboxlegacy .quarter-top-padding,html.no-flexboxlegacy .small-quarter-top-padding{padding-top:.3125em}html.no-flexbox .right-space,html.no-flexbox .small-right-space,html.no-flexboxlegacy .right-space,html.no-flexboxlegacy .small-right-space{margin-right:1.25em}html.no-flexbox .right-padding,html.no-flexbox .small-right-padding,html.no-flexboxlegacy .right-padding,html.no-flexboxlegacy .small-right-padding{padding-right:1.25em}html.no-flexbox .double-right-space,html.no-flexbox .small-double-right-space,html.no-flexboxlegacy .double-right-space,html.no-flexboxlegacy .small-double-right-space{margin-right:2.5em}html.no-flexbox .double-right-padding,html.no-flexbox .small-double-right-padding,html.no-flexboxlegacy .double-right-padding,html.no-flexboxlegacy .small-double-right-padding{padding-right:2.5em}html.no-flexbox .half-right-space,html.no-flexbox .small-half-right-space,html.no-flexboxlegacy .half-right-space,html.no-flexboxlegacy .small-half-right-space{margin-right:.625em}html.no-flexbox .half-right-padding,html.no-flexbox .small-half-right-padding,html.no-flexboxlegacy .half-right-padding,html.no-flexboxlegacy .small-half-right-padding{padding-right:.625em}html.no-flexbox .quarter-right-space,html.no-flexbox .small-quarter-right-space,html.no-flexboxlegacy .quarter-right-space,html.no-flexboxlegacy .small-quarter-right-space{margin-right:.3125em}html.no-flexbox .quarter-right-padding,html.no-flexbox .small-quarter-right-padding,html.no-flexboxlegacy .quarter-right-padding,html.no-flexboxlegacy .small-quarter-right-padding{padding-right:.3125em}html.no-flexbox .bottom-space,html.no-flexbox .small-bottom-space,html.no-flexboxlegacy .bottom-space,html.no-flexboxlegacy .small-bottom-space{margin-bottom:1.25em}html.no-flexbox .bottom-padding,html.no-flexbox .small-bottom-padding,html.no-flexboxlegacy .bottom-padding,html.no-flexboxlegacy .small-bottom-padding{padding-bottom:1.25em}html.no-flexbox .double-bottom-space,html.no-flexbox .small-double-bottom-space,html.no-flexboxlegacy .double-bottom-space,html.no-flexboxlegacy .small-double-bottom-space{margin-bottom:2.5em}html.no-flexbox .double-bottom-padding,html.no-flexbox .small-double-bottom-padding,html.no-flexboxlegacy .double-bottom-padding,html.no-flexboxlegacy .small-double-bottom-padding{padding-bottom:2.5em}html.no-flexbox .half-bottom-space,html.no-flexbox .small-half-bottom-space,html.no-flexboxlegacy .half-bottom-space,html.no-flexboxlegacy .small-half-bottom-space{margin-bottom:.625em}html.no-flexbox .half-bottom-padding,html.no-flexbox .small-half-bottom-padding,html.no-flexboxlegacy .half-bottom-padding,html.no-flexboxlegacy .small-half-bottom-padding{padding-bottom:.625em}html.no-flexbox .quarter-bottom-space,html.no-flexbox .small-quarter-bottom-space,html.no-flexboxlegacy .quarter-bottom-space,html.no-flexboxlegacy .small-quarter-bottom-space{margin-bottom:.3125em}html.no-flexbox .quarter-bottom-padding,html.no-flexbox .small-quarter-bottom-padding,html.no-flexboxlegacy .quarter-bottom-padding,html.no-flexboxlegacy .small-quarter-bottom-padding{padding-bottom:.3125em}html.no-flexbox .left-space,html.no-flexbox .small-left-space,html.no-flexboxlegacy .left-space,html.no-flexboxlegacy .small-left-space{margin-left:1.25em}html.no-flexbox .left-padding,html.no-flexbox .small-left-padding,html.no-flexboxlegacy .left-padding,html.no-flexboxlegacy .small-left-padding{padding-left:1.25em}html.no-flexbox .double-left-space,html.no-flexbox .small-double-left-space,html.no-flexboxlegacy .double-left-space,html.no-flexboxlegacy .small-double-left-space{margin-left:2.5em}html.no-flexbox .double-left-padding,html.no-flexbox .small-double-left-padding,html.no-flexboxlegacy .double-left-padding,html.no-flexboxlegacy .small-double-left-padding{padding-left:2.5em}html.no-flexbox .half-left-space,html.no-flexbox .small-half-left-space,html.no-flexboxlegacy .half-left-space,html.no-flexboxlegacy .small-half-left-space{margin-left:.625em}html.no-flexbox .half-left-padding,html.no-flexbox .small-half-left-padding,html.no-flexboxlegacy .half-left-padding,html.no-flexboxlegacy .small-half-left-padding{padding-left:.625em}html.no-flexbox .quarter-left-space,html.no-flexbox .small-quarter-left-space,html.no-flexboxlegacy .quarter-left-space,html.no-flexboxlegacy .small-quarter-left-space{margin-left:.3125em}html.no-flexbox .quarter-left-padding,html.no-flexbox .small-quarter-left-padding,html.no-flexboxlegacy .quarter-left-padding,html.no-flexboxlegacy .small-quarter-left-padding{padding-left:.3125em}html.no-flexbox .hide-small,html.no-flexboxlegacy .hide-small{display:none!important}html.no-flexbox .show-small,html.no-flexboxlegacy .show-small{display:inherit!important}html.no-flexbox table.show-small,html.no-flexboxlegacy table.show-small{display:table}html.no-flexbox thead.show-small,html.no-flexboxlegacy thead.show-small{display:table-header-group}html.no-flexbox tbody.show-small,html.no-flexboxlegacy tbody.show-small{display:table-row-group}html.no-flexbox tfoot.show-small,html.no-flexboxlegacy tfoot.show-small{display:table-footer-group}html.no-flexbox tr.show-small,html.no-flexboxlegacy tr.show-small{display:table-row}html.no-flexbox td.show-small,html.no-flexbox th.show-small,html.no-flexboxlegacy td.show-small,html.no-flexboxlegacy th.show-small{display:table-cell}}@media screen and (max-width:320px){html.no-flexbox .ink-grid,html.no-flexboxlegacy .ink-grid{padding:0 1em}html.no-flexbox .column-group>[class*=tiny-],html.no-flexboxlegacy .column-group>[class*=tiny-]{float:left;clear:none}html.no-flexbox .tiny-5,html.no-flexboxlegacy .tiny-5{width:5%}html.no-flexbox .tiny-10,html.no-flexboxlegacy .tiny-10{width:10%}html.no-flexbox .tiny-15,html.no-flexboxlegacy .tiny-15{width:15%}html.no-flexbox .tiny-20,html.no-flexboxlegacy .tiny-20{width:20%}html.no-flexbox .tiny-25,html.no-flexboxlegacy .tiny-25{width:25%}html.no-flexbox .tiny-30,html.no-flexboxlegacy .tiny-30{width:30%}html.no-flexbox .tiny-33,html.no-flexboxlegacy .tiny-33{width:33.33%}html.no-flexbox .tiny-35,html.no-flexboxlegacy .tiny-35{width:35%}html.no-flexbox .tiny-40,html.no-flexboxlegacy .tiny-40{width:40%}html.no-flexbox .tiny-45,html.no-flexboxlegacy .tiny-45{width:45%}html.no-flexbox .tiny-50,html.no-flexboxlegacy .tiny-50{width:50%}html.no-flexbox .tiny-55,html.no-flexboxlegacy .tiny-55{width:55%}html.no-flexbox .tiny-60,html.no-flexboxlegacy .tiny-60{width:60%}html.no-flexbox .tiny-65,html.no-flexboxlegacy .tiny-65{width:65%}html.no-flexbox .tiny-66,html.no-flexboxlegacy .tiny-66{width:66.66%}html.no-flexbox .tiny-70,html.no-flexboxlegacy .tiny-70{width:70%}html.no-flexbox .tiny-75,html.no-flexboxlegacy .tiny-75{width:75%}html.no-flexbox .tiny-80,html.no-flexboxlegacy .tiny-80{width:80%}html.no-flexbox .tiny-85,html.no-flexboxlegacy .tiny-85{width:85%}html.no-flexbox .tiny-90,html.no-flexboxlegacy .tiny-90{width:90%}html.no-flexbox .tiny-95,html.no-flexboxlegacy .tiny-95{width:95%}html.no-flexbox .tiny-100,html.no-flexboxlegacy .tiny-100{width:100%}html.no-flexbox [class*=tiny-100],html.no-flexboxlegacy [class*=tiny-100]{float:none;clear:both}html.no-flexbox .column-group,html.no-flexboxlegacy .column-group{*zoom:1}html.no-flexbox .column-group:after,html.no-flexboxlegacy .column-group:after{content:"";display:table;clear:both}html.no-flexbox .column-group.gutters,html.no-flexboxlegacy .column-group.gutters{margin-left:-1em}html.no-flexbox .column-group.gutters>[class*=all-],html.no-flexbox .column-group.gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.gutters>[class*=all-],html.no-flexboxlegacy .column-group.gutters>[class*=tiny-]{padding-left:1em;margin-bottom:1em}html.no-flexbox .column-group.horizontal-gutters,html.no-flexboxlegacy .column-group.horizontal-gutters{margin-left:-1em}html.no-flexbox .column-group.horizontal-gutters>[class*=all-],html.no-flexbox .column-group.horizontal-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.horizontal-gutters>[class*=tiny-]{padding-left:1em}html.no-flexbox .column-group.vertical-gutters>[class*=all-],html.no-flexbox .column-group.vertical-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.vertical-gutters>[class*=tiny-]{margin-bottom:1em}html.no-flexbox .column-group.double-gutters,html.no-flexboxlegacy .column-group.double-gutters{margin-left:-2em}html.no-flexbox .column-group.double-gutters>[class*=all-],html.no-flexbox .column-group.double-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.double-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-gutters>[class*=tiny-]{padding-left:2em;margin-bottom:2em}html.no-flexbox .column-group.double-horizontal-gutters,html.no-flexboxlegacy .column-group.double-horizontal-gutters{margin-left:-2em}html.no-flexbox .column-group.double-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.double-horizontal-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.double-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-horizontal-gutters>[class*=tiny-]{padding-left:2em}html.no-flexbox .column-group.double-vertical-gutters>[class*=all-],html.no-flexbox .column-group.double-vertical-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.double-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.double-vertical-gutters>[class*=tiny-]{margin-bottom:2em}html.no-flexbox .column-group.half-gutters,html.no-flexboxlegacy .column-group.half-gutters{margin-left:-.5em}html.no-flexbox .column-group.half-gutters>[class*=all-],html.no-flexbox .column-group.half-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.half-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-gutters>[class*=tiny-]{padding-left:.5em;margin-bottom:.5em}html.no-flexbox .column-group.half-horizontal-gutters,html.no-flexboxlegacy .column-group.half-horizontal-gutters{margin-left:-.5em}html.no-flexbox .column-group.half-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.half-horizontal-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.half-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-horizontal-gutters>[class*=tiny-]{padding-left:.5em}html.no-flexbox .column-group.half-vertical-gutters>[class*=all-],html.no-flexbox .column-group.half-vertical-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.half-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.half-vertical-gutters>[class*=tiny-]{margin-bottom:.5em}html.no-flexbox .column-group.quarter-gutters,html.no-flexboxlegacy .column-group.quarter-gutters{margin-left:-.25em}html.no-flexbox .column-group.quarter-gutters>[class*=all-],html.no-flexbox .column-group.quarter-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.quarter-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-gutters>[class*=tiny-]{padding-left:.25em;margin-bottom:.25em}html.no-flexbox .column-group.quarter-horizontal-gutters,html.no-flexboxlegacy .column-group.quarter-horizontal-gutters{margin-left:-.25em}html.no-flexbox .column-group.quarter-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.quarter-horizontal-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.quarter-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-horizontal-gutters>[class*=tiny-]{padding-left:.25em}html.no-flexbox .column-group.quarter-vertical-gutters>[class*=all-],html.no-flexbox .column-group.quarter-vertical-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.quarter-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.quarter-vertical-gutters>[class*=tiny-]{margin-bottom:.25em}html.no-flexbox .column-group.tiny-gutters,html.no-flexboxlegacy .column-group.tiny-gutters{margin-left:-1em}html.no-flexbox .column-group.tiny-gutters>[class*=all-],html.no-flexbox .column-group.tiny-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-gutters>[class*=tiny-]{padding-left:.25em;margin-bottom:.25em}html.no-flexbox .column-group.tiny-horizontal-gutters,html.no-flexboxlegacy .column-group.tiny-horizontal-gutters{margin-left:-1em}html.no-flexbox .column-group.tiny-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.tiny-horizontal-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-horizontal-gutters>[class*=tiny-]{padding-left:1em}html.no-flexbox .column-group.tiny-vertical-gutters>[class*=all-],html.no-flexbox .column-group.tiny-vertical-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-vertical-gutters>[class*=tiny-]{margin-bottom:1em}html.no-flexbox .column-group.tiny-double-gutters,html.no-flexboxlegacy .column-group.tiny-double-gutters{margin-left:-2em}html.no-flexbox .column-group.tiny-double-gutters>[class*=all-],html.no-flexbox .column-group.tiny-double-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-double-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-double-gutters>[class*=tiny-]{padding-left:2em;margin-bottom:2em}html.no-flexbox .column-group.tiny-double-horizontal-gutters,html.no-flexboxlegacy .column-group.tiny-double-horizontal-gutters{margin-left:-2em}html.no-flexbox .column-group.tiny-double-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.tiny-double-horizontal-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-double-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-double-horizontal-gutters>[class*=tiny-]{padding-left:2em}html.no-flexbox .column-group.tiny-double-vertical-gutters>[class*=all-],html.no-flexbox .column-group.tiny-double-vertical-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-double-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-double-vertical-gutters>[class*=tiny-]{margin-bottom:2em}html.no-flexbox .column-group.tiny-half-gutters,html.no-flexboxlegacy .column-group.tiny-half-gutters{margin-left:-.5em}html.no-flexbox .column-group.tiny-half-gutters>[class*=all-],html.no-flexbox .column-group.tiny-half-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-half-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-half-gutters>[class*=tiny-]{padding-left:.5em;margin-bottom:.5em}html.no-flexbox .column-group.tiny-half-horizontal-gutters,html.no-flexboxlegacy .column-group.tiny-half-horizontal-gutters{margin-left:-.5em}html.no-flexbox .column-group.tiny-half-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.tiny-half-horizontal-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-half-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-half-horizontal-gutters>[class*=tiny-]{padding-left:.5em}html.no-flexbox .column-group.tiny-half-vertical-gutters>[class*=all-],html.no-flexbox .column-group.tiny-half-vertical-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-half-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-half-vertical-gutters>[class*=tiny-]{margin-bottom:.5em}html.no-flexbox .column-group.tiny-quarter-gutters,html.no-flexboxlegacy .column-group.tiny-quarter-gutters{margin-left:-.25em}html.no-flexbox .column-group.tiny-quarter-gutters>[class*=all-],html.no-flexbox .column-group.tiny-quarter-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-quarter-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-quarter-gutters>[class*=tiny-]{padding-left:.25em;margin-bottom:.25em}html.no-flexbox .column-group.tiny-quarter-horizontal-gutters,html.no-flexboxlegacy .column-group.tiny-quarter-horizontal-gutters{margin-left:-.25em}html.no-flexbox .column-group.tiny-quarter-horizontal-gutters>[class*=all-],html.no-flexbox .column-group.tiny-quarter-horizontal-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-quarter-horizontal-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-quarter-horizontal-gutters>[class*=tiny-]{padding-left:.25em}html.no-flexbox .column-group.tiny-quarter-vertical-gutters>[class*=all-],html.no-flexbox .column-group.tiny-quarter-vertical-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-quarter-vertical-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-quarter-vertical-gutters>[class*=tiny-]{margin-bottom:.25em}html.no-flexbox .column-group.tiny-no-gutters,html.no-flexboxlegacy .column-group.tiny-no-gutters{margin-left:0}html.no-flexbox .column-group.tiny-no-gutters>[class*=all-],html.no-flexbox .column-group.tiny-no-gutters>[class*=tiny-],html.no-flexboxlegacy .column-group.tiny-no-gutters>[class*=all-],html.no-flexboxlegacy .column-group.tiny-no-gutters>[class*=tiny-]{padding-left:0;margin-bottom:0}html.no-flexbox .ink-table tbody[class*=tiny-],html.no-flexbox .ink-table td[class*=tiny-],html.no-flexbox .ink-table tfoot[class*=tiny-],html.no-flexbox .ink-table th[class*=tiny-],html.no-flexbox .ink-table thead[class*=tiny-],html.no-flexbox .ink-table tr[class*=tiny-],html.no-flexboxlegacy .ink-table tbody[class*=tiny-],html.no-flexboxlegacy .ink-table td[class*=tiny-],html.no-flexboxlegacy .ink-table tfoot[class*=tiny-],html.no-flexboxlegacy .ink-table th[class*=tiny-],html.no-flexboxlegacy .ink-table thead[class*=tiny-],html.no-flexboxlegacy .ink-table tr[class*=tiny-]{float:none}html.no-flexbox .tiny-push-left,html.no-flexboxlegacy .tiny-push-left{float:left}html.no-flexbox .tiny-push-center,html.no-flexboxlegacy .tiny-push-center{float:none;margin-left:auto;margin-right:auto}html.no-flexbox .tiny-push-right,html.no-flexboxlegacy .tiny-push-right{float:right}html.no-flexbox .tiny-align-left,html.no-flexboxlegacy .tiny-align-left{text-align:left}html.no-flexbox .tiny-align-center,html.no-flexboxlegacy .tiny-align-center{text-align:center}html.no-flexbox .tiny-align-right,html.no-flexboxlegacy .tiny-align-right{text-align:right}html.no-flexbox .tiny-no-margin,html.no-flexboxlegacy .tiny-no-margin{margin:0!important}html.no-flexbox .space,html.no-flexbox .tiny-space,html.no-flexboxlegacy .space,html.no-flexboxlegacy .tiny-space{margin:1em}html.no-flexbox .padding,html.no-flexbox .tiny-padding,html.no-flexboxlegacy .padding,html.no-flexboxlegacy .tiny-padding{padding:1em}html.no-flexbox .double-space,html.no-flexbox .tiny-double-space,html.no-flexboxlegacy .double-space,html.no-flexboxlegacy .tiny-double-space{margin:2em}html.no-flexbox .double-padding,html.no-flexbox .tiny-double-padding,html.no-flexboxlegacy .double-padding,html.no-flexboxlegacy .tiny-double-padding{padding:2em}html.no-flexbox .half-space,html.no-flexbox .tiny-half-space,html.no-flexboxlegacy .half-space,html.no-flexboxlegacy .tiny-half-space{margin:.5em}html.no-flexbox .half-padding,html.no-flexbox .tiny-half-padding,html.no-flexboxlegacy .half-padding,html.no-flexboxlegacy .tiny-half-padding{padding:.5em}html.no-flexbox .quarter-space,html.no-flexbox .tiny-quarter-space,html.no-flexboxlegacy .quarter-space,html.no-flexboxlegacy .tiny-quarter-space{margin:.25em}html.no-flexbox .quarter-padding,html.no-flexbox .tiny-quarter-padding,html.no-flexboxlegacy .quarter-padding,html.no-flexboxlegacy .tiny-quarter-padding{padding:.25em}html.no-flexbox .tiny-vertical-space,html.no-flexbox .vertical-space,html.no-flexboxlegacy .tiny-vertical-space,html.no-flexboxlegacy .vertical-space{margin-top:1em;margin-bottom:1em}html.no-flexbox .tiny-vertical-padding,html.no-flexbox .vertical-padding,html.no-flexboxlegacy .tiny-vertical-padding,html.no-flexboxlegacy .vertical-padding{padding-top:1em;padding-bottom:1em}html.no-flexbox .double-vertical-space,html.no-flexbox .tiny-double-vertical-space,html.no-flexboxlegacy .double-vertical-space,html.no-flexboxlegacy .tiny-double-vertical-space{margin-top:2em;margin-bottom:2em}html.no-flexbox .double-vertical-padding,html.no-flexbox .tiny-double-vertical-padding,html.no-flexboxlegacy .double-vertical-padding,html.no-flexboxlegacy .tiny-double-vertical-padding{padding-top:2em;padding-bottom:2em}html.no-flexbox .half-vertical-space,html.no-flexbox .tiny-half-vertical-space,html.no-flexboxlegacy .half-vertical-space,html.no-flexboxlegacy .tiny-half-vertical-space{margin-top:.5em;margin-bottom:.5em}html.no-flexbox .half-vertical-padding,html.no-flexbox .tiny-half-vertical-padding,html.no-flexboxlegacy .half-vertical-padding,html.no-flexboxlegacy .tiny-half-vertical-padding{padding-top:.5em;padding-bottom:.5em}html.no-flexbox .quarter-vertical-space,html.no-flexbox .tiny-quarter-vertical-space,html.no-flexboxlegacy .quarter-vertical-space,html.no-flexboxlegacy .tiny-quarter-vertical-space{margin-top:.25em;margin-bottom:.25em}html.no-flexbox .quarter-vertical-padding,html.no-flexbox .tiny-quarter-vertical-padding,html.no-flexboxlegacy .quarter-vertical-padding,html.no-flexboxlegacy .tiny-quarter-vertical-padding{padding-top:.25em;padding-bottom:.25em}html.no-flexbox .horizontal-space,html.no-flexbox .tiny-horizontal-space,html.no-flexboxlegacy .horizontal-space,html.no-flexboxlegacy .tiny-horizontal-space{margin-left:1em;margin-right:1em}html.no-flexbox .horizontal-padding,html.no-flexbox .tiny-horizontal-padding,html.no-flexboxlegacy .horizontal-padding,html.no-flexboxlegacy .tiny-horizontal-padding{padding-left:1em;padding-right:1em}html.no-flexbox .double-horizontal-space,html.no-flexbox .tiny-double-horizontal-space,html.no-flexboxlegacy .double-horizontal-space,html.no-flexboxlegacy .tiny-double-horizontal-space{margin-left:2em;margin-right:2em}html.no-flexbox .double-horizontal-padding,html.no-flexbox .tiny-double-horizontal-padding,html.no-flexboxlegacy .double-horizontal-padding,html.no-flexboxlegacy .tiny-double-horizontal-padding{padding-left:2em;padding-right:2em}html.no-flexbox .half-horizontal-space,html.no-flexbox .tiny-half-horizontal-space,html.no-flexboxlegacy .half-horizontal-space,html.no-flexboxlegacy .tiny-half-horizontal-space{margin-left:.5em;margin-right:.5em}html.no-flexbox .half-horizontal-padding,html.no-flexbox .tiny-half-horizontal-padding,html.no-flexboxlegacy .half-horizontal-padding,html.no-flexboxlegacy .tiny-half-horizontal-padding{padding-left:.5em;padding-right:.5em}html.no-flexbox .quarter-horizontal-space,html.no-flexbox .tiny-quarter-horizontal-space,html.no-flexboxlegacy .quarter-horizontal-space,html.no-flexboxlegacy .tiny-quarter-horizontal-space{margin-left:.25em;margin-right:.25em}html.no-flexbox .quarter-horizontal-padding,html.no-flexbox .tiny-quarter-horizontal-padding,html.no-flexboxlegacy .quarter-horizontal-padding,html.no-flexboxlegacy .tiny-quarter-horizontal-padding{padding-left:.25em;padding-right:.25em}html.no-flexbox .tiny-top-space,html.no-flexbox .top-space,html.no-flexboxlegacy .tiny-top-space,html.no-flexboxlegacy .top-space{margin-top:1em}html.no-flexbox .tiny-top-padding,html.no-flexbox .top-padding,html.no-flexboxlegacy .tiny-top-padding,html.no-flexboxlegacy .top-padding{padding-top:1em}html.no-flexbox .double-top-space,html.no-flexbox .tiny-double-top-space,html.no-flexboxlegacy .double-top-space,html.no-flexboxlegacy .tiny-double-top-space{margin-top:2em}html.no-flexbox .double-top-padding,html.no-flexbox .tiny-double-top-padding,html.no-flexboxlegacy .double-top-padding,html.no-flexboxlegacy .tiny-double-top-padding{padding-top:2em}html.no-flexbox .half-top-space,html.no-flexbox .tiny-half-top-space,html.no-flexboxlegacy .half-top-space,html.no-flexboxlegacy .tiny-half-top-space{margin-top:.5em}html.no-flexbox .half-top-padding,html.no-flexbox .tiny-half-top-padding,html.no-flexboxlegacy .half-top-padding,html.no-flexboxlegacy .tiny-half-top-padding{padding-top:.5em}html.no-flexbox .quarter-top-space,html.no-flexbox .tiny-quarter-top-space,html.no-flexboxlegacy .quarter-top-space,html.no-flexboxlegacy .tiny-quarter-top-space{margin-top:.25em}html.no-flexbox .quarter-top-padding,html.no-flexbox .tiny-quarter-top-padding,html.no-flexboxlegacy .quarter-top-padding,html.no-flexboxlegacy .tiny-quarter-top-padding{padding-top:.25em}html.no-flexbox .right-space,html.no-flexbox .tiny-right-space,html.no-flexboxlegacy .right-space,html.no-flexboxlegacy .tiny-right-space{margin-right:1em}html.no-flexbox .right-padding,html.no-flexbox .tiny-right-padding,html.no-flexboxlegacy .right-padding,html.no-flexboxlegacy .tiny-right-padding{padding-right:1em}html.no-flexbox .double-right-space,html.no-flexbox .tiny-double-right-space,html.no-flexboxlegacy .double-right-space,html.no-flexboxlegacy .tiny-double-right-space{margin-right:2em}html.no-flexbox .double-right-padding,html.no-flexbox .tiny-double-right-padding,html.no-flexboxlegacy .double-right-padding,html.no-flexboxlegacy .tiny-double-right-padding{padding-right:2em}html.no-flexbox .half-right-space,html.no-flexbox .tiny-half-right-space,html.no-flexboxlegacy .half-right-space,html.no-flexboxlegacy .tiny-half-right-space{margin-right:.5em}html.no-flexbox .half-right-padding,html.no-flexbox .tiny-half-right-padding,html.no-flexboxlegacy .half-right-padding,html.no-flexboxlegacy .tiny-half-right-padding{padding-right:.5em}html.no-flexbox .quarter-right-space,html.no-flexbox .tiny-quarter-right-space,html.no-flexboxlegacy .quarter-right-space,html.no-flexboxlegacy .tiny-quarter-right-space{margin-right:.25em}html.no-flexbox .quarter-right-padding,html.no-flexbox .tiny-quarter-right-padding,html.no-flexboxlegacy .quarter-right-padding,html.no-flexboxlegacy .tiny-quarter-right-padding{padding-right:.25em}html.no-flexbox .bottom-space,html.no-flexbox .tiny-bottom-space,html.no-flexboxlegacy .bottom-space,html.no-flexboxlegacy .tiny-bottom-space{margin-bottom:1em}html.no-flexbox .bottom-padding,html.no-flexbox .tiny-bottom-padding,html.no-flexboxlegacy .bottom-padding,html.no-flexboxlegacy .tiny-bottom-padding{padding-bottom:1em}html.no-flexbox .double-bottom-space,html.no-flexbox .tiny-double-bottom-space,html.no-flexboxlegacy .double-bottom-space,html.no-flexboxlegacy .tiny-double-bottom-space{margin-bottom:2em}html.no-flexbox .double-bottom-padding,html.no-flexbox .tiny-double-bottom-padding,html.no-flexboxlegacy .double-bottom-padding,html.no-flexboxlegacy .tiny-double-bottom-padding{padding-bottom:2em}html.no-flexbox .half-bottom-space,html.no-flexbox .tiny-half-bottom-space,html.no-flexboxlegacy .half-bottom-space,html.no-flexboxlegacy .tiny-half-bottom-space{margin-bottom:.5em}html.no-flexbox .half-bottom-padding,html.no-flexbox .tiny-half-bottom-padding,html.no-flexboxlegacy .half-bottom-padding,html.no-flexboxlegacy .tiny-half-bottom-padding{padding-bottom:.5em}html.no-flexbox .quarter-bottom-space,html.no-flexbox .tiny-quarter-bottom-space,html.no-flexboxlegacy .quarter-bottom-space,html.no-flexboxlegacy .tiny-quarter-bottom-space{margin-bottom:.25em}html.no-flexbox .quarter-bottom-padding,html.no-flexbox .tiny-quarter-bottom-padding,html.no-flexboxlegacy .quarter-bottom-padding,html.no-flexboxlegacy .tiny-quarter-bottom-padding{padding-bottom:.25em}html.no-flexbox .left-space,html.no-flexbox .tiny-left-space,html.no-flexboxlegacy .left-space,html.no-flexboxlegacy .tiny-left-space{margin-left:1em}html.no-flexbox .left-padding,html.no-flexbox .tiny-left-padding,html.no-flexboxlegacy .left-padding,html.no-flexboxlegacy .tiny-left-padding{padding-left:1em}html.no-flexbox .double-left-space,html.no-flexbox .tiny-double-left-space,html.no-flexboxlegacy .double-left-space,html.no-flexboxlegacy .tiny-double-left-space{margin-left:2em}html.no-flexbox .double-left-padding,html.no-flexbox .tiny-double-left-padding,html.no-flexboxlegacy .double-left-padding,html.no-flexboxlegacy .tiny-double-left-padding{padding-left:2em}html.no-flexbox .half-left-space,html.no-flexbox .tiny-half-left-space,html.no-flexboxlegacy .half-left-space,html.no-flexboxlegacy .tiny-half-left-space{margin-left:.5em}html.no-flexbox .half-left-padding,html.no-flexbox .tiny-half-left-padding,html.no-flexboxlegacy .half-left-padding,html.no-flexboxlegacy .tiny-half-left-padding{padding-left:.5em}html.no-flexbox .quarter-left-space,html.no-flexbox .tiny-quarter-left-space,html.no-flexboxlegacy .quarter-left-space,html.no-flexboxlegacy .tiny-quarter-left-space{margin-left:.25em}html.no-flexbox .quarter-left-padding,html.no-flexbox .tiny-quarter-left-padding,html.no-flexboxlegacy .quarter-left-padding,html.no-flexboxlegacy .tiny-quarter-left-padding{padding-left:.25em}html.no-flexbox .hide-tiny,html.no-flexboxlegacy .hide-tiny{display:none!important}html.no-flexbox .show-tiny,html.no-flexboxlegacy .show-tiny{display:inherit!important}html.no-flexbox table.show-tiny,html.no-flexboxlegacy table.show-tiny{display:table}html.no-flexbox thead.show-tiny,html.no-flexboxlegacy thead.show-tiny{display:table-header-group}html.no-flexbox tbody.show-tiny,html.no-flexboxlegacy tbody.show-tiny{display:table-row-group}html.no-flexbox tfoot.show-tiny,html.no-flexboxlegacy tfoot.show-tiny{display:table-footer-group}html.no-flexbox tr.show-tiny,html.no-flexboxlegacy tr.show-tiny{display:table-row}html.no-flexbox td.show-tiny,html.no-flexbox th.show-tiny,html.no-flexboxlegacy td.show-tiny,html.no-flexboxlegacy th.show-tiny{display:table-cell}}@media screen and (min-width:1261px){html.no-flexbox html,html.no-flexboxlegacy html{font-size:1.08em}html.no-flexbox html:after,html.no-flexboxlegacy html:after{font-family:'{name:xlarge,{min:"1261px",max:""}}'}}@media screen and (min-width:961px) and (max-width:1260px){html.no-flexbox html,html.no-flexboxlegacy html{font-size:1.05em}html.no-flexbox html:after,html.no-flexboxlegacy html:after{font-family:'{name:large,{min:"961px",max:"1260px"}}'}}@media screen and (min-width:641px) and (max-width:960px){html.no-flexbox html,html.no-flexboxlegacy html{font-size:1em}html.no-flexbox html:after,html.no-flexboxlegacy html:after{font-family:'{name:medium,{min:"641px",max:"960px"}}'}}@media screen and (min-width:321px) and (max-width:640px){html.no-flexbox html,html.no-flexboxlegacy html{font-size:.98em}html.no-flexbox html:after,html.no-flexboxlegacy html:after{font-family:'{name:small,{min:"321px",max:"640px"}}'}}@media screen and (max-width:320px){html.no-flexbox html,html.no-flexboxlegacy html{font-size:.97em}html.no-flexbox html:after,html.no-flexboxlegacy html:after{font-family:'{name:tiny,{min:"",max:"320px"}}'}}html.no-flexbox .ink-carousel,html.no-flexboxlegacy .ink-carousel{width:100%;position:relative;overflow:hidden;display:block}html.no-flexbox .ink-carousel .stage,html.no-flexboxlegacy .ink-carousel .stage{left:0;height:auto!important;margin-top:0;margin-bottom:0;padding-left:0;list-style-type:none;white-space:nowrap;position:relative;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease}html.no-flexbox .ink-carousel .stage .slide,html.no-flexboxlegacy .ink-carousel .stage .slide{position:relative;display:inline-block;vertical-align:top;white-space:normal;margin:0;float:none;zoom:1;*display:inline} \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/css/ink.css b/ajax/libs/ink/3.0.0/css/ink.css new file mode 100644 index 000000000..600297d8f --- /dev/null +++ b/ajax/libs/ink/3.0.0/css/ink.css @@ -0,0 +1,8345 @@ +@charset "UTF-8"; +/** + * Ink + * + * A set of tools for quick development of web interfaces. + * + * @package Ink + * @author Sapo Ink Team + * @license http://opensource.org/licenses/MIT MIT + * @link http://ink.sapo.pt + * @version 3.0.0 + */ +/** + * Ink class names prefix + * Used in all of Inks components root elements + */ +/** + * Grid class names + */ +/** + * Alerts class names + */ +/** + * Badges class names + */ +/** + * Buttons class names + */ +/** + * Forms class names + */ +/** + * Labels class names + */ +/** + * Navigation class names + */ +/** + * Dropdown class names + */ +/** + * Tables class names + */ +/** + * Images class names + */ +/** + * Sets the grids maximum width + * @var $grid-max-width (pixels|ems|percentage) + */ +/*! + * Sets the grids breakpoint + * + * To add a new break point you'll need to add an element to the list. + * + * Here's an example: ( class-name-prefix, minimum-width, maximum-width, gutter-width, no-media-query). + * + * class-name-prefix: this is the prefix used in tons of inks classes i.e.: large-100, small-40, etc. + * minimum-width: (pixels|null) the minimum width for the breakpoint + * maximum-width: (pixels|null) the maximum width for the breakpoint + * gutter-width: (ems) the width for the gutters (space between grid columns) for the breakpoint + * no-media-query: (true|false) if you need to support IE8 set this to true on a single breakpoint. + * Since IE8 does not support the @media statement leaving one of the breakpoints + * outside a @media query let's you use the grid in IE8. + * + */ +.show-all { + display: inherit; +} + +.hide-all { + display: none !important; +} + +.no-margin { + margin: 0 !important; +} + +.no-padding { + padding: 0 !important; +} + +.push-left { + float: left; +} + +.push-center { + float: none !important; + margin-left: auto; + margin-right: auto; +} + +.push-right { + float: right; + -webkit-justify-content: flex-end; + -moz-justify-content: flex-end; + justify-content: flex-end; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +.clearfix { + *zoom: 1; + overflow: hidden; + *zoom: 1; +} +.clearfix:after { + content: ""; + display: table; + clear: both; +} + +/*! normalize.css v3.0.0 | 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 */ +} +html * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/** + * Remove default margin. + */ +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ +/** + * Correct `block` display not defined in IE 8/9. + */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ +audio, +canvas, +progress, +video { + display: inline-block; + /* 1 */ + vertical-align: baseline; + /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9. + * Hide the `template` element in IE, Safari, and Firefox < 22. + */ +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ +/** + * Remove the gray background color from active links in IE 10. + */ +a { + background: 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, Safari 5, and Chrome. + */ +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari 5 and Chrome. + */ +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ +h1 { + font-size: 2em; + margin: .67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -.5em; +} + +sub { + bottom: -.25em; +} + +/* Embedded content + ========================================================================== */ +/** + * Remove border when inside `a` element in IE 8/9. + */ +img { + border: 0; +} + +/** + * Correct overflow displayed oddly in IE 9. + */ +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ +/** + * Address margin not present in IE 8/9 and Safari 5. + */ +figure { + margin: 0; +} + +/** + * Address differences between Firefox and other browsers. + */ +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * 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; +} + +/* Forms + ========================================================================== */ +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ +button, +input, +optgroup, +select, +textarea { + color: inherit; + /* 1 */ + font: inherit; + /* 2 */ + margin: 0; + /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10. + */ +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8+, and Opera + * Correct `select` style inheritance in Firefox. + */ +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + /* 2 */ + cursor: pointer; + /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ +input[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + /* 2 */ + box-sizing: border-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: .35em .625em .75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ +legend { + border: 0; + /* 1 */ + padding: 0; + /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9. + */ +textarea { + overflow: auto; +} + +/** + * 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; +} + +.ink-alert.basic, .ink-alert.block { + font-size: .938em; + margin: 1em 0; + position: relative; + overflow: hidden; +} +.ink-alert.basic { + padding: 1em 3em 1em 1em; +} +.ink-alert.basic p { + margin: 0; +} +.ink-alert.basic .ink-close { + top: .55em; + *top: .2em; +} +.ink-alert.block { + font-size: 1em; +} +.ink-alert.block > h4 { + padding: 1em 3em 1em 1em; + font-size: .938em; + line-height: 1.5; + margin: 0; +} +.ink-alert.block p { + margin: 1.5em 1em; +} +.ink-alert.block ul { + list-style: inside; +} +.ink-alert .ink-dismiss { + position: absolute; + line-height: .56em; + font-size: 1.8em; + padding: 5px; + border: none; + background: none; + top: .5em; + *top: .2em; + right: .4em; +} + +.ink-badge { + padding: 0.2em 0.6em; + font-size: 0.813em; + margin-left: .6em; +} + +.ink-button { + -webkit-appearance: menuitem; + padding: 8px 12px; + cursor: pointer; + text-decoration: none; + text-align: center; + display: inline-block; + vertical-align: middle; + white-space: nowrap; + line-height: normal; +} +.ink-button + .ink-button { + margin-left: 5px; +} + +.button-group { + *zoom: 1; +} +.button-group > .ink-button { + float: left; + margin: 5px 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + -ms-border-radius: 0; + -o-border-radius: 0; + border-radius: 0; + border-left: none; +} +.button-group > .ink-button:hover, .button-group > .ink-button:active { + border-left: none; +} +.button-group > .ink-button:first-child { + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; + border-left: 1px solid #bfbfbf; +} +.button-group > .ink-button:last-child { + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; +} +.button-group:after { + content: ""; + display: table; + clear: both; +} + +.button-toolbar { + *zoom: 1; +} +.button-toolbar > .button-group { + margin-right: 10px; + float: left; +} +.button-toolbar:after { + content: ""; + display: table; + clear: both; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-thin-webfont.eot'); + src: url('../fonts/Roboto/roboto-thin-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-thin-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-thin-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-thin-webfont.svg') format('svg'); + font-weight: 100; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-thinitalic-webfont.eot'); + src: url('../fonts/Roboto/roboto-thinitalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-thinitalic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-thinitalic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-thinitalic-webfont.svg') format('svg'); + font-weight: 100; + font-style: italic; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-light-webfont.eot'); + src: url('../fonts/Roboto/roboto-light-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-light-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-light-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-light-webfont.svg') format('svg'); + font-weight: 300; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-lightitalic-webfont.eot'); + src: url('../fonts/Roboto/roboto-lightitalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-lightitalic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-lightitalic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-lightitalic-webfont.svg') format('svg'); + font-weight: 300; + font-style: italic; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-regular-webfont.eot'); + src: url('../fonts/Roboto/roboto-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-regular-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-regular-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-regular-webfont.svg') format('svg'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-italic-webfont.eot'); + src: url('../fonts/Roboto/roboto-italic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-italic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-italic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-italic-webfont.svg') format('svg'); + font-weight: 400; + font-style: italic; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-medium-webfont.eot'); + src: url('../fonts/Roboto/roboto-medium-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-medium-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-medium-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-medium-webfont.svg') format('svg'); + font-weight: 500; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-mediumitalic-webfont.eot'); + src: url('../fonts/Roboto/roboto-mediumitalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-mediumitalic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-mediumitalic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-mediumitalic-webfont.svg') format('svg'); + font-weight: 500; + font-style: italic; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-bold-webfont.eot'); + src: url('../fonts/Roboto/roboto-bold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-bold-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-bold-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-bold-webfont.svg') format('svg'); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-bolditalic-webfont.eot'); + src: url('../fonts/Roboto/roboto-bolditalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-bolditalic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-bolditalic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-bolditalic-webfont.svg') format('svg'); + font-weight: 700; + font-style: italic; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-black-webfont.eot'); + src: url('../fonts/Roboto/roboto-black-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-black-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-black-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-black-webfont.svg') format('svg'); + font-weight: 900; + font-style: normal; +} + +@font-face { + font-family: "Roboto"; + src: url('../fonts/Roboto/roboto-blackitalic-webfont.eot'); + src: url('../fonts/Roboto/roboto-blackitalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto/roboto-blackitalic-webfont.woff') format('woff'), url('../fonts/Roboto/roboto-blackitalic-webfont.ttf') format('truetype'), url('../fonts/Roboto/roboto-blackitalic-webfont.svg') format('svg'); + font-weight: 900; + font-style: italic; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-light-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-light-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-light-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-light-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-light-webfont.svg') format('svg'); + font-weight: 300; + font-style: normal; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.svg') format('svg'); + font-weight: 300; + font-style: italic; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-regular-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-regular-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-regular-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-regular-webfont.svg') format('svg'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-italic-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-italic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-italic-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-italic-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-italic-webfont.svg') format('svg'); + font-weight: 400; + font-style: italic; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-bold-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-bold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-bold-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-bold-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-bold-webfont.svg') format('svg'); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: "Roboto_condensed"; + src: url('../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.eot'); + src: url('../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.woff') format('woff'), url('../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.ttf') format('truetype'), url('../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.svg') format('svg'); + font-weight: 700; + font-style: italic; +} + +@font-face { + font-family: "Roboto_slab"; + src: url('../fonts/Roboto_slab/robotoslab-thin-webfont.eot'); + src: url('../fonts/Roboto_slab/robotoslab-thin-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_slab/robotoslab-thin-webfont.woff') format('woff'), url('../fonts/Roboto_slab/robotoslab-thin-webfont.ttf') format('truetype'), url('../fonts/Roboto_slab/robotoslab-thin-webfont.svg') format('svg'); + font-weight: 100; + font-style: normal; +} + +@font-face { + font-family: "Roboto_slab"; + src: url('../fonts/Roboto_slab/robotoslab-light-webfont.eot'); + src: url('../fonts/Roboto_slab/robotoslab-light-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_slab/robotoslab-light-webfont.woff') format('woff'), url('../fonts/Roboto_slab/robotoslab-light-webfont.ttf') format('truetype'), url('../fonts/Roboto_slab/robotoslab-light-webfont.svg') format('svg'); + font-weight: 300; + font-style: normal; +} + +@font-face { + font-family: "Roboto_slab"; + src: url('../fonts/Roboto_slab/robotoslab-regular-webfont.eot'); + src: url('../fonts/Roboto_slab/robotoslab-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_slab/robotoslab-regular-webfont.woff') format('woff'), url('../fonts/Roboto_slab/robotoslab-regular-webfont.ttf') format('truetype'), url('../fonts/Roboto_slab/robotoslab-regular-webfont.svg') format('svg'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: "Roboto_slab"; + src: url('../fonts/Roboto_slab/robotoslab-bold-webfont.eot'); + src: url('../fonts/Roboto_slab/robotoslab-bold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/Roboto_slab/robotoslab-bold-webfont.woff') format('woff'), url('../fonts/Roboto_slab/robotoslab-bold-webfont.ttf') format('truetype'), url('../fonts/Roboto_slab/robotoslab-bold-webfont.svg') format('svg'); + font-weight: 700; + font-style: normal; +} + +.ink-form fieldset { + border: none; + margin-bottom: 1.5em; + padding: 0; + margin: 0; +} +.ink-form fieldset legend { + font-size: 1.438em; + font-weight: 700; + width: 100%; + border-bottom: 1px solid #ddd; +} +.ink-form fieldset legend + * { + -webkit-margin-top-collapse: separate; + margin: 2em 0; +} +.ink-form p.tip { + font-size: .875em; + color: #909090; + position: relative; + margin: .2em 0 0 .1em; +} +.ink-form p.label { + padding: 0; + margin: 0; + color: #555555; + white-space: normal; +} +.ink-form select, +.ink-form textarea, +.ink-form input[type="text"], +.ink-form input[type="password"], +.ink-form input[type="datetime"], +.ink-form input[type="datetime-local"], +.ink-form input[type="date"], +.ink-form input[type="month"], +.ink-form input[type="time"], +.ink-form input[type="week"], +.ink-form input[type="number"], +.ink-form input[type="email"], +.ink-form input[type="url"], +.ink-form input[type="search"], +.ink-form input[type="tel"], +.ink-form input[type="color"] { + font-family: "Roboto", Arial, Helvetica, sans-serif; + font-weight: 300; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + padding: 8px 6px; + border: 1px solid #c6c6c6; + resize: none; + background: white; + vertical-align: middle; +} +.ink-form select:focus, +.ink-form textarea:focus, +.ink-form input[type="text"]:focus, +.ink-form input[type="password"]:focus, +.ink-form input[type="datetime"]:focus, +.ink-form input[type="datetime-local"]:focus, +.ink-form input[type="date"]:focus, +.ink-form input[type="month"]:focus, +.ink-form input[type="time"]:focus, +.ink-form input[type="week"]:focus, +.ink-form input[type="number"]:focus, +.ink-form input[type="email"]:focus, +.ink-form input[type="url"]:focus, +.ink-form input[type="search"]:focus, +.ink-form input[type="tel"]:focus, +.ink-form input[type="color"]:focus { + outline: none; + border-color: rgba(153, 153, 153, 0.9); + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + outline: 0 none; +} +.ink-form select:disabled, +.ink-form textarea:disabled, +.ink-form input[type="text"]:disabled, +.ink-form input[type="password"]:disabled, +.ink-form input[type="datetime"]:disabled, +.ink-form input[type="datetime-local"]:disabled, +.ink-form input[type="date"]:disabled, +.ink-form input[type="month"]:disabled, +.ink-form input[type="time"]:disabled, +.ink-form input[type="week"]:disabled, +.ink-form input[type="number"]:disabled, +.ink-form input[type="email"]:disabled, +.ink-form input[type="url"]:disabled, +.ink-form input[type="search"]:disabled, +.ink-form input[type="tel"]:disabled, +.ink-form input[type="color"]:disabled { + background: #f2f2f2; + cursor: not-allowed; +} +.ink-form .input-file { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + padding: 6px; + border: 1px solid #c6c6c6; + background: white; + vertical-align: middle; + line-height: 1.2; +} +.ink-form .input-file input[type="file"] { + -webkit-border-radius: 0; + -moz-border-radius: 0; + -ms-border-radius: 0; + -o-border-radius: 0; + border-radius: 0; + border: none; + padding: 0; + background: none; + width: 100%; +} +.ink-form .ink-button { + margin: 0 5px; +} +.ink-form label { + cursor: pointer; +} +.ink-form select { + line-height: 2; + cursor: pointer; +} +.ink-form textarea { + min-height: 5em; +} +.ink-form .control-group { + line-height: 2; + margin-bottom: 1em; + *zoom: 1; +} +.ink-form .control-group:after { + content: ""; + display: table; + clear: both; +} +.ink-form .control-group .control { + position: relative; + *zoom: 1; +} +.ink-form .control-group .control:after { + content: ""; + display: table; + clear: both; +} +.ink-form .control-group .control > li { + margin: 0; + *zoom: 1; +} +.ink-form .control-group .control > li:after { + content: ""; + display: table; + clear: both; +} +.ink-form .control-group .control > input, .ink-form .control-group .control > select, .ink-form .control-group .control > textarea { + width: 100%; +} +.ink-form .control-group .control > input + [class^="icon-"], .ink-form .control-group .control > input + [class*=" icon-"], .ink-form .control-group .control > select + [class^="icon-"], .ink-form .control-group .control > select + [class*=" icon-"], .ink-form .control-group .control > textarea + [class^="icon-"], .ink-form .control-group .control > textarea + [class*=" icon-"] { + display: none; +} +.ink-form .control-group .control.append-button span, .ink-form .control-group .control.append-symbol span, .ink-form .control-group .control.prepend-button span, .ink-form .control-group .control.prepend-symbol span { + width: 100%; + position: relative; +} +.ink-form .control-group .control.append-button span > input, .ink-form .control-group .control.append-button span > select, .ink-form .control-group .control.append-button span > textarea, .ink-form .control-group .control.append-symbol span > input, .ink-form .control-group .control.append-symbol span > select, .ink-form .control-group .control.append-symbol span > textarea, .ink-form .control-group .control.prepend-button span > input, .ink-form .control-group .control.prepend-button span > select, .ink-form .control-group .control.prepend-button span > textarea, .ink-form .control-group .control.prepend-symbol span > input, .ink-form .control-group .control.prepend-symbol span > select, .ink-form .control-group .control.prepend-symbol span > textarea { + width: 100%; +} +.ink-form .control-group .control.append-button > input[type="submit"], .ink-form .control-group .control.append-button > input[type="button"], .ink-form .control-group .control.append-button > input[type="reset"], .ink-form .control-group .control.append-symbol > input[type="submit"], .ink-form .control-group .control.append-symbol > input[type="button"], .ink-form .control-group .control.append-symbol > input[type="reset"], .ink-form .control-group .control.prepend-button > input[type="submit"], .ink-form .control-group .control.prepend-button > input[type="button"], .ink-form .control-group .control.prepend-button > input[type="reset"], .ink-form .control-group .control.prepend-symbol > input[type="submit"], .ink-form .control-group .control.prepend-symbol > input[type="button"], .ink-form .control-group .control.prepend-symbol > input[type="reset"] { + width: auto; +} +.ink-form .control-group .control.append-button { + display: table; +} +.ink-form .control-group .control.append-button span { + display: table-cell; +} +.ink-form .control-group .control.append-button span > input, .ink-form .control-group .control.append-button span > select, .ink-form .control-group .control.append-button span > textarea { + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; +} +.ink-form .control-group .control.append-button .ink-button { + margin: 0; + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; + border-left: none; +} +.ink-form .control-group .control.prepend-button { + display: table; +} +.ink-form .control-group .control.prepend-button span { + display: table-cell; +} +.ink-form .control-group .control.prepend-button span > input, .ink-form .control-group .control.prepend-button span > select, .ink-form .control-group .control.prepend-button span > textarea { + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; +} +.ink-form .control-group .control.prepend-button .ink-button { + margin: 0; + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; + border-right: none; +} +.ink-form .control-group .control.append-symbol span { + display: block; +} +.ink-form .control-group .control.append-symbol span > input, .ink-form .control-group .control.append-symbol span > select, .ink-form .control-group .control.append-symbol span > textarea { + padding-right: 2.5em; +} +.ink-form .control-group .control.append-symbol span > [class^="fa-"], .ink-form .control-group .control.append-symbol span > [class*=" fa-"] { + position: absolute; + right: 1em; + top: .86em; + pointer-events: none; +} +.ink-form .control-group .control.prepend-symbol span { + display: block; +} +.ink-form .control-group .control.prepend-symbol span > input, .ink-form .control-group .control.prepend-symbol span > select, .ink-form .control-group .control.prepend-symbol span > textarea { + padding-left: 2.5em; +} +.ink-form .control-group .control.prepend-symbol span > [class^="fa-"], .ink-form .control-group .control.prepend-symbol span > [class*=" fa-"] { + position: absolute; + left: 1em; + top: .86em; + pointer-events: none; +} +.ink-form .control-group input[type="radio"], +.ink-form .control-group input[type="checkbox"] { + padding: 0; + margin: .55em 0; + border: none; + clear: left; + float: left; + cursor: pointer; +} +.ink-form .control-group input[type="radio"] + label, +.ink-form .control-group input[type="checkbox"] + label { + float: left; + margin: .25em 0 .25em .4em; +} +.ink-form .control-group .inline li { + padding: 0; +} +.ink-form .control-group .inline li label { + margin-right: 1em; +} +.ink-form .control-group.validation.error input, .ink-form .control-group.validation.error textarea, .ink-form .control-group.validation.error select { + outline: none; + border-color: rgba(200, 10, 16, 0.8); + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + border: 1px solid rgba(200, 10, 16, 0.5); +} +.ink-form .control-group.validation.error p.tip { + color: rgba(150, 7, 12, 0.55); +} +.ink-form .control-group.validation.warning input, .ink-form .control-group.validation.warning textarea, .ink-form .control-group.validation.warning select { + outline: none; + border-color: rgba(255, 156, 0, 0.9); + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + border: 1px solid rgba(255, 156, 0, 0.6); +} +.ink-form .control-group.validation.warning p.tip { + color: rgba(204, 125, 0, 0.6); +} +.ink-form .control-group.required label, .ink-form .control-group.required p.label { + color: #555555; +} +.ink-form .control-group.required label:after, .ink-form .control-group.required p.label:after { + content: "\f069"; + color: #c91111; + margin-left: .6em; + font-family: FontAwesome; + font-size: .75em; + width: 1.25em; +} +.ink-form .control-group.required ul.control label:after { + content: ""; +} + +.ink-grid { + width: auto; + max-width: 1440px; + margin: 0 auto; +} + +.all-5 { + width: 5%; + float: left; + clear: none; +} + +.all-10 { + width: 10%; + float: left; + clear: none; +} + +.all-15 { + width: 15%; + float: left; + clear: none; +} + +.all-20 { + width: 20%; + float: left; + clear: none; +} + +.all-25 { + width: 25%; + float: left; + clear: none; +} + +.all-30 { + width: 30%; + float: left; + clear: none; +} + +.all-33 { + width: 33.33%; + float: left; + clear: none; +} + +.all-35 { + width: 35%; + float: left; + clear: none; +} + +.all-40 { + width: 40%; + float: left; + clear: none; +} + +.all-45 { + width: 45%; + float: left; + clear: none; +} + +.all-50 { + width: 50%; + float: left; + clear: none; +} + +.all-55 { + width: 55%; + float: left; + clear: none; +} + +.all-60 { + width: 60%; + float: left; + clear: none; +} + +.all-65 { + width: 65%; + float: left; + clear: none; +} + +.all-66 { + width: 66.66%; + float: left; + clear: none; +} + +.all-70 { + width: 70%; + float: left; + clear: none; +} + +.all-75 { + width: 75%; + float: left; + clear: none; +} + +.all-80 { + width: 80%; + float: left; + clear: none; +} + +.all-85 { + width: 85%; + float: left; + clear: none; +} + +.all-90 { + width: 90%; + float: left; + clear: none; +} + +.all-95 { + width: 95%; + float: left; + clear: none; +} + +.all-100 { + width: 100%; + float: left; + clear: none; +} + +[class~=all-100] { + float: none; + clear: both; +} + +@media screen and (min-width: 1261px) { + .ink-grid { + padding: 0 2em; + } + + .column-group > [class*=xlarge-] { + float: left; + clear: none; + } + + .xlarge-5 { + width: 5%; + } + + .xlarge-10 { + width: 10%; + } + + .xlarge-15 { + width: 15%; + } + + .xlarge-20 { + width: 20%; + } + + .xlarge-25 { + width: 25%; + } + + .xlarge-30 { + width: 30%; + } + + .xlarge-33 { + width: 33.33%; + } + + .xlarge-35 { + width: 35%; + } + + .xlarge-40 { + width: 40%; + } + + .xlarge-45 { + width: 45%; + } + + .xlarge-50 { + width: 50%; + } + + .xlarge-55 { + width: 55%; + } + + .xlarge-60 { + width: 60%; + } + + .xlarge-65 { + width: 65%; + } + + .xlarge-66 { + width: 66.66%; + } + + .xlarge-70 { + width: 70%; + } + + .xlarge-75 { + width: 75%; + } + + .xlarge-80 { + width: 80%; + } + + .xlarge-85 { + width: 85%; + } + + .xlarge-90 { + width: 90%; + } + + .xlarge-95 { + width: 95%; + } + + .xlarge-100 { + width: 100%; + } + + [class*=xlarge-100] { + float: none; + clear: both; + } + + .column-group { + *zoom: 1; + } + .column-group:after { + content: ""; + display: table; + clear: both; + } + + .column-group.gutters { + margin-left: -2em; + } + .column-group.gutters > [class*=xlarge-], .column-group.gutters > [class*=all-] { + padding-left: 2em; + margin-bottom: 2em; + } + + .column-group.horizontal-gutters { + margin-left: -2em; + } + .column-group.horizontal-gutters > [class*=xlarge-], .column-group.horizontal-gutters > [class*=all-] { + padding-left: 2em; + } + + .column-group.vertical-gutters > [class*=xlarge-], .column-group.vertical-gutters > [class*=all-] { + margin-bottom: 2em; + } + + .column-group.double-gutters { + margin-left: -4em; + } + .column-group.double-gutters > [class*=xlarge-], .column-group.double-gutters > [class*=all-] { + padding-left: 4em; + margin-bottom: 4em; + } + + .column-group.double-horizontal-gutters { + margin-left: -4em; + } + .column-group.double-horizontal-gutters > [class*=xlarge-], .column-group.double-horizontal-gutters > [class*=all-] { + padding-left: 4em; + } + + .column-group.double-vertical-gutters > [class*=xlarge-], .column-group.double-vertical-gutters > [class*=all-] { + margin-bottom: 4em; + } + + .column-group.half-gutters { + margin-left: -1em; + } + .column-group.half-gutters > [class*=xlarge-], .column-group.half-gutters > [class*=all-] { + padding-left: 1em; + margin-bottom: 1em; + } + + .column-group.half-horizontal-gutters { + margin-left: -1em; + } + .column-group.half-horizontal-gutters > [class*=xlarge-], .column-group.half-horizontal-gutters > [class*=all-] { + padding-left: 1em; + } + + .column-group.half-vertical-gutters > [class*=xlarge-], .column-group.half-vertical-gutters > [class*=all-] { + margin-bottom: 1em; + } + + .column-group.quarter-gutters { + margin-left: -0.5em; + } + .column-group.quarter-gutters > [class*=xlarge-], .column-group.quarter-gutters > [class*=all-] { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + + .column-group.quarter-horizontal-gutters { + margin-left: -0.5em; + } + .column-group.quarter-horizontal-gutters > [class*=xlarge-], .column-group.quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.5em; + } + + .column-group.quarter-vertical-gutters > [class*=xlarge-], .column-group.quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.5em; + } + + .column-group.xlarge-gutters { + margin-left: -2em; + } + .column-group.xlarge-gutters > [class*=xlarge-], .column-group.xlarge-gutters > [class*=all-] { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + + .column-group.xlarge-horizontal-gutters { + margin-left: -2em; + } + .column-group.xlarge-horizontal-gutters > [class*=xlarge-], .column-group.xlarge-horizontal-gutters > [class*=all-] { + padding-left: 2em; + } + + .column-group.xlarge-vertical-gutters > [class*=xlarge-], .column-group.xlarge-vertical-gutters > [class*=all-] { + margin-bottom: 2em; + } + + .column-group.xlarge-double-gutters { + margin-left: -4em; + } + .column-group.xlarge-double-gutters > [class*=xlarge-], .column-group.xlarge-double-gutters > [class*=all-] { + padding-left: 4em; + margin-bottom: 4em; + } + + .column-group.xlarge-double-horizontal-gutters { + margin-left: -4em; + } + .column-group.xlarge-double-horizontal-gutters > [class*=xlarge-], .column-group.xlarge-double-horizontal-gutters > [class*=all-] { + padding-left: 4em; + } + + .column-group.xlarge-double-vertical-gutters > [class*=xlarge-], .column-group.xlarge-double-vertical-gutters > [class*=all-] { + margin-bottom: 4em; + } + + .column-group.xlarge-half-gutters { + margin-left: -1em; + } + .column-group.xlarge-half-gutters > [class*=xlarge-], .column-group.xlarge-half-gutters > [class*=all-] { + padding-left: 1em; + margin-bottom: 1em; + } + + .column-group.xlarge-half-horizontal-gutters { + margin-left: -1em; + } + .column-group.xlarge-half-horizontal-gutters > [class*=xlarge-], .column-group.xlarge-half-horizontal-gutters > [class*=all-] { + padding-left: 1em; + } + + .column-group.xlarge-half-vertical-gutters > [class*=xlarge-], .column-group.xlarge-half-vertical-gutters > [class*=all-] { + margin-bottom: 1em; + } + + .column-group.xlarge-quarter-gutters { + margin-left: -0.5em; + } + .column-group.xlarge-quarter-gutters > [class*=xlarge-], .column-group.xlarge-quarter-gutters > [class*=all-] { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + + .column-group.xlarge-quarter-horizontal-gutters { + margin-left: -0.5em; + } + .column-group.xlarge-quarter-horizontal-gutters > [class*=xlarge-], .column-group.xlarge-quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.5em; + } + + .column-group.xlarge-quarter-vertical-gutters > [class*=xlarge-], .column-group.xlarge-quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.5em; + } + + .column-group.xlarge-no-gutters { + margin-left: 0; + } + .column-group.xlarge-no-gutters > [class*=xlarge-], .column-group.xlarge-no-gutters > [class*=all-] { + padding-left: 0; + margin-bottom: 0; + } + + .ink-table td[class*=xlarge-], .ink-table th[class*=xlarge-], .ink-table tr[class*=xlarge-], .ink-table thead[class*=xlarge-], .ink-table tbody[class*=xlarge-], .ink-table tfoot[class*=xlarge-] { + float: none; + } + + .xlarge-push-left { + float: left; + } + + .xlarge-push-center { + float: none; + margin-left: auto; + margin-right: auto; + } + + .xlarge-push-right { + float: right; + } + + .xlarge-align-left { + text-align: left; + } + + .xlarge-align-center { + text-align: center; + } + + .xlarge-align-right { + text-align: right; + } + + .xlarge-no-margin { + margin: 0 !important; + } + + .space { + margin: 2em; + } + + .xlarge-space { + margin: 2em; + } + + .padding { + padding: 2em; + } + + .xlarge-padding { + padding: 2em; + } + + .double-space { + margin: 4em; + } + + .xlarge-double-space { + margin: 4em; + } + + .double-padding { + padding: 4em; + } + + .xlarge-double-padding { + padding: 4em; + } + + .half-space { + margin: 1em; + } + + .xlarge-half-space { + margin: 1em; + } + + .half-padding { + padding: 1em; + } + + .xlarge-half-padding { + padding: 1em; + } + + .quarter-space { + margin: 0.5em; + } + + .xlarge-quarter-space { + margin: 0.5em; + } + + .quarter-padding { + padding: 0.5em; + } + + .xlarge-quarter-padding { + padding: 0.5em; + } + + .vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + + .xlarge-vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + + .vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + + .xlarge-vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + + .double-vertical-space { + margin-top: 4em; + margin-bottom: 4em; + } + + .xlarge-double-vertical-space { + margin-top: 4em; + margin-bottom: 4em; + } + + .double-vertical-padding { + padding-top: 4em; + padding-bottom: 4em; + } + + .xlarge-double-vertical-padding { + padding-top: 4em; + padding-bottom: 4em; + } + + .half-vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + + .xlarge-half-vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + + .half-vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + + .xlarge-half-vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + + .quarter-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + + .xlarge-quarter-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + + .quarter-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + + .xlarge-quarter-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + + .horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + + .xlarge-horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + + .horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + + .xlarge-horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + + .double-horizontal-space { + margin-left: 4em; + margin-right: 4em; + } + + .xlarge-double-horizontal-space { + margin-left: 4em; + margin-right: 4em; + } + + .double-horizontal-padding { + padding-left: 4em; + padding-right: 4em; + } + + .xlarge-double-horizontal-padding { + padding-left: 4em; + padding-right: 4em; + } + + .half-horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + + .xlarge-half-horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + + .half-horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + + .xlarge-half-horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + + .quarter-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + + .xlarge-quarter-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + + .quarter-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + + .xlarge-quarter-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + + .top-space { + margin-top: 2em; + } + + .xlarge-top-space { + margin-top: 2em; + } + + .top-padding { + padding-top: 2em; + } + + .xlarge-top-padding { + padding-top: 2em; + } + + .double-top-space { + margin-top: 4em; + } + + .xlarge-double-top-space { + margin-top: 4em; + } + + .double-top-padding { + padding-top: 4em; + } + + .xlarge-double-top-padding { + padding-top: 4em; + } + + .half-top-space { + margin-top: 1em; + } + + .xlarge-half-top-space { + margin-top: 1em; + } + + .half-top-padding { + padding-top: 1em; + } + + .xlarge-half-top-padding { + padding-top: 1em; + } + + .quarter-top-space { + margin-top: 0.5em; + } + + .xlarge-quarter-top-space { + margin-top: 0.5em; + } + + .quarter-top-padding { + padding-top: 0.5em; + } + + .xlarge-quarter-top-padding { + padding-top: 0.5em; + } + + .right-space { + margin-right: 2em; + } + + .xlarge-right-space { + margin-right: 2em; + } + + .right-padding { + padding-right: 2em; + } + + .xlarge-right-padding { + padding-right: 2em; + } + + .double-right-space { + margin-right: 4em; + } + + .xlarge-double-right-space { + margin-right: 4em; + } + + .double-right-padding { + padding-right: 4em; + } + + .xlarge-double-right-padding { + padding-right: 4em; + } + + .half-right-space { + margin-right: 1em; + } + + .xlarge-half-right-space { + margin-right: 1em; + } + + .half-right-padding { + padding-right: 1em; + } + + .xlarge-half-right-padding { + padding-right: 1em; + } + + .quarter-right-space { + margin-right: 0.5em; + } + + .xlarge-quarter-right-space { + margin-right: 0.5em; + } + + .quarter-right-padding { + padding-right: 0.5em; + } + + .xlarge-quarter-right-padding { + padding-right: 0.5em; + } + + .bottom-space { + margin-bottom: 2em; + } + + .xlarge-bottom-space { + margin-bottom: 2em; + } + + .bottom-padding { + padding-bottom: 2em; + } + + .xlarge-bottom-padding { + padding-bottom: 2em; + } + + .double-bottom-space { + margin-bottom: 4em; + } + + .xlarge-double-bottom-space { + margin-bottom: 4em; + } + + .double-bottom-padding { + padding-bottom: 4em; + } + + .xlarge-double-bottom-padding { + padding-bottom: 4em; + } + + .half-bottom-space { + margin-bottom: 1em; + } + + .xlarge-half-bottom-space { + margin-bottom: 1em; + } + + .half-bottom-padding { + padding-bottom: 1em; + } + + .xlarge-half-bottom-padding { + padding-bottom: 1em; + } + + .quarter-bottom-space { + margin-bottom: 0.5em; + } + + .xlarge-quarter-bottom-space { + margin-bottom: 0.5em; + } + + .quarter-bottom-padding { + padding-bottom: 0.5em; + } + + .xlarge-quarter-bottom-padding { + padding-bottom: 0.5em; + } + + .left-space { + margin-left: 2em; + } + + .xlarge-left-space { + margin-left: 2em; + } + + .left-padding { + padding-left: 2em; + } + + .xlarge-left-padding { + padding-left: 2em; + } + + .double-left-space { + margin-left: 4em; + } + + .xlarge-double-left-space { + margin-left: 4em; + } + + .double-left-padding { + padding-left: 4em; + } + + .xlarge-double-left-padding { + padding-left: 4em; + } + + .half-left-space { + margin-left: 1em; + } + + .xlarge-half-left-space { + margin-left: 1em; + } + + .half-left-padding { + padding-left: 1em; + } + + .xlarge-half-left-padding { + padding-left: 1em; + } + + .quarter-left-space { + margin-left: 0.5em; + } + + .xlarge-quarter-left-space { + margin-left: 0.5em; + } + + .quarter-left-padding { + padding-left: 0.5em; + } + + .xlarge-quarter-left-padding { + padding-left: 0.5em; + } + + .hide-xlarge { + display: none !important; + } + + .show-xlarge { + display: inherit !important; + } + + table.show-xlarge { + display: table; + } + + thead.show-xlarge { + display: table-header-group; + } + + tbody.show-xlarge { + display: table-row-group; + } + + tfoot.show-xlarge { + display: table-footer-group; + } + + tr.show-xlarge { + display: table-row; + } + + th.show-xlarge, + td.show-xlarge { + display: table-cell; + } +} +@media screen and (min-width: 961px) and (max-width: 1260px) { + .ink-grid { + padding: 0 1.75em; + } + + .column-group > [class*=large-] { + float: left; + clear: none; + } + + .large-5 { + width: 5%; + } + + .large-10 { + width: 10%; + } + + .large-15 { + width: 15%; + } + + .large-20 { + width: 20%; + } + + .large-25 { + width: 25%; + } + + .large-30 { + width: 30%; + } + + .large-33 { + width: 33.33%; + } + + .large-35 { + width: 35%; + } + + .large-40 { + width: 40%; + } + + .large-45 { + width: 45%; + } + + .large-50 { + width: 50%; + } + + .large-55 { + width: 55%; + } + + .large-60 { + width: 60%; + } + + .large-65 { + width: 65%; + } + + .large-66 { + width: 66.66%; + } + + .large-70 { + width: 70%; + } + + .large-75 { + width: 75%; + } + + .large-80 { + width: 80%; + } + + .large-85 { + width: 85%; + } + + .large-90 { + width: 90%; + } + + .large-95 { + width: 95%; + } + + .large-100 { + width: 100%; + } + + [class*=large-100] { + float: none; + clear: both; + } + + .column-group { + *zoom: 1; + } + .column-group:after { + content: ""; + display: table; + clear: both; + } + + .column-group.gutters { + margin-left: -1.75em; + } + .column-group.gutters > [class*=large-], .column-group.gutters > [class*=all-] { + padding-left: 1.75em; + margin-bottom: 1.75em; + } + + .column-group.horizontal-gutters { + margin-left: -1.75em; + } + .column-group.horizontal-gutters > [class*=large-], .column-group.horizontal-gutters > [class*=all-] { + padding-left: 1.75em; + } + + .column-group.vertical-gutters > [class*=large-], .column-group.vertical-gutters > [class*=all-] { + margin-bottom: 1.75em; + } + + .column-group.double-gutters { + margin-left: -3.5em; + } + .column-group.double-gutters > [class*=large-], .column-group.double-gutters > [class*=all-] { + padding-left: 3.5em; + margin-bottom: 3.5em; + } + + .column-group.double-horizontal-gutters { + margin-left: -3.5em; + } + .column-group.double-horizontal-gutters > [class*=large-], .column-group.double-horizontal-gutters > [class*=all-] { + padding-left: 3.5em; + } + + .column-group.double-vertical-gutters > [class*=large-], .column-group.double-vertical-gutters > [class*=all-] { + margin-bottom: 3.5em; + } + + .column-group.half-gutters { + margin-left: -0.875em; + } + .column-group.half-gutters > [class*=large-], .column-group.half-gutters > [class*=all-] { + padding-left: 0.875em; + margin-bottom: 0.875em; + } + + .column-group.half-horizontal-gutters { + margin-left: -0.875em; + } + .column-group.half-horizontal-gutters > [class*=large-], .column-group.half-horizontal-gutters > [class*=all-] { + padding-left: 0.875em; + } + + .column-group.half-vertical-gutters > [class*=large-], .column-group.half-vertical-gutters > [class*=all-] { + margin-bottom: 0.875em; + } + + .column-group.quarter-gutters { + margin-left: -0.4375em; + } + .column-group.quarter-gutters > [class*=large-], .column-group.quarter-gutters > [class*=all-] { + padding-left: 0.4375em; + margin-bottom: 0.4375em; + } + + .column-group.quarter-horizontal-gutters { + margin-left: -0.4375em; + } + .column-group.quarter-horizontal-gutters > [class*=large-], .column-group.quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.4375em; + } + + .column-group.quarter-vertical-gutters > [class*=large-], .column-group.quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.4375em; + } + + .column-group.large-gutters { + margin-left: -1.75em; + } + .column-group.large-gutters > [class*=large-], .column-group.large-gutters > [class*=all-] { + padding-left: 0.4375em; + margin-bottom: 0.4375em; + } + + .column-group.large-horizontal-gutters { + margin-left: -1.75em; + } + .column-group.large-horizontal-gutters > [class*=large-], .column-group.large-horizontal-gutters > [class*=all-] { + padding-left: 1.75em; + } + + .column-group.large-vertical-gutters > [class*=large-], .column-group.large-vertical-gutters > [class*=all-] { + margin-bottom: 1.75em; + } + + .column-group.large-double-gutters { + margin-left: -3.5em; + } + .column-group.large-double-gutters > [class*=large-], .column-group.large-double-gutters > [class*=all-] { + padding-left: 3.5em; + margin-bottom: 3.5em; + } + + .column-group.large-double-horizontal-gutters { + margin-left: -3.5em; + } + .column-group.large-double-horizontal-gutters > [class*=large-], .column-group.large-double-horizontal-gutters > [class*=all-] { + padding-left: 3.5em; + } + + .column-group.large-double-vertical-gutters > [class*=large-], .column-group.large-double-vertical-gutters > [class*=all-] { + margin-bottom: 3.5em; + } + + .column-group.large-half-gutters { + margin-left: -0.875em; + } + .column-group.large-half-gutters > [class*=large-], .column-group.large-half-gutters > [class*=all-] { + padding-left: 0.875em; + margin-bottom: 0.875em; + } + + .column-group.large-half-horizontal-gutters { + margin-left: -0.875em; + } + .column-group.large-half-horizontal-gutters > [class*=large-], .column-group.large-half-horizontal-gutters > [class*=all-] { + padding-left: 0.875em; + } + + .column-group.large-half-vertical-gutters > [class*=large-], .column-group.large-half-vertical-gutters > [class*=all-] { + margin-bottom: 0.875em; + } + + .column-group.large-quarter-gutters { + margin-left: -0.4375em; + } + .column-group.large-quarter-gutters > [class*=large-], .column-group.large-quarter-gutters > [class*=all-] { + padding-left: 0.4375em; + margin-bottom: 0.4375em; + } + + .column-group.large-quarter-horizontal-gutters { + margin-left: -0.4375em; + } + .column-group.large-quarter-horizontal-gutters > [class*=large-], .column-group.large-quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.4375em; + } + + .column-group.large-quarter-vertical-gutters > [class*=large-], .column-group.large-quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.4375em; + } + + .column-group.large-no-gutters { + margin-left: 0; + } + .column-group.large-no-gutters > [class*=large-], .column-group.large-no-gutters > [class*=all-] { + padding-left: 0; + margin-bottom: 0; + } + + .ink-table td[class*=large-], .ink-table th[class*=large-], .ink-table tr[class*=large-], .ink-table thead[class*=large-], .ink-table tbody[class*=large-], .ink-table tfoot[class*=large-] { + float: none; + } + + .large-push-left { + float: left; + } + + .large-push-center { + float: none; + margin-left: auto; + margin-right: auto; + } + + .large-push-right { + float: right; + } + + .large-align-left { + text-align: left; + } + + .large-align-center { + text-align: center; + } + + .large-align-right { + text-align: right; + } + + .large-no-margin { + margin: 0 !important; + } + + .space { + margin: 1.75em; + } + + .large-space { + margin: 1.75em; + } + + .padding { + padding: 1.75em; + } + + .large-padding { + padding: 1.75em; + } + + .double-space { + margin: 3.5em; + } + + .large-double-space { + margin: 3.5em; + } + + .double-padding { + padding: 3.5em; + } + + .large-double-padding { + padding: 3.5em; + } + + .half-space { + margin: 0.875em; + } + + .large-half-space { + margin: 0.875em; + } + + .half-padding { + padding: 0.875em; + } + + .large-half-padding { + padding: 0.875em; + } + + .quarter-space { + margin: 0.4375em; + } + + .large-quarter-space { + margin: 0.4375em; + } + + .quarter-padding { + padding: 0.4375em; + } + + .large-quarter-padding { + padding: 0.4375em; + } + + .vertical-space { + margin-top: 1.75em; + margin-bottom: 1.75em; + } + + .large-vertical-space { + margin-top: 1.75em; + margin-bottom: 1.75em; + } + + .vertical-padding { + padding-top: 1.75em; + padding-bottom: 1.75em; + } + + .large-vertical-padding { + padding-top: 1.75em; + padding-bottom: 1.75em; + } + + .double-vertical-space { + margin-top: 3.5em; + margin-bottom: 3.5em; + } + + .large-double-vertical-space { + margin-top: 3.5em; + margin-bottom: 3.5em; + } + + .double-vertical-padding { + padding-top: 3.5em; + padding-bottom: 3.5em; + } + + .large-double-vertical-padding { + padding-top: 3.5em; + padding-bottom: 3.5em; + } + + .half-vertical-space { + margin-top: 0.875em; + margin-bottom: 0.875em; + } + + .large-half-vertical-space { + margin-top: 0.875em; + margin-bottom: 0.875em; + } + + .half-vertical-padding { + padding-top: 0.875em; + padding-bottom: 0.875em; + } + + .large-half-vertical-padding { + padding-top: 0.875em; + padding-bottom: 0.875em; + } + + .quarter-vertical-space { + margin-top: 0.4375em; + margin-bottom: 0.4375em; + } + + .large-quarter-vertical-space { + margin-top: 0.4375em; + margin-bottom: 0.4375em; + } + + .quarter-vertical-padding { + padding-top: 0.4375em; + padding-bottom: 0.4375em; + } + + .large-quarter-vertical-padding { + padding-top: 0.4375em; + padding-bottom: 0.4375em; + } + + .horizontal-space { + margin-left: 1.75em; + margin-right: 1.75em; + } + + .large-horizontal-space { + margin-left: 1.75em; + margin-right: 1.75em; + } + + .horizontal-padding { + padding-left: 1.75em; + padding-right: 1.75em; + } + + .large-horizontal-padding { + padding-left: 1.75em; + padding-right: 1.75em; + } + + .double-horizontal-space { + margin-left: 3.5em; + margin-right: 3.5em; + } + + .large-double-horizontal-space { + margin-left: 3.5em; + margin-right: 3.5em; + } + + .double-horizontal-padding { + padding-left: 3.5em; + padding-right: 3.5em; + } + + .large-double-horizontal-padding { + padding-left: 3.5em; + padding-right: 3.5em; + } + + .half-horizontal-space { + margin-left: 0.875em; + margin-right: 0.875em; + } + + .large-half-horizontal-space { + margin-left: 0.875em; + margin-right: 0.875em; + } + + .half-horizontal-padding { + padding-left: 0.875em; + padding-right: 0.875em; + } + + .large-half-horizontal-padding { + padding-left: 0.875em; + padding-right: 0.875em; + } + + .quarter-horizontal-space { + margin-left: 0.4375em; + margin-right: 0.4375em; + } + + .large-quarter-horizontal-space { + margin-left: 0.4375em; + margin-right: 0.4375em; + } + + .quarter-horizontal-padding { + padding-left: 0.4375em; + padding-right: 0.4375em; + } + + .large-quarter-horizontal-padding { + padding-left: 0.4375em; + padding-right: 0.4375em; + } + + .top-space { + margin-top: 1.75em; + } + + .large-top-space { + margin-top: 1.75em; + } + + .top-padding { + padding-top: 1.75em; + } + + .large-top-padding { + padding-top: 1.75em; + } + + .double-top-space { + margin-top: 3.5em; + } + + .large-double-top-space { + margin-top: 3.5em; + } + + .double-top-padding { + padding-top: 3.5em; + } + + .large-double-top-padding { + padding-top: 3.5em; + } + + .half-top-space { + margin-top: 0.875em; + } + + .large-half-top-space { + margin-top: 0.875em; + } + + .half-top-padding { + padding-top: 0.875em; + } + + .large-half-top-padding { + padding-top: 0.875em; + } + + .quarter-top-space { + margin-top: 0.4375em; + } + + .large-quarter-top-space { + margin-top: 0.4375em; + } + + .quarter-top-padding { + padding-top: 0.4375em; + } + + .large-quarter-top-padding { + padding-top: 0.4375em; + } + + .right-space { + margin-right: 1.75em; + } + + .large-right-space { + margin-right: 1.75em; + } + + .right-padding { + padding-right: 1.75em; + } + + .large-right-padding { + padding-right: 1.75em; + } + + .double-right-space { + margin-right: 3.5em; + } + + .large-double-right-space { + margin-right: 3.5em; + } + + .double-right-padding { + padding-right: 3.5em; + } + + .large-double-right-padding { + padding-right: 3.5em; + } + + .half-right-space { + margin-right: 0.875em; + } + + .large-half-right-space { + margin-right: 0.875em; + } + + .half-right-padding { + padding-right: 0.875em; + } + + .large-half-right-padding { + padding-right: 0.875em; + } + + .quarter-right-space { + margin-right: 0.4375em; + } + + .large-quarter-right-space { + margin-right: 0.4375em; + } + + .quarter-right-padding { + padding-right: 0.4375em; + } + + .large-quarter-right-padding { + padding-right: 0.4375em; + } + + .bottom-space { + margin-bottom: 1.75em; + } + + .large-bottom-space { + margin-bottom: 1.75em; + } + + .bottom-padding { + padding-bottom: 1.75em; + } + + .large-bottom-padding { + padding-bottom: 1.75em; + } + + .double-bottom-space { + margin-bottom: 3.5em; + } + + .large-double-bottom-space { + margin-bottom: 3.5em; + } + + .double-bottom-padding { + padding-bottom: 3.5em; + } + + .large-double-bottom-padding { + padding-bottom: 3.5em; + } + + .half-bottom-space { + margin-bottom: 0.875em; + } + + .large-half-bottom-space { + margin-bottom: 0.875em; + } + + .half-bottom-padding { + padding-bottom: 0.875em; + } + + .large-half-bottom-padding { + padding-bottom: 0.875em; + } + + .quarter-bottom-space { + margin-bottom: 0.4375em; + } + + .large-quarter-bottom-space { + margin-bottom: 0.4375em; + } + + .quarter-bottom-padding { + padding-bottom: 0.4375em; + } + + .large-quarter-bottom-padding { + padding-bottom: 0.4375em; + } + + .left-space { + margin-left: 1.75em; + } + + .large-left-space { + margin-left: 1.75em; + } + + .left-padding { + padding-left: 1.75em; + } + + .large-left-padding { + padding-left: 1.75em; + } + + .double-left-space { + margin-left: 3.5em; + } + + .large-double-left-space { + margin-left: 3.5em; + } + + .double-left-padding { + padding-left: 3.5em; + } + + .large-double-left-padding { + padding-left: 3.5em; + } + + .half-left-space { + margin-left: 0.875em; + } + + .large-half-left-space { + margin-left: 0.875em; + } + + .half-left-padding { + padding-left: 0.875em; + } + + .large-half-left-padding { + padding-left: 0.875em; + } + + .quarter-left-space { + margin-left: 0.4375em; + } + + .large-quarter-left-space { + margin-left: 0.4375em; + } + + .quarter-left-padding { + padding-left: 0.4375em; + } + + .large-quarter-left-padding { + padding-left: 0.4375em; + } + + .hide-large { + display: none !important; + } + + .show-large { + display: inherit !important; + } + + table.show-large { + display: table; + } + + thead.show-large { + display: table-header-group; + } + + tbody.show-large { + display: table-row-group; + } + + tfoot.show-large { + display: table-footer-group; + } + + tr.show-large { + display: table-row; + } + + th.show-large, + td.show-large { + display: table-cell; + } +} +@media screen and (min-width: 641px) and (max-width: 960px) { + .ink-grid { + padding: 0 1.5em; + } + + .column-group > [class*=medium-] { + float: left; + clear: none; + } + + .medium-5 { + width: 5%; + } + + .medium-10 { + width: 10%; + } + + .medium-15 { + width: 15%; + } + + .medium-20 { + width: 20%; + } + + .medium-25 { + width: 25%; + } + + .medium-30 { + width: 30%; + } + + .medium-33 { + width: 33.33%; + } + + .medium-35 { + width: 35%; + } + + .medium-40 { + width: 40%; + } + + .medium-45 { + width: 45%; + } + + .medium-50 { + width: 50%; + } + + .medium-55 { + width: 55%; + } + + .medium-60 { + width: 60%; + } + + .medium-65 { + width: 65%; + } + + .medium-66 { + width: 66.66%; + } + + .medium-70 { + width: 70%; + } + + .medium-75 { + width: 75%; + } + + .medium-80 { + width: 80%; + } + + .medium-85 { + width: 85%; + } + + .medium-90 { + width: 90%; + } + + .medium-95 { + width: 95%; + } + + .medium-100 { + width: 100%; + } + + [class*=medium-100] { + float: none; + clear: both; + } + + .column-group { + *zoom: 1; + } + .column-group:after { + content: ""; + display: table; + clear: both; + } + + .column-group.gutters { + margin-left: -1.5em; + } + .column-group.gutters > [class*=medium-], .column-group.gutters > [class*=all-] { + padding-left: 1.5em; + margin-bottom: 1.5em; + } + + .column-group.horizontal-gutters { + margin-left: -1.5em; + } + .column-group.horizontal-gutters > [class*=medium-], .column-group.horizontal-gutters > [class*=all-] { + padding-left: 1.5em; + } + + .column-group.vertical-gutters > [class*=medium-], .column-group.vertical-gutters > [class*=all-] { + margin-bottom: 1.5em; + } + + .column-group.double-gutters { + margin-left: -3em; + } + .column-group.double-gutters > [class*=medium-], .column-group.double-gutters > [class*=all-] { + padding-left: 3em; + margin-bottom: 3em; + } + + .column-group.double-horizontal-gutters { + margin-left: -3em; + } + .column-group.double-horizontal-gutters > [class*=medium-], .column-group.double-horizontal-gutters > [class*=all-] { + padding-left: 3em; + } + + .column-group.double-vertical-gutters > [class*=medium-], .column-group.double-vertical-gutters > [class*=all-] { + margin-bottom: 3em; + } + + .column-group.half-gutters { + margin-left: -0.75em; + } + .column-group.half-gutters > [class*=medium-], .column-group.half-gutters > [class*=all-] { + padding-left: 0.75em; + margin-bottom: 0.75em; + } + + .column-group.half-horizontal-gutters { + margin-left: -0.75em; + } + .column-group.half-horizontal-gutters > [class*=medium-], .column-group.half-horizontal-gutters > [class*=all-] { + padding-left: 0.75em; + } + + .column-group.half-vertical-gutters > [class*=medium-], .column-group.half-vertical-gutters > [class*=all-] { + margin-bottom: 0.75em; + } + + .column-group.quarter-gutters { + margin-left: -0.375em; + } + .column-group.quarter-gutters > [class*=medium-], .column-group.quarter-gutters > [class*=all-] { + padding-left: 0.375em; + margin-bottom: 0.375em; + } + + .column-group.quarter-horizontal-gutters { + margin-left: -0.375em; + } + .column-group.quarter-horizontal-gutters > [class*=medium-], .column-group.quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.375em; + } + + .column-group.quarter-vertical-gutters > [class*=medium-], .column-group.quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.375em; + } + + .column-group.medium-gutters { + margin-left: -1.5em; + } + .column-group.medium-gutters > [class*=medium-], .column-group.medium-gutters > [class*=all-] { + padding-left: 0.375em; + margin-bottom: 0.375em; + } + + .column-group.medium-horizontal-gutters { + margin-left: -1.5em; + } + .column-group.medium-horizontal-gutters > [class*=medium-], .column-group.medium-horizontal-gutters > [class*=all-] { + padding-left: 1.5em; + } + + .column-group.medium-vertical-gutters > [class*=medium-], .column-group.medium-vertical-gutters > [class*=all-] { + margin-bottom: 1.5em; + } + + .column-group.medium-double-gutters { + margin-left: -3em; + } + .column-group.medium-double-gutters > [class*=medium-], .column-group.medium-double-gutters > [class*=all-] { + padding-left: 3em; + margin-bottom: 3em; + } + + .column-group.medium-double-horizontal-gutters { + margin-left: -3em; + } + .column-group.medium-double-horizontal-gutters > [class*=medium-], .column-group.medium-double-horizontal-gutters > [class*=all-] { + padding-left: 3em; + } + + .column-group.medium-double-vertical-gutters > [class*=medium-], .column-group.medium-double-vertical-gutters > [class*=all-] { + margin-bottom: 3em; + } + + .column-group.medium-half-gutters { + margin-left: -0.75em; + } + .column-group.medium-half-gutters > [class*=medium-], .column-group.medium-half-gutters > [class*=all-] { + padding-left: 0.75em; + margin-bottom: 0.75em; + } + + .column-group.medium-half-horizontal-gutters { + margin-left: -0.75em; + } + .column-group.medium-half-horizontal-gutters > [class*=medium-], .column-group.medium-half-horizontal-gutters > [class*=all-] { + padding-left: 0.75em; + } + + .column-group.medium-half-vertical-gutters > [class*=medium-], .column-group.medium-half-vertical-gutters > [class*=all-] { + margin-bottom: 0.75em; + } + + .column-group.medium-quarter-gutters { + margin-left: -0.375em; + } + .column-group.medium-quarter-gutters > [class*=medium-], .column-group.medium-quarter-gutters > [class*=all-] { + padding-left: 0.375em; + margin-bottom: 0.375em; + } + + .column-group.medium-quarter-horizontal-gutters { + margin-left: -0.375em; + } + .column-group.medium-quarter-horizontal-gutters > [class*=medium-], .column-group.medium-quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.375em; + } + + .column-group.medium-quarter-vertical-gutters > [class*=medium-], .column-group.medium-quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.375em; + } + + .column-group.medium-no-gutters { + margin-left: 0; + } + .column-group.medium-no-gutters > [class*=medium-], .column-group.medium-no-gutters > [class*=all-] { + padding-left: 0; + margin-bottom: 0; + } + + .ink-table td[class*=medium-], .ink-table th[class*=medium-], .ink-table tr[class*=medium-], .ink-table thead[class*=medium-], .ink-table tbody[class*=medium-], .ink-table tfoot[class*=medium-] { + float: none; + } + + .medium-push-left { + float: left; + } + + .medium-push-center { + float: none; + margin-left: auto; + margin-right: auto; + } + + .medium-push-right { + float: right; + } + + .medium-align-left { + text-align: left; + } + + .medium-align-center { + text-align: center; + } + + .medium-align-right { + text-align: right; + } + + .medium-no-margin { + margin: 0 !important; + } + + .space { + margin: 1.5em; + } + + .medium-space { + margin: 1.5em; + } + + .padding { + padding: 1.5em; + } + + .medium-padding { + padding: 1.5em; + } + + .double-space { + margin: 3em; + } + + .medium-double-space { + margin: 3em; + } + + .double-padding { + padding: 3em; + } + + .medium-double-padding { + padding: 3em; + } + + .half-space { + margin: 0.75em; + } + + .medium-half-space { + margin: 0.75em; + } + + .half-padding { + padding: 0.75em; + } + + .medium-half-padding { + padding: 0.75em; + } + + .quarter-space { + margin: 0.375em; + } + + .medium-quarter-space { + margin: 0.375em; + } + + .quarter-padding { + padding: 0.375em; + } + + .medium-quarter-padding { + padding: 0.375em; + } + + .vertical-space { + margin-top: 1.5em; + margin-bottom: 1.5em; + } + + .medium-vertical-space { + margin-top: 1.5em; + margin-bottom: 1.5em; + } + + .vertical-padding { + padding-top: 1.5em; + padding-bottom: 1.5em; + } + + .medium-vertical-padding { + padding-top: 1.5em; + padding-bottom: 1.5em; + } + + .double-vertical-space { + margin-top: 3em; + margin-bottom: 3em; + } + + .medium-double-vertical-space { + margin-top: 3em; + margin-bottom: 3em; + } + + .double-vertical-padding { + padding-top: 3em; + padding-bottom: 3em; + } + + .medium-double-vertical-padding { + padding-top: 3em; + padding-bottom: 3em; + } + + .half-vertical-space { + margin-top: 0.75em; + margin-bottom: 0.75em; + } + + .medium-half-vertical-space { + margin-top: 0.75em; + margin-bottom: 0.75em; + } + + .half-vertical-padding { + padding-top: 0.75em; + padding-bottom: 0.75em; + } + + .medium-half-vertical-padding { + padding-top: 0.75em; + padding-bottom: 0.75em; + } + + .quarter-vertical-space { + margin-top: 0.375em; + margin-bottom: 0.375em; + } + + .medium-quarter-vertical-space { + margin-top: 0.375em; + margin-bottom: 0.375em; + } + + .quarter-vertical-padding { + padding-top: 0.375em; + padding-bottom: 0.375em; + } + + .medium-quarter-vertical-padding { + padding-top: 0.375em; + padding-bottom: 0.375em; + } + + .horizontal-space { + margin-left: 1.5em; + margin-right: 1.5em; + } + + .medium-horizontal-space { + margin-left: 1.5em; + margin-right: 1.5em; + } + + .horizontal-padding { + padding-left: 1.5em; + padding-right: 1.5em; + } + + .medium-horizontal-padding { + padding-left: 1.5em; + padding-right: 1.5em; + } + + .double-horizontal-space { + margin-left: 3em; + margin-right: 3em; + } + + .medium-double-horizontal-space { + margin-left: 3em; + margin-right: 3em; + } + + .double-horizontal-padding { + padding-left: 3em; + padding-right: 3em; + } + + .medium-double-horizontal-padding { + padding-left: 3em; + padding-right: 3em; + } + + .half-horizontal-space { + margin-left: 0.75em; + margin-right: 0.75em; + } + + .medium-half-horizontal-space { + margin-left: 0.75em; + margin-right: 0.75em; + } + + .half-horizontal-padding { + padding-left: 0.75em; + padding-right: 0.75em; + } + + .medium-half-horizontal-padding { + padding-left: 0.75em; + padding-right: 0.75em; + } + + .quarter-horizontal-space { + margin-left: 0.375em; + margin-right: 0.375em; + } + + .medium-quarter-horizontal-space { + margin-left: 0.375em; + margin-right: 0.375em; + } + + .quarter-horizontal-padding { + padding-left: 0.375em; + padding-right: 0.375em; + } + + .medium-quarter-horizontal-padding { + padding-left: 0.375em; + padding-right: 0.375em; + } + + .top-space { + margin-top: 1.5em; + } + + .medium-top-space { + margin-top: 1.5em; + } + + .top-padding { + padding-top: 1.5em; + } + + .medium-top-padding { + padding-top: 1.5em; + } + + .double-top-space { + margin-top: 3em; + } + + .medium-double-top-space { + margin-top: 3em; + } + + .double-top-padding { + padding-top: 3em; + } + + .medium-double-top-padding { + padding-top: 3em; + } + + .half-top-space { + margin-top: 0.75em; + } + + .medium-half-top-space { + margin-top: 0.75em; + } + + .half-top-padding { + padding-top: 0.75em; + } + + .medium-half-top-padding { + padding-top: 0.75em; + } + + .quarter-top-space { + margin-top: 0.375em; + } + + .medium-quarter-top-space { + margin-top: 0.375em; + } + + .quarter-top-padding { + padding-top: 0.375em; + } + + .medium-quarter-top-padding { + padding-top: 0.375em; + } + + .right-space { + margin-right: 1.5em; + } + + .medium-right-space { + margin-right: 1.5em; + } + + .right-padding { + padding-right: 1.5em; + } + + .medium-right-padding { + padding-right: 1.5em; + } + + .double-right-space { + margin-right: 3em; + } + + .medium-double-right-space { + margin-right: 3em; + } + + .double-right-padding { + padding-right: 3em; + } + + .medium-double-right-padding { + padding-right: 3em; + } + + .half-right-space { + margin-right: 0.75em; + } + + .medium-half-right-space { + margin-right: 0.75em; + } + + .half-right-padding { + padding-right: 0.75em; + } + + .medium-half-right-padding { + padding-right: 0.75em; + } + + .quarter-right-space { + margin-right: 0.375em; + } + + .medium-quarter-right-space { + margin-right: 0.375em; + } + + .quarter-right-padding { + padding-right: 0.375em; + } + + .medium-quarter-right-padding { + padding-right: 0.375em; + } + + .bottom-space { + margin-bottom: 1.5em; + } + + .medium-bottom-space { + margin-bottom: 1.5em; + } + + .bottom-padding { + padding-bottom: 1.5em; + } + + .medium-bottom-padding { + padding-bottom: 1.5em; + } + + .double-bottom-space { + margin-bottom: 3em; + } + + .medium-double-bottom-space { + margin-bottom: 3em; + } + + .double-bottom-padding { + padding-bottom: 3em; + } + + .medium-double-bottom-padding { + padding-bottom: 3em; + } + + .half-bottom-space { + margin-bottom: 0.75em; + } + + .medium-half-bottom-space { + margin-bottom: 0.75em; + } + + .half-bottom-padding { + padding-bottom: 0.75em; + } + + .medium-half-bottom-padding { + padding-bottom: 0.75em; + } + + .quarter-bottom-space { + margin-bottom: 0.375em; + } + + .medium-quarter-bottom-space { + margin-bottom: 0.375em; + } + + .quarter-bottom-padding { + padding-bottom: 0.375em; + } + + .medium-quarter-bottom-padding { + padding-bottom: 0.375em; + } + + .left-space { + margin-left: 1.5em; + } + + .medium-left-space { + margin-left: 1.5em; + } + + .left-padding { + padding-left: 1.5em; + } + + .medium-left-padding { + padding-left: 1.5em; + } + + .double-left-space { + margin-left: 3em; + } + + .medium-double-left-space { + margin-left: 3em; + } + + .double-left-padding { + padding-left: 3em; + } + + .medium-double-left-padding { + padding-left: 3em; + } + + .half-left-space { + margin-left: 0.75em; + } + + .medium-half-left-space { + margin-left: 0.75em; + } + + .half-left-padding { + padding-left: 0.75em; + } + + .medium-half-left-padding { + padding-left: 0.75em; + } + + .quarter-left-space { + margin-left: 0.375em; + } + + .medium-quarter-left-space { + margin-left: 0.375em; + } + + .quarter-left-padding { + padding-left: 0.375em; + } + + .medium-quarter-left-padding { + padding-left: 0.375em; + } + + .hide-medium { + display: none !important; + } + + .show-medium { + display: inherit !important; + } + + table.show-medium { + display: table; + } + + thead.show-medium { + display: table-header-group; + } + + tbody.show-medium { + display: table-row-group; + } + + tfoot.show-medium { + display: table-footer-group; + } + + tr.show-medium { + display: table-row; + } + + th.show-medium, + td.show-medium { + display: table-cell; + } +} +@media screen and (min-width: 321px) and (max-width: 640px) { + .ink-grid { + padding: 0 1.25em; + } + + .column-group > [class*=small-] { + float: left; + clear: none; + } + + .small-5 { + width: 5%; + } + + .small-10 { + width: 10%; + } + + .small-15 { + width: 15%; + } + + .small-20 { + width: 20%; + } + + .small-25 { + width: 25%; + } + + .small-30 { + width: 30%; + } + + .small-33 { + width: 33.33%; + } + + .small-35 { + width: 35%; + } + + .small-40 { + width: 40%; + } + + .small-45 { + width: 45%; + } + + .small-50 { + width: 50%; + } + + .small-55 { + width: 55%; + } + + .small-60 { + width: 60%; + } + + .small-65 { + width: 65%; + } + + .small-66 { + width: 66.66%; + } + + .small-70 { + width: 70%; + } + + .small-75 { + width: 75%; + } + + .small-80 { + width: 80%; + } + + .small-85 { + width: 85%; + } + + .small-90 { + width: 90%; + } + + .small-95 { + width: 95%; + } + + .small-100 { + width: 100%; + } + + [class*=small-100] { + float: none; + clear: both; + } + + .column-group { + *zoom: 1; + } + .column-group:after { + content: ""; + display: table; + clear: both; + } + + .column-group.gutters { + margin-left: -1.25em; + } + .column-group.gutters > [class*=small-], .column-group.gutters > [class*=all-] { + padding-left: 1.25em; + margin-bottom: 1.25em; + } + + .column-group.horizontal-gutters { + margin-left: -1.25em; + } + .column-group.horizontal-gutters > [class*=small-], .column-group.horizontal-gutters > [class*=all-] { + padding-left: 1.25em; + } + + .column-group.vertical-gutters > [class*=small-], .column-group.vertical-gutters > [class*=all-] { + margin-bottom: 1.25em; + } + + .column-group.double-gutters { + margin-left: -2.5em; + } + .column-group.double-gutters > [class*=small-], .column-group.double-gutters > [class*=all-] { + padding-left: 2.5em; + margin-bottom: 2.5em; + } + + .column-group.double-horizontal-gutters { + margin-left: -2.5em; + } + .column-group.double-horizontal-gutters > [class*=small-], .column-group.double-horizontal-gutters > [class*=all-] { + padding-left: 2.5em; + } + + .column-group.double-vertical-gutters > [class*=small-], .column-group.double-vertical-gutters > [class*=all-] { + margin-bottom: 2.5em; + } + + .column-group.half-gutters { + margin-left: -0.625em; + } + .column-group.half-gutters > [class*=small-], .column-group.half-gutters > [class*=all-] { + padding-left: 0.625em; + margin-bottom: 0.625em; + } + + .column-group.half-horizontal-gutters { + margin-left: -0.625em; + } + .column-group.half-horizontal-gutters > [class*=small-], .column-group.half-horizontal-gutters > [class*=all-] { + padding-left: 0.625em; + } + + .column-group.half-vertical-gutters > [class*=small-], .column-group.half-vertical-gutters > [class*=all-] { + margin-bottom: 0.625em; + } + + .column-group.quarter-gutters { + margin-left: -0.3125em; + } + .column-group.quarter-gutters > [class*=small-], .column-group.quarter-gutters > [class*=all-] { + padding-left: 0.3125em; + margin-bottom: 0.3125em; + } + + .column-group.quarter-horizontal-gutters { + margin-left: -0.3125em; + } + .column-group.quarter-horizontal-gutters > [class*=small-], .column-group.quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.3125em; + } + + .column-group.quarter-vertical-gutters > [class*=small-], .column-group.quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.3125em; + } + + .column-group.small-gutters { + margin-left: -1.25em; + } + .column-group.small-gutters > [class*=small-], .column-group.small-gutters > [class*=all-] { + padding-left: 0.3125em; + margin-bottom: 0.3125em; + } + + .column-group.small-horizontal-gutters { + margin-left: -1.25em; + } + .column-group.small-horizontal-gutters > [class*=small-], .column-group.small-horizontal-gutters > [class*=all-] { + padding-left: 1.25em; + } + + .column-group.small-vertical-gutters > [class*=small-], .column-group.small-vertical-gutters > [class*=all-] { + margin-bottom: 1.25em; + } + + .column-group.small-double-gutters { + margin-left: -2.5em; + } + .column-group.small-double-gutters > [class*=small-], .column-group.small-double-gutters > [class*=all-] { + padding-left: 2.5em; + margin-bottom: 2.5em; + } + + .column-group.small-double-horizontal-gutters { + margin-left: -2.5em; + } + .column-group.small-double-horizontal-gutters > [class*=small-], .column-group.small-double-horizontal-gutters > [class*=all-] { + padding-left: 2.5em; + } + + .column-group.small-double-vertical-gutters > [class*=small-], .column-group.small-double-vertical-gutters > [class*=all-] { + margin-bottom: 2.5em; + } + + .column-group.small-half-gutters { + margin-left: -0.625em; + } + .column-group.small-half-gutters > [class*=small-], .column-group.small-half-gutters > [class*=all-] { + padding-left: 0.625em; + margin-bottom: 0.625em; + } + + .column-group.small-half-horizontal-gutters { + margin-left: -0.625em; + } + .column-group.small-half-horizontal-gutters > [class*=small-], .column-group.small-half-horizontal-gutters > [class*=all-] { + padding-left: 0.625em; + } + + .column-group.small-half-vertical-gutters > [class*=small-], .column-group.small-half-vertical-gutters > [class*=all-] { + margin-bottom: 0.625em; + } + + .column-group.small-quarter-gutters { + margin-left: -0.3125em; + } + .column-group.small-quarter-gutters > [class*=small-], .column-group.small-quarter-gutters > [class*=all-] { + padding-left: 0.3125em; + margin-bottom: 0.3125em; + } + + .column-group.small-quarter-horizontal-gutters { + margin-left: -0.3125em; + } + .column-group.small-quarter-horizontal-gutters > [class*=small-], .column-group.small-quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.3125em; + } + + .column-group.small-quarter-vertical-gutters > [class*=small-], .column-group.small-quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.3125em; + } + + .column-group.small-no-gutters { + margin-left: 0; + } + .column-group.small-no-gutters > [class*=small-], .column-group.small-no-gutters > [class*=all-] { + padding-left: 0; + margin-bottom: 0; + } + + .ink-table td[class*=small-], .ink-table th[class*=small-], .ink-table tr[class*=small-], .ink-table thead[class*=small-], .ink-table tbody[class*=small-], .ink-table tfoot[class*=small-] { + float: none; + } + + .small-push-left { + float: left; + } + + .small-push-center { + float: none; + margin-left: auto; + margin-right: auto; + } + + .small-push-right { + float: right; + } + + .small-align-left { + text-align: left; + } + + .small-align-center { + text-align: center; + } + + .small-align-right { + text-align: right; + } + + .small-no-margin { + margin: 0 !important; + } + + .space { + margin: 1.25em; + } + + .small-space { + margin: 1.25em; + } + + .padding { + padding: 1.25em; + } + + .small-padding { + padding: 1.25em; + } + + .double-space { + margin: 2.5em; + } + + .small-double-space { + margin: 2.5em; + } + + .double-padding { + padding: 2.5em; + } + + .small-double-padding { + padding: 2.5em; + } + + .half-space { + margin: 0.625em; + } + + .small-half-space { + margin: 0.625em; + } + + .half-padding { + padding: 0.625em; + } + + .small-half-padding { + padding: 0.625em; + } + + .quarter-space { + margin: 0.3125em; + } + + .small-quarter-space { + margin: 0.3125em; + } + + .quarter-padding { + padding: 0.3125em; + } + + .small-quarter-padding { + padding: 0.3125em; + } + + .vertical-space { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + + .small-vertical-space { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + + .vertical-padding { + padding-top: 1.25em; + padding-bottom: 1.25em; + } + + .small-vertical-padding { + padding-top: 1.25em; + padding-bottom: 1.25em; + } + + .double-vertical-space { + margin-top: 2.5em; + margin-bottom: 2.5em; + } + + .small-double-vertical-space { + margin-top: 2.5em; + margin-bottom: 2.5em; + } + + .double-vertical-padding { + padding-top: 2.5em; + padding-bottom: 2.5em; + } + + .small-double-vertical-padding { + padding-top: 2.5em; + padding-bottom: 2.5em; + } + + .half-vertical-space { + margin-top: 0.625em; + margin-bottom: 0.625em; + } + + .small-half-vertical-space { + margin-top: 0.625em; + margin-bottom: 0.625em; + } + + .half-vertical-padding { + padding-top: 0.625em; + padding-bottom: 0.625em; + } + + .small-half-vertical-padding { + padding-top: 0.625em; + padding-bottom: 0.625em; + } + + .quarter-vertical-space { + margin-top: 0.3125em; + margin-bottom: 0.3125em; + } + + .small-quarter-vertical-space { + margin-top: 0.3125em; + margin-bottom: 0.3125em; + } + + .quarter-vertical-padding { + padding-top: 0.3125em; + padding-bottom: 0.3125em; + } + + .small-quarter-vertical-padding { + padding-top: 0.3125em; + padding-bottom: 0.3125em; + } + + .horizontal-space { + margin-left: 1.25em; + margin-right: 1.25em; + } + + .small-horizontal-space { + margin-left: 1.25em; + margin-right: 1.25em; + } + + .horizontal-padding { + padding-left: 1.25em; + padding-right: 1.25em; + } + + .small-horizontal-padding { + padding-left: 1.25em; + padding-right: 1.25em; + } + + .double-horizontal-space { + margin-left: 2.5em; + margin-right: 2.5em; + } + + .small-double-horizontal-space { + margin-left: 2.5em; + margin-right: 2.5em; + } + + .double-horizontal-padding { + padding-left: 2.5em; + padding-right: 2.5em; + } + + .small-double-horizontal-padding { + padding-left: 2.5em; + padding-right: 2.5em; + } + + .half-horizontal-space { + margin-left: 0.625em; + margin-right: 0.625em; + } + + .small-half-horizontal-space { + margin-left: 0.625em; + margin-right: 0.625em; + } + + .half-horizontal-padding { + padding-left: 0.625em; + padding-right: 0.625em; + } + + .small-half-horizontal-padding { + padding-left: 0.625em; + padding-right: 0.625em; + } + + .quarter-horizontal-space { + margin-left: 0.3125em; + margin-right: 0.3125em; + } + + .small-quarter-horizontal-space { + margin-left: 0.3125em; + margin-right: 0.3125em; + } + + .quarter-horizontal-padding { + padding-left: 0.3125em; + padding-right: 0.3125em; + } + + .small-quarter-horizontal-padding { + padding-left: 0.3125em; + padding-right: 0.3125em; + } + + .top-space { + margin-top: 1.25em; + } + + .small-top-space { + margin-top: 1.25em; + } + + .top-padding { + padding-top: 1.25em; + } + + .small-top-padding { + padding-top: 1.25em; + } + + .double-top-space { + margin-top: 2.5em; + } + + .small-double-top-space { + margin-top: 2.5em; + } + + .double-top-padding { + padding-top: 2.5em; + } + + .small-double-top-padding { + padding-top: 2.5em; + } + + .half-top-space { + margin-top: 0.625em; + } + + .small-half-top-space { + margin-top: 0.625em; + } + + .half-top-padding { + padding-top: 0.625em; + } + + .small-half-top-padding { + padding-top: 0.625em; + } + + .quarter-top-space { + margin-top: 0.3125em; + } + + .small-quarter-top-space { + margin-top: 0.3125em; + } + + .quarter-top-padding { + padding-top: 0.3125em; + } + + .small-quarter-top-padding { + padding-top: 0.3125em; + } + + .right-space { + margin-right: 1.25em; + } + + .small-right-space { + margin-right: 1.25em; + } + + .right-padding { + padding-right: 1.25em; + } + + .small-right-padding { + padding-right: 1.25em; + } + + .double-right-space { + margin-right: 2.5em; + } + + .small-double-right-space { + margin-right: 2.5em; + } + + .double-right-padding { + padding-right: 2.5em; + } + + .small-double-right-padding { + padding-right: 2.5em; + } + + .half-right-space { + margin-right: 0.625em; + } + + .small-half-right-space { + margin-right: 0.625em; + } + + .half-right-padding { + padding-right: 0.625em; + } + + .small-half-right-padding { + padding-right: 0.625em; + } + + .quarter-right-space { + margin-right: 0.3125em; + } + + .small-quarter-right-space { + margin-right: 0.3125em; + } + + .quarter-right-padding { + padding-right: 0.3125em; + } + + .small-quarter-right-padding { + padding-right: 0.3125em; + } + + .bottom-space { + margin-bottom: 1.25em; + } + + .small-bottom-space { + margin-bottom: 1.25em; + } + + .bottom-padding { + padding-bottom: 1.25em; + } + + .small-bottom-padding { + padding-bottom: 1.25em; + } + + .double-bottom-space { + margin-bottom: 2.5em; + } + + .small-double-bottom-space { + margin-bottom: 2.5em; + } + + .double-bottom-padding { + padding-bottom: 2.5em; + } + + .small-double-bottom-padding { + padding-bottom: 2.5em; + } + + .half-bottom-space { + margin-bottom: 0.625em; + } + + .small-half-bottom-space { + margin-bottom: 0.625em; + } + + .half-bottom-padding { + padding-bottom: 0.625em; + } + + .small-half-bottom-padding { + padding-bottom: 0.625em; + } + + .quarter-bottom-space { + margin-bottom: 0.3125em; + } + + .small-quarter-bottom-space { + margin-bottom: 0.3125em; + } + + .quarter-bottom-padding { + padding-bottom: 0.3125em; + } + + .small-quarter-bottom-padding { + padding-bottom: 0.3125em; + } + + .left-space { + margin-left: 1.25em; + } + + .small-left-space { + margin-left: 1.25em; + } + + .left-padding { + padding-left: 1.25em; + } + + .small-left-padding { + padding-left: 1.25em; + } + + .double-left-space { + margin-left: 2.5em; + } + + .small-double-left-space { + margin-left: 2.5em; + } + + .double-left-padding { + padding-left: 2.5em; + } + + .small-double-left-padding { + padding-left: 2.5em; + } + + .half-left-space { + margin-left: 0.625em; + } + + .small-half-left-space { + margin-left: 0.625em; + } + + .half-left-padding { + padding-left: 0.625em; + } + + .small-half-left-padding { + padding-left: 0.625em; + } + + .quarter-left-space { + margin-left: 0.3125em; + } + + .small-quarter-left-space { + margin-left: 0.3125em; + } + + .quarter-left-padding { + padding-left: 0.3125em; + } + + .small-quarter-left-padding { + padding-left: 0.3125em; + } + + .hide-small { + display: none !important; + } + + .show-small { + display: inherit !important; + } + + table.show-small { + display: table; + } + + thead.show-small { + display: table-header-group; + } + + tbody.show-small { + display: table-row-group; + } + + tfoot.show-small { + display: table-footer-group; + } + + tr.show-small { + display: table-row; + } + + th.show-small, + td.show-small { + display: table-cell; + } +} +@media screen and (max-width: 320px) { + .ink-grid { + padding: 0 1em; + } + + .column-group > [class*=tiny-] { + float: left; + clear: none; + } + + .tiny-5 { + width: 5%; + } + + .tiny-10 { + width: 10%; + } + + .tiny-15 { + width: 15%; + } + + .tiny-20 { + width: 20%; + } + + .tiny-25 { + width: 25%; + } + + .tiny-30 { + width: 30%; + } + + .tiny-33 { + width: 33.33%; + } + + .tiny-35 { + width: 35%; + } + + .tiny-40 { + width: 40%; + } + + .tiny-45 { + width: 45%; + } + + .tiny-50 { + width: 50%; + } + + .tiny-55 { + width: 55%; + } + + .tiny-60 { + width: 60%; + } + + .tiny-65 { + width: 65%; + } + + .tiny-66 { + width: 66.66%; + } + + .tiny-70 { + width: 70%; + } + + .tiny-75 { + width: 75%; + } + + .tiny-80 { + width: 80%; + } + + .tiny-85 { + width: 85%; + } + + .tiny-90 { + width: 90%; + } + + .tiny-95 { + width: 95%; + } + + .tiny-100 { + width: 100%; + } + + [class*=tiny-100] { + float: none; + clear: both; + } + + .column-group { + *zoom: 1; + } + .column-group:after { + content: ""; + display: table; + clear: both; + } + + .column-group.gutters { + margin-left: -1em; + } + .column-group.gutters > [class*=tiny-], .column-group.gutters > [class*=all-] { + padding-left: 1em; + margin-bottom: 1em; + } + + .column-group.horizontal-gutters { + margin-left: -1em; + } + .column-group.horizontal-gutters > [class*=tiny-], .column-group.horizontal-gutters > [class*=all-] { + padding-left: 1em; + } + + .column-group.vertical-gutters > [class*=tiny-], .column-group.vertical-gutters > [class*=all-] { + margin-bottom: 1em; + } + + .column-group.double-gutters { + margin-left: -2em; + } + .column-group.double-gutters > [class*=tiny-], .column-group.double-gutters > [class*=all-] { + padding-left: 2em; + margin-bottom: 2em; + } + + .column-group.double-horizontal-gutters { + margin-left: -2em; + } + .column-group.double-horizontal-gutters > [class*=tiny-], .column-group.double-horizontal-gutters > [class*=all-] { + padding-left: 2em; + } + + .column-group.double-vertical-gutters > [class*=tiny-], .column-group.double-vertical-gutters > [class*=all-] { + margin-bottom: 2em; + } + + .column-group.half-gutters { + margin-left: -0.5em; + } + .column-group.half-gutters > [class*=tiny-], .column-group.half-gutters > [class*=all-] { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + + .column-group.half-horizontal-gutters { + margin-left: -0.5em; + } + .column-group.half-horizontal-gutters > [class*=tiny-], .column-group.half-horizontal-gutters > [class*=all-] { + padding-left: 0.5em; + } + + .column-group.half-vertical-gutters > [class*=tiny-], .column-group.half-vertical-gutters > [class*=all-] { + margin-bottom: 0.5em; + } + + .column-group.quarter-gutters { + margin-left: -0.25em; + } + .column-group.quarter-gutters > [class*=tiny-], .column-group.quarter-gutters > [class*=all-] { + padding-left: 0.25em; + margin-bottom: 0.25em; + } + + .column-group.quarter-horizontal-gutters { + margin-left: -0.25em; + } + .column-group.quarter-horizontal-gutters > [class*=tiny-], .column-group.quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.25em; + } + + .column-group.quarter-vertical-gutters > [class*=tiny-], .column-group.quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.25em; + } + + .column-group.tiny-gutters { + margin-left: -1em; + } + .column-group.tiny-gutters > [class*=tiny-], .column-group.tiny-gutters > [class*=all-] { + padding-left: 0.25em; + margin-bottom: 0.25em; + } + + .column-group.tiny-horizontal-gutters { + margin-left: -1em; + } + .column-group.tiny-horizontal-gutters > [class*=tiny-], .column-group.tiny-horizontal-gutters > [class*=all-] { + padding-left: 1em; + } + + .column-group.tiny-vertical-gutters > [class*=tiny-], .column-group.tiny-vertical-gutters > [class*=all-] { + margin-bottom: 1em; + } + + .column-group.tiny-double-gutters { + margin-left: -2em; + } + .column-group.tiny-double-gutters > [class*=tiny-], .column-group.tiny-double-gutters > [class*=all-] { + padding-left: 2em; + margin-bottom: 2em; + } + + .column-group.tiny-double-horizontal-gutters { + margin-left: -2em; + } + .column-group.tiny-double-horizontal-gutters > [class*=tiny-], .column-group.tiny-double-horizontal-gutters > [class*=all-] { + padding-left: 2em; + } + + .column-group.tiny-double-vertical-gutters > [class*=tiny-], .column-group.tiny-double-vertical-gutters > [class*=all-] { + margin-bottom: 2em; + } + + .column-group.tiny-half-gutters { + margin-left: -0.5em; + } + .column-group.tiny-half-gutters > [class*=tiny-], .column-group.tiny-half-gutters > [class*=all-] { + padding-left: 0.5em; + margin-bottom: 0.5em; + } + + .column-group.tiny-half-horizontal-gutters { + margin-left: -0.5em; + } + .column-group.tiny-half-horizontal-gutters > [class*=tiny-], .column-group.tiny-half-horizontal-gutters > [class*=all-] { + padding-left: 0.5em; + } + + .column-group.tiny-half-vertical-gutters > [class*=tiny-], .column-group.tiny-half-vertical-gutters > [class*=all-] { + margin-bottom: 0.5em; + } + + .column-group.tiny-quarter-gutters { + margin-left: -0.25em; + } + .column-group.tiny-quarter-gutters > [class*=tiny-], .column-group.tiny-quarter-gutters > [class*=all-] { + padding-left: 0.25em; + margin-bottom: 0.25em; + } + + .column-group.tiny-quarter-horizontal-gutters { + margin-left: -0.25em; + } + .column-group.tiny-quarter-horizontal-gutters > [class*=tiny-], .column-group.tiny-quarter-horizontal-gutters > [class*=all-] { + padding-left: 0.25em; + } + + .column-group.tiny-quarter-vertical-gutters > [class*=tiny-], .column-group.tiny-quarter-vertical-gutters > [class*=all-] { + margin-bottom: 0.25em; + } + + .column-group.tiny-no-gutters { + margin-left: 0; + } + .column-group.tiny-no-gutters > [class*=tiny-], .column-group.tiny-no-gutters > [class*=all-] { + padding-left: 0; + margin-bottom: 0; + } + + .ink-table td[class*=tiny-], .ink-table th[class*=tiny-], .ink-table tr[class*=tiny-], .ink-table thead[class*=tiny-], .ink-table tbody[class*=tiny-], .ink-table tfoot[class*=tiny-] { + float: none; + } + + .tiny-push-left { + float: left; + } + + .tiny-push-center { + float: none; + margin-left: auto; + margin-right: auto; + } + + .tiny-push-right { + float: right; + } + + .tiny-align-left { + text-align: left; + } + + .tiny-align-center { + text-align: center; + } + + .tiny-align-right { + text-align: right; + } + + .tiny-no-margin { + margin: 0 !important; + } + + .space { + margin: 1em; + } + + .tiny-space { + margin: 1em; + } + + .padding { + padding: 1em; + } + + .tiny-padding { + padding: 1em; + } + + .double-space { + margin: 2em; + } + + .tiny-double-space { + margin: 2em; + } + + .double-padding { + padding: 2em; + } + + .tiny-double-padding { + padding: 2em; + } + + .half-space { + margin: 0.5em; + } + + .tiny-half-space { + margin: 0.5em; + } + + .half-padding { + padding: 0.5em; + } + + .tiny-half-padding { + padding: 0.5em; + } + + .quarter-space { + margin: 0.25em; + } + + .tiny-quarter-space { + margin: 0.25em; + } + + .quarter-padding { + padding: 0.25em; + } + + .tiny-quarter-padding { + padding: 0.25em; + } + + .vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + + .tiny-vertical-space { + margin-top: 1em; + margin-bottom: 1em; + } + + .vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + + .tiny-vertical-padding { + padding-top: 1em; + padding-bottom: 1em; + } + + .double-vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + + .tiny-double-vertical-space { + margin-top: 2em; + margin-bottom: 2em; + } + + .double-vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + + .tiny-double-vertical-padding { + padding-top: 2em; + padding-bottom: 2em; + } + + .half-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + + .tiny-half-vertical-space { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + + .half-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + + .tiny-half-vertical-padding { + padding-top: 0.5em; + padding-bottom: 0.5em; + } + + .quarter-vertical-space { + margin-top: 0.25em; + margin-bottom: 0.25em; + } + + .tiny-quarter-vertical-space { + margin-top: 0.25em; + margin-bottom: 0.25em; + } + + .quarter-vertical-padding { + padding-top: 0.25em; + padding-bottom: 0.25em; + } + + .tiny-quarter-vertical-padding { + padding-top: 0.25em; + padding-bottom: 0.25em; + } + + .horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + + .tiny-horizontal-space { + margin-left: 1em; + margin-right: 1em; + } + + .horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + + .tiny-horizontal-padding { + padding-left: 1em; + padding-right: 1em; + } + + .double-horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + + .tiny-double-horizontal-space { + margin-left: 2em; + margin-right: 2em; + } + + .double-horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + + .tiny-double-horizontal-padding { + padding-left: 2em; + padding-right: 2em; + } + + .half-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + + .tiny-half-horizontal-space { + margin-left: 0.5em; + margin-right: 0.5em; + } + + .half-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + + .tiny-half-horizontal-padding { + padding-left: 0.5em; + padding-right: 0.5em; + } + + .quarter-horizontal-space { + margin-left: 0.25em; + margin-right: 0.25em; + } + + .tiny-quarter-horizontal-space { + margin-left: 0.25em; + margin-right: 0.25em; + } + + .quarter-horizontal-padding { + padding-left: 0.25em; + padding-right: 0.25em; + } + + .tiny-quarter-horizontal-padding { + padding-left: 0.25em; + padding-right: 0.25em; + } + + .top-space { + margin-top: 1em; + } + + .tiny-top-space { + margin-top: 1em; + } + + .top-padding { + padding-top: 1em; + } + + .tiny-top-padding { + padding-top: 1em; + } + + .double-top-space { + margin-top: 2em; + } + + .tiny-double-top-space { + margin-top: 2em; + } + + .double-top-padding { + padding-top: 2em; + } + + .tiny-double-top-padding { + padding-top: 2em; + } + + .half-top-space { + margin-top: 0.5em; + } + + .tiny-half-top-space { + margin-top: 0.5em; + } + + .half-top-padding { + padding-top: 0.5em; + } + + .tiny-half-top-padding { + padding-top: 0.5em; + } + + .quarter-top-space { + margin-top: 0.25em; + } + + .tiny-quarter-top-space { + margin-top: 0.25em; + } + + .quarter-top-padding { + padding-top: 0.25em; + } + + .tiny-quarter-top-padding { + padding-top: 0.25em; + } + + .right-space { + margin-right: 1em; + } + + .tiny-right-space { + margin-right: 1em; + } + + .right-padding { + padding-right: 1em; + } + + .tiny-right-padding { + padding-right: 1em; + } + + .double-right-space { + margin-right: 2em; + } + + .tiny-double-right-space { + margin-right: 2em; + } + + .double-right-padding { + padding-right: 2em; + } + + .tiny-double-right-padding { + padding-right: 2em; + } + + .half-right-space { + margin-right: 0.5em; + } + + .tiny-half-right-space { + margin-right: 0.5em; + } + + .half-right-padding { + padding-right: 0.5em; + } + + .tiny-half-right-padding { + padding-right: 0.5em; + } + + .quarter-right-space { + margin-right: 0.25em; + } + + .tiny-quarter-right-space { + margin-right: 0.25em; + } + + .quarter-right-padding { + padding-right: 0.25em; + } + + .tiny-quarter-right-padding { + padding-right: 0.25em; + } + + .bottom-space { + margin-bottom: 1em; + } + + .tiny-bottom-space { + margin-bottom: 1em; + } + + .bottom-padding { + padding-bottom: 1em; + } + + .tiny-bottom-padding { + padding-bottom: 1em; + } + + .double-bottom-space { + margin-bottom: 2em; + } + + .tiny-double-bottom-space { + margin-bottom: 2em; + } + + .double-bottom-padding { + padding-bottom: 2em; + } + + .tiny-double-bottom-padding { + padding-bottom: 2em; + } + + .half-bottom-space { + margin-bottom: 0.5em; + } + + .tiny-half-bottom-space { + margin-bottom: 0.5em; + } + + .half-bottom-padding { + padding-bottom: 0.5em; + } + + .tiny-half-bottom-padding { + padding-bottom: 0.5em; + } + + .quarter-bottom-space { + margin-bottom: 0.25em; + } + + .tiny-quarter-bottom-space { + margin-bottom: 0.25em; + } + + .quarter-bottom-padding { + padding-bottom: 0.25em; + } + + .tiny-quarter-bottom-padding { + padding-bottom: 0.25em; + } + + .left-space { + margin-left: 1em; + } + + .tiny-left-space { + margin-left: 1em; + } + + .left-padding { + padding-left: 1em; + } + + .tiny-left-padding { + padding-left: 1em; + } + + .double-left-space { + margin-left: 2em; + } + + .tiny-double-left-space { + margin-left: 2em; + } + + .double-left-padding { + padding-left: 2em; + } + + .tiny-double-left-padding { + padding-left: 2em; + } + + .half-left-space { + margin-left: 0.5em; + } + + .tiny-half-left-space { + margin-left: 0.5em; + } + + .half-left-padding { + padding-left: 0.5em; + } + + .tiny-half-left-padding { + padding-left: 0.5em; + } + + .quarter-left-space { + margin-left: 0.25em; + } + + .tiny-quarter-left-space { + margin-left: 0.25em; + } + + .quarter-left-padding { + padding-left: 0.25em; + } + + .tiny-quarter-left-padding { + padding-left: 0.25em; + } + + .hide-tiny { + display: none !important; + } + + .show-tiny { + display: inherit !important; + } + + table.show-tiny { + display: table; + } + + thead.show-tiny { + display: table-header-group; + } + + tbody.show-tiny { + display: table-row-group; + } + + tfoot.show-tiny { + display: table-footer-group; + } + + tr.show-tiny { + display: table-row; + } + + th.show-tiny, + td.show-tiny { + display: table-cell; + } +} +@media screen and (min-width: 1261px) { + html { + font-size: 1.08em; + } + html:after { + font-family: '{"name":"xlarge",{"min":"1261px","max":""}}'; + } +} +@media screen and (min-width: 961px) and (max-width: 1260px) { + html { + font-size: 1.05em; + } + html:after { + font-family: '{"name":"large",{"min":"961px","max":"1260px"}}'; + } +} +@media screen and (min-width: 641px) and (max-width: 960px) { + html { + font-size: 1em; + } + html:after { + font-family: '{"name":"medium",{"min":"641px","max":"960px"}}'; + } +} +@media screen and (min-width: 321px) and (max-width: 640px) { + html { + font-size: 0.98em; + } + html:after { + font-family: '{"name":"small",{"min":"321px","max":"640px"}}'; + } +} +@media screen and (max-width: 320px) { + html { + font-size: 0.97em; + } + html:after { + font-family: '{"name":"tiny",{"min":"","max":"320px"}}'; + } +} +.ink-label { + padding: 0 0.35em; + white-space: nowrap; +} + +.ink-navigation { + overflow: visible; +} +.ink-navigation ul { + list-style-type: none; + padding: 0; + margin: 0; +} +.ink-navigation ul li { + margin: 0; +} + +.ink-navigation .breadcrumbs li { + line-height: 2.7em; + display: inline; +} +.ink-navigation .breadcrumbs li a { + display: inline; + padding: 0; +} +.ink-navigation .breadcrumbs li a:hover { + background: transparent; +} +.ink-navigation .breadcrumbs li.active a { + cursor: default; + text-decoration: none; +} +.ink-navigation .breadcrumbs li:first-child a { + padding-left: 1.2em; +} +.ink-navigation .breadcrumbs li:after { + content: '/'; + display: inline; + margin: 0 .7em; +} +.ink-navigation .breadcrumbs li:last-child:after { + content: ''; + display: none; +} + +.ink-dropdown ul.dropdown-menu, +.ink-dropdown ul.dropdown, +.ink-navigation ul.dropdown-menu, +.ink-navigation ul.dropdown { + display: inline-block; + background: white; + z-index: 30; + border: 1px solid #d9d9d9; + height: auto; + width: auto; + min-width: 10em; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: rgba(100, 100, 100, 0.3) 0 0 1px 0; + -moz-box-shadow: rgba(100, 100, 100, 0.3) 0 0 1px 0; + box-shadow: rgba(100, 100, 100, 0.3) 0 0 1px 0; + padding: .3em 0; + margin-left: 0px; + padding: .35em 0; + font-size: .85em; +} +.ink-dropdown ul.dropdown-menu li, +.ink-dropdown ul.dropdown li, +.ink-navigation ul.dropdown-menu li, +.ink-navigation ul.dropdown li { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + -webkit-border-radius: none; + -moz-border-radius: none; + -ms-border-radius: none; + -o-border-radius: none; + border-radius: none; + width: auto; + height: auto; + min-height: auto; + display: list-item; + float: none; + margin: 0; + text-align: left; + text-transform: none; + padding: 0; + position: relative; + list-style-type: none; +} +.ink-dropdown ul.dropdown-menu li.separator-above, +.ink-dropdown ul.dropdown li.separator-above, +.ink-navigation ul.dropdown-menu li.separator-above, +.ink-navigation ul.dropdown li.separator-above { + padding-top: .35em; + margin-top: .35em; + border-top: 1px solid #d9d9d9; +} +.ink-dropdown ul.dropdown-menu li.separator-below, +.ink-dropdown ul.dropdown li.separator-below, +.ink-navigation ul.dropdown-menu li.separator-below, +.ink-navigation ul.dropdown li.separator-below { + padding-bottom: .35em; + margin-bottom: .35em; + border-bottom: 1px solid #d9d9d9; +} +.ink-dropdown ul.dropdown-menu li.heading, +.ink-dropdown ul.dropdown li.heading, +.ink-navigation ul.dropdown-menu li.heading, +.ink-navigation ul.dropdown li.heading { + font-weight: 700; + padding-bottom: .35em; + margin-bottom: .35em; + padding: .5em .8em; + color: #333333; +} +.ink-dropdown ul.dropdown-menu li a, +.ink-dropdown ul.dropdown li a, +.ink-navigation ul.dropdown-menu li a, +.ink-navigation ul.dropdown li a { + color: #444; + padding: .5em .8em; + display: block; + clear: both; +} +.ink-dropdown ul.dropdown-menu li a:hover, +.ink-dropdown ul.dropdown li a:hover, +.ink-navigation ul.dropdown-menu li a:hover, +.ink-navigation ul.dropdown li a:hover { + background: #f2f2f2; + text-decoration: none; +} +.ink-dropdown ul.dropdown-menu li.active a, +.ink-dropdown ul.dropdown li.active a, +.ink-navigation ul.dropdown-menu li.active a, +.ink-navigation ul.dropdown li.active a { + background: #999999; + color: white; +} +.ink-dropdown ul.dropdown-menu li.disabled a, +.ink-dropdown ul.dropdown li.disabled a, +.ink-navigation ul.dropdown-menu li.disabled a, +.ink-navigation ul.dropdown li.disabled a { + color: #b3b3b3; +} +.ink-dropdown ul.dropdown-menu li.disabled a:hover, +.ink-dropdown ul.dropdown li.disabled a:hover, +.ink-navigation ul.dropdown-menu li.disabled a:hover, +.ink-navigation ul.dropdown li.disabled a:hover { + background: transparent; + cursor: default; +} +.ink-dropdown ul.dropdown-menu li.submenu, +.ink-dropdown ul.dropdown li.submenu, +.ink-navigation ul.dropdown-menu li.submenu, +.ink-navigation ul.dropdown li.submenu { + overflow: visible; +} +.ink-dropdown ul.dropdown-menu li.submenu > a, +.ink-dropdown ul.dropdown li.submenu > a, +.ink-navigation ul.dropdown-menu li.submenu > a, +.ink-navigation ul.dropdown li.submenu > a { + white-space: nowrap; +} +.ink-dropdown ul.dropdown-menu li.submenu > a:after, +.ink-dropdown ul.dropdown li.submenu > a:after, +.ink-navigation ul.dropdown-menu li.submenu > a:after, +.ink-navigation ul.dropdown li.submenu > a:after { + content: "\f0da"; + width: auto; + margin-left: .8em; + font-family: FontAwesome; + color: #b3b3b3; +} +.ink-dropdown ul.dropdown-menu li.submenu:hover > a, +.ink-dropdown ul.dropdown li.submenu:hover > a, +.ink-navigation ul.dropdown-menu li.submenu:hover > a, +.ink-navigation ul.dropdown li.submenu:hover > a { + background: #f2f2f2; + text-decoration: none; +} +.ink-dropdown ul.dropdown-menu li.submenu:hover:hover > ul.dropdown-menu, .ink-dropdown ul.dropdown-menu li.submenu:hover:hover > ul.dropdown, +.ink-dropdown ul.dropdown li.submenu:hover:hover > ul.dropdown-menu, +.ink-dropdown ul.dropdown li.submenu:hover:hover > ul.dropdown, +.ink-navigation ul.dropdown-menu li.submenu:hover:hover > ul.dropdown-menu, +.ink-navigation ul.dropdown-menu li.submenu:hover:hover > ul.dropdown, +.ink-navigation ul.dropdown li.submenu:hover:hover > ul.dropdown-menu, +.ink-navigation ul.dropdown li.submenu:hover:hover > ul.dropdown { + display: block; +} +.ink-dropdown ul.dropdown-menu li.submenu > ul.dropdown-menu, .ink-dropdown ul.dropdown-menu li.submenu > ul.dropdown, +.ink-dropdown ul.dropdown li.submenu > ul.dropdown-menu, +.ink-dropdown ul.dropdown li.submenu > ul.dropdown, +.ink-navigation ul.dropdown-menu li.submenu > ul.dropdown-menu, +.ink-navigation ul.dropdown-menu li.submenu > ul.dropdown, +.ink-navigation ul.dropdown li.submenu > ul.dropdown-menu, +.ink-navigation ul.dropdown li.submenu > ul.dropdown { + font-size: inherit; + position: absolute; + top: -.36em; + left: 100%; + display: none; +} + +.ink-navigation ul.pagination { + overflow: hidden; + *zoom: 1; +} +.ink-navigation ul.pagination li { + line-height: 1.7; + float: left; +} +.ink-navigation ul.pagination li a { + padding: 0.5em 1em; + display: block; + float: left; +} +.ink-navigation ul.pagination.dotted li a { + display: block; + height: 1em; + width: 1em; + margin-right: .6em; + padding: 0; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + -ms-border-radius: 50%; + -o-border-radius: 50%; + border-radius: 50%; + text-indent: 99999px; +} +.ink-navigation ul.pagination.dotted li a:first-child, .ink-navigation ul.pagination.dotted li a:last-child { + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + -ms-border-radius: 50%; + -o-border-radius: 50%; + border-radius: 50%; +} +.ink-navigation ul.pagination.chevron li { + display: none; +} +.ink-navigation ul.pagination.chevron li.next, .ink-navigation ul.pagination.chevron li.previous { + display: block; +} +.ink-navigation ul.pagination.chevron li.next a, .ink-navigation ul.pagination.chevron li.previous a { + display: block; + position: absolute; + top: 35%; + padding: 0 .5em; + margin: 0; + font-family: FontAwesome; + font-size: 4em; +} +.ink-navigation ul.pagination.chevron li.next a span, .ink-navigation ul.pagination.chevron li.previous a span { + text-indent: -99999px; + display: inline-block; +} +.ink-navigation ul.pagination.chevron li.disabled a { + color: rgba(255, 255, 255, 0.6); + text-shadow: none; +} +.ink-navigation ul.pagination.chevron li.disabled a:hover, .ink-navigation ul.pagination.chevron li.disabled a:focus { + color: rgba(255, 255, 255, 0.6); +} +.ink-navigation ul.pagination.chevron li.previous a { + left: 0; +} +.ink-navigation ul.pagination.chevron li.previous a:after { + content: "\f137"; +} +.ink-navigation ul.pagination.chevron li.next a { + right: 0; +} +.ink-navigation ul.pagination.chevron li.next a:after { + content: "\f138"; +} + +.ink-navigation .pills { + overflow: hidden; + *zoom: 1; +} +.ink-navigation .pills li { + overflow: hidden; + display: block; + float: left; + margin: 0 .5em .5em 0; + line-height: 1.7; +} +.ink-navigation .pills li a { + display: block; + padding: 0.5em 1em; +} +.ink-navigation .pills li a:hover { + text-decoration: none; +} +.ink-navigation .pills li.active a, .ink-navigation .pills li.disabled a { + cursor: default; +} + +.ink-navigation ul { + *height: 100%; +} +.ink-navigation ul.menu { + *zoom: 1; +} +.ink-navigation ul.menu:after { + content: ""; + display: table; + clear: both; +} +.ink-navigation ul.menu li { + *height: 100%; +} +.ink-navigation ul.menu li:hover ul.submenu { + display: block; +} +.ink-navigation ul.menu li ul.submenu { + display: none; + position: absolute; + z-index: 10; +} +.ink-navigation ul.menu li ul.submenu li { + overflow: hidden; +} +.ink-navigation ul.menu li ul.submenu li a { + padding: 0.5em 1em; + display: block; + float: none; +} +.ink-navigation ul.menu.horizontal li { + float: left; + position: relative; +} +.ink-navigation ul.menu.horizontal li a { + padding: 0.5em 1em; + display: block; + line-height: 1.7; +} +.ink-navigation ul.menu.horizontal li .control { + margin-top: .3em; +} +.ink-navigation ul.menu.horizontal li ul.submenu { + min-width: 100%; + left: 0; + z-index: 50; +} +.ink-navigation ul.menu.horizontal li ul.submenu li { + float: none; +} +.ink-navigation ul.menu.vertical li { + line-height: 1.7; + position: relative; +} +.ink-navigation ul.menu.vertical li a { + padding: 0.5em 1em; + display: block; +} +.ink-navigation ul.menu.vertical li ul.submenu { + position: relative; + top: auto; + left: auto; +} +.ink-navigation ul.menu.vertical li ul.submenu.flyout { + position: absolute; + min-width: 8em; + top: 0; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.menu.vertical li ul.submenu.flyout.left { + right: 100%; +} +.ink-navigation ul.menu.vertical li ul.submenu.flyout.right { + left: 100%; +} + +table.ink-table { + width: 100%; + border-collapse: collapse; + border-spacing: 0; +} +table.ink-table tr th { + padding: 5px 10px; + line-height: 1.3; +} +table.ink-table tr th[data-sortable="true"]:hover { + cursor: pointer; + text-decoration: underline; +} +table.ink-table tr th[data-sortable="true"]:hover i { + text-decoration: none; +} +table.ink-table tr th[data-sortable="true"] i { + padding-left: .5em; +} +table.ink-table tr td { + padding: 5px 10px; + line-height: 1.3; +} +table.ink-table.hover tbody tr:hover { + cursor: pointer; +} +table.ink-table.bordered { + border-collapse: separate; +} + +html { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} + +body { + color: #555555; + font-family: "Roboto", Arial, Helvetica, sans-serif; + line-height: 1.45; +} + +.fw-100, .fw-light { + font-weight: 100; +} + +.fw-300, .fw-thin { + font-weight: 300; +} + +.fw-400, .fw-regular { + font-weight: 400; +} + +.fw-500, .fw-medium { + font-weight: 500; +} + +.fw-700, .fw-bold { + font-weight: 700; +} + +.fw-900, .fw-black { + font-weight: 900; +} + +.condensed-300, .condensed-thin { + font-weight: 200; + font-family: Roboto_condensed, Arial, Helvetica, sans-serif; +} + +.condensed-400, .condensed-regular { + font-weight: 400; + font-family: Roboto_condensed, Arial, Helvetica, sans-serif; +} + +.condensed-700, .condensed-bold { + font-weight: 700; + font-family: Roboto_condensed, Arial, Helvetica, sans-serif; +} + +.slab-100, .slab-light { + font-weight: 100; + font-family: Roboto_slab, Arial, Helvetica, sans-serif; +} + +.slab-300, .slab-thin { + font-weight: 300; + font-family: Roboto_slab, Arial, Helvetica, sans-serif; +} + +.slab-400, .slab-regular { + font-weight: 400; + font-family: Roboto_slab, Arial, Helvetica, sans-serif; +} + +.slab-700, .slab-bold { + font-weight: 700; + font-family: Roboto_slab, Arial, Helvetica, sans-serif; +} + +.sans { + font-family: "Roboto", Arial, Helvetica, sans-serif; +} + +.serif { + font-family: Times, "Times New Roman", serif; +} + +.monospace { + font-family: Monaco, "Andale Mono", "Courier New", monospace; +} + +.condensed { + font-family: Roboto_condensed, Arial, Helvetica, sans-serif; +} + +.slab { + font-family: Roboto_slab, Arial, Helvetica, sans-serif; +} + +.italic { + font-style: italic; +} + +.uppercase { + text-transform: uppercase; +} + +.lowercase { + text-transform: lowercase; +} + +.capitalizer { + text-transform: capitalize; +} + +.fa { + font-size: 14px; +} + +a { + color: #6998c9; + text-decoration: none; + cursor: pointer; +} +a:hover { + color: #007ed5; + text-decoration: underline; +} + +h1 { + font-size: 2.2em; + margin-top: 0; + margin-bottom: 0.57539em; +} + +h2 { + font-size: 1.75em; + margin-top: 0; + margin-bottom: 0.72334em; +} + +h3 { + font-size: 1.5em; + margin-top: 0; + margin-bottom: 0.8439em; +} + +h4 { + font-size: 1.25em; + margin-top: 0; + margin-bottom: 1.01268em; +} + +h5 { + font-size: 1.1em; + margin-top: 0; + margin-bottom: 1.15077em; +} + +h6 { + font-size: 1.1em; + margin-top: 0; + margin-bottom: 1.15077em; +} + +p { + font-size: 1em; + margin-top: 0; + margin-bottom: 1.26585em; +} + +table { + font-size: 1em; + margin-top: 0; + margin-bottom: 1.26585em; +} + +h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, h6:first-child, p:first-child { + margin-top: 0; +} + +/* Headings */ +h1, h2, h3, h4, h5, h6 { + color: #404040; + font-weight: 700; + line-height: 1.16; +} + +small { + color: #888888; +} + +input, textarea { + color: #666; +} + +h1 small, h2 small, h3 small, h4 small { + color: #bbb; + font-size: .6em; + font-weight: 100; + line-height: 1; +} + +mark { + background: #dae5f2; +} + +address { + color: #777777; + font-size: 1em; + line-height: 1.4; +} +address p { + margin-top: 0; +} +address h6 { + color: #555555; +} + +abbr:hover { + cursor: help; +} + +blockquote { + border-left: 4px solid #ddd; + padding-left: 25px; + margin: 1em 0; + font-weight: 200; + font-size: 1.1em; +} +blockquote small { + font-size: .9em; +} +blockquote small::before, blockquote small::after { + content: ' — '; +} + +.note { + font-size: .9em; + color: #777777; +} +.note strong { + color: #555555; +} + +.small { + font-size: .75em; +} + +.medium { + font-size: .85em; +} + +.large { + font-size: 1.2em; +} + +.extralarge { + font-size: 1.45em !important; +} + +hr { + border: 0; + border-top: 1px solid #ddd; + margin: 1em 0; +} + +.lead { + font-size: 1.1em; + font-weight: bold; +} + +ul, ol { + line-height: 1.4; + padding: 0 0 0 1.45; + margin: 1em 0; +} +ul li, ol li { + margin: .5em 0; +} + +ul.unstyled { + list-style: none; + padding-left: 0em; +} +ul.unstyled ul { + list-style: disc outside; +} +ul.inline { + list-style: none; +} +ul.inline li { + display: inline-block; + padding: 0 .5em; +} +ul.inline li:first-child { + padding: 0 .5em 0 0; +} + +dl { + margin: 1em 0; +} +dl dt { + font-weight: bold; + margin: .5em 0; +} +dl dd { + margin: 0.5em 0 0.5em 25px; +} +dl.inline dt { + float: left; + clear: left; + text-align: right; + width: 180px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + margin: 0; +} +dl.inline dd { + margin: .5em 0 .5em 200px; +} + +figure.ink-image { + position: relative; + border: 1px solid #555555; +} +figure.ink-image > img { + width: 100%; +} +figure.ink-image > figcaption { + padding: 1em; + background: white; + line-height: 1.3; +} +figure.ink-image > figcaption.over-top, figure.ink-image > figcaption.over-bottom { + position: absolute; + width: 100%; + left: 0; + border: none; +} +figure.ink-image > figcaption.over-top.dark, figure.ink-image > figcaption.over-bottom.dark { + color: white; + background: rgba(0, 0, 0, 0.6); +} +figure.ink-image > figcaption.over-top { + top: 0; + background: rgba(255, 255, 255, 0.7); +} +figure.ink-image > figcaption.over-bottom { + bottom: 0; + background: rgba(255, 255, 255, 0.7); +} +figure.ink-image > figcaption.dark { + color: white; + background: #222222; +} + +img { + border: 0; + width: auto; + max-width: 100%; + vertical-align: top; +} + +.ink-alert.basic, .ink-alert.block { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-alert.basic { + background: rgba(255, 156, 0, 0.25); + color: #b87814; + border: 1px solid #b87814; +} +.ink-alert.basic .ink-dismiss { + color: #b87814; +} +.ink-alert.basic.success { + background: rgba(74, 155, 23, 0.25); + color: #38621d; + border: 1px solid #38621d; +} +.ink-alert.basic.success .ink-dismiss { + color: #38621d; +} +.ink-alert.basic.error { + background: rgba(201, 17, 17, 0.25); + color: #891e1e; + border: 1px solid #891e1e; +} +.ink-alert.basic.error .ink-dismiss { + color: #891e1e; +} +.ink-alert.basic.info { + background: rgba(15, 117, 218, 0.25); + color: #1e5b98; + border: 1px solid #1e5b98; +} +.ink-alert.basic.info .ink-dismiss { + color: #1e5b98; +} +.ink-alert.block { + border: 1px solid #b87814; + background: white; +} +.ink-alert.block > h4 { + background: rgba(255, 156, 0, 0.3); + color: #b87814; +} +.ink-alert.block .ink-dismiss { + color: #b87814; +} +.ink-alert.block.success { + border: 1px solid #38621d; + background: white; +} +.ink-alert.block.success > h4 { + background: rgba(74, 155, 23, 0.3); + color: #38621d; +} +.ink-alert.block.success .ink-dismiss { + color: #38621d; +} +.ink-alert.block.error { + border: 1px solid #891e1e; + background: white; +} +.ink-alert.block.error > h4 { + background: rgba(201, 17, 17, 0.3); + color: #891e1e; +} +.ink-alert.block.error .ink-dismiss { + color: #891e1e; +} +.ink-alert.block.info { + border: 1px solid #1e5b98; + background: white; +} +.ink-alert.block.info > h4 { + background: rgba(15, 117, 218, 0.3); + color: #1e5b98; +} +.ink-alert.block.info .ink-dismiss { + color: #1e5b98; +} +.ink-alert .ink-dismiss { + font-family: Arial, sans-serif; + font-weight: bold; + text-shadow: white 0 1px 0; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=25); + opacity: 0.25; +} +.ink-alert .ink-dismiss:hover { + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); + opacity: 0.6; +} + +.ink-badge { + -webkit-border-radius: 8em; + -moz-border-radius: 8em; + -ms-border-radius: 8em; + -o-border-radius: 8em; + border-radius: 8em; + color: white; +} +.ink-badge.white { + background: white; + color: #555555; +} +.ink-badge.black { + background: black; +} +.ink-badge.orange { + background: #ff9c00; +} +.ink-badge.red { + background: #c91111; +} +.ink-badge.green { + background: #4a9b17; +} +.ink-badge.blue { + background: #0f75da; +} +.ink-badge.yellow { + background: #ffd500; + color: #555555; +} +.ink-badge.grey { + background: gray; +} +.ink-badge + .ink-badge { + margin-left: .2em; +} + +/** + * Ink + * + * A set of tools for quick development of web interfaces. + * + * @package Ink + * @author Sapo Ink Team + * @license http://opensource.org/licenses/MIT MIT + * @link http://ink.sapo.pt + * @version 3.0.0 + */ +/** + * Ink + * + * A set of tools for quick development of web interfaces. + * + * @package Ink + * @subpackage Theme + * @category Buttons + * @since 3.0.0 + */ +.ink-button { + background: #d9d9d9; + color: black; + border: 1px solid #bfbfbf; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-button:hover, .ink-button:active { + text-decoration: none; + color: black; + background: #cccccc; + border: 1px solid #b3b3b3; + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; +} +.ink-button:focus { + outline: none; + background: #cccccc; + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px inset; +} +.ink-button[disabled] { + background: #e6e6e6; + border: none; +} +.ink-button[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.blue { + color: white; + background: #0f75da; + border-color: #0c63b9; +} +.ink-button.blue:hover, .ink-button.blue:active { + background: #0d68c2; + border-color: #0a56a1; + color: white; + text-decoration: none; +} +.ink-button.blue:focus { + background: #0d68c2; +} +.ink-button.blue[disabled] { + background: rgba(15, 117, 218, 0.6); + border: none; +} +.ink-button.blue[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.green { + color: white; + background: #4a9b17; + border-color: #3e8313; +} +.ink-button.green:hover, .ink-button.green:active { + background: #3f8514; + border-color: #336d10; + color: white; + text-decoration: none; +} +.ink-button.green:focus { + background: #3f8514; +} +.ink-button.green[disabled] { + background: rgba(74, 155, 23, 0.6); + border: none; +} +.ink-button.green[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.orange { + color: white; + background: #ff9c00; + border-color: #d88400; +} +.ink-button.orange:hover, .ink-button.orange:active { + background: #e68c00; + border-color: #bf7400; + color: white; + text-decoration: none; +} +.ink-button.orange:focus { + background: #e68c00; +} +.ink-button.orange[disabled] { + background: rgba(255, 156, 0, 0.6); + border: none; +} +.ink-button.orange[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.red { + color: white; + background: #c91111; + border-color: #aa0e0e; +} +.ink-button.red:hover, .ink-button.red:active { + background: #b10f0f; + border-color: #920c0c; + color: white; + text-decoration: none; +} +.ink-button.red:focus { + background: #b10f0f; +} +.ink-button.red[disabled] { + background: rgba(201, 17, 17, 0.6); + border: none; +} +.ink-button.red[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.black { + color: white; + background: #1a1a1a; + border-color: #161616; +} +.ink-button.black:hover, .ink-button.black:active { + background: #0d0d0d; + border-color: #090909; + color: white; + text-decoration: none; +} +.ink-button.black:focus { + background: #0d0d0d; +} +.ink-button.black[disabled] { + background: rgba(26, 26, 26, 0.6); + border: none; +} +.ink-button.black[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.ink-button.white { + color: #555555; + background: white; + border-color: #d8d8d8; +} +.ink-button.white:hover, .ink-button.white:active { + background: #f2f2f2; + border-color: #cbcbcb; + color: #555555; + text-decoration: none; +} +.ink-button.white:focus { + background: #f2f2f2; +} +.ink-button.white[disabled] { + background: rgba(255, 255, 255, 0.6); + border: none; +} +.ink-button.white[disabled]:hover { + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.button-group > .ink-button.blue:first-child { + border-left: #0c63b9; +} +.button-group > .ink-button.green:first-child { + border-left: #3e8313; +} +.button-group > .ink-button.orange:first-child { + border-left: #d88400; +} +.button-group > .ink-button.red:first-child { + border-left: #aa0e0e; +} +.button-group > .ink-button.black:first-child { + border-left: #161616; +} +.button-group > .ink-button.white:first-child { + border-left: #d8d8d8; +} + +.ink-label { + color: white; + font-weight: 300; + font-size: 0.938em; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-label.white { + background: white; + color: #555555; +} +.ink-label.black { + background: black; +} +.ink-label.orange { + background: #ff9c00; +} +.ink-label.red { + background: #c91111; +} +.ink-label.green { + background: #4a9b17; +} +.ink-label.blue { + background: #0f75da; +} +.ink-label.yellow { + background: #ffd500; + color: #555555; +} +.ink-label.grey { + background: gray; +} +.ink-label + .ink-label { + margin-left: .2em; +} + +.ink-navigation ul.breadcrumbs { + font-weight: 300; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.breadcrumbs li.active a { + background: none; + color: #999999; +} +.ink-navigation ul.breadcrumbs li.active a:hover { + cursor: default; + text-decoration: none; +} +.ink-navigation ul.breadcrumbs li a:hover { + background: none; + text-decoration: underline; +} +.ink-navigation ul.breadcrumbs.white { + background: white; +} +.ink-navigation ul.breadcrumbs.white li a, .ink-navigation ul.breadcrumbs.white li:after { + color: #555555; +} +.ink-navigation ul.breadcrumbs.white li.active a { + color: #cccccc; + text-shadow: white 0 1px 0; +} +.ink-navigation ul.breadcrumbs.grey { + background: #d9d9d9; +} +.ink-navigation ul.breadcrumbs.grey li a, .ink-navigation ul.breadcrumbs.grey li:after { + color: #555555; +} +.ink-navigation ul.breadcrumbs.grey li.active a { + color: #a6a6a6; + text-shadow: #ededed 0 1px 0; +} +.ink-navigation ul.breadcrumbs.black { + background: #1a1a1a; +} +.ink-navigation ul.breadcrumbs.black li a, .ink-navigation ul.breadcrumbs.black li:after { + color: white; +} +.ink-navigation ul.breadcrumbs.black li.active a { + color: #666666; + text-shadow: black 0 -1px 0; +} +.ink-navigation ul.breadcrumbs.blue { + background: #1b75ce; +} +.ink-navigation ul.breadcrumbs.blue li a, .ink-navigation ul.breadcrumbs.blue li:after { + color: white; +} +.ink-navigation ul.breadcrumbs.blue li.active a { + color: #08427b; + text-shadow: #1884ef 0 1px 0; +} +.ink-navigation ul.breadcrumbs.orange { + background: #f2990d; +} +.ink-navigation ul.breadcrumbs.orange li a, .ink-navigation ul.breadcrumbs.orange li:after { + color: white; +} +.ink-navigation ul.breadcrumbs.orange li.active a { + color: #995e00; + text-shadow: #ffa81f 0 1px 0; +} +.ink-navigation ul.breadcrumbs.green { + background: #4c9220; +} +.ink-navigation ul.breadcrumbs.green li a, .ink-navigation ul.breadcrumbs.green li:after { + color: white; +} +.ink-navigation ul.breadcrumbs.green li.active a { + color: #20420a; + text-shadow: #57b61b 0 1px 0; +} +.ink-navigation ul.breadcrumbs.red { + background: #be1c1c; +} +.ink-navigation ul.breadcrumbs.red li a, .ink-navigation ul.breadcrumbs.red li:after { + color: white; +} +.ink-navigation ul.breadcrumbs.red li.active a { + color: #6b0909; + text-shadow: #e51313 0 1px 0; +} + +.ink-dropdown.blue ul.dropdown-menu li.active a { + background: #0f75da; + color: white; +} +.ink-dropdown.green ul.dropdown-menu li.active a { + background: #4a9b17; + color: white; +} +.ink-dropdown.orange ul.dropdown-menu li.active a { + background: #ff9c00; + color: white; +} +.ink-dropdown.red ul.dropdown-menu li.active a { + background: #c91111; + color: white; +} +.ink-dropdown.black ul.dropdown-menu li.active a { + background: #1a1a1a; + color: white; +} +.ink-dropdown.blue ul.dropdown-menu li.active a { + background: #0f75da; + color: white; +} + +.ink-navigation ul.menu { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.menu > li { + font-weight: 300; +} +.ink-navigation ul.menu > li.active a { + text-decoration: underline; +} +.ink-navigation ul.menu > li.heading { + font-weight: 500; +} +.ink-navigation ul.menu > li.disabled a { + color: #b3b3b3; + text-shadow: white 0 1px 0; +} +.ink-navigation ul.menu > li.disabled a:hover { + cursor: default; + background: none; + text-decoration: none; +} +.ink-navigation ul.menu > li ul.submenu li { + font-size: .875em; +} +.ink-navigation ul.menu > li ul.submenu li a { + border-bottom: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.vertical li a { + border-bottom: 1px solid rgba(0, 0, 0, 0.15); +} +.ink-navigation ul.menu.vertical li:first-child { + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + -ms-border-radius: 2px 2px 0 0; + -o-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +.ink-navigation ul.menu.vertical li:first-child > a { + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + -ms-border-radius: 2px 2px 0 0; + -o-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +.ink-navigation ul.menu.vertical li:last-child { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.vertical li:last-child > a { + border-bottom: none; + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.vertical li:last-child .submenu { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.vertical li:last-child .submenu.flyout { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.menu.vertical li:last-child .submenu li:last-child { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.vertical li:last-child .submenu li:last-child a { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.horizontal > li:first-child { + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; +} +.ink-navigation ul.menu.horizontal > li:first-child a { + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; +} +.ink-navigation ul.menu.horizontal > li:last-child { + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; +} +.ink-navigation ul.menu.horizontal > li:last-child a { + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; +} +.ink-navigation ul.menu.horizontal > li ul.submenu { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; + background: white; +} +.ink-navigation ul.menu.horizontal > li ul.submenu li:last-child { + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + -ms-border-radius: 0 0 2px 2px; + -o-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.ink-navigation ul.menu.horizontal > li ul.submenu li:last-child a { + border-bottom: none; +} +.ink-navigation ul.menu.white { + background: white; +} +.ink-navigation ul.menu.white li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.white li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.white li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.white li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.white li.active { + background: #e6e6e6; +} +.ink-navigation ul.menu.white li.disabled a { + color: #cccccc; + text-shadow: white 0 1px 0; +} +.ink-navigation ul.menu.white li a { + color: #555555; + text-decoration: none; +} +.ink-navigation ul.menu.white li a:hover { + background: #f2f2f2; +} +.ink-navigation ul.menu.grey { + background: #d9d9d9; +} +.ink-navigation ul.menu.grey li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.grey li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.grey li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.grey li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.grey li.active { + background: #bfbfbf; +} +.ink-navigation ul.menu.grey li.disabled a { + color: #a6a6a6; + text-shadow: #ededed 0 1px 0; +} +.ink-navigation ul.menu.grey li a { + color: #555555; + text-decoration: none; +} +.ink-navigation ul.menu.grey li a:hover { + background: #cccccc; +} +.ink-navigation ul.menu.black { + background: #1a1a1a; +} +.ink-navigation ul.menu.black li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.black li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.black li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.black li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.black li.active { + background: #333333; +} +.ink-navigation ul.menu.black li.disabled a { + color: #666666; + text-shadow: black 0 -1px 0; +} +.ink-navigation ul.menu.black li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.menu.black li a:hover { + background: #404040; +} +.ink-navigation ul.menu.blue { + background: #1b75ce; +} +.ink-navigation ul.menu.blue li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.blue li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.blue li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.blue li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.blue li.active { + background: #0c5baa; +} +.ink-navigation ul.menu.blue li.disabled a { + color: #08427b; + text-shadow: #2289f0 0 1px 0; +} +.ink-navigation ul.menu.blue li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.menu.blue li a:hover { + background: #0d68c2; +} +.ink-navigation ul.menu.green { + background: #4c9220; +} +.ink-navigation ul.menu.green li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.green li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.green li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.green li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.green li.active { + background: #356f10; +} +.ink-navigation ul.menu.green li.disabled a { + color: #20420a; + text-shadow: #5bbf1c 0 1px 0; +} +.ink-navigation ul.menu.green li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.menu.green li a:hover { + background: #3f8514; +} +.ink-navigation ul.menu.orange { + background: #f2990d; +} +.ink-navigation ul.menu.orange li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.orange li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.orange li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.orange li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.orange li.active { + background: #cc7d00; +} +.ink-navigation ul.menu.orange li.disabled a { + color: #995e00; + text-shadow: #ffac29 0 1px 0; +} +.ink-navigation ul.menu.orange li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.menu.orange li a:hover { + background: #e68c00; +} +.ink-navigation ul.menu.red { + background: #be1c1c; +} +.ink-navigation ul.menu.red li ul.submenu { + background: white; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.ink-navigation ul.menu.red li ul.submenu li a { + color: #555555; +} +.ink-navigation ul.menu.red li ul.submenu li a:hover { + background: rgba(0, 0, 0, 0.05); +} +.ink-navigation ul.menu.red li.disabled a:hover { + background: none; +} +.ink-navigation ul.menu.red li.active { + background: #9a0d0d; +} +.ink-navigation ul.menu.red li.disabled a { + color: #6b0909; + text-shadow: #eb1717 0 1px 0; +} +.ink-navigation ul.menu.red li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.menu.red li a:hover { + background: #b10f0f; +} + +.ink-navigation ul.pagination { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.pagination li { + font-weight: 300; +} +.ink-navigation ul.pagination li.active a { + text-decoration: underline; +} +.ink-navigation ul.pagination li.disabled a { + color: #b3b3b3; + text-shadow: white 0 1px 0; +} +.ink-navigation ul.pagination li.disabled a:hover { + cursor: default; + background: none; + text-decoration: none; +} +.ink-navigation ul.pagination li:first-child, .ink-navigation ul.pagination li:first-child a { + -webkit-border-radius: 2px 0 0 2px; + -moz-border-radius: 2px 0 0 2px; + -ms-border-radius: 2px 0 0 2px; + -o-border-radius: 2px 0 0 2px; + border-radius: 2px 0 0 2px; +} +.ink-navigation ul.pagination li:last-child, .ink-navigation ul.pagination li:last-child a { + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + -ms-border-radius: 0 2px 2px 0; + -o-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; +} +.ink-navigation ul.pagination.white li { + background: white; +} +.ink-navigation ul.pagination.white li.active a { + background: #e6e6e6; +} +.ink-navigation ul.pagination.white li.disabled a { + color: #cccccc; + background: fade(black, 0%); + text-shadow: white 0 1px 0; +} +.ink-navigation ul.pagination.white li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.white li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.white li a:hover { + background: #e6e6e6; +} +.ink-navigation ul.pagination.white li { + background: white; +} +.ink-navigation ul.pagination.white li.active a { + background: #e6e6e6; +} +.ink-navigation ul.pagination.white li.disabled a { + color: #cccccc; + background: fade(black, 0%); + text-shadow: white 0 1px 0; +} +.ink-navigation ul.pagination.white li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.white li a { + color: #555555; + text-decoration: none; +} +.ink-navigation ul.pagination.white li a:hover { + background: #f2f2f2; +} +.ink-navigation ul.pagination.grey li { + background: #d9d9d9; +} +.ink-navigation ul.pagination.grey li.active a { + background: #bfbfbf; +} +.ink-navigation ul.pagination.grey li.disabled a { + color: #a6a6a6; + background: fade(black, 0%); + text-shadow: #ededed 0 1px 0; +} +.ink-navigation ul.pagination.grey li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.grey li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.grey li a:hover { + background: #bfbfbf; +} +.ink-navigation ul.pagination.grey li { + background: #d9d9d9; +} +.ink-navigation ul.pagination.grey li.active a { + background: #bfbfbf; +} +.ink-navigation ul.pagination.grey li.disabled a { + color: #a6a6a6; + background: fade(black, 0%); + text-shadow: #ededed 0 1px 0; +} +.ink-navigation ul.pagination.grey li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.grey li a { + color: #555555; + text-decoration: none; +} +.ink-navigation ul.pagination.grey li a:hover { + background: #cccccc; +} +.ink-navigation ul.pagination.black li { + background: #1a1a1a; +} +.ink-navigation ul.pagination.black li.active a { + background: black; +} +.ink-navigation ul.pagination.black li.disabled a { + color: black; + background: fade(black, 0%); + text-shadow: #2e2e2e 0 1px 0; +} +.ink-navigation ul.pagination.black li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.black li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.black li a:hover { + background: black; +} +.ink-navigation ul.pagination.black li { + background: #1a1a1a; +} +.ink-navigation ul.pagination.black li.active a { + background: #333333; +} +.ink-navigation ul.pagination.black li.disabled a { + color: #666666; + background: fade(black, 0%); + text-shadow: black 0 -1px 0; +} +.ink-navigation ul.pagination.black li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.black li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.black li a:hover { + background: #292929; +} +.ink-navigation ul.pagination.orange li { + background: #f2990d; +} +.ink-navigation ul.pagination.orange li.active a { + background: #cc7d00; +} +.ink-navigation ul.pagination.orange li.disabled a { + color: #995e00; + background: fade(black, 0%); + text-shadow: #ffac29 0 1px 0; +} +.ink-navigation ul.pagination.orange li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.orange li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.orange li a:hover { + background: #cc7d00; +} +.ink-navigation ul.pagination.orange li { + background: #f2990d; +} +.ink-navigation ul.pagination.orange li.active a { + background: #cc7d00; +} +.ink-navigation ul.pagination.orange li.disabled a { + color: #995e00; + background: fade(black, 0%); + text-shadow: #ffac29 0 1px 0; +} +.ink-navigation ul.pagination.orange li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.orange li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.orange li a:hover { + background: #e68c00; +} +.ink-navigation ul.pagination.blue li { + background: #1b75ce; +} +.ink-navigation ul.pagination.blue li.active a { + background: #0c5baa; +} +.ink-navigation ul.pagination.blue li.disabled a { + color: #08427b; + background: fade(black, 0%); + text-shadow: #2289f0 0 1px 0; +} +.ink-navigation ul.pagination.blue li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.blue li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.blue li a:hover { + background: #0c5baa; +} +.ink-navigation ul.pagination.blue li { + background: #1b75ce; +} +.ink-navigation ul.pagination.blue li.active a { + background: #0c5baa; +} +.ink-navigation ul.pagination.blue li.disabled a { + color: #08427b; + background: fade(black, 0%); + text-shadow: #2289f0 0 1px 0; +} +.ink-navigation ul.pagination.blue li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.blue li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.blue li a:hover { + background: #0d68c2; +} +.ink-navigation ul.pagination.green li { + background: #4c9220; +} +.ink-navigation ul.pagination.green li.active a { + background: #356f10; +} +.ink-navigation ul.pagination.green li.disabled a { + color: #20420a; + background: fade(black, 0%); + text-shadow: #5bbf1c 0 1px 0; +} +.ink-navigation ul.pagination.green li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.green li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.green li a:hover { + background: #356f10; +} +.ink-navigation ul.pagination.green li { + background: #4c9220; +} +.ink-navigation ul.pagination.green li.active a { + background: #356f10; +} +.ink-navigation ul.pagination.green li.disabled a { + color: #20420a; + background: fade(black, 0%); + text-shadow: #5bbf1c 0 1px 0; +} +.ink-navigation ul.pagination.green li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.green li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.green li a:hover { + background: #3f8514; +} +.ink-navigation ul.pagination.red li { + background: #be1c1c; +} +.ink-navigation ul.pagination.red li.active a { + background: #9a0d0d; +} +.ink-navigation ul.pagination.red li.disabled a { + color: #6b0909; + background: fade(black, 0%); + text-shadow: #eb1717 0 1px 0; +} +.ink-navigation ul.pagination.red li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.red li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.red li a:hover { + background: #9a0d0d; +} +.ink-navigation ul.pagination.red li { + background: #be1c1c; +} +.ink-navigation ul.pagination.red li.active a { + background: #9a0d0d; +} +.ink-navigation ul.pagination.red li.disabled a { + color: #6b0909; + background: fade(black, 0%); + text-shadow: #eb1717 0 1px 0; +} +.ink-navigation ul.pagination.red li.disabled a:hover { + background: none; +} +.ink-navigation ul.pagination.red li a { + color: white; + text-decoration: none; +} +.ink-navigation ul.pagination.red li a:hover { + background: #b10f0f; +} +.ink-navigation ul.pagination.dotted li { + background: none; +} +.ink-navigation ul.pagination.dotted li a { + background: #999999; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); + opacity: 0.5; +} +.ink-navigation ul.pagination.dotted li:hover a, .ink-navigation ul.pagination.dotted li.active a { + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); + opacity: 1; +} +.ink-navigation ul.pagination.dotted.black li a { + background: #1a1a1a; +} +.ink-navigation ul.pagination.dotted.white li a { + background: white; +} +.ink-navigation ul.pagination.dotted.blue li a { + background: #1b75ce; +} +.ink-navigation ul.pagination.dotted.green li a { + background: #4c9220; +} +.ink-navigation ul.pagination.dotted.orange li a { + background: #f2990d; +} +.ink-navigation ul.pagination.dotted.red li a { + background: #be1c1c; +} +.ink-navigation ul.pagination.chevron li.next a, .ink-navigation ul.pagination.chevron li.previous a { + color: white; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); + opacity: 0.6; +} +.ink-navigation ul.pagination.chevron li.next a:hover, .ink-navigation ul.pagination.chevron li.next a:focus, .ink-navigation ul.pagination.chevron li.next a.active, .ink-navigation ul.pagination.chevron li.previous a:hover, .ink-navigation ul.pagination.chevron li.previous a:focus, .ink-navigation ul.pagination.chevron li.previous a.active { + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); + opacity: 0.8; + text-decoration: none; + background: none; +} +.ink-navigation ul.pagination.chevron li.disabled a { + color: white; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); + opacity: 0.6; + text-shadow: none; +} +.ink-navigation ul.pagination.chevron li.disabled a:hover, .ink-navigation ul.pagination.chevron li.disabled a:focus { + color: white; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); + opacity: 0.6; +} +.ink-navigation ul.pagination.chevron.black li.next a, .ink-navigation ul.pagination.chevron.black li.previous a, .ink-navigation ul.pagination.chevron.black li.disabled a { + color: #1a1a1a; +} +.ink-navigation ul.pagination.chevron.grey li.next a, .ink-navigation ul.pagination.chevron.grey li.previous a, .ink-navigation ul.pagination.chevron.grey li.disabled a { + color: #d9d9d9; +} +.ink-navigation ul.pagination.chevron.blue li.next a, .ink-navigation ul.pagination.chevron.blue li.previous a, .ink-navigation ul.pagination.chevron.blue li.disabled a { + color: #1b75ce; +} +.ink-navigation ul.pagination.chevron.green li.next a, .ink-navigation ul.pagination.chevron.green li.previous a, .ink-navigation ul.pagination.chevron.green li.disabled a { + color: #4c9220; +} +.ink-navigation ul.pagination.chevron.orange li.next a, .ink-navigation ul.pagination.chevron.orange li.previous a, .ink-navigation ul.pagination.chevron.orange li.disabled a { + color: #f2990d; +} +.ink-navigation ul.pagination.chevron.red li.next a, .ink-navigation ul.pagination.chevron.red li.previous a, .ink-navigation ul.pagination.chevron.red li.disabled a { + color: #be1c1c; +} + +.ink-navigation ul.pills li { + background: white; + font-weight: 300; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-navigation ul.pills li a { + color: #555555; + background: none; +} +.ink-navigation ul.pills li a:hover { + background: #e6e6e6; +} +.ink-navigation ul.pills li.active a { + background: #e6e6e6; +} +.ink-navigation ul.pills li.disabled a { + color: #999999; + text-shadow: white 0 1px 0; +} +.ink-navigation ul.pills li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.grey li { + background: #d9d9d9; +} +.ink-navigation ul.pills.grey li.active a { + background: #bfbfbf; +} +.ink-navigation ul.pills.grey li.disabled a { + color: #a6a6a6; + text-shadow: #ededed 0 1px 0; +} +.ink-navigation ul.pills.grey li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.grey li a { + color: #555555; +} +.ink-navigation ul.pills.grey li a:hover { + background: #cccccc; +} +.ink-navigation ul.pills.black li { + background: #1a1a1a; +} +.ink-navigation ul.pills.black li.active a { + background: #333333; +} +.ink-navigation ul.pills.black li.disabled a { + color: #666666; + text-shadow: black 0 -1px 0; +} +.ink-navigation ul.pills.black li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.black li a { + color: white; +} +.ink-navigation ul.pills.black li a:hover { + background: #292929; +} +.ink-navigation ul.pills.blue li { + background: #1b75ce; +} +.ink-navigation ul.pills.blue li.active a { + background: #0c5baa; +} +.ink-navigation ul.pills.blue li.disabled a { + color: #08427b; + text-shadow: #2289f0 0 1px 0; +} +.ink-navigation ul.pills.blue li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.blue li a { + color: white; +} +.ink-navigation ul.pills.blue li a:hover { + background: #0d68c2; +} +.ink-navigation ul.pills.green li { + background: #4c9220; +} +.ink-navigation ul.pills.green li.active a { + background: #356f10; +} +.ink-navigation ul.pills.green li.disabled a { + color: #20420a; + text-shadow: #5bbf1c 0 1px 0; +} +.ink-navigation ul.pills.green li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.green li a { + color: white; +} +.ink-navigation ul.pills.green li a:hover { + background: #3f8514; +} +.ink-navigation ul.pills.orange li { + background: #f2990d; +} +.ink-navigation ul.pills.orange li.active a { + background: #cc7d00; +} +.ink-navigation ul.pills.orange li.disabled a { + color: #995e00; + text-shadow: #ffac29 0 1px 0; +} +.ink-navigation ul.pills.orange li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.orange li a { + color: white; +} +.ink-navigation ul.pills.orange li a:hover { + background: #e68c00; +} +.ink-navigation ul.pills.red li { + background: #be1c1c; +} +.ink-navigation ul.pills.red li.active a { + background: #9a0d0d; +} +.ink-navigation ul.pills.red li.disabled a { + color: #6b0909; + text-shadow: #eb1717 0 1px 0; +} +.ink-navigation ul.pills.red li.disabled a:hover { + background: none; +} +.ink-navigation ul.pills.red li a { + color: white; +} +.ink-navigation ul.pills.red li a:hover { + background: #b10f0f; +} + +table.ink-table { + background: white; +} +table.ink-table tr th, table.ink-table tr td { + border-bottom: #bbbbbb 1px solid; + background: none; +} +table.ink-table tfoot tr th, table.ink-table tfoot tr td { + border-top: #bbbbbb 1px solid; +} +table.ink-table.alternating tbody tr:nth-child(odd) { + background-color: whitesmoke; +} +table.ink-table.hover tbody tr:hover { + background: #fefbd6; + color: #555555; +} +table.ink-table.bordered { + border: #bbbbbb 1px solid; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +table.ink-table.bordered tr th { + border-left: #bbbbbb 1px solid; +} +table.ink-table.bordered tr th:first-child { + border-left: none; +} +table.ink-table.bordered tr:last-child td { + border-bottom: none; +} +table.ink-table.bordered tr td { + border-left: #bbbbbb 1px solid; +} +table.ink-table.bordered tr td:first-child { + border-left: none; +} +table.ink-table tbody > tr.red td { + background: #c91111; + color: white; +} +table.ink-table tbody > tr.green td { + background: #4a9b17; + color: white; +} +table.ink-table tbody > tr.blue td { + background: #0f75da; + color: white; +} +table.ink-table tbody > tr.orange td { + background: #ff9c00; + color: white; +} +table.ink-table tbody > tr.black td { + background: black; + color: #cccccc; +} +table.ink-table tbody > tr.yellow td { + background: #ffd500; + color: black; +} + +.animated.slow { + animation-duration: 1s; +} +.animated.medium { + animation-duration: 0.5s; +} +.animated.fast { + animation-duration: 0.2s; +} + +.ink-carousel { + width: 100%; + position: relative; + overflow: hidden; + display: block; +} +.ink-carousel .stage { + left: 0; + height: auto !important; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; + list-style-type: none; + white-space: nowrap; + position: relative; + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; +} +.ink-carousel .stage .slide { + position: relative; + display: inline-block; + vertical-align: top; + white-space: normal; + margin: 0; + float: none; + zoom: 1; + *display: inline; +} + +.ink-datepicker-wrapper { + position: relative; +} + +.ink-datepicker-calendar { + margin-top: 0; + position: absolute; +} +.ink-datepicker-calendar.right { + left: 100%; + top: 0; +} +.ink-datepicker-calendar.left { + right: 100%; + top: 0; +} +.ink-datepicker-calendar.bottom { + top: 100%; + left: 0; +} +.ink-datepicker-calendar.top { + bottom: 100%; + left: 0; +} + +.ink-datepicker-wrapper, .ink-datepicker-calendar { + display: inline; + display: inline-block; +} + +.ink-calendar { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + text-align: center; + padding: 0.3em; + min-width: 17.4em; + font-size: 13px; + -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0 1px 2px 0; + -moz-box-shadow: rgba(0, 0, 0, 0.4) 0 1px 2px 0; + box-shadow: rgba(0, 0, 0, 0.4) 0 1px 2px 0; + background: white; + z-index: 10; +} +.ink-calendar a { + text-decoration: none; +} +.ink-calendar li { + list-style: none inside; +} + +html.ink-modal-is-open .ink-calendar { + z-index: 101; +} + +.ink-calendar-top-options { + padding: 5px; + font-size: .813em; + cursor: pointer; +} +.ink-calendar-top-options .clean { + float: left; +} +.ink-calendar-top-options .close { + float: right; +} + +.ink-calendar-top { + line-height: 2em; + background: #e6e6e6; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-calendar-top div { + float: left; +} +.ink-calendar-top .ink-calendar-prev, +.ink-calendar-top .ink-calendar-next { + width: 10%; +} +.ink-calendar-top .ink-calendar-prev a, +.ink-calendar-top .ink-calendar-next a { + display: block; +} +.ink-calendar-top .ink-calendar-month_desc { + width: 80%; +} + +.ink-calendar-month, +.ink-calendar-year-selector, +.ink-calendar-month-selector { + margin-top: .5em; + padding-left: 0; +} +.ink-calendar-month li a, +.ink-calendar-year-selector li a, +.ink-calendar-month-selector li a { + margin: 0px; + line-height: 2em; + vertical-align: middle; + display: block; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + color: #444444; +} +.ink-calendar-month li a:hover, +.ink-calendar-year-selector li a:hover, +.ink-calendar-month-selector li a:hover { + background: #e6e6e6; +} +.ink-calendar-month li a.ink-calendar-on, .ink-calendar-month li a.ink-calendar-on:hover, +.ink-calendar-year-selector li a.ink-calendar-on, +.ink-calendar-year-selector li a.ink-calendar-on:hover, +.ink-calendar-month-selector li a.ink-calendar-on, +.ink-calendar-month-selector li a.ink-calendar-on:hover { + background: #0069d6; + color: white; +} +.ink-calendar-month li a.ink-calendar-off, .ink-calendar-month li a.ink-calendar-off:hover, +.ink-calendar-year-selector li a.ink-calendar-off, +.ink-calendar-year-selector li a.ink-calendar-off:hover, +.ink-calendar-month-selector li a.ink-calendar-off, +.ink-calendar-month-selector li a.ink-calendar-off:hover { + background: white; + color: #aaaaaa; + cursor: default; +} +.ink-calendar-month ul, +.ink-calendar-year-selector ul, +.ink-calendar-month-selector ul { + clear: both; + padding-left: 0; +} +.ink-calendar-month ul li, +.ink-calendar-year-selector ul li, +.ink-calendar-month-selector ul li { + width: 2.4em; + float: left; + text-align: center; + padding: 0; + margin: 0; +} + +.ink-calendar-year-selector ul li { + width: 25%; +} + +.ink-calendar-month-selector ul li { + width: 25%; +} + +.ink-calendar-year-selector, +.ink-calendar-month-selector { + display: none; +} + +.ink-calendar-off, .action_inactive { + color: #ddd !important; +} + +.ink-calendar-month .ink-calendar-header { + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + padding-bottom: .5em; + margin-bottom: .5em; + color: #aaa; +} + +.ink-calendar-top, +.ink-calendar-middle, +.ink-calendar-top-options, +.ink-calendar-month .ink-calendar-header, +.ink-calendar-month .ink-calendar-middle ul { + *zoom: 1; +} +.ink-calendar-top:after, +.ink-calendar-middle:after, +.ink-calendar-top-options:after, +.ink-calendar-month .ink-calendar-header:after, +.ink-calendar-month .ink-calendar-middle ul:after { + content: ""; + display: table; + clear: both; +} + +body.ink-drawer { + max-width: 100%; +} +body.ink-drawer .left-drawer, +body.ink-drawer .right-drawer, +body.ink-drawer .content-drawer { + -webkit-transition-property: translate3d; + -moz-transition-property: translate3d; + -o-transition-property: translate3d; + transition-property: translate3d; + -webkit-transition-duration: 300ms; + -moz-transition-duration: 300ms; + -o-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + -moz-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + -o-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); +} +body.ink-drawer .left-drawer { + left: -220px; +} +body.ink-drawer .right-drawer { + right: -220px; +} +body.ink-drawer .content-drawer { + width: 100%; +} +body.ink-drawer .left-drawer, +body.ink-drawer .right-drawer { + position: absolute; + top: 0; + z-index: 0; + display: none; + overflow-x: hidden; + overflow-y: auto; + width: 220px; + height: 100%; + -webkit-overflow-scrolling: touch; +} +body.ink-drawer .left-drawer.show, +body.ink-drawer .right-drawer.show { + display: block; +} +body.ink-drawer.push { + overflow: hidden; + width: 100%; + height: 100%; + position: fixed; +} +body.ink-drawer.push .content-drawer { + overflow: hidden; +} +body.ink-drawer.push.left .left-drawer, body.ink-drawer.push.left .content-drawer { + -webkit-transform: translate3d(220px, 0, 0); + -moz-transform: translate3d(220px, 0, 0); + -ms-transform: translate3d(220px, 0, 0); + -o-transform: translate3d(220px, 0, 0); + transform: translate3d(220px, 0, 0); +} +body.ink-drawer.push.right .right-drawer, body.ink-drawer.push.right .content-drawer { + -webkit-transform: translate3d(-220px, 0, 0); + -moz-transform: translate3d(-220px, 0, 0); + -ms-transform: translate3d(-220px, 0, 0); + -o-transform: translate3d(-220px, 0, 0); + transform: translate3d(-220px, 0, 0); +} +body.ink-drawer.over { + overflow: hidden; + -webkit-user-drag: none; +} +body.ink-drawer.over.left .left-drawer { + -webkit-transform: translate3d(220px, 0, 0); + -moz-transform: translate3d(220px, 0, 0); + -ms-transform: translate3d(220px, 0, 0); + -o-transform: translate3d(220px, 0, 0); + transform: translate3d(220px, 0, 0); +} +body.ink-drawer.over.right .right-drawer { + -webkit-transform: translate3d(-220px, 0, 0); + -moz-transform: translate3d(-220px, 0, 0); + -ms-transform: translate3d(-220px, 0, 0); + -o-transform: translate3d(-220px, 0, 0); + transform: translate3d(-220px, 0, 0); +} + +.ink-shade { + background: rgba(0, 0, 0, 0.8); + width: 100%; + height: 100%; + top: 0; + right: 0; + bottom: 0; + left: 0; + margin-top: 0; + position: fixed; + z-index: 100; + display: none; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); + opacity: 0; +} +.ink-shade.fade { + -webkit-transition: opacity 300ms; + -moz-transition: opacity 300ms; + -o-transition: opacity 300ms; + transition: opacity 300ms; +} +.ink-shade.visible { + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); + opacity: 1; +} + +.ink-modal { + top: 50%; + left: 50%; + width: 90%; + height: 90%; + background: white; + z-index: 100; + position: absolute; + border: 1px #666666 solid; + overflow: hidden; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); + opacity: 1; + -webkit-box-shadow: rgba(0, 0, 0, 0.8) 0 0 15px 0; + -moz-box-shadow: rgba(0, 0, 0, 0.8) 0 0 15px 0; + box-shadow: rgba(0, 0, 0, 0.8) 0 0 15px 0; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + *zoom: 1; +} +.ink-modal:after { + content: ""; + display: table; + clear: both; +} +.ink-modal > .modal-body { + padding: 1em; + overflow-y: auto; + overflow-x: hidden; + height: auto; +} +.ink-modal > .modal-body .ink-grid { + padding-left: 0; + padding-right: 0; + width: 100%; + min-width: 100%; +} +.ink-modal > .modal-header, .ink-modal > header { + border-bottom: 1px #e6e6e6 solid; + overflow: hidden; + -webkit-box-shadow: rgba(175, 175, 175, 0.2) 0 1px 2px 0; + -moz-box-shadow: rgba(175, 175, 175, 0.2) 0 1px 2px 0; + box-shadow: rgba(175, 175, 175, 0.2) 0 1px 2px 0; +} +.ink-modal > .modal-header > .modal-close, .ink-modal > header > .modal-close { + padding-top: 2px; + text-align: center; + color: white; + width: 26px; + height: 26px; + line-height: 1.2em; + border: 0; + background: #bfbfbf; + font-size: 0; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + -ms-border-radius: 50%; + -o-border-radius: 50%; + border-radius: 50%; + text-shadow: rgba(0, 0, 0, 0.6) 0 -1px 0; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=60); + opacity: 0.6; + float: right; +} +.ink-modal > .modal-header > .modal-close:after, .ink-modal > header > .modal-close:after { + content: "\f00d"; + font-family: FontAwesome; + font-size: medium; + line-height: 22px; +} +.ink-modal > .modal-header > .modal-close:hover, .ink-modal > header > .modal-close:hover { + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); + opacity: 1; +} +.ink-modal > .modal-footer, .ink-modal > footer { + background: #e6e6e6; + margin-bottom: 0; + zoom: 1; + -webkit-box-shadow: rgba(175, 175, 175, 0.2) 0 -1px 2px 0; + -moz-box-shadow: rgba(175, 175, 175, 0.2) 0 -1px 2px 0; + box-shadow: rgba(175, 175, 175, 0.2) 0 -1px 2px 0; +} +.ink-modal > .modal-header, .ink-modal > header, .ink-modal > .modal-footer, .ink-modal > footer { + padding: .8em 1em .65em 1em; +} +.ink-modal > .modal-header:before, .ink-modal > .modal-header:after, .ink-modal > header:before, .ink-modal > header:after, .ink-modal > .modal-footer:before, .ink-modal > .modal-footer:after, .ink-modal > footer:before, .ink-modal > footer:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.ink-modal-open { + overflow: hidden; +} + +/* Progess bars */ +.ink-progress-bar { + margin-bottom: 1em; + overflow: hidden; + background: #f2f2f2; + position: relative; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: 0, 1px, 3px, 0, rgba(0, 0, 0, 0.2), inset; + -moz-box-shadow: 0, 1px, 3px, 0, rgba(0, 0, 0, 0.2), inset; + box-shadow: 0, 1px, 3px, 0, rgba(0, 0, 0, 0.2), inset; +} +.ink-progress-bar .caption { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + line-height: 1.7; + text-align: center; + color: black; + font-size: 0.813em; + z-index: 10; +} +.ink-progress-bar .bar { + height: 1.3em; + text-shadow: rgba(0, 0, 0, 0.25), 0, 1px, 0; + -webkit-box-shadow: 0, 1px, 1px, 0, rgba(0, 0, 0, 0.1), inset; + -moz-box-shadow: 0, 1px, 1px, 0, rgba(0, 0, 0, 0.1), inset; + box-shadow: 0, 1px, 1px, 0, rgba(0, 0, 0, 0.1), inset; + -webkit-transition-property: width; + -moz-transition-property: width; + -o-transition-property: width; + transition-property: width; + -webkit-transition-duration: 0.6s; + -moz-transition-duration: 0.6s; + -o-transition-duration: 0.6s; + transition-duration: 0.6s; + -webkit-transition-timing-function: ease; + -moz-transition-timing-function: ease; + -o-transition-timing-function: ease; + transition-timing-function: ease; +} +.ink-progress-bar .bar.grey { + background: #cccccc; + color: #555555; +} +.ink-progress-bar .bar.green { + background: #4a9b17; + color: white; +} +.ink-progress-bar .bar.blue { + background: #0f75da; + color: white; +} +.ink-progress-bar .bar.red { + background: #c91111; + color: white; +} +.ink-progress-bar .bar.orange { + background: #ff9c00; + color: #555555; +} +.ink-progress-bar .bar.black { + background: black; + color: white; +} + +.dragging, .ink-sortable-list li { + cursor: move; + -moz-user-select: none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + -ms-user-select: none; + user-select: none; + -ms-user-drag: none; + -moz-user-drag: none; + -khtml-user-drag: none; + -webkit-user-drag: none; + -o-user-drag: none; + user-drag: none; +} + +.drag, .ink-sortable-list li.placeholder { + -webkit-box-shadow: 0, 0px, 10px, 0, rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0, 0px, 10px, 0, rgba(0, 0, 0, 0.3); + box-shadow: 0, 0px, 10px, 0, rgba(0, 0, 0, 0.3); +} + +.ink-sortable-list li { + margin: 0; + border-bottom: 1px solid #ccc; + line-height: 40px; +} +.ink-sortable-list li:hover, .ink-sortable-list li.placeholder { + background: #cccccc; + background: rgba(204, 204, 204, 0.2); +} +.ink-sortable-list li .ink-label { + margin: 0 .8em; +} + +.ink-sticky-stuck { + position: fixed; +} + +/* Tabs */ +.ink-tabs .tabs-nav { + list-style: none; + padding: 0em; + *zoom: 1; +} +.ink-tabs .tabs-nav li { + line-height: 1.7; + position: relative; + margin: 0; +} +.ink-tabs .tabs-nav li a { + padding: 0.5em 1em; + display: block; +} +.ink-tabs .tabs-nav li a:hover { + background: #f0f0f0; +} +.ink-tabs .tabs-nav li.active a { + color: #555555; + cursor: default; + text-decoration: none; + background: white; + border: 1px solid #cccccc; +} +.ink-tabs .tabs-nav:after { + content: ""; + display: table; + clear: both; +} +.ink-tabs .tabs-content { + margin-top: 1.5em; + overflow: auto; +} +.ink-tabs.top > .tabs-nav { + border-bottom: 1px solid #cccccc; +} +.ink-tabs.top > .tabs-nav li { + float: left; +} +.ink-tabs.top > .tabs-nav li a { + margin-right: .4em; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + -ms-border-radius: 4px 4px 0 0; + -o-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.ink-tabs.top > .tabs-nav li.active { + margin: 0 0 -2px 0; +} +.ink-tabs.top > .tabs-nav li.active a { + border-bottom-color: transparent; +} +.ink-tabs.bottom > .tabs-nav { + border-top: 1px solid #cccccc; +} +.ink-tabs.bottom > .tabs-nav li { + float: left; +} +.ink-tabs.bottom > .tabs-nav li a { + margin-right: .4em; + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + -ms-border-radius: 0 0 4px 4px; + -o-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.ink-tabs.bottom > .tabs-nav li.active { + margin: -2px 0 0 0; +} +.ink-tabs.bottom > .tabs-nav li.active a { + border-top-color: transparent; +} +.ink-tabs.left > .tabs-nav { + border-right: 1px solid #cccccc; + float: left; + margin-right: 2em; +} +.ink-tabs.left > .tabs-nav li { + float: none; + text-align: right; +} +.ink-tabs.left > .tabs-nav li a { + margin-bottom: .4em; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + -ms-border-radius: 4px 0 0 4px; + -o-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.ink-tabs.left > .tabs-nav li.active { + margin: 0 -2px 0 0; +} +.ink-tabs.left > .tabs-nav li.active a { + border-right-color: transparent; +} +.ink-tabs.right > .tabs-nav { + border-left: 1px solid #cccccc; + float: right; + margin-left: 2em; +} +.ink-tabs.right > .tabs-nav li { + float: none; +} +.ink-tabs.right > .tabs-nav li a { + margin-bottom: .4em; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + -ms-border-radius: 0 4px 4px 0; + -o-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.ink-tabs.right > .tabs-nav li.active { + margin: 0 0 0 -2px; +} +.ink-tabs.right > .tabs-nav li.active a { + border-left-color: transparent; +} + +.ink-tagfield input[type="text"].new-tag-input { + background-color: #fff; + border: 1px solid #ccc; + line-height: 1em; + margin: 0; + padding: 5px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.ink-tagfield input[type="text"].new-tag-input:focus { + -webkit-box-shadow: 0px, 0px, 0px, 3px, #eaeaea; + -moz-box-shadow: 0px, 0px, 0px, 3px, #eaeaea; + box-shadow: 0px, 0px, 0px, 3px, #eaeaea; + border: 1px solid #c3c3c3; +} +.ink-tagfield span.ink-tag { + background-color: #1b1b1b; + color: #eaeaea; + text-shadow: none; + font-size: .9em; + font-weight: normal; + border: 1px solid #000; + padding: 4px 6px; +} +.ink-tagfield span.ink-tag i.icon-remove { + color: #ccc; + font-size: .9em; + font-weight: normal; + margin-left: 4px; +} +.ink-tagfield span.ink-tag i.icon-remove:hover { + cursor: pointer; + color: red; +} + +.ink-tree-view li { + list-style-type: none; +} +.ink-tree-view [data-open] > :before { + margin-left: -1.3em; + margin-right: .4em; + text-decoration: none; +} diff --git a/ajax/libs/ink/3.0.0/css/ink.min.css b/ajax/libs/ink/3.0.0/css/ink.min.css new file mode 100644 index 000000000..1a7006408 --- /dev/null +++ b/ajax/libs/ink/3.0.0/css/ink.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.show-all{display:inherit}.hide-all{display:none!important}.no-margin{margin:0!important}.no-padding{padding:0!important}.push-left{float:left}.push-center{float:none!important;margin-left:auto;margin-right:auto}.push-right{float:right;-webkit-justify-content:flex-end;-moz-justify-content:flex-end;justify-content:flex-end}.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}.clearfix{overflow:hidden;*zoom:1}.clearfix:after{content:"";display:table;clear:both}html{font-family:sans-serif}html *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:0}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.ink-alert.basic,.ink-alert.block{font-size:.938em;margin:1em 0;position:relative;overflow:hidden}.ink-alert.basic{padding:1em 3em 1em 1em}.ink-alert.basic p{margin:0}.ink-alert.basic .ink-close{top:.55em;*top:.2em}.ink-alert.block{font-size:1em}.ink-alert.block>h4{padding:1em 3em 1em 1em;font-size:.938em;line-height:1.5;margin:0}.ink-alert.block p{margin:1.5em 1em}.ink-alert.block ul{list-style:inside}.ink-alert .ink-dismiss{position:absolute;line-height:.56em;font-size:1.8em;padding:5px;border:0;background:0 0;top:.5em;*top:.2em;right:.4em}.ink-badge{padding:.2em .6em;font-size:.813em;margin-left:.6em}.ink-button{-webkit-appearance:menuitem;padding:8px 12px;cursor:pointer;text-decoration:none;text-align:center;display:inline-block;vertical-align:middle;white-space:nowrap;line-height:normal}.ink-button+.ink-button{margin-left:5px}.button-group{*zoom:1}.button-group>.ink-button{float:left;margin:5px 0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;border-left:0}.button-group>.ink-button:active,.button-group>.ink-button:hover{border-left:0}.button-group>.ink-button:first-child{-webkit-border-radius:2px 0 0 2px;-moz-border-radius:2px 0 0 2px;-ms-border-radius:2px 0 0 2px;-o-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px;border-left:1px solid #bfbfbf}.button-group>.ink-button:last-child{-webkit-border-radius:0 2px 2px 0;-moz-border-radius:0 2px 2px 0;-ms-border-radius:0 2px 2px 0;-o-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.button-group:after{content:"";display:table;clear:both}.button-toolbar{*zoom:1}.button-toolbar>.button-group{margin-right:10px;float:left}.button-toolbar:after{content:"";display:table;clear:both}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-thin-webfont.eot);src:url(../fonts/Roboto/roboto-thin-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-thin-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-thin-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-thin-webfont.svg) format('svg');font-weight:100;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-thinitalic-webfont.eot);src:url(../fonts/Roboto/roboto-thinitalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-thinitalic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-thinitalic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-thinitalic-webfont.svg) format('svg');font-weight:100;font-style:italic}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-light-webfont.eot);src:url(../fonts/Roboto/roboto-light-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-light-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-light-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-light-webfont.svg) format('svg');font-weight:300;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-lightitalic-webfont.eot);src:url(../fonts/Roboto/roboto-lightitalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-lightitalic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-lightitalic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-lightitalic-webfont.svg) format('svg');font-weight:300;font-style:italic}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-regular-webfont.eot);src:url(../fonts/Roboto/roboto-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-regular-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-regular-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-regular-webfont.svg) format('svg');font-weight:400;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-italic-webfont.eot);src:url(../fonts/Roboto/roboto-italic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-italic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-italic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-italic-webfont.svg) format('svg');font-weight:400;font-style:italic}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-medium-webfont.eot);src:url(../fonts/Roboto/roboto-medium-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-medium-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-medium-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-medium-webfont.svg) format('svg');font-weight:500;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-mediumitalic-webfont.eot);src:url(../fonts/Roboto/roboto-mediumitalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-mediumitalic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-mediumitalic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-mediumitalic-webfont.svg) format('svg');font-weight:500;font-style:italic}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-bold-webfont.eot);src:url(../fonts/Roboto/roboto-bold-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-bold-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-bold-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-bold-webfont.svg) format('svg');font-weight:700;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-bolditalic-webfont.eot);src:url(../fonts/Roboto/roboto-bolditalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-bolditalic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-bolditalic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-bolditalic-webfont.svg) format('svg');font-weight:700;font-style:italic}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-black-webfont.eot);src:url(../fonts/Roboto/roboto-black-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-black-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-black-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-black-webfont.svg) format('svg');font-weight:900;font-style:normal}@font-face{font-family:Roboto;src:url(../fonts/Roboto/roboto-blackitalic-webfont.eot);src:url(../fonts/Roboto/roboto-blackitalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto/roboto-blackitalic-webfont.woff) format('woff'),url(../fonts/Roboto/roboto-blackitalic-webfont.ttf) format('truetype'),url(../fonts/Roboto/roboto-blackitalic-webfont.svg) format('svg');font-weight:900;font-style:italic}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-light-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-light-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-light-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-light-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-light-webfont.svg) format('svg');font-weight:300;font-style:normal}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.svg) format('svg');font-weight:300;font-style:italic}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-regular-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-regular-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-regular-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-regular-webfont.svg) format('svg');font-weight:400;font-style:normal}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-italic-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-italic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-italic-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-italic-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-italic-webfont.svg) format('svg');font-weight:400;font-style:italic}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-bold-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-bold-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-bold-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-bold-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-bold-webfont.svg) format('svg');font-weight:700;font-style:normal}@font-face{font-family:Roboto_condensed;src:url(../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.eot);src:url(../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.woff) format('woff'),url(../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.ttf) format('truetype'),url(../fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.svg) format('svg');font-weight:700;font-style:italic}@font-face{font-family:Roboto_slab;src:url(../fonts/Roboto_slab/robotoslab-thin-webfont.eot);src:url(../fonts/Roboto_slab/robotoslab-thin-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_slab/robotoslab-thin-webfont.woff) format('woff'),url(../fonts/Roboto_slab/robotoslab-thin-webfont.ttf) format('truetype'),url(../fonts/Roboto_slab/robotoslab-thin-webfont.svg) format('svg');font-weight:100;font-style:normal}@font-face{font-family:Roboto_slab;src:url(../fonts/Roboto_slab/robotoslab-light-webfont.eot);src:url(../fonts/Roboto_slab/robotoslab-light-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_slab/robotoslab-light-webfont.woff) format('woff'),url(../fonts/Roboto_slab/robotoslab-light-webfont.ttf) format('truetype'),url(../fonts/Roboto_slab/robotoslab-light-webfont.svg) format('svg');font-weight:300;font-style:normal}@font-face{font-family:Roboto_slab;src:url(../fonts/Roboto_slab/robotoslab-regular-webfont.eot);src:url(../fonts/Roboto_slab/robotoslab-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_slab/robotoslab-regular-webfont.woff) format('woff'),url(../fonts/Roboto_slab/robotoslab-regular-webfont.ttf) format('truetype'),url(../fonts/Roboto_slab/robotoslab-regular-webfont.svg) format('svg');font-weight:400;font-style:normal}@font-face{font-family:Roboto_slab;src:url(../fonts/Roboto_slab/robotoslab-bold-webfont.eot);src:url(../fonts/Roboto_slab/robotoslab-bold-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/Roboto_slab/robotoslab-bold-webfont.woff) format('woff'),url(../fonts/Roboto_slab/robotoslab-bold-webfont.ttf) format('truetype'),url(../fonts/Roboto_slab/robotoslab-bold-webfont.svg) format('svg');font-weight:700;font-style:normal}.ink-form fieldset{border:0;padding:0;margin:0}.ink-form fieldset legend{font-size:1.438em;font-weight:700;width:100%;border-bottom:1px solid #ddd}.ink-form fieldset legend+*{-webkit-margin-top-collapse:separate;margin:2em 0}.ink-form p.tip{font-size:.875em;color:#909090;position:relative;margin:.2em 0 0 .1em}.ink-form p.label{padding:0;margin:0;color:#555;white-space:normal}.ink-form input[type=color],.ink-form input[type=date],.ink-form input[type=datetime-local],.ink-form input[type=datetime],.ink-form input[type=email],.ink-form input[type=month],.ink-form input[type=number],.ink-form input[type=password],.ink-form input[type=search],.ink-form input[type=tel],.ink-form input[type=text],.ink-form input[type=time],.ink-form input[type=url],.ink-form input[type=week],.ink-form select,.ink-form textarea{font-family:Roboto,Arial,Helvetica,sans-serif;font-weight:300;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;padding:8px 6px;border:1px solid #c6c6c6;resize:none;background:#fff;vertical-align:middle}.ink-form input[type=color]:focus,.ink-form input[type=date]:focus,.ink-form input[type=datetime-local]:focus,.ink-form input[type=datetime]:focus,.ink-form input[type=email]:focus,.ink-form input[type=month]:focus,.ink-form input[type=number]:focus,.ink-form input[type=password]:focus,.ink-form input[type=search]:focus,.ink-form input[type=tel]:focus,.ink-form input[type=text]:focus,.ink-form input[type=time]:focus,.ink-form input[type=url]:focus,.ink-form input[type=week]:focus,.ink-form select:focus,.ink-form textarea:focus{border-color:rgba(153,153,153,.9);-webkit-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;-moz-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;outline:0 none}.ink-form input[type=color]:disabled,.ink-form input[type=date]:disabled,.ink-form input[type=datetime-local]:disabled,.ink-form input[type=datetime]:disabled,.ink-form input[type=email]:disabled,.ink-form input[type=month]:disabled,.ink-form input[type=number]:disabled,.ink-form input[type=password]:disabled,.ink-form input[type=search]:disabled,.ink-form input[type=tel]:disabled,.ink-form input[type=text]:disabled,.ink-form input[type=time]:disabled,.ink-form input[type=url]:disabled,.ink-form input[type=week]:disabled,.ink-form select:disabled,.ink-form textarea:disabled{background:#f2f2f2;cursor:not-allowed}.ink-form .input-file{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;padding:6px;border:1px solid #c6c6c6;background:#fff;vertical-align:middle;line-height:1.2}.ink-form .input-file input[type=file]{-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;border:0;padding:0;background:0 0;width:100%}.ink-form .ink-button{margin:0 5px}.ink-form label{cursor:pointer}.ink-form select{line-height:2;cursor:pointer}.ink-form textarea{min-height:5em}.ink-form .control-group{line-height:2;margin-bottom:1em;*zoom:1}.ink-form .control-group:after{content:"";display:table;clear:both}.ink-form .control-group .control{position:relative;*zoom:1}.ink-form .control-group .control:after{content:"";display:table;clear:both}.ink-form .control-group .control>li{margin:0;*zoom:1}.ink-form .control-group .control>li:after{content:"";display:table;clear:both}.ink-form .control-group .control>input,.ink-form .control-group .control>select,.ink-form .control-group .control>textarea{width:100%}.ink-form .control-group .control>input+[class*=" icon-"],.ink-form .control-group .control>input+[class^=icon-],.ink-form .control-group .control>select+[class*=" icon-"],.ink-form .control-group .control>select+[class^=icon-],.ink-form .control-group .control>textarea+[class*=" icon-"],.ink-form .control-group .control>textarea+[class^=icon-]{display:none}.ink-form .control-group .control.append-button span,.ink-form .control-group .control.append-symbol span,.ink-form .control-group .control.prepend-button span,.ink-form .control-group .control.prepend-symbol span{width:100%;position:relative}.ink-form .control-group .control.append-button span>input,.ink-form .control-group .control.append-button span>select,.ink-form .control-group .control.append-button span>textarea,.ink-form .control-group .control.append-symbol span>input,.ink-form .control-group .control.append-symbol span>select,.ink-form .control-group .control.append-symbol span>textarea,.ink-form .control-group .control.prepend-button span>input,.ink-form .control-group .control.prepend-button span>select,.ink-form .control-group .control.prepend-button span>textarea,.ink-form .control-group .control.prepend-symbol span>input,.ink-form .control-group .control.prepend-symbol span>select,.ink-form .control-group .control.prepend-symbol span>textarea{width:100%}.ink-form .control-group .control.append-button>input[type=button],.ink-form .control-group .control.append-button>input[type=reset],.ink-form .control-group .control.append-button>input[type=submit],.ink-form .control-group .control.append-symbol>input[type=button],.ink-form .control-group .control.append-symbol>input[type=reset],.ink-form .control-group .control.append-symbol>input[type=submit],.ink-form .control-group .control.prepend-button>input[type=button],.ink-form .control-group .control.prepend-button>input[type=reset],.ink-form .control-group .control.prepend-button>input[type=submit],.ink-form .control-group .control.prepend-symbol>input[type=button],.ink-form .control-group .control.prepend-symbol>input[type=reset],.ink-form .control-group .control.prepend-symbol>input[type=submit]{width:auto}.ink-form .control-group .control.append-button{display:table}.ink-form .control-group .control.append-button span{display:table-cell}.ink-form .control-group .control.append-button span>input,.ink-form .control-group .control.append-button span>select,.ink-form .control-group .control.append-button span>textarea{-webkit-border-radius:2px 0 0 2px;-moz-border-radius:2px 0 0 2px;-ms-border-radius:2px 0 0 2px;-o-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.ink-form .control-group .control.append-button .ink-button{margin:0;-webkit-border-radius:0 2px 2px 0;-moz-border-radius:0 2px 2px 0;-ms-border-radius:0 2px 2px 0;-o-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0;border-left:0}.ink-form .control-group .control.prepend-button{display:table}.ink-form .control-group .control.prepend-button span{display:table-cell}.ink-form .control-group .control.prepend-button span>input,.ink-form .control-group .control.prepend-button span>select,.ink-form .control-group .control.prepend-button span>textarea{-webkit-border-radius:0 2px 2px 0;-moz-border-radius:0 2px 2px 0;-ms-border-radius:0 2px 2px 0;-o-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.ink-form .control-group .control.prepend-button .ink-button{margin:0;-webkit-border-radius:2px 0 0 2px;-moz-border-radius:2px 0 0 2px;-ms-border-radius:2px 0 0 2px;-o-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px;border-right:0}.ink-form .control-group .control.append-symbol span{display:block}.ink-form .control-group .control.append-symbol span>input,.ink-form .control-group .control.append-symbol span>select,.ink-form .control-group .control.append-symbol span>textarea{padding-right:2.5em}.ink-form .control-group .control.append-symbol span>[class*=" fa-"],.ink-form .control-group .control.append-symbol span>[class^=fa-]{position:absolute;right:1em;top:.86em;pointer-events:none}.ink-form .control-group .control.prepend-symbol span{display:block}.ink-form .control-group .control.prepend-symbol span>input,.ink-form .control-group .control.prepend-symbol span>select,.ink-form .control-group .control.prepend-symbol span>textarea{padding-left:2.5em}.ink-form .control-group .control.prepend-symbol span>[class*=" fa-"],.ink-form .control-group .control.prepend-symbol span>[class^=fa-]{position:absolute;left:1em;top:.86em;pointer-events:none}.ink-form .control-group input[type=checkbox],.ink-form .control-group input[type=radio]{padding:0;margin:.55em 0;border:0;clear:left;float:left;cursor:pointer}.ink-form .control-group input[type=checkbox]+label,.ink-form .control-group input[type=radio]+label{float:left;margin:.25em 0 .25em .4em}.ink-form .control-group .inline li{padding:0}.ink-form .control-group .inline li label{margin-right:1em}.ink-form .control-group.validation.error input,.ink-form .control-group.validation.error select,.ink-form .control-group.validation.error textarea{outline:0;-webkit-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;-moz-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;border:1px solid rgba(200,10,16,.5)}.ink-form .control-group.validation.error p.tip{color:rgba(150,7,12,.55)}.ink-form .control-group.validation.warning input,.ink-form .control-group.validation.warning select,.ink-form .control-group.validation.warning textarea{outline:0;-webkit-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;-moz-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;border:1px solid rgba(255,156,0,.6)}.ink-form .control-group.validation.warning p.tip{color:rgba(204,125,0,.6)}.ink-form .control-group.required label,.ink-form .control-group.required p.label{color:#555}.ink-form .control-group.required label:after,.ink-form .control-group.required p.label:after{content:"\f069";color:#c91111;margin-left:.6em;font-family:FontAwesome;font-size:.75em;width:1.25em}.ink-form .control-group.required ul.control label:after{content:""}.ink-grid{width:auto;max-width:1440px;margin:0 auto}.all-5{width:5%;float:left;clear:none}.all-10{width:10%;float:left;clear:none}.all-15{width:15%;float:left;clear:none}.all-20{width:20%;float:left;clear:none}.all-25{width:25%;float:left;clear:none}.all-30{width:30%;float:left;clear:none}.all-33{width:33.33%;float:left;clear:none}.all-35{width:35%;float:left;clear:none}.all-40{width:40%;float:left;clear:none}.all-45{width:45%;float:left;clear:none}.all-50{width:50%;float:left;clear:none}.all-55{width:55%;float:left;clear:none}.all-60{width:60%;float:left;clear:none}.all-65{width:65%;float:left;clear:none}.all-66{width:66.66%;float:left;clear:none}.all-70{width:70%;float:left;clear:none}.all-75{width:75%;float:left;clear:none}.all-80{width:80%;float:left;clear:none}.all-85{width:85%;float:left;clear:none}.all-90{width:90%;float:left;clear:none}.all-95{width:95%;float:left;clear:none}.all-100{width:100%;float:left;clear:none}[class~=all-100]{float:none;clear:both}@media screen and (min-width:1261px){.ink-grid{padding:0 2em}.column-group>[class*=xlarge-]{float:left;clear:none}.xlarge-5{width:5%}.xlarge-10{width:10%}.xlarge-15{width:15%}.xlarge-20{width:20%}.xlarge-25{width:25%}.xlarge-30{width:30%}.xlarge-33{width:33.33%}.xlarge-35{width:35%}.xlarge-40{width:40%}.xlarge-45{width:45%}.xlarge-50{width:50%}.xlarge-55{width:55%}.xlarge-60{width:60%}.xlarge-65{width:65%}.xlarge-66{width:66.66%}.xlarge-70{width:70%}.xlarge-75{width:75%}.xlarge-80{width:80%}.xlarge-85{width:85%}.xlarge-90{width:90%}.xlarge-95{width:95%}.xlarge-100{width:100%}[class*=xlarge-100]{float:none;clear:both}.column-group{*zoom:1}.column-group:after{content:"";display:table;clear:both}.column-group.gutters{margin-left:-2em}.column-group.gutters>[class*=all-],.column-group.gutters>[class*=xlarge-]{padding-left:2em;margin-bottom:2em}.column-group.horizontal-gutters{margin-left:-2em}.column-group.horizontal-gutters>[class*=all-],.column-group.horizontal-gutters>[class*=xlarge-]{padding-left:2em}.column-group.vertical-gutters>[class*=all-],.column-group.vertical-gutters>[class*=xlarge-]{margin-bottom:2em}.column-group.double-gutters{margin-left:-4em}.column-group.double-gutters>[class*=all-],.column-group.double-gutters>[class*=xlarge-]{padding-left:4em;margin-bottom:4em}.column-group.double-horizontal-gutters{margin-left:-4em}.column-group.double-horizontal-gutters>[class*=all-],.column-group.double-horizontal-gutters>[class*=xlarge-]{padding-left:4em}.column-group.double-vertical-gutters>[class*=all-],.column-group.double-vertical-gutters>[class*=xlarge-]{margin-bottom:4em}.column-group.half-gutters{margin-left:-1em}.column-group.half-gutters>[class*=all-],.column-group.half-gutters>[class*=xlarge-]{padding-left:1em;margin-bottom:1em}.column-group.half-horizontal-gutters{margin-left:-1em}.column-group.half-horizontal-gutters>[class*=all-],.column-group.half-horizontal-gutters>[class*=xlarge-]{padding-left:1em}.column-group.half-vertical-gutters>[class*=all-],.column-group.half-vertical-gutters>[class*=xlarge-]{margin-bottom:1em}.column-group.quarter-gutters{margin-left:-.5em}.column-group.quarter-gutters>[class*=all-],.column-group.quarter-gutters>[class*=xlarge-]{padding-left:.5em;margin-bottom:.5em}.column-group.quarter-horizontal-gutters{margin-left:-.5em}.column-group.quarter-horizontal-gutters>[class*=all-],.column-group.quarter-horizontal-gutters>[class*=xlarge-]{padding-left:.5em}.column-group.quarter-vertical-gutters>[class*=all-],.column-group.quarter-vertical-gutters>[class*=xlarge-]{margin-bottom:.5em}.column-group.xlarge-gutters{margin-left:-2em}.column-group.xlarge-gutters>[class*=all-],.column-group.xlarge-gutters>[class*=xlarge-]{padding-left:.5em;margin-bottom:.5em}.column-group.xlarge-horizontal-gutters{margin-left:-2em}.column-group.xlarge-horizontal-gutters>[class*=all-],.column-group.xlarge-horizontal-gutters>[class*=xlarge-]{padding-left:2em}.column-group.xlarge-vertical-gutters>[class*=all-],.column-group.xlarge-vertical-gutters>[class*=xlarge-]{margin-bottom:2em}.column-group.xlarge-double-gutters{margin-left:-4em}.column-group.xlarge-double-gutters>[class*=all-],.column-group.xlarge-double-gutters>[class*=xlarge-]{padding-left:4em;margin-bottom:4em}.column-group.xlarge-double-horizontal-gutters{margin-left:-4em}.column-group.xlarge-double-horizontal-gutters>[class*=all-],.column-group.xlarge-double-horizontal-gutters>[class*=xlarge-]{padding-left:4em}.column-group.xlarge-double-vertical-gutters>[class*=all-],.column-group.xlarge-double-vertical-gutters>[class*=xlarge-]{margin-bottom:4em}.column-group.xlarge-half-gutters{margin-left:-1em}.column-group.xlarge-half-gutters>[class*=all-],.column-group.xlarge-half-gutters>[class*=xlarge-]{padding-left:1em;margin-bottom:1em}.column-group.xlarge-half-horizontal-gutters{margin-left:-1em}.column-group.xlarge-half-horizontal-gutters>[class*=all-],.column-group.xlarge-half-horizontal-gutters>[class*=xlarge-]{padding-left:1em}.column-group.xlarge-half-vertical-gutters>[class*=all-],.column-group.xlarge-half-vertical-gutters>[class*=xlarge-]{margin-bottom:1em}.column-group.xlarge-quarter-gutters{margin-left:-.5em}.column-group.xlarge-quarter-gutters>[class*=all-],.column-group.xlarge-quarter-gutters>[class*=xlarge-]{padding-left:.5em;margin-bottom:.5em}.column-group.xlarge-quarter-horizontal-gutters{margin-left:-.5em}.column-group.xlarge-quarter-horizontal-gutters>[class*=all-],.column-group.xlarge-quarter-horizontal-gutters>[class*=xlarge-]{padding-left:.5em}.column-group.xlarge-quarter-vertical-gutters>[class*=all-],.column-group.xlarge-quarter-vertical-gutters>[class*=xlarge-]{margin-bottom:.5em}.column-group.xlarge-no-gutters{margin-left:0}.column-group.xlarge-no-gutters>[class*=all-],.column-group.xlarge-no-gutters>[class*=xlarge-]{padding-left:0;margin-bottom:0}.ink-table tbody[class*=xlarge-],.ink-table td[class*=xlarge-],.ink-table tfoot[class*=xlarge-],.ink-table th[class*=xlarge-],.ink-table thead[class*=xlarge-],.ink-table tr[class*=xlarge-]{float:none}.xlarge-push-left{float:left}.xlarge-push-center{float:none;margin-left:auto;margin-right:auto}.xlarge-push-right{float:right}.xlarge-align-left{text-align:left}.xlarge-align-center{text-align:center}.xlarge-align-right{text-align:right}.xlarge-no-margin{margin:0!important}.space,.xlarge-space{margin:2em}.padding,.xlarge-padding{padding:2em}.double-space,.xlarge-double-space{margin:4em}.double-padding,.xlarge-double-padding{padding:4em}.half-space,.xlarge-half-space{margin:1em}.half-padding,.xlarge-half-padding{padding:1em}.quarter-space,.xlarge-quarter-space{margin:.5em}.quarter-padding,.xlarge-quarter-padding{padding:.5em}.vertical-space,.xlarge-vertical-space{margin-top:2em;margin-bottom:2em}.vertical-padding,.xlarge-vertical-padding{padding-top:2em;padding-bottom:2em}.double-vertical-space,.xlarge-double-vertical-space{margin-top:4em;margin-bottom:4em}.double-vertical-padding,.xlarge-double-vertical-padding{padding-top:4em;padding-bottom:4em}.half-vertical-space,.xlarge-half-vertical-space{margin-top:1em;margin-bottom:1em}.half-vertical-padding,.xlarge-half-vertical-padding{padding-top:1em;padding-bottom:1em}.quarter-vertical-space,.xlarge-quarter-vertical-space{margin-top:.5em;margin-bottom:.5em}.quarter-vertical-padding,.xlarge-quarter-vertical-padding{padding-top:.5em;padding-bottom:.5em}.horizontal-space,.xlarge-horizontal-space{margin-left:2em;margin-right:2em}.horizontal-padding,.xlarge-horizontal-padding{padding-left:2em;padding-right:2em}.double-horizontal-space,.xlarge-double-horizontal-space{margin-left:4em;margin-right:4em}.double-horizontal-padding,.xlarge-double-horizontal-padding{padding-left:4em;padding-right:4em}.half-horizontal-space,.xlarge-half-horizontal-space{margin-left:1em;margin-right:1em}.half-horizontal-padding,.xlarge-half-horizontal-padding{padding-left:1em;padding-right:1em}.quarter-horizontal-space,.xlarge-quarter-horizontal-space{margin-left:.5em;margin-right:.5em}.quarter-horizontal-padding,.xlarge-quarter-horizontal-padding{padding-left:.5em;padding-right:.5em}.top-space,.xlarge-top-space{margin-top:2em}.top-padding,.xlarge-top-padding{padding-top:2em}.double-top-space,.xlarge-double-top-space{margin-top:4em}.double-top-padding,.xlarge-double-top-padding{padding-top:4em}.half-top-space,.xlarge-half-top-space{margin-top:1em}.half-top-padding,.xlarge-half-top-padding{padding-top:1em}.quarter-top-space,.xlarge-quarter-top-space{margin-top:.5em}.quarter-top-padding,.xlarge-quarter-top-padding{padding-top:.5em}.right-space,.xlarge-right-space{margin-right:2em}.right-padding,.xlarge-right-padding{padding-right:2em}.double-right-space,.xlarge-double-right-space{margin-right:4em}.double-right-padding,.xlarge-double-right-padding{padding-right:4em}.half-right-space,.xlarge-half-right-space{margin-right:1em}.half-right-padding,.xlarge-half-right-padding{padding-right:1em}.quarter-right-space,.xlarge-quarter-right-space{margin-right:.5em}.quarter-right-padding,.xlarge-quarter-right-padding{padding-right:.5em}.bottom-space,.xlarge-bottom-space{margin-bottom:2em}.bottom-padding,.xlarge-bottom-padding{padding-bottom:2em}.double-bottom-space,.xlarge-double-bottom-space{margin-bottom:4em}.double-bottom-padding,.xlarge-double-bottom-padding{padding-bottom:4em}.half-bottom-space,.xlarge-half-bottom-space{margin-bottom:1em}.half-bottom-padding,.xlarge-half-bottom-padding{padding-bottom:1em}.quarter-bottom-space,.xlarge-quarter-bottom-space{margin-bottom:.5em}.quarter-bottom-padding,.xlarge-quarter-bottom-padding{padding-bottom:.5em}.left-space,.xlarge-left-space{margin-left:2em}.left-padding,.xlarge-left-padding{padding-left:2em}.double-left-space,.xlarge-double-left-space{margin-left:4em}.double-left-padding,.xlarge-double-left-padding{padding-left:4em}.half-left-space,.xlarge-half-left-space{margin-left:1em}.half-left-padding,.xlarge-half-left-padding{padding-left:1em}.quarter-left-space,.xlarge-quarter-left-space{margin-left:.5em}.quarter-left-padding,.xlarge-quarter-left-padding{padding-left:.5em}.hide-xlarge{display:none!important}.show-xlarge{display:inherit!important}table.show-xlarge{display:table}thead.show-xlarge{display:table-header-group}tbody.show-xlarge{display:table-row-group}tfoot.show-xlarge{display:table-footer-group}tr.show-xlarge{display:table-row}td.show-xlarge,th.show-xlarge{display:table-cell}}@media screen and (min-width:961px) and (max-width:1260px){.ink-grid{padding:0 1.75em}.column-group>[class*=large-]{float:left;clear:none}.large-5{width:5%}.large-10{width:10%}.large-15{width:15%}.large-20{width:20%}.large-25{width:25%}.large-30{width:30%}.large-33{width:33.33%}.large-35{width:35%}.large-40{width:40%}.large-45{width:45%}.large-50{width:50%}.large-55{width:55%}.large-60{width:60%}.large-65{width:65%}.large-66{width:66.66%}.large-70{width:70%}.large-75{width:75%}.large-80{width:80%}.large-85{width:85%}.large-90{width:90%}.large-95{width:95%}.large-100{width:100%}[class*=large-100]{float:none;clear:both}.column-group{*zoom:1}.column-group:after{content:"";display:table;clear:both}.column-group.gutters{margin-left:-1.75em}.column-group.gutters>[class*=all-],.column-group.gutters>[class*=large-]{padding-left:1.75em;margin-bottom:1.75em}.column-group.horizontal-gutters{margin-left:-1.75em}.column-group.horizontal-gutters>[class*=all-],.column-group.horizontal-gutters>[class*=large-]{padding-left:1.75em}.column-group.vertical-gutters>[class*=all-],.column-group.vertical-gutters>[class*=large-]{margin-bottom:1.75em}.column-group.double-gutters{margin-left:-3.5em}.column-group.double-gutters>[class*=all-],.column-group.double-gutters>[class*=large-]{padding-left:3.5em;margin-bottom:3.5em}.column-group.double-horizontal-gutters{margin-left:-3.5em}.column-group.double-horizontal-gutters>[class*=all-],.column-group.double-horizontal-gutters>[class*=large-]{padding-left:3.5em}.column-group.double-vertical-gutters>[class*=all-],.column-group.double-vertical-gutters>[class*=large-]{margin-bottom:3.5em}.column-group.half-gutters{margin-left:-.875em}.column-group.half-gutters>[class*=all-],.column-group.half-gutters>[class*=large-]{padding-left:.875em;margin-bottom:.875em}.column-group.half-horizontal-gutters{margin-left:-.875em}.column-group.half-horizontal-gutters>[class*=all-],.column-group.half-horizontal-gutters>[class*=large-]{padding-left:.875em}.column-group.half-vertical-gutters>[class*=all-],.column-group.half-vertical-gutters>[class*=large-]{margin-bottom:.875em}.column-group.quarter-gutters{margin-left:-.4375em}.column-group.quarter-gutters>[class*=all-],.column-group.quarter-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}.column-group.quarter-horizontal-gutters{margin-left:-.4375em}.column-group.quarter-horizontal-gutters>[class*=all-],.column-group.quarter-horizontal-gutters>[class*=large-]{padding-left:.4375em}.column-group.quarter-vertical-gutters>[class*=all-],.column-group.quarter-vertical-gutters>[class*=large-]{margin-bottom:.4375em}.column-group.large-gutters{margin-left:-1.75em}.column-group.large-gutters>[class*=all-],.column-group.large-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}.column-group.large-horizontal-gutters{margin-left:-1.75em}.column-group.large-horizontal-gutters>[class*=all-],.column-group.large-horizontal-gutters>[class*=large-]{padding-left:1.75em}.column-group.large-vertical-gutters>[class*=all-],.column-group.large-vertical-gutters>[class*=large-]{margin-bottom:1.75em}.column-group.large-double-gutters{margin-left:-3.5em}.column-group.large-double-gutters>[class*=all-],.column-group.large-double-gutters>[class*=large-]{padding-left:3.5em;margin-bottom:3.5em}.column-group.large-double-horizontal-gutters{margin-left:-3.5em}.column-group.large-double-horizontal-gutters>[class*=all-],.column-group.large-double-horizontal-gutters>[class*=large-]{padding-left:3.5em}.column-group.large-double-vertical-gutters>[class*=all-],.column-group.large-double-vertical-gutters>[class*=large-]{margin-bottom:3.5em}.column-group.large-half-gutters{margin-left:-.875em}.column-group.large-half-gutters>[class*=all-],.column-group.large-half-gutters>[class*=large-]{padding-left:.875em;margin-bottom:.875em}.column-group.large-half-horizontal-gutters{margin-left:-.875em}.column-group.large-half-horizontal-gutters>[class*=all-],.column-group.large-half-horizontal-gutters>[class*=large-]{padding-left:.875em}.column-group.large-half-vertical-gutters>[class*=all-],.column-group.large-half-vertical-gutters>[class*=large-]{margin-bottom:.875em}.column-group.large-quarter-gutters{margin-left:-.4375em}.column-group.large-quarter-gutters>[class*=all-],.column-group.large-quarter-gutters>[class*=large-]{padding-left:.4375em;margin-bottom:.4375em}.column-group.large-quarter-horizontal-gutters{margin-left:-.4375em}.column-group.large-quarter-horizontal-gutters>[class*=all-],.column-group.large-quarter-horizontal-gutters>[class*=large-]{padding-left:.4375em}.column-group.large-quarter-vertical-gutters>[class*=all-],.column-group.large-quarter-vertical-gutters>[class*=large-]{margin-bottom:.4375em}.column-group.large-no-gutters{margin-left:0}.column-group.large-no-gutters>[class*=all-],.column-group.large-no-gutters>[class*=large-]{padding-left:0;margin-bottom:0}.ink-table tbody[class*=large-],.ink-table td[class*=large-],.ink-table tfoot[class*=large-],.ink-table th[class*=large-],.ink-table thead[class*=large-],.ink-table tr[class*=large-]{float:none}.large-push-left{float:left}.large-push-center{float:none;margin-left:auto;margin-right:auto}.large-push-right{float:right}.large-align-left{text-align:left}.large-align-center{text-align:center}.large-align-right{text-align:right}.large-no-margin{margin:0!important}.large-space,.space{margin:1.75em}.large-padding,.padding{padding:1.75em}.double-space,.large-double-space{margin:3.5em}.double-padding,.large-double-padding{padding:3.5em}.half-space,.large-half-space{margin:.875em}.half-padding,.large-half-padding{padding:.875em}.large-quarter-space,.quarter-space{margin:.4375em}.large-quarter-padding,.quarter-padding{padding:.4375em}.large-vertical-space,.vertical-space{margin-top:1.75em;margin-bottom:1.75em}.large-vertical-padding,.vertical-padding{padding-top:1.75em;padding-bottom:1.75em}.double-vertical-space,.large-double-vertical-space{margin-top:3.5em;margin-bottom:3.5em}.double-vertical-padding,.large-double-vertical-padding{padding-top:3.5em;padding-bottom:3.5em}.half-vertical-space,.large-half-vertical-space{margin-top:.875em;margin-bottom:.875em}.half-vertical-padding,.large-half-vertical-padding{padding-top:.875em;padding-bottom:.875em}.large-quarter-vertical-space,.quarter-vertical-space{margin-top:.4375em;margin-bottom:.4375em}.large-quarter-vertical-padding,.quarter-vertical-padding{padding-top:.4375em;padding-bottom:.4375em}.horizontal-space,.large-horizontal-space{margin-left:1.75em;margin-right:1.75em}.horizontal-padding,.large-horizontal-padding{padding-left:1.75em;padding-right:1.75em}.double-horizontal-space,.large-double-horizontal-space{margin-left:3.5em;margin-right:3.5em}.double-horizontal-padding,.large-double-horizontal-padding{padding-left:3.5em;padding-right:3.5em}.half-horizontal-space,.large-half-horizontal-space{margin-left:.875em;margin-right:.875em}.half-horizontal-padding,.large-half-horizontal-padding{padding-left:.875em;padding-right:.875em}.large-quarter-horizontal-space,.quarter-horizontal-space{margin-left:.4375em;margin-right:.4375em}.large-quarter-horizontal-padding,.quarter-horizontal-padding{padding-left:.4375em;padding-right:.4375em}.large-top-space,.top-space{margin-top:1.75em}.large-top-padding,.top-padding{padding-top:1.75em}.double-top-space,.large-double-top-space{margin-top:3.5em}.double-top-padding,.large-double-top-padding{padding-top:3.5em}.half-top-space,.large-half-top-space{margin-top:.875em}.half-top-padding,.large-half-top-padding{padding-top:.875em}.large-quarter-top-space,.quarter-top-space{margin-top:.4375em}.large-quarter-top-padding,.quarter-top-padding{padding-top:.4375em}.large-right-space,.right-space{margin-right:1.75em}.large-right-padding,.right-padding{padding-right:1.75em}.double-right-space,.large-double-right-space{margin-right:3.5em}.double-right-padding,.large-double-right-padding{padding-right:3.5em}.half-right-space,.large-half-right-space{margin-right:.875em}.half-right-padding,.large-half-right-padding{padding-right:.875em}.large-quarter-right-space,.quarter-right-space{margin-right:.4375em}.large-quarter-right-padding,.quarter-right-padding{padding-right:.4375em}.bottom-space,.large-bottom-space{margin-bottom:1.75em}.bottom-padding,.large-bottom-padding{padding-bottom:1.75em}.double-bottom-space,.large-double-bottom-space{margin-bottom:3.5em}.double-bottom-padding,.large-double-bottom-padding{padding-bottom:3.5em}.half-bottom-space,.large-half-bottom-space{margin-bottom:.875em}.half-bottom-padding,.large-half-bottom-padding{padding-bottom:.875em}.large-quarter-bottom-space,.quarter-bottom-space{margin-bottom:.4375em}.large-quarter-bottom-padding,.quarter-bottom-padding{padding-bottom:.4375em}.large-left-space,.left-space{margin-left:1.75em}.large-left-padding,.left-padding{padding-left:1.75em}.double-left-space,.large-double-left-space{margin-left:3.5em}.double-left-padding,.large-double-left-padding{padding-left:3.5em}.half-left-space,.large-half-left-space{margin-left:.875em}.half-left-padding,.large-half-left-padding{padding-left:.875em}.large-quarter-left-space,.quarter-left-space{margin-left:.4375em}.large-quarter-left-padding,.quarter-left-padding{padding-left:.4375em}.hide-large{display:none!important}.show-large{display:inherit!important}table.show-large{display:table}thead.show-large{display:table-header-group}tbody.show-large{display:table-row-group}tfoot.show-large{display:table-footer-group}tr.show-large{display:table-row}td.show-large,th.show-large{display:table-cell}}@media screen and (min-width:641px) and (max-width:960px){.ink-grid{padding:0 1.5em}.column-group>[class*=medium-]{float:left;clear:none}.medium-5{width:5%}.medium-10{width:10%}.medium-15{width:15%}.medium-20{width:20%}.medium-25{width:25%}.medium-30{width:30%}.medium-33{width:33.33%}.medium-35{width:35%}.medium-40{width:40%}.medium-45{width:45%}.medium-50{width:50%}.medium-55{width:55%}.medium-60{width:60%}.medium-65{width:65%}.medium-66{width:66.66%}.medium-70{width:70%}.medium-75{width:75%}.medium-80{width:80%}.medium-85{width:85%}.medium-90{width:90%}.medium-95{width:95%}.medium-100{width:100%}[class*=medium-100]{float:none;clear:both}.column-group{*zoom:1}.column-group:after{content:"";display:table;clear:both}.column-group.gutters{margin-left:-1.5em}.column-group.gutters>[class*=all-],.column-group.gutters>[class*=medium-]{padding-left:1.5em;margin-bottom:1.5em}.column-group.horizontal-gutters{margin-left:-1.5em}.column-group.horizontal-gutters>[class*=all-],.column-group.horizontal-gutters>[class*=medium-]{padding-left:1.5em}.column-group.vertical-gutters>[class*=all-],.column-group.vertical-gutters>[class*=medium-]{margin-bottom:1.5em}.column-group.double-gutters{margin-left:-3em}.column-group.double-gutters>[class*=all-],.column-group.double-gutters>[class*=medium-]{padding-left:3em;margin-bottom:3em}.column-group.double-horizontal-gutters{margin-left:-3em}.column-group.double-horizontal-gutters>[class*=all-],.column-group.double-horizontal-gutters>[class*=medium-]{padding-left:3em}.column-group.double-vertical-gutters>[class*=all-],.column-group.double-vertical-gutters>[class*=medium-]{margin-bottom:3em}.column-group.half-gutters{margin-left:-.75em}.column-group.half-gutters>[class*=all-],.column-group.half-gutters>[class*=medium-]{padding-left:.75em;margin-bottom:.75em}.column-group.half-horizontal-gutters{margin-left:-.75em}.column-group.half-horizontal-gutters>[class*=all-],.column-group.half-horizontal-gutters>[class*=medium-]{padding-left:.75em}.column-group.half-vertical-gutters>[class*=all-],.column-group.half-vertical-gutters>[class*=medium-]{margin-bottom:.75em}.column-group.quarter-gutters{margin-left:-.375em}.column-group.quarter-gutters>[class*=all-],.column-group.quarter-gutters>[class*=medium-]{padding-left:.375em;margin-bottom:.375em}.column-group.quarter-horizontal-gutters{margin-left:-.375em}.column-group.quarter-horizontal-gutters>[class*=all-],.column-group.quarter-horizontal-gutters>[class*=medium-]{padding-left:.375em}.column-group.quarter-vertical-gutters>[class*=all-],.column-group.quarter-vertical-gutters>[class*=medium-]{margin-bottom:.375em}.column-group.medium-gutters{margin-left:-1.5em}.column-group.medium-gutters>[class*=all-],.column-group.medium-gutters>[class*=medium-]{padding-left:.375em;margin-bottom:.375em}.column-group.medium-horizontal-gutters{margin-left:-1.5em}.column-group.medium-horizontal-gutters>[class*=all-],.column-group.medium-horizontal-gutters>[class*=medium-]{padding-left:1.5em}.column-group.medium-vertical-gutters>[class*=all-],.column-group.medium-vertical-gutters>[class*=medium-]{margin-bottom:1.5em}.column-group.medium-double-gutters{margin-left:-3em}.column-group.medium-double-gutters>[class*=all-],.column-group.medium-double-gutters>[class*=medium-]{padding-left:3em;margin-bottom:3em}.column-group.medium-double-horizontal-gutters{margin-left:-3em}.column-group.medium-double-horizontal-gutters>[class*=all-],.column-group.medium-double-horizontal-gutters>[class*=medium-]{padding-left:3em}.column-group.medium-double-vertical-gutters>[class*=all-],.column-group.medium-double-vertical-gutters>[class*=medium-]{margin-bottom:3em}.column-group.medium-half-gutters{margin-left:-.75em}.column-group.medium-half-gutters>[class*=all-],.column-group.medium-half-gutters>[class*=medium-]{padding-left:.75em;margin-bottom:.75em}.column-group.medium-half-horizontal-gutters{margin-left:-.75em}.column-group.medium-half-horizontal-gutters>[class*=all-],.column-group.medium-half-horizontal-gutters>[class*=medium-]{padding-left:.75em}.column-group.medium-half-vertical-gutters>[class*=all-],.column-group.medium-half-vertical-gutters>[class*=medium-]{margin-bottom:.75em}.column-group.medium-quarter-gutters{margin-left:-.375em}.column-group.medium-quarter-gutters>[class*=all-],.column-group.medium-quarter-gutters>[class*=medium-]{padding-left:.375em;margin-bottom:.375em}.column-group.medium-quarter-horizontal-gutters{margin-left:-.375em}.column-group.medium-quarter-horizontal-gutters>[class*=all-],.column-group.medium-quarter-horizontal-gutters>[class*=medium-]{padding-left:.375em}.column-group.medium-quarter-vertical-gutters>[class*=all-],.column-group.medium-quarter-vertical-gutters>[class*=medium-]{margin-bottom:.375em}.column-group.medium-no-gutters{margin-left:0}.column-group.medium-no-gutters>[class*=all-],.column-group.medium-no-gutters>[class*=medium-]{padding-left:0;margin-bottom:0}.ink-table tbody[class*=medium-],.ink-table td[class*=medium-],.ink-table tfoot[class*=medium-],.ink-table th[class*=medium-],.ink-table thead[class*=medium-],.ink-table tr[class*=medium-]{float:none}.medium-push-left{float:left}.medium-push-center{float:none;margin-left:auto;margin-right:auto}.medium-push-right{float:right}.medium-align-left{text-align:left}.medium-align-center{text-align:center}.medium-align-right{text-align:right}.medium-no-margin{margin:0!important}.medium-space,.space{margin:1.5em}.medium-padding,.padding{padding:1.5em}.double-space,.medium-double-space{margin:3em}.double-padding,.medium-double-padding{padding:3em}.half-space,.medium-half-space{margin:.75em}.half-padding,.medium-half-padding{padding:.75em}.medium-quarter-space,.quarter-space{margin:.375em}.medium-quarter-padding,.quarter-padding{padding:.375em}.medium-vertical-space,.vertical-space{margin-top:1.5em;margin-bottom:1.5em}.medium-vertical-padding,.vertical-padding{padding-top:1.5em;padding-bottom:1.5em}.double-vertical-space,.medium-double-vertical-space{margin-top:3em;margin-bottom:3em}.double-vertical-padding,.medium-double-vertical-padding{padding-top:3em;padding-bottom:3em}.half-vertical-space,.medium-half-vertical-space{margin-top:.75em;margin-bottom:.75em}.half-vertical-padding,.medium-half-vertical-padding{padding-top:.75em;padding-bottom:.75em}.medium-quarter-vertical-space,.quarter-vertical-space{margin-top:.375em;margin-bottom:.375em}.medium-quarter-vertical-padding,.quarter-vertical-padding{padding-top:.375em;padding-bottom:.375em}.horizontal-space,.medium-horizontal-space{margin-left:1.5em;margin-right:1.5em}.horizontal-padding,.medium-horizontal-padding{padding-left:1.5em;padding-right:1.5em}.double-horizontal-space,.medium-double-horizontal-space{margin-left:3em;margin-right:3em}.double-horizontal-padding,.medium-double-horizontal-padding{padding-left:3em;padding-right:3em}.half-horizontal-space,.medium-half-horizontal-space{margin-left:.75em;margin-right:.75em}.half-horizontal-padding,.medium-half-horizontal-padding{padding-left:.75em;padding-right:.75em}.medium-quarter-horizontal-space,.quarter-horizontal-space{margin-left:.375em;margin-right:.375em}.medium-quarter-horizontal-padding,.quarter-horizontal-padding{padding-left:.375em;padding-right:.375em}.medium-top-space,.top-space{margin-top:1.5em}.medium-top-padding,.top-padding{padding-top:1.5em}.double-top-space,.medium-double-top-space{margin-top:3em}.double-top-padding,.medium-double-top-padding{padding-top:3em}.half-top-space,.medium-half-top-space{margin-top:.75em}.half-top-padding,.medium-half-top-padding{padding-top:.75em}.medium-quarter-top-space,.quarter-top-space{margin-top:.375em}.medium-quarter-top-padding,.quarter-top-padding{padding-top:.375em}.medium-right-space,.right-space{margin-right:1.5em}.medium-right-padding,.right-padding{padding-right:1.5em}.double-right-space,.medium-double-right-space{margin-right:3em}.double-right-padding,.medium-double-right-padding{padding-right:3em}.half-right-space,.medium-half-right-space{margin-right:.75em}.half-right-padding,.medium-half-right-padding{padding-right:.75em}.medium-quarter-right-space,.quarter-right-space{margin-right:.375em}.medium-quarter-right-padding,.quarter-right-padding{padding-right:.375em}.bottom-space,.medium-bottom-space{margin-bottom:1.5em}.bottom-padding,.medium-bottom-padding{padding-bottom:1.5em}.double-bottom-space,.medium-double-bottom-space{margin-bottom:3em}.double-bottom-padding,.medium-double-bottom-padding{padding-bottom:3em}.half-bottom-space,.medium-half-bottom-space{margin-bottom:.75em}.half-bottom-padding,.medium-half-bottom-padding{padding-bottom:.75em}.medium-quarter-bottom-space,.quarter-bottom-space{margin-bottom:.375em}.medium-quarter-bottom-padding,.quarter-bottom-padding{padding-bottom:.375em}.left-space,.medium-left-space{margin-left:1.5em}.left-padding,.medium-left-padding{padding-left:1.5em}.double-left-space,.medium-double-left-space{margin-left:3em}.double-left-padding,.medium-double-left-padding{padding-left:3em}.half-left-space,.medium-half-left-space{margin-left:.75em}.half-left-padding,.medium-half-left-padding{padding-left:.75em}.medium-quarter-left-space,.quarter-left-space{margin-left:.375em}.medium-quarter-left-padding,.quarter-left-padding{padding-left:.375em}.hide-medium{display:none!important}.show-medium{display:inherit!important}table.show-medium{display:table}thead.show-medium{display:table-header-group}tbody.show-medium{display:table-row-group}tfoot.show-medium{display:table-footer-group}tr.show-medium{display:table-row}td.show-medium,th.show-medium{display:table-cell}}@media screen and (min-width:321px) and (max-width:640px){.ink-grid{padding:0 1.25em}.column-group>[class*=small-]{float:left;clear:none}.small-5{width:5%}.small-10{width:10%}.small-15{width:15%}.small-20{width:20%}.small-25{width:25%}.small-30{width:30%}.small-33{width:33.33%}.small-35{width:35%}.small-40{width:40%}.small-45{width:45%}.small-50{width:50%}.small-55{width:55%}.small-60{width:60%}.small-65{width:65%}.small-66{width:66.66%}.small-70{width:70%}.small-75{width:75%}.small-80{width:80%}.small-85{width:85%}.small-90{width:90%}.small-95{width:95%}.small-100{width:100%}[class*=small-100]{float:none;clear:both}.column-group{*zoom:1}.column-group:after{content:"";display:table;clear:both}.column-group.gutters{margin-left:-1.25em}.column-group.gutters>[class*=all-],.column-group.gutters>[class*=small-]{padding-left:1.25em;margin-bottom:1.25em}.column-group.horizontal-gutters{margin-left:-1.25em}.column-group.horizontal-gutters>[class*=all-],.column-group.horizontal-gutters>[class*=small-]{padding-left:1.25em}.column-group.vertical-gutters>[class*=all-],.column-group.vertical-gutters>[class*=small-]{margin-bottom:1.25em}.column-group.double-gutters{margin-left:-2.5em}.column-group.double-gutters>[class*=all-],.column-group.double-gutters>[class*=small-]{padding-left:2.5em;margin-bottom:2.5em}.column-group.double-horizontal-gutters{margin-left:-2.5em}.column-group.double-horizontal-gutters>[class*=all-],.column-group.double-horizontal-gutters>[class*=small-]{padding-left:2.5em}.column-group.double-vertical-gutters>[class*=all-],.column-group.double-vertical-gutters>[class*=small-]{margin-bottom:2.5em}.column-group.half-gutters{margin-left:-.625em}.column-group.half-gutters>[class*=all-],.column-group.half-gutters>[class*=small-]{padding-left:.625em;margin-bottom:.625em}.column-group.half-horizontal-gutters{margin-left:-.625em}.column-group.half-horizontal-gutters>[class*=all-],.column-group.half-horizontal-gutters>[class*=small-]{padding-left:.625em}.column-group.half-vertical-gutters>[class*=all-],.column-group.half-vertical-gutters>[class*=small-]{margin-bottom:.625em}.column-group.quarter-gutters{margin-left:-.3125em}.column-group.quarter-gutters>[class*=all-],.column-group.quarter-gutters>[class*=small-]{padding-left:.3125em;margin-bottom:.3125em}.column-group.quarter-horizontal-gutters{margin-left:-.3125em}.column-group.quarter-horizontal-gutters>[class*=all-],.column-group.quarter-horizontal-gutters>[class*=small-]{padding-left:.3125em}.column-group.quarter-vertical-gutters>[class*=all-],.column-group.quarter-vertical-gutters>[class*=small-]{margin-bottom:.3125em}.column-group.small-gutters{margin-left:-1.25em}.column-group.small-gutters>[class*=all-],.column-group.small-gutters>[class*=small-]{padding-left:.3125em;margin-bottom:.3125em}.column-group.small-horizontal-gutters{margin-left:-1.25em}.column-group.small-horizontal-gutters>[class*=all-],.column-group.small-horizontal-gutters>[class*=small-]{padding-left:1.25em}.column-group.small-vertical-gutters>[class*=all-],.column-group.small-vertical-gutters>[class*=small-]{margin-bottom:1.25em}.column-group.small-double-gutters{margin-left:-2.5em}.column-group.small-double-gutters>[class*=all-],.column-group.small-double-gutters>[class*=small-]{padding-left:2.5em;margin-bottom:2.5em}.column-group.small-double-horizontal-gutters{margin-left:-2.5em}.column-group.small-double-horizontal-gutters>[class*=all-],.column-group.small-double-horizontal-gutters>[class*=small-]{padding-left:2.5em}.column-group.small-double-vertical-gutters>[class*=all-],.column-group.small-double-vertical-gutters>[class*=small-]{margin-bottom:2.5em}.column-group.small-half-gutters{margin-left:-.625em}.column-group.small-half-gutters>[class*=all-],.column-group.small-half-gutters>[class*=small-]{padding-left:.625em;margin-bottom:.625em}.column-group.small-half-horizontal-gutters{margin-left:-.625em}.column-group.small-half-horizontal-gutters>[class*=all-],.column-group.small-half-horizontal-gutters>[class*=small-]{padding-left:.625em}.column-group.small-half-vertical-gutters>[class*=all-],.column-group.small-half-vertical-gutters>[class*=small-]{margin-bottom:.625em}.column-group.small-quarter-gutters{margin-left:-.3125em}.column-group.small-quarter-gutters>[class*=all-],.column-group.small-quarter-gutters>[class*=small-]{padding-left:.3125em;margin-bottom:.3125em}.column-group.small-quarter-horizontal-gutters{margin-left:-.3125em}.column-group.small-quarter-horizontal-gutters>[class*=all-],.column-group.small-quarter-horizontal-gutters>[class*=small-]{padding-left:.3125em}.column-group.small-quarter-vertical-gutters>[class*=all-],.column-group.small-quarter-vertical-gutters>[class*=small-]{margin-bottom:.3125em}.column-group.small-no-gutters{margin-left:0}.column-group.small-no-gutters>[class*=all-],.column-group.small-no-gutters>[class*=small-]{padding-left:0;margin-bottom:0}.ink-table tbody[class*=small-],.ink-table td[class*=small-],.ink-table tfoot[class*=small-],.ink-table th[class*=small-],.ink-table thead[class*=small-],.ink-table tr[class*=small-]{float:none}.small-push-left{float:left}.small-push-center{float:none;margin-left:auto;margin-right:auto}.small-push-right{float:right}.small-align-left{text-align:left}.small-align-center{text-align:center}.small-align-right{text-align:right}.small-no-margin{margin:0!important}.small-space,.space{margin:1.25em}.padding,.small-padding{padding:1.25em}.double-space,.small-double-space{margin:2.5em}.double-padding,.small-double-padding{padding:2.5em}.half-space,.small-half-space{margin:.625em}.half-padding,.small-half-padding{padding:.625em}.quarter-space,.small-quarter-space{margin:.3125em}.quarter-padding,.small-quarter-padding{padding:.3125em}.small-vertical-space,.vertical-space{margin-top:1.25em;margin-bottom:1.25em}.small-vertical-padding,.vertical-padding{padding-top:1.25em;padding-bottom:1.25em}.double-vertical-space,.small-double-vertical-space{margin-top:2.5em;margin-bottom:2.5em}.double-vertical-padding,.small-double-vertical-padding{padding-top:2.5em;padding-bottom:2.5em}.half-vertical-space,.small-half-vertical-space{margin-top:.625em;margin-bottom:.625em}.half-vertical-padding,.small-half-vertical-padding{padding-top:.625em;padding-bottom:.625em}.quarter-vertical-space,.small-quarter-vertical-space{margin-top:.3125em;margin-bottom:.3125em}.quarter-vertical-padding,.small-quarter-vertical-padding{padding-top:.3125em;padding-bottom:.3125em}.horizontal-space,.small-horizontal-space{margin-left:1.25em;margin-right:1.25em}.horizontal-padding,.small-horizontal-padding{padding-left:1.25em;padding-right:1.25em}.double-horizontal-space,.small-double-horizontal-space{margin-left:2.5em;margin-right:2.5em}.double-horizontal-padding,.small-double-horizontal-padding{padding-left:2.5em;padding-right:2.5em}.half-horizontal-space,.small-half-horizontal-space{margin-left:.625em;margin-right:.625em}.half-horizontal-padding,.small-half-horizontal-padding{padding-left:.625em;padding-right:.625em}.quarter-horizontal-space,.small-quarter-horizontal-space{margin-left:.3125em;margin-right:.3125em}.quarter-horizontal-padding,.small-quarter-horizontal-padding{padding-left:.3125em;padding-right:.3125em}.small-top-space,.top-space{margin-top:1.25em}.small-top-padding,.top-padding{padding-top:1.25em}.double-top-space,.small-double-top-space{margin-top:2.5em}.double-top-padding,.small-double-top-padding{padding-top:2.5em}.half-top-space,.small-half-top-space{margin-top:.625em}.half-top-padding,.small-half-top-padding{padding-top:.625em}.quarter-top-space,.small-quarter-top-space{margin-top:.3125em}.quarter-top-padding,.small-quarter-top-padding{padding-top:.3125em}.right-space,.small-right-space{margin-right:1.25em}.right-padding,.small-right-padding{padding-right:1.25em}.double-right-space,.small-double-right-space{margin-right:2.5em}.double-right-padding,.small-double-right-padding{padding-right:2.5em}.half-right-space,.small-half-right-space{margin-right:.625em}.half-right-padding,.small-half-right-padding{padding-right:.625em}.quarter-right-space,.small-quarter-right-space{margin-right:.3125em}.quarter-right-padding,.small-quarter-right-padding{padding-right:.3125em}.bottom-space,.small-bottom-space{margin-bottom:1.25em}.bottom-padding,.small-bottom-padding{padding-bottom:1.25em}.double-bottom-space,.small-double-bottom-space{margin-bottom:2.5em}.double-bottom-padding,.small-double-bottom-padding{padding-bottom:2.5em}.half-bottom-space,.small-half-bottom-space{margin-bottom:.625em}.half-bottom-padding,.small-half-bottom-padding{padding-bottom:.625em}.quarter-bottom-space,.small-quarter-bottom-space{margin-bottom:.3125em}.quarter-bottom-padding,.small-quarter-bottom-padding{padding-bottom:.3125em}.left-space,.small-left-space{margin-left:1.25em}.left-padding,.small-left-padding{padding-left:1.25em}.double-left-space,.small-double-left-space{margin-left:2.5em}.double-left-padding,.small-double-left-padding{padding-left:2.5em}.half-left-space,.small-half-left-space{margin-left:.625em}.half-left-padding,.small-half-left-padding{padding-left:.625em}.quarter-left-space,.small-quarter-left-space{margin-left:.3125em}.quarter-left-padding,.small-quarter-left-padding{padding-left:.3125em}.hide-small{display:none!important}.show-small{display:inherit!important}table.show-small{display:table}thead.show-small{display:table-header-group}tbody.show-small{display:table-row-group}tfoot.show-small{display:table-footer-group}tr.show-small{display:table-row}td.show-small,th.show-small{display:table-cell}}@media screen and (max-width:320px){.ink-grid{padding:0 1em}.column-group>[class*=tiny-]{float:left;clear:none}.tiny-5{width:5%}.tiny-10{width:10%}.tiny-15{width:15%}.tiny-20{width:20%}.tiny-25{width:25%}.tiny-30{width:30%}.tiny-33{width:33.33%}.tiny-35{width:35%}.tiny-40{width:40%}.tiny-45{width:45%}.tiny-50{width:50%}.tiny-55{width:55%}.tiny-60{width:60%}.tiny-65{width:65%}.tiny-66{width:66.66%}.tiny-70{width:70%}.tiny-75{width:75%}.tiny-80{width:80%}.tiny-85{width:85%}.tiny-90{width:90%}.tiny-95{width:95%}.tiny-100{width:100%}[class*=tiny-100]{float:none;clear:both}.column-group{*zoom:1}.column-group:after{content:"";display:table;clear:both}.column-group.gutters{margin-left:-1em}.column-group.gutters>[class*=all-],.column-group.gutters>[class*=tiny-]{padding-left:1em;margin-bottom:1em}.column-group.horizontal-gutters{margin-left:-1em}.column-group.horizontal-gutters>[class*=all-],.column-group.horizontal-gutters>[class*=tiny-]{padding-left:1em}.column-group.vertical-gutters>[class*=all-],.column-group.vertical-gutters>[class*=tiny-]{margin-bottom:1em}.column-group.double-gutters{margin-left:-2em}.column-group.double-gutters>[class*=all-],.column-group.double-gutters>[class*=tiny-]{padding-left:2em;margin-bottom:2em}.column-group.double-horizontal-gutters{margin-left:-2em}.column-group.double-horizontal-gutters>[class*=all-],.column-group.double-horizontal-gutters>[class*=tiny-]{padding-left:2em}.column-group.double-vertical-gutters>[class*=all-],.column-group.double-vertical-gutters>[class*=tiny-]{margin-bottom:2em}.column-group.half-gutters{margin-left:-.5em}.column-group.half-gutters>[class*=all-],.column-group.half-gutters>[class*=tiny-]{padding-left:.5em;margin-bottom:.5em}.column-group.half-horizontal-gutters{margin-left:-.5em}.column-group.half-horizontal-gutters>[class*=all-],.column-group.half-horizontal-gutters>[class*=tiny-]{padding-left:.5em}.column-group.half-vertical-gutters>[class*=all-],.column-group.half-vertical-gutters>[class*=tiny-]{margin-bottom:.5em}.column-group.quarter-gutters{margin-left:-.25em}.column-group.quarter-gutters>[class*=all-],.column-group.quarter-gutters>[class*=tiny-]{padding-left:.25em;margin-bottom:.25em}.column-group.quarter-horizontal-gutters{margin-left:-.25em}.column-group.quarter-horizontal-gutters>[class*=all-],.column-group.quarter-horizontal-gutters>[class*=tiny-]{padding-left:.25em}.column-group.quarter-vertical-gutters>[class*=all-],.column-group.quarter-vertical-gutters>[class*=tiny-]{margin-bottom:.25em}.column-group.tiny-gutters{margin-left:-1em}.column-group.tiny-gutters>[class*=all-],.column-group.tiny-gutters>[class*=tiny-]{padding-left:.25em;margin-bottom:.25em}.column-group.tiny-horizontal-gutters{margin-left:-1em}.column-group.tiny-horizontal-gutters>[class*=all-],.column-group.tiny-horizontal-gutters>[class*=tiny-]{padding-left:1em}.column-group.tiny-vertical-gutters>[class*=all-],.column-group.tiny-vertical-gutters>[class*=tiny-]{margin-bottom:1em}.column-group.tiny-double-gutters{margin-left:-2em}.column-group.tiny-double-gutters>[class*=all-],.column-group.tiny-double-gutters>[class*=tiny-]{padding-left:2em;margin-bottom:2em}.column-group.tiny-double-horizontal-gutters{margin-left:-2em}.column-group.tiny-double-horizontal-gutters>[class*=all-],.column-group.tiny-double-horizontal-gutters>[class*=tiny-]{padding-left:2em}.column-group.tiny-double-vertical-gutters>[class*=all-],.column-group.tiny-double-vertical-gutters>[class*=tiny-]{margin-bottom:2em}.column-group.tiny-half-gutters{margin-left:-.5em}.column-group.tiny-half-gutters>[class*=all-],.column-group.tiny-half-gutters>[class*=tiny-]{padding-left:.5em;margin-bottom:.5em}.column-group.tiny-half-horizontal-gutters{margin-left:-.5em}.column-group.tiny-half-horizontal-gutters>[class*=all-],.column-group.tiny-half-horizontal-gutters>[class*=tiny-]{padding-left:.5em}.column-group.tiny-half-vertical-gutters>[class*=all-],.column-group.tiny-half-vertical-gutters>[class*=tiny-]{margin-bottom:.5em}.column-group.tiny-quarter-gutters{margin-left:-.25em}.column-group.tiny-quarter-gutters>[class*=all-],.column-group.tiny-quarter-gutters>[class*=tiny-]{padding-left:.25em;margin-bottom:.25em}.column-group.tiny-quarter-horizontal-gutters{margin-left:-.25em}.column-group.tiny-quarter-horizontal-gutters>[class*=all-],.column-group.tiny-quarter-horizontal-gutters>[class*=tiny-]{padding-left:.25em}.column-group.tiny-quarter-vertical-gutters>[class*=all-],.column-group.tiny-quarter-vertical-gutters>[class*=tiny-]{margin-bottom:.25em}.column-group.tiny-no-gutters{margin-left:0}.column-group.tiny-no-gutters>[class*=all-],.column-group.tiny-no-gutters>[class*=tiny-]{padding-left:0;margin-bottom:0}.ink-table tbody[class*=tiny-],.ink-table td[class*=tiny-],.ink-table tfoot[class*=tiny-],.ink-table th[class*=tiny-],.ink-table thead[class*=tiny-],.ink-table tr[class*=tiny-]{float:none}.tiny-push-left{float:left}.tiny-push-center{float:none;margin-left:auto;margin-right:auto}.tiny-push-right{float:right}.tiny-align-left{text-align:left}.tiny-align-center{text-align:center}.tiny-align-right{text-align:right}.tiny-no-margin{margin:0!important}.space,.tiny-space{margin:1em}.padding,.tiny-padding{padding:1em}.double-space,.tiny-double-space{margin:2em}.double-padding,.tiny-double-padding{padding:2em}.half-space,.tiny-half-space{margin:.5em}.half-padding,.tiny-half-padding{padding:.5em}.quarter-space,.tiny-quarter-space{margin:.25em}.quarter-padding,.tiny-quarter-padding{padding:.25em}.tiny-vertical-space,.vertical-space{margin-top:1em;margin-bottom:1em}.tiny-vertical-padding,.vertical-padding{padding-top:1em;padding-bottom:1em}.double-vertical-space,.tiny-double-vertical-space{margin-top:2em;margin-bottom:2em}.double-vertical-padding,.tiny-double-vertical-padding{padding-top:2em;padding-bottom:2em}.half-vertical-space,.tiny-half-vertical-space{margin-top:.5em;margin-bottom:.5em}.half-vertical-padding,.tiny-half-vertical-padding{padding-top:.5em;padding-bottom:.5em}.quarter-vertical-space,.tiny-quarter-vertical-space{margin-top:.25em;margin-bottom:.25em}.quarter-vertical-padding,.tiny-quarter-vertical-padding{padding-top:.25em;padding-bottom:.25em}.horizontal-space,.tiny-horizontal-space{margin-left:1em;margin-right:1em}.horizontal-padding,.tiny-horizontal-padding{padding-left:1em;padding-right:1em}.double-horizontal-space,.tiny-double-horizontal-space{margin-left:2em;margin-right:2em}.double-horizontal-padding,.tiny-double-horizontal-padding{padding-left:2em;padding-right:2em}.half-horizontal-space,.tiny-half-horizontal-space{margin-left:.5em;margin-right:.5em}.half-horizontal-padding,.tiny-half-horizontal-padding{padding-left:.5em;padding-right:.5em}.quarter-horizontal-space,.tiny-quarter-horizontal-space{margin-left:.25em;margin-right:.25em}.quarter-horizontal-padding,.tiny-quarter-horizontal-padding{padding-left:.25em;padding-right:.25em}.tiny-top-space,.top-space{margin-top:1em}.tiny-top-padding,.top-padding{padding-top:1em}.double-top-space,.tiny-double-top-space{margin-top:2em}.double-top-padding,.tiny-double-top-padding{padding-top:2em}.half-top-space,.tiny-half-top-space{margin-top:.5em}.half-top-padding,.tiny-half-top-padding{padding-top:.5em}.quarter-top-space,.tiny-quarter-top-space{margin-top:.25em}.quarter-top-padding,.tiny-quarter-top-padding{padding-top:.25em}.right-space,.tiny-right-space{margin-right:1em}.right-padding,.tiny-right-padding{padding-right:1em}.double-right-space,.tiny-double-right-space{margin-right:2em}.double-right-padding,.tiny-double-right-padding{padding-right:2em}.half-right-space,.tiny-half-right-space{margin-right:.5em}.half-right-padding,.tiny-half-right-padding{padding-right:.5em}.quarter-right-space,.tiny-quarter-right-space{margin-right:.25em}.quarter-right-padding,.tiny-quarter-right-padding{padding-right:.25em}.bottom-space,.tiny-bottom-space{margin-bottom:1em}.bottom-padding,.tiny-bottom-padding{padding-bottom:1em}.double-bottom-space,.tiny-double-bottom-space{margin-bottom:2em}.double-bottom-padding,.tiny-double-bottom-padding{padding-bottom:2em}.half-bottom-space,.tiny-half-bottom-space{margin-bottom:.5em}.half-bottom-padding,.tiny-half-bottom-padding{padding-bottom:.5em}.quarter-bottom-space,.tiny-quarter-bottom-space{margin-bottom:.25em}.quarter-bottom-padding,.tiny-quarter-bottom-padding{padding-bottom:.25em}.left-space,.tiny-left-space{margin-left:1em}.left-padding,.tiny-left-padding{padding-left:1em}.double-left-space,.tiny-double-left-space{margin-left:2em}.double-left-padding,.tiny-double-left-padding{padding-left:2em}.half-left-space,.tiny-half-left-space{margin-left:.5em}.half-left-padding,.tiny-half-left-padding{padding-left:.5em}.quarter-left-space,.tiny-quarter-left-space{margin-left:.25em}.quarter-left-padding,.tiny-quarter-left-padding{padding-left:.25em}.hide-tiny{display:none!important}.show-tiny{display:inherit!important}table.show-tiny{display:table}thead.show-tiny{display:table-header-group}tbody.show-tiny{display:table-row-group}tfoot.show-tiny{display:table-footer-group}tr.show-tiny{display:table-row}td.show-tiny,th.show-tiny{display:table-cell}}@media screen and (min-width:1261px){html{font-size:1.08em}html:after{font-family:'{name:xlarge,{min:"1261px",max:""}}'}}@media screen and (min-width:961px) and (max-width:1260px){html{font-size:1.05em}html:after{font-family:'{name:large,{min:"961px",max:"1260px"}}'}}@media screen and (min-width:641px) and (max-width:960px){html{font-size:1em}html:after{font-family:'{name:medium,{min:"641px",max:"960px"}}'}}@media screen and (min-width:321px) and (max-width:640px){html{font-size:.98em}html:after{font-family:'{name:small,{min:"321px",max:"640px"}}'}}@media screen and (max-width:320px){html{font-size:.97em}html:after{font-family:'{name:tiny,{min:"",max:"320px"}}'}}.ink-label{padding:0 .35em;white-space:nowrap}.ink-navigation{overflow:visible}.ink-navigation ul{list-style-type:none;padding:0;margin:0}.ink-navigation ul li{margin:0}.ink-navigation .breadcrumbs li{line-height:2.7em;display:inline}.ink-navigation .breadcrumbs li a{display:inline;padding:0}.ink-navigation .breadcrumbs li a:hover{background:0 0}.ink-navigation .breadcrumbs li.active a{cursor:default;text-decoration:none}.ink-navigation .breadcrumbs li:first-child a{padding-left:1.2em}.ink-navigation .breadcrumbs li:after{content:'/';display:inline;margin:0 .7em}.ink-navigation .breadcrumbs li:last-child:after{content:'';display:none}.ink-dropdown ul.dropdown,.ink-dropdown ul.dropdown-menu,.ink-navigation ul.dropdown,.ink-navigation ul.dropdown-menu{display:inline-block;background:#fff;z-index:30;border:1px solid #d9d9d9;height:auto;width:auto;min-width:10em;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-box-shadow:rgba(100,100,100,.3) 0 0 1px 0;-moz-box-shadow:rgba(100,100,100,.3) 0 0 1px 0;box-shadow:rgba(100,100,100,.3) 0 0 1px 0;margin-left:0;padding:.35em 0;font-size:.85em}.ink-dropdown ul.dropdown li,.ink-dropdown ul.dropdown-menu li,.ink-navigation ul.dropdown li,.ink-navigation ul.dropdown-menu li{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:none;-moz-border-radius:none;-ms-border-radius:none;-o-border-radius:none;border-radius:none;width:auto;height:auto;min-height:auto;display:list-item;float:none;margin:0;text-align:left;text-transform:none;padding:0;position:relative;list-style-type:none}.ink-dropdown ul.dropdown li.separator-above,.ink-dropdown ul.dropdown-menu li.separator-above,.ink-navigation ul.dropdown li.separator-above,.ink-navigation ul.dropdown-menu li.separator-above{padding-top:.35em;margin-top:.35em;border-top:1px solid #d9d9d9}.ink-dropdown ul.dropdown li.separator-below,.ink-dropdown ul.dropdown-menu li.separator-below,.ink-navigation ul.dropdown li.separator-below,.ink-navigation ul.dropdown-menu li.separator-below{padding-bottom:.35em;margin-bottom:.35em;border-bottom:1px solid #d9d9d9}.ink-dropdown ul.dropdown li.heading,.ink-dropdown ul.dropdown-menu li.heading,.ink-navigation ul.dropdown li.heading,.ink-navigation ul.dropdown-menu li.heading{font-weight:700;margin-bottom:.35em;padding:.5em .8em;color:#333}.ink-dropdown ul.dropdown li a,.ink-dropdown ul.dropdown-menu li a,.ink-navigation ul.dropdown li a,.ink-navigation ul.dropdown-menu li a{color:#444;padding:.5em .8em;display:block;clear:both}.ink-dropdown ul.dropdown li a:hover,.ink-dropdown ul.dropdown-menu li a:hover,.ink-navigation ul.dropdown li a:hover,.ink-navigation ul.dropdown-menu li a:hover{background:#f2f2f2;text-decoration:none}.ink-dropdown ul.dropdown li.active a,.ink-dropdown ul.dropdown-menu li.active a,.ink-navigation ul.dropdown li.active a,.ink-navigation ul.dropdown-menu li.active a{background:#999;color:#fff}.ink-dropdown ul.dropdown li.disabled a,.ink-dropdown ul.dropdown-menu li.disabled a,.ink-navigation ul.dropdown li.disabled a,.ink-navigation ul.dropdown-menu li.disabled a{color:#b3b3b3}.ink-dropdown ul.dropdown li.disabled a:hover,.ink-dropdown ul.dropdown-menu li.disabled a:hover,.ink-navigation ul.dropdown li.disabled a:hover,.ink-navigation ul.dropdown-menu li.disabled a:hover{background:0 0;cursor:default}.ink-dropdown ul.dropdown li.submenu,.ink-dropdown ul.dropdown-menu li.submenu,.ink-navigation ul.dropdown li.submenu,.ink-navigation ul.dropdown-menu li.submenu{overflow:visible}.ink-dropdown ul.dropdown li.submenu>a,.ink-dropdown ul.dropdown-menu li.submenu>a,.ink-navigation ul.dropdown li.submenu>a,.ink-navigation ul.dropdown-menu li.submenu>a{white-space:nowrap}.ink-dropdown ul.dropdown li.submenu>a:after,.ink-dropdown ul.dropdown-menu li.submenu>a:after,.ink-navigation ul.dropdown li.submenu>a:after,.ink-navigation ul.dropdown-menu li.submenu>a:after{content:"\f0da";width:auto;margin-left:.8em;font-family:FontAwesome;color:#b3b3b3}.ink-dropdown ul.dropdown li.submenu:hover>a,.ink-dropdown ul.dropdown-menu li.submenu:hover>a,.ink-navigation ul.dropdown li.submenu:hover>a,.ink-navigation ul.dropdown-menu li.submenu:hover>a{background:#f2f2f2;text-decoration:none}.ink-dropdown ul.dropdown li.submenu:hover:hover>ul.dropdown,.ink-dropdown ul.dropdown li.submenu:hover:hover>ul.dropdown-menu,.ink-dropdown ul.dropdown-menu li.submenu:hover:hover>ul.dropdown,.ink-dropdown ul.dropdown-menu li.submenu:hover:hover>ul.dropdown-menu,.ink-navigation ul.dropdown li.submenu:hover:hover>ul.dropdown,.ink-navigation ul.dropdown li.submenu:hover:hover>ul.dropdown-menu,.ink-navigation ul.dropdown-menu li.submenu:hover:hover>ul.dropdown,.ink-navigation ul.dropdown-menu li.submenu:hover:hover>ul.dropdown-menu{display:block}.ink-dropdown ul.dropdown li.submenu>ul.dropdown,.ink-dropdown ul.dropdown li.submenu>ul.dropdown-menu,.ink-dropdown ul.dropdown-menu li.submenu>ul.dropdown,.ink-dropdown ul.dropdown-menu li.submenu>ul.dropdown-menu,.ink-navigation ul.dropdown li.submenu>ul.dropdown,.ink-navigation ul.dropdown li.submenu>ul.dropdown-menu,.ink-navigation ul.dropdown-menu li.submenu>ul.dropdown,.ink-navigation ul.dropdown-menu li.submenu>ul.dropdown-menu{font-size:inherit;position:absolute;top:-.36em;left:100%;display:none}.ink-navigation ul.pagination{overflow:hidden;*zoom:1}.ink-navigation ul.pagination li{line-height:1.7;float:left}.ink-navigation ul.pagination li a{padding:.5em 1em;display:block;float:left}.ink-navigation ul.pagination.dotted li a{display:block;height:1em;width:1em;margin-right:.6em;padding:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;text-indent:99999px}.ink-navigation ul.pagination.dotted li a:first-child,.ink-navigation ul.pagination.dotted li a:last-child{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%}.ink-navigation ul.pagination.chevron li{display:none}.ink-navigation ul.pagination.chevron li.next,.ink-navigation ul.pagination.chevron li.previous{display:block}.ink-navigation ul.pagination.chevron li.next a,.ink-navigation ul.pagination.chevron li.previous a{display:block;position:absolute;top:35%;padding:0 .5em;margin:0;font-family:FontAwesome;font-size:4em}.ink-navigation ul.pagination.chevron li.next a span,.ink-navigation ul.pagination.chevron li.previous a span{text-indent:-99999px;display:inline-block}.ink-navigation ul.pagination.chevron li.previous a{left:0}.ink-navigation ul.pagination.chevron li.previous a:after{content:"\f137"}.ink-navigation ul.pagination.chevron li.next a{right:0}.ink-navigation ul.pagination.chevron li.next a:after{content:"\f138"}.ink-navigation .pills{overflow:hidden;*zoom:1}.ink-navigation .pills li{overflow:hidden;display:block;float:left;margin:0 .5em .5em 0;line-height:1.7}.ink-navigation .pills li a{display:block;padding:.5em 1em}.ink-navigation .pills li a:hover{text-decoration:none}.ink-navigation .pills li.active a,.ink-navigation .pills li.disabled a{cursor:default}.ink-navigation ul{*height:100%}.ink-navigation ul.menu{*zoom:1}.ink-navigation ul.menu:after{content:"";display:table;clear:both}.ink-navigation ul.menu li{*height:100%}.ink-navigation ul.menu li:hover ul.submenu{display:block}.ink-navigation ul.menu li ul.submenu{display:none;position:absolute;z-index:10}.ink-navigation ul.menu li ul.submenu li{overflow:hidden}.ink-navigation ul.menu li ul.submenu li a{padding:.5em 1em;display:block;float:none}.ink-navigation ul.menu.horizontal li{float:left;position:relative}.ink-navigation ul.menu.horizontal li a{padding:.5em 1em;display:block;line-height:1.7}.ink-navigation ul.menu.horizontal li .control{margin-top:.3em}.ink-navigation ul.menu.horizontal li ul.submenu{min-width:100%;left:0;z-index:50}.ink-navigation ul.menu.horizontal li ul.submenu li{float:none}.ink-navigation ul.menu.vertical li{line-height:1.7;position:relative}.ink-navigation ul.menu.vertical li a{padding:.5em 1em;display:block}.ink-navigation ul.menu.vertical li ul.submenu{position:relative;top:auto;left:auto}.ink-navigation ul.menu.vertical li ul.submenu.flyout{position:absolute;min-width:8em;top:0;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.menu.vertical li ul.submenu.flyout.left{right:100%}.ink-navigation ul.menu.vertical li ul.submenu.flyout.right{left:100%}table.ink-table{width:100%;border-collapse:collapse;border-spacing:0}table.ink-table tr th{padding:5px 10px;line-height:1.3}table.ink-table tr th[data-sortable=true]:hover{cursor:pointer;text-decoration:underline}table.ink-table tr th[data-sortable=true]:hover i{text-decoration:none}table.ink-table tr th[data-sortable=true] i{padding-left:.5em}table.ink-table tr td{padding:5px 10px;line-height:1.3}table.ink-table.hover tbody tr:hover{cursor:pointer}table.ink-table.bordered{border-collapse:separate}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{color:#555;font-family:Roboto,Arial,Helvetica,sans-serif;line-height:1.45}.fw-100,.fw-light{font-weight:100}.fw-300,.fw-thin{font-weight:300}.fw-400,.fw-regular{font-weight:400}.fw-500,.fw-medium{font-weight:500}.fw-700,.fw-bold{font-weight:700}.fw-900,.fw-black{font-weight:900}.condensed-300,.condensed-thin{font-weight:200;font-family:Roboto_condensed,Arial,Helvetica,sans-serif}.condensed-400,.condensed-regular{font-weight:400;font-family:Roboto_condensed,Arial,Helvetica,sans-serif}.condensed-700,.condensed-bold{font-weight:700;font-family:Roboto_condensed,Arial,Helvetica,sans-serif}.slab-100,.slab-light{font-weight:100;font-family:Roboto_slab,Arial,Helvetica,sans-serif}.slab-300,.slab-thin{font-weight:300;font-family:Roboto_slab,Arial,Helvetica,sans-serif}.slab-400,.slab-regular{font-weight:400;font-family:Roboto_slab,Arial,Helvetica,sans-serif}.slab-700,.slab-bold{font-weight:700;font-family:Roboto_slab,Arial,Helvetica,sans-serif}.sans{font-family:Roboto,Arial,Helvetica,sans-serif}.serif{font-family:Times,"Times New Roman",serif}.monospace{font-family:Monaco,"Andale Mono","Courier New",monospace}.condensed{font-family:Roboto_condensed,Arial,Helvetica,sans-serif}.slab{font-family:Roboto_slab,Arial,Helvetica,sans-serif}.italic{font-style:italic}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalizer{text-transform:capitalize}.fa{font-size:14px}a{color:#6998c9;text-decoration:none;cursor:pointer}a:hover{color:#007ed5;text-decoration:underline}h1{font-size:2.2em;margin-top:0;margin-bottom:.57539em}h2{font-size:1.75em;margin-top:0;margin-bottom:.72334em}h3{font-size:1.5em;margin-top:0;margin-bottom:.8439em}h4{font-size:1.25em;margin-top:0;margin-bottom:1.01268em}h5,h6{font-size:1.1em;margin-top:0;margin-bottom:1.15077em}p,table{font-size:1em;margin-top:0;margin-bottom:1.26585em}h1:first-child,h2:first-child,h3:first-child,h4:first-child,h5:first-child,h6:first-child,p:first-child{margin-top:0}h1,h2,h3,h4,h5,h6{color:#404040;font-weight:700;line-height:1.16}small{color:#888}input,textarea{color:#666}h1 small,h2 small,h3 small,h4 small{color:#bbb;font-size:.6em;font-weight:100;line-height:1}mark{background:#dae5f2}address{color:#777;font-size:1em;line-height:1.4}address p{margin-top:0}address h6{color:#555}abbr:hover{cursor:help}blockquote{border-left:4px solid #ddd;padding-left:25px;margin:1em 0;font-weight:200;font-size:1.1em}blockquote small{font-size:.9em}blockquote small::after,blockquote small::before{content:' — '}.note{font-size:.9em;color:#777}.note strong{color:#555}.small{font-size:.75em}.medium{font-size:.85em}.large{font-size:1.2em}.extralarge{font-size:1.45em!important}hr{border:0;border-top:1px solid #ddd;margin:1em 0}.lead{font-size:1.1em;font-weight:700}ol,ul{line-height:1.4;padding:0 0 0 1.45;margin:1em 0}ol li,ul li{margin:.5em 0}ul.unstyled{list-style:none;padding-left:0}ul.unstyled ul{list-style:disc outside}ul.inline{list-style:none}ul.inline li{display:inline-block;padding:0 .5em}ul.inline li:first-child{padding:0 .5em 0 0}dl{margin:1em 0}dl dt{font-weight:700;margin:.5em 0}dl dd{margin:.5em 0 .5em 25px}dl.inline dt{float:left;clear:left;text-align:right;width:180px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:0}dl.inline dd{margin:.5em 0 .5em 200px}figure.ink-image{position:relative;border:1px solid #555}figure.ink-image>img{width:100%}figure.ink-image>figcaption{padding:1em;background:#fff;line-height:1.3}figure.ink-image>figcaption.over-bottom,figure.ink-image>figcaption.over-top{position:absolute;width:100%;left:0;border:0}figure.ink-image>figcaption.over-bottom.dark,figure.ink-image>figcaption.over-top.dark{color:#fff;background:rgba(0,0,0,.6)}figure.ink-image>figcaption.over-top{top:0;background:rgba(255,255,255,.7)}figure.ink-image>figcaption.over-bottom{bottom:0;background:rgba(255,255,255,.7)}figure.ink-image>figcaption.dark{color:#fff;background:#222}img{border:0;width:auto;max-width:100%;vertical-align:top}.ink-alert.basic,.ink-alert.block{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-alert.basic{background:rgba(255,156,0,.25);color:#b87814;border:1px solid #b87814}.ink-alert.basic .ink-dismiss{color:#b87814}.ink-alert.basic.success{background:rgba(74,155,23,.25);color:#38621d;border:1px solid #38621d}.ink-alert.basic.success .ink-dismiss{color:#38621d}.ink-alert.basic.error{background:rgba(201,17,17,.25);color:#891e1e;border:1px solid #891e1e}.ink-alert.basic.error .ink-dismiss{color:#891e1e}.ink-alert.basic.info{background:rgba(15,117,218,.25);color:#1e5b98;border:1px solid #1e5b98}.ink-alert.basic.info .ink-dismiss{color:#1e5b98}.ink-alert.block{border:1px solid #b87814;background:#fff}.ink-alert.block>h4{background:rgba(255,156,0,.3);color:#b87814}.ink-alert.block .ink-dismiss{color:#b87814}.ink-alert.block.success{border:1px solid #38621d;background:#fff}.ink-alert.block.success>h4{background:rgba(74,155,23,.3);color:#38621d}.ink-alert.block.success .ink-dismiss{color:#38621d}.ink-alert.block.error{border:1px solid #891e1e;background:#fff}.ink-alert.block.error>h4{background:rgba(201,17,17,.3);color:#891e1e}.ink-alert.block.error .ink-dismiss{color:#891e1e}.ink-alert.block.info{border:1px solid #1e5b98;background:#fff}.ink-alert.block.info>h4{background:rgba(15,117,218,.3);color:#1e5b98}.ink-alert.block.info .ink-dismiss{color:#1e5b98}.ink-alert .ink-dismiss{font-family:Arial,sans-serif;font-weight:700;text-shadow:#fff 0 1px 0;filter:alpha(Opacity=25);opacity:.25}.ink-alert .ink-dismiss:hover{filter:alpha(Opacity=60);opacity:.6}.ink-badge{-webkit-border-radius:8em;-moz-border-radius:8em;-ms-border-radius:8em;-o-border-radius:8em;border-radius:8em;color:#fff}.ink-badge.white{background:#fff;color:#555}.ink-badge.black{background:#000}.ink-badge.orange{background:#ff9c00}.ink-badge.red{background:#c91111}.ink-badge.green{background:#4a9b17}.ink-badge.blue{background:#0f75da}.ink-badge.yellow{background:#ffd500;color:#555}.ink-badge.grey{background:gray}.ink-badge+.ink-badge{margin-left:.2em}.ink-button{background:#d9d9d9;color:#000;border:1px solid #bfbfbf;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-button:active,.ink-button:hover{text-decoration:none;color:#000;background:#ccc;border:1px solid #b3b3b3;-webkit-box-shadow:rgba(0,0,0,.2) 0 1px 1px;-moz-box-shadow:rgba(0,0,0,.2) 0 1px 1px;box-shadow:rgba(0,0,0,.2) 0 1px 1px}.ink-button:focus{outline:0;background:#ccc;-webkit-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;-moz-box-shadow:rgba(0,0,0,.2) 0 1px 1px inset;box-shadow:rgba(0,0,0,.2) 0 1px 1px inset}.ink-button[disabled]{background:#e6e6e6;border:0}.ink-button[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.blue{color:#fff;background:#0f75da;border-color:#0c63b9}.ink-button.blue:active,.ink-button.blue:hover{background:#0d68c2;border-color:#0a56a1;color:#fff;text-decoration:none}.ink-button.blue:focus{background:#0d68c2}.ink-button.blue[disabled]{background:rgba(15,117,218,.6);border:0}.ink-button.blue[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.green{color:#fff;background:#4a9b17;border-color:#3e8313}.ink-button.green:active,.ink-button.green:hover{background:#3f8514;border-color:#336d10;color:#fff;text-decoration:none}.ink-button.green:focus{background:#3f8514}.ink-button.green[disabled]{background:rgba(74,155,23,.6);border:0}.ink-button.green[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.orange{color:#fff;background:#ff9c00;border-color:#d88400}.ink-button.orange:active,.ink-button.orange:hover{background:#e68c00;border-color:#bf7400;color:#fff;text-decoration:none}.ink-button.orange:focus{background:#e68c00}.ink-button.orange[disabled]{background:rgba(255,156,0,.6);border:0}.ink-button.orange[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.red{color:#fff;background:#c91111;border-color:#aa0e0e}.ink-button.red:active,.ink-button.red:hover{background:#b10f0f;border-color:#920c0c;color:#fff;text-decoration:none}.ink-button.red:focus{background:#b10f0f}.ink-button.red[disabled]{background:rgba(201,17,17,.6);border:0}.ink-button.red[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.black{color:#fff;background:#1a1a1a;border-color:#161616}.ink-button.black:active,.ink-button.black:hover{background:#0d0d0d;border-color:#090909;color:#fff;text-decoration:none}.ink-button.black:focus{background:#0d0d0d}.ink-button.black[disabled]{background:rgba(26,26,26,.6);border:0}.ink-button.black[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ink-button.white{color:#555;background:#fff;border-color:#d8d8d8}.ink-button.white:active,.ink-button.white:hover{background:#f2f2f2;border-color:#cbcbcb;color:#555;text-decoration:none}.ink-button.white:focus{background:#f2f2f2}.ink-button.white[disabled]{background:rgba(255,255,255,.6);border:0}.ink-button.white[disabled]:hover{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.button-group>.ink-button.blue:first-child{border-left:#0c63b9}.button-group>.ink-button.green:first-child{border-left:#3e8313}.button-group>.ink-button.orange:first-child{border-left:#d88400}.button-group>.ink-button.red:first-child{border-left:#aa0e0e}.button-group>.ink-button.black:first-child{border-left:#161616}.button-group>.ink-button.white:first-child{border-left:#d8d8d8}.ink-label{color:#fff;font-weight:300;font-size:.938em;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-label.white{background:#fff;color:#555}.ink-label.black{background:#000}.ink-label.orange{background:#ff9c00}.ink-label.red{background:#c91111}.ink-label.green{background:#4a9b17}.ink-label.blue{background:#0f75da}.ink-label.yellow{background:#ffd500;color:#555}.ink-label.grey{background:gray}.ink-label+.ink-label{margin-left:.2em}.ink-navigation ul.breadcrumbs{font-weight:300;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.breadcrumbs li.active a{background:0 0;color:#999}.ink-navigation ul.breadcrumbs li.active a:hover{cursor:default;text-decoration:none}.ink-navigation ul.breadcrumbs li a:hover{background:0 0;text-decoration:underline}.ink-navigation ul.breadcrumbs.white{background:#fff}.ink-navigation ul.breadcrumbs.white li a,.ink-navigation ul.breadcrumbs.white li:after{color:#555}.ink-navigation ul.breadcrumbs.white li.active a{color:#ccc;text-shadow:#fff 0 1px 0}.ink-navigation ul.breadcrumbs.grey{background:#d9d9d9}.ink-navigation ul.breadcrumbs.grey li a,.ink-navigation ul.breadcrumbs.grey li:after{color:#555}.ink-navigation ul.breadcrumbs.grey li.active a{color:#a6a6a6;text-shadow:#ededed 0 1px 0}.ink-navigation ul.breadcrumbs.black{background:#1a1a1a}.ink-navigation ul.breadcrumbs.black li a,.ink-navigation ul.breadcrumbs.black li:after{color:#fff}.ink-navigation ul.breadcrumbs.black li.active a{color:#666;text-shadow:#000 0 -1px 0}.ink-navigation ul.breadcrumbs.blue{background:#1b75ce}.ink-navigation ul.breadcrumbs.blue li a,.ink-navigation ul.breadcrumbs.blue li:after{color:#fff}.ink-navigation ul.breadcrumbs.blue li.active a{color:#08427b;text-shadow:#1884ef 0 1px 0}.ink-navigation ul.breadcrumbs.orange{background:#f2990d}.ink-navigation ul.breadcrumbs.orange li a,.ink-navigation ul.breadcrumbs.orange li:after{color:#fff}.ink-navigation ul.breadcrumbs.orange li.active a{color:#995e00;text-shadow:#ffa81f 0 1px 0}.ink-navigation ul.breadcrumbs.green{background:#4c9220}.ink-navigation ul.breadcrumbs.green li a,.ink-navigation ul.breadcrumbs.green li:after{color:#fff}.ink-navigation ul.breadcrumbs.green li.active a{color:#20420a;text-shadow:#57b61b 0 1px 0}.ink-navigation ul.breadcrumbs.red{background:#be1c1c}.ink-navigation ul.breadcrumbs.red li a,.ink-navigation ul.breadcrumbs.red li:after{color:#fff}.ink-navigation ul.breadcrumbs.red li.active a{color:#6b0909;text-shadow:#e51313 0 1px 0}.ink-dropdown.green ul.dropdown-menu li.active a{background:#4a9b17;color:#fff}.ink-dropdown.orange ul.dropdown-menu li.active a{background:#ff9c00;color:#fff}.ink-dropdown.red ul.dropdown-menu li.active a{background:#c91111;color:#fff}.ink-dropdown.black ul.dropdown-menu li.active a{background:#1a1a1a;color:#fff}.ink-dropdown.blue ul.dropdown-menu li.active a{background:#0f75da;color:#fff}.ink-navigation ul.menu{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.menu>li{font-weight:300}.ink-navigation ul.menu>li.active a{text-decoration:underline}.ink-navigation ul.menu>li.heading{font-weight:500}.ink-navigation ul.menu>li.disabled a{color:#b3b3b3;text-shadow:#fff 0 1px 0}.ink-navigation ul.menu>li.disabled a:hover{cursor:default;background:0 0;text-decoration:none}.ink-navigation ul.menu>li ul.submenu li{font-size:.875em}.ink-navigation ul.menu>li ul.submenu li a{border-bottom:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.vertical li a{border-bottom:1px solid rgba(0,0,0,.15)}.ink-navigation ul.menu.vertical li:first-child,.ink-navigation ul.menu.vertical li:first-child>a{-webkit-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;-ms-border-radius:2px 2px 0 0;-o-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.ink-navigation ul.menu.vertical li:last-child{-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}.ink-navigation ul.menu.vertical li:last-child>a{border-bottom:0;-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}.ink-navigation ul.menu.vertical li:last-child .submenu{-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}.ink-navigation ul.menu.vertical li:last-child .submenu.flyout{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.menu.vertical li:last-child .submenu li:last-child,.ink-navigation ul.menu.vertical li:last-child .submenu li:last-child a{-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}.ink-navigation ul.menu.horizontal>li:first-child,.ink-navigation ul.menu.horizontal>li:first-child a{-webkit-border-radius:2px 0 0 2px;-moz-border-radius:2px 0 0 2px;-ms-border-radius:2px 0 0 2px;-o-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.ink-navigation ul.menu.horizontal>li:last-child,.ink-navigation ul.menu.horizontal>li:last-child a{-webkit-border-radius:0 2px 2px 0;-moz-border-radius:0 2px 2px 0;-ms-border-radius:0 2px 2px 0;-o-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.ink-navigation ul.menu.horizontal>li ul.submenu{-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;background:#fff}.ink-navigation ul.menu.horizontal>li ul.submenu li:last-child{-webkit-border-radius:0 0 2px 2px;-moz-border-radius:0 0 2px 2px;-ms-border-radius:0 0 2px 2px;-o-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px}.ink-navigation ul.menu.horizontal>li ul.submenu li:last-child a{border-bottom:0}.ink-navigation ul.menu.white{background:#fff}.ink-navigation ul.menu.white li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.white li ul.submenu li a{color:#555}.ink-navigation ul.menu.white li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.white li.disabled a:hover{background:0 0}.ink-navigation ul.menu.white li.active{background:#e6e6e6}.ink-navigation ul.menu.white li.disabled a{color:#ccc;text-shadow:#fff 0 1px 0}.ink-navigation ul.menu.white li a{color:#555;text-decoration:none}.ink-navigation ul.menu.white li a:hover{background:#f2f2f2}.ink-navigation ul.menu.grey{background:#d9d9d9}.ink-navigation ul.menu.grey li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.grey li ul.submenu li a{color:#555}.ink-navigation ul.menu.grey li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.grey li.disabled a:hover{background:0 0}.ink-navigation ul.menu.grey li.active{background:#bfbfbf}.ink-navigation ul.menu.grey li.disabled a{color:#a6a6a6;text-shadow:#ededed 0 1px 0}.ink-navigation ul.menu.grey li a{color:#555;text-decoration:none}.ink-navigation ul.menu.grey li a:hover{background:#ccc}.ink-navigation ul.menu.black{background:#1a1a1a}.ink-navigation ul.menu.black li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.black li ul.submenu li a{color:#555}.ink-navigation ul.menu.black li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.black li.disabled a:hover{background:0 0}.ink-navigation ul.menu.black li.active{background:#333}.ink-navigation ul.menu.black li.disabled a{color:#666;text-shadow:#000 0 -1px 0}.ink-navigation ul.menu.black li a{color:#fff;text-decoration:none}.ink-navigation ul.menu.black li a:hover{background:#404040}.ink-navigation ul.menu.blue{background:#1b75ce}.ink-navigation ul.menu.blue li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.blue li ul.submenu li a{color:#555}.ink-navigation ul.menu.blue li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.blue li.disabled a:hover{background:0 0}.ink-navigation ul.menu.blue li.active{background:#0c5baa}.ink-navigation ul.menu.blue li.disabled a{color:#08427b;text-shadow:#2289f0 0 1px 0}.ink-navigation ul.menu.blue li a{color:#fff;text-decoration:none}.ink-navigation ul.menu.blue li a:hover{background:#0d68c2}.ink-navigation ul.menu.green{background:#4c9220}.ink-navigation ul.menu.green li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.green li ul.submenu li a{color:#555}.ink-navigation ul.menu.green li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.green li.disabled a:hover{background:0 0}.ink-navigation ul.menu.green li.active{background:#356f10}.ink-navigation ul.menu.green li.disabled a{color:#20420a;text-shadow:#5bbf1c 0 1px 0}.ink-navigation ul.menu.green li a{color:#fff;text-decoration:none}.ink-navigation ul.menu.green li a:hover{background:#3f8514}.ink-navigation ul.menu.orange{background:#f2990d}.ink-navigation ul.menu.orange li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.orange li ul.submenu li a{color:#555}.ink-navigation ul.menu.orange li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.orange li.disabled a:hover{background:0 0}.ink-navigation ul.menu.orange li.active{background:#cc7d00}.ink-navigation ul.menu.orange li.disabled a{color:#995e00;text-shadow:#ffac29 0 1px 0}.ink-navigation ul.menu.orange li a{color:#fff;text-decoration:none}.ink-navigation ul.menu.orange li a:hover{background:#e68c00}.ink-navigation ul.menu.red{background:#be1c1c}.ink-navigation ul.menu.red li ul.submenu{background:#fff;border:1px solid rgba(0,0,0,.1)}.ink-navigation ul.menu.red li ul.submenu li a{color:#555}.ink-navigation ul.menu.red li ul.submenu li a:hover{background:rgba(0,0,0,.05)}.ink-navigation ul.menu.red li.disabled a:hover{background:0 0}.ink-navigation ul.menu.red li.active{background:#9a0d0d}.ink-navigation ul.menu.red li.disabled a{color:#6b0909;text-shadow:#eb1717 0 1px 0}.ink-navigation ul.menu.red li a{color:#fff;text-decoration:none}.ink-navigation ul.menu.red li a:hover{background:#b10f0f}.ink-navigation ul.pagination{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.pagination li{font-weight:300}.ink-navigation ul.pagination li.active a{text-decoration:underline}.ink-navigation ul.pagination li.disabled a{color:#b3b3b3;text-shadow:#fff 0 1px 0}.ink-navigation ul.pagination li.disabled a:hover{cursor:default;background:0 0;text-decoration:none}.ink-navigation ul.pagination li:first-child,.ink-navigation ul.pagination li:first-child a{-webkit-border-radius:2px 0 0 2px;-moz-border-radius:2px 0 0 2px;-ms-border-radius:2px 0 0 2px;-o-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px}.ink-navigation ul.pagination li:last-child,.ink-navigation ul.pagination li:last-child a{-webkit-border-radius:0 2px 2px 0;-moz-border-radius:0 2px 2px 0;-ms-border-radius:0 2px 2px 0;-o-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0}.ink-navigation ul.pagination.white li{background:#fff}.ink-navigation ul.pagination.white li.active a{background:#e6e6e6}.ink-navigation ul.pagination.white li.disabled a{color:#ccc;background:fade(black,0);text-shadow:#fff 0 1px 0}.ink-navigation ul.pagination.white li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.white li a{color:#555;text-decoration:none}.ink-navigation ul.pagination.white li a:hover{background:#f2f2f2}.ink-navigation ul.pagination.grey li{background:#d9d9d9}.ink-navigation ul.pagination.grey li.active a{background:#bfbfbf}.ink-navigation ul.pagination.grey li.disabled a{color:#a6a6a6;background:fade(black,0);text-shadow:#ededed 0 1px 0}.ink-navigation ul.pagination.grey li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.grey li a{color:#555;text-decoration:none}.ink-navigation ul.pagination.grey li a:hover{background:#ccc}.ink-navigation ul.pagination.black li{background:#1a1a1a}.ink-navigation ul.pagination.black li.active a{background:#333}.ink-navigation ul.pagination.black li.disabled a{color:#666;background:fade(black,0);text-shadow:#000 0 -1px 0}.ink-navigation ul.pagination.black li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.black li a{color:#fff;text-decoration:none}.ink-navigation ul.pagination.black li a:hover{background:#292929}.ink-navigation ul.pagination.orange li{background:#f2990d}.ink-navigation ul.pagination.orange li.active a{background:#cc7d00}.ink-navigation ul.pagination.orange li.disabled a{color:#995e00;background:fade(black,0);text-shadow:#ffac29 0 1px 0}.ink-navigation ul.pagination.orange li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.orange li a{color:#fff;text-decoration:none}.ink-navigation ul.pagination.orange li a:hover{background:#e68c00}.ink-navigation ul.pagination.blue li{background:#1b75ce}.ink-navigation ul.pagination.blue li.active a{background:#0c5baa}.ink-navigation ul.pagination.blue li.disabled a{color:#08427b;background:fade(black,0);text-shadow:#2289f0 0 1px 0}.ink-navigation ul.pagination.blue li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.blue li a{color:#fff;text-decoration:none}.ink-navigation ul.pagination.blue li a:hover{background:#0d68c2}.ink-navigation ul.pagination.green li{background:#4c9220}.ink-navigation ul.pagination.green li.active a{background:#356f10}.ink-navigation ul.pagination.green li.disabled a{color:#20420a;background:fade(black,0);text-shadow:#5bbf1c 0 1px 0}.ink-navigation ul.pagination.green li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.green li a{color:#fff;text-decoration:none}.ink-navigation ul.pagination.green li a:hover{background:#3f8514}.ink-navigation ul.pagination.red li{background:#be1c1c}.ink-navigation ul.pagination.red li.active a{background:#9a0d0d}.ink-navigation ul.pagination.red li.disabled a{color:#6b0909;background:fade(black,0);text-shadow:#eb1717 0 1px 0}.ink-navigation ul.pagination.red li.disabled a:hover{background:0 0}.ink-navigation ul.pagination.red li a{color:#fff;text-decoration:none}.ink-navigation ul.pagination.red li a:hover{background:#b10f0f}.ink-navigation ul.pagination.dotted li{background:0 0}.ink-navigation ul.pagination.dotted li a{background:#999;filter:alpha(Opacity=50);opacity:.5}.ink-navigation ul.pagination.dotted li.active a,.ink-navigation ul.pagination.dotted li:hover a{filter:alpha(Opacity=100);opacity:1}.ink-navigation ul.pagination.dotted.black li a{background:#1a1a1a}.ink-navigation ul.pagination.dotted.white li a{background:#fff}.ink-navigation ul.pagination.dotted.blue li a{background:#1b75ce}.ink-navigation ul.pagination.dotted.green li a{background:#4c9220}.ink-navigation ul.pagination.dotted.orange li a{background:#f2990d}.ink-navigation ul.pagination.dotted.red li a{background:#be1c1c}.ink-navigation ul.pagination.chevron li.next a,.ink-navigation ul.pagination.chevron li.previous a{color:#fff;filter:alpha(Opacity=60);opacity:.6}.ink-navigation ul.pagination.chevron li.next a.active,.ink-navigation ul.pagination.chevron li.next a:focus,.ink-navigation ul.pagination.chevron li.next a:hover,.ink-navigation ul.pagination.chevron li.previous a.active,.ink-navigation ul.pagination.chevron li.previous a:focus,.ink-navigation ul.pagination.chevron li.previous a:hover{filter:alpha(Opacity=80);opacity:.8;text-decoration:none;background:0 0}.ink-navigation ul.pagination.chevron li.disabled a{color:#fff;filter:alpha(Opacity=60);opacity:.6;text-shadow:none}.ink-navigation ul.pagination.chevron li.disabled a:focus,.ink-navigation ul.pagination.chevron li.disabled a:hover{color:#fff;filter:alpha(Opacity=60);opacity:.6}.ink-navigation ul.pagination.chevron.black li.disabled a,.ink-navigation ul.pagination.chevron.black li.next a,.ink-navigation ul.pagination.chevron.black li.previous a{color:#1a1a1a}.ink-navigation ul.pagination.chevron.grey li.disabled a,.ink-navigation ul.pagination.chevron.grey li.next a,.ink-navigation ul.pagination.chevron.grey li.previous a{color:#d9d9d9}.ink-navigation ul.pagination.chevron.blue li.disabled a,.ink-navigation ul.pagination.chevron.blue li.next a,.ink-navigation ul.pagination.chevron.blue li.previous a{color:#1b75ce}.ink-navigation ul.pagination.chevron.green li.disabled a,.ink-navigation ul.pagination.chevron.green li.next a,.ink-navigation ul.pagination.chevron.green li.previous a{color:#4c9220}.ink-navigation ul.pagination.chevron.orange li.disabled a,.ink-navigation ul.pagination.chevron.orange li.next a,.ink-navigation ul.pagination.chevron.orange li.previous a{color:#f2990d}.ink-navigation ul.pagination.chevron.red li.disabled a,.ink-navigation ul.pagination.chevron.red li.next a,.ink-navigation ul.pagination.chevron.red li.previous a{color:#be1c1c}.ink-navigation ul.pills li{background:#fff;font-weight:300;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-navigation ul.pills li a{color:#555;background:0 0}.ink-navigation ul.pills li a:hover,.ink-navigation ul.pills li.active a{background:#e6e6e6}.ink-navigation ul.pills li.disabled a{color:#999;text-shadow:#fff 0 1px 0}.ink-navigation ul.pills li.disabled a:hover{background:0 0}.ink-navigation ul.pills.grey li{background:#d9d9d9}.ink-navigation ul.pills.grey li.active a{background:#bfbfbf}.ink-navigation ul.pills.grey li.disabled a{color:#a6a6a6;text-shadow:#ededed 0 1px 0}.ink-navigation ul.pills.grey li.disabled a:hover{background:0 0}.ink-navigation ul.pills.grey li a{color:#555}.ink-navigation ul.pills.grey li a:hover{background:#ccc}.ink-navigation ul.pills.black li{background:#1a1a1a}.ink-navigation ul.pills.black li.active a{background:#333}.ink-navigation ul.pills.black li.disabled a{color:#666;text-shadow:#000 0 -1px 0}.ink-navigation ul.pills.black li.disabled a:hover{background:0 0}.ink-navigation ul.pills.black li a{color:#fff}.ink-navigation ul.pills.black li a:hover{background:#292929}.ink-navigation ul.pills.blue li{background:#1b75ce}.ink-navigation ul.pills.blue li.active a{background:#0c5baa}.ink-navigation ul.pills.blue li.disabled a{color:#08427b;text-shadow:#2289f0 0 1px 0}.ink-navigation ul.pills.blue li.disabled a:hover{background:0 0}.ink-navigation ul.pills.blue li a{color:#fff}.ink-navigation ul.pills.blue li a:hover{background:#0d68c2}.ink-navigation ul.pills.green li{background:#4c9220}.ink-navigation ul.pills.green li.active a{background:#356f10}.ink-navigation ul.pills.green li.disabled a{color:#20420a;text-shadow:#5bbf1c 0 1px 0}.ink-navigation ul.pills.green li.disabled a:hover{background:0 0}.ink-navigation ul.pills.green li a{color:#fff}.ink-navigation ul.pills.green li a:hover{background:#3f8514}.ink-navigation ul.pills.orange li{background:#f2990d}.ink-navigation ul.pills.orange li.active a{background:#cc7d00}.ink-navigation ul.pills.orange li.disabled a{color:#995e00;text-shadow:#ffac29 0 1px 0}.ink-navigation ul.pills.orange li.disabled a:hover{background:0 0}.ink-navigation ul.pills.orange li a{color:#fff}.ink-navigation ul.pills.orange li a:hover{background:#e68c00}.ink-navigation ul.pills.red li{background:#be1c1c}.ink-navigation ul.pills.red li.active a{background:#9a0d0d}.ink-navigation ul.pills.red li.disabled a{color:#6b0909;text-shadow:#eb1717 0 1px 0}.ink-navigation ul.pills.red li.disabled a:hover{background:0 0}.ink-navigation ul.pills.red li a{color:#fff}.ink-navigation ul.pills.red li a:hover{background:#b10f0f}table.ink-table{background:#fff}table.ink-table tr td,table.ink-table tr th{border-bottom:#bbb 1px solid;background:0 0}table.ink-table tfoot tr td,table.ink-table tfoot tr th{border-top:#bbb 1px solid}table.ink-table.alternating tbody tr:nth-child(odd){background-color:#f5f5f5}table.ink-table.hover tbody tr:hover{background:#fefbd6;color:#555}table.ink-table.bordered{border:#bbb 1px solid;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}table.ink-table.bordered tr th{border-left:#bbb 1px solid}table.ink-table.bordered tr th:first-child{border-left:0}table.ink-table.bordered tr:last-child td{border-bottom:0}table.ink-table.bordered tr td{border-left:#bbb 1px solid}table.ink-table.bordered tr td:first-child{border-left:0}table.ink-table tbody>tr.red td{background:#c91111;color:#fff}table.ink-table tbody>tr.green td{background:#4a9b17;color:#fff}table.ink-table tbody>tr.blue td{background:#0f75da;color:#fff}table.ink-table tbody>tr.orange td{background:#ff9c00;color:#fff}table.ink-table tbody>tr.black td{background:#000;color:#ccc}table.ink-table tbody>tr.yellow td{background:#ffd500;color:#000}.animated.slow{animation-duration:1s}.animated.medium{animation-duration:.5s}.animated.fast{animation-duration:.2s}.ink-carousel{width:100%;position:relative;overflow:hidden;display:block}.ink-carousel .stage{left:0;height:auto!important;margin-top:0;margin-bottom:0;padding-left:0;list-style-type:none;white-space:nowrap;position:relative;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease}.ink-carousel .stage .slide{position:relative;display:inline-block;vertical-align:top;white-space:normal;margin:0;float:none;zoom:1;*display:inline}.ink-datepicker-wrapper{position:relative}.ink-datepicker-calendar{margin-top:0;position:absolute}.ink-datepicker-calendar.right{left:100%;top:0}.ink-datepicker-calendar.left{right:100%;top:0}.ink-datepicker-calendar.bottom{top:100%;left:0}.ink-datepicker-calendar.top{bottom:100%;left:0}.ink-datepicker-calendar,.ink-datepicker-wrapper{display:inline;display:inline-block}.ink-calendar{-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;text-align:center;padding:.3em;min-width:17.4em;font-size:13px;-webkit-box-shadow:rgba(0,0,0,.4) 0 1px 2px 0;-moz-box-shadow:rgba(0,0,0,.4) 0 1px 2px 0;box-shadow:rgba(0,0,0,.4) 0 1px 2px 0;background:#fff;z-index:10}.ink-calendar a{text-decoration:none}.ink-calendar li{list-style:none inside}html.ink-modal-is-open .ink-calendar{z-index:101}.ink-calendar-top-options{padding:5px;font-size:.813em;cursor:pointer}.ink-calendar-top-options .clean{float:left}.ink-calendar-top-options .close{float:right}.ink-calendar-top{line-height:2em;background:#e6e6e6;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-calendar-top div{float:left}.ink-calendar-top .ink-calendar-next,.ink-calendar-top .ink-calendar-prev{width:10%}.ink-calendar-top .ink-calendar-next a,.ink-calendar-top .ink-calendar-prev a{display:block}.ink-calendar-top .ink-calendar-month_desc{width:80%}.ink-calendar-month,.ink-calendar-month-selector,.ink-calendar-year-selector{margin-top:.5em;padding-left:0}.ink-calendar-month li a,.ink-calendar-month-selector li a,.ink-calendar-year-selector li a{margin:0;line-height:2em;vertical-align:middle;display:block;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;color:#444}.ink-calendar-month li a:hover,.ink-calendar-month-selector li a:hover,.ink-calendar-year-selector li a:hover{background:#e6e6e6}.ink-calendar-month li a.ink-calendar-on,.ink-calendar-month li a.ink-calendar-on:hover,.ink-calendar-month-selector li a.ink-calendar-on,.ink-calendar-month-selector li a.ink-calendar-on:hover,.ink-calendar-year-selector li a.ink-calendar-on,.ink-calendar-year-selector li a.ink-calendar-on:hover{background:#0069d6;color:#fff}.ink-calendar-month li a.ink-calendar-off,.ink-calendar-month li a.ink-calendar-off:hover,.ink-calendar-month-selector li a.ink-calendar-off,.ink-calendar-month-selector li a.ink-calendar-off:hover,.ink-calendar-year-selector li a.ink-calendar-off,.ink-calendar-year-selector li a.ink-calendar-off:hover{background:#fff;color:#aaa;cursor:default}.ink-calendar-month ul,.ink-calendar-month-selector ul,.ink-calendar-year-selector ul{clear:both;padding-left:0}.ink-calendar-month ul li,.ink-calendar-month-selector ul li,.ink-calendar-year-selector ul li{width:2.4em;float:left;text-align:center;padding:0;margin:0}.ink-calendar-month-selector ul li,.ink-calendar-year-selector ul li{width:25%}.ink-calendar-month-selector,.ink-calendar-year-selector{display:none}.action_inactive,.ink-calendar-off{color:#ddd!important}.ink-calendar-month .ink-calendar-header{border-bottom:1px solid rgba(0,0,0,.1);padding-bottom:.5em;margin-bottom:.5em;color:#aaa}.ink-calendar-middle,.ink-calendar-month .ink-calendar-header,.ink-calendar-month .ink-calendar-middle ul,.ink-calendar-top,.ink-calendar-top-options{*zoom:1}.ink-calendar-middle:after,.ink-calendar-month .ink-calendar-header:after,.ink-calendar-month .ink-calendar-middle ul:after,.ink-calendar-top-options:after,.ink-calendar-top:after{content:"";display:table;clear:both}body.ink-drawer{max-width:100%}body.ink-drawer .content-drawer,body.ink-drawer .left-drawer,body.ink-drawer .right-drawer{-webkit-transition-property:translate3d;-moz-transition-property:translate3d;-o-transition-property:translate3d;transition-property:translate3d;-webkit-transition-duration:300ms;-moz-transition-duration:300ms;-o-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.86,0,.07,1);-moz-transition-timing-function:cubic-bezier(0.86,0,.07,1);-o-transition-timing-function:cubic-bezier(0.86,0,.07,1);transition-timing-function:cubic-bezier(0.86,0,.07,1)}body.ink-drawer .left-drawer{left:-220px}body.ink-drawer .right-drawer{right:-220px}body.ink-drawer .content-drawer{width:100%}body.ink-drawer .left-drawer,body.ink-drawer .right-drawer{position:absolute;top:0;z-index:0;display:none;overflow-x:hidden;overflow-y:auto;width:220px;height:100%;-webkit-overflow-scrolling:touch}body.ink-drawer .left-drawer.show,body.ink-drawer .right-drawer.show{display:block}body.ink-drawer.push{overflow:hidden;width:100%;height:100%;position:fixed}body.ink-drawer.push .content-drawer{overflow:hidden}body.ink-drawer.push.left .content-drawer,body.ink-drawer.push.left .left-drawer{-webkit-transform:translate3d(220px,0,0);-moz-transform:translate3d(220px,0,0);-ms-transform:translate3d(220px,0,0);-o-transform:translate3d(220px,0,0);transform:translate3d(220px,0,0)}body.ink-drawer.push.right .content-drawer,body.ink-drawer.push.right .right-drawer{-webkit-transform:translate3d(-220px,0,0);-moz-transform:translate3d(-220px,0,0);-ms-transform:translate3d(-220px,0,0);-o-transform:translate3d(-220px,0,0);transform:translate3d(-220px,0,0)}body.ink-drawer.over{overflow:hidden;-webkit-user-drag:none}body.ink-drawer.over.left .left-drawer{-webkit-transform:translate3d(220px,0,0);-moz-transform:translate3d(220px,0,0);-ms-transform:translate3d(220px,0,0);-o-transform:translate3d(220px,0,0);transform:translate3d(220px,0,0)}body.ink-drawer.over.right .right-drawer{-webkit-transform:translate3d(-220px,0,0);-moz-transform:translate3d(-220px,0,0);-ms-transform:translate3d(-220px,0,0);-o-transform:translate3d(-220px,0,0);transform:translate3d(-220px,0,0)}.ink-shade{background:rgba(0,0,0,.8);width:100%;height:100%;top:0;right:0;bottom:0;left:0;margin-top:0;position:fixed;z-index:100;display:none;filter:alpha(Opacity=0);opacity:0}.ink-shade.fade{-webkit-transition:opacity 300ms;-moz-transition:opacity 300ms;-o-transition:opacity 300ms;transition:opacity 300ms}.ink-shade.visible{filter:alpha(Opacity=100);opacity:1}.ink-modal{top:50%;left:50%;width:90%;height:90%;background:#fff;z-index:100;position:absolute;border:1px #666 solid;overflow:hidden;filter:alpha(Opacity=100);opacity:1;-webkit-box-shadow:rgba(0,0,0,.8) 0 0 15px 0;-moz-box-shadow:rgba(0,0,0,.8) 0 0 15px 0;box-shadow:rgba(0,0,0,.8) 0 0 15px 0;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;*zoom:1}.ink-modal:after{content:"";display:table;clear:both}.ink-modal>.modal-body{padding:1em;overflow-y:auto;overflow-x:hidden;height:auto}.ink-modal>.modal-body .ink-grid{padding-left:0;padding-right:0;width:100%;min-width:100%}.ink-modal>.modal-header,.ink-modal>header{border-bottom:1px #e6e6e6 solid;overflow:hidden;-webkit-box-shadow:rgba(175,175,175,.2) 0 1px 2px 0;-moz-box-shadow:rgba(175,175,175,.2) 0 1px 2px 0;box-shadow:rgba(175,175,175,.2) 0 1px 2px 0}.ink-modal>.modal-header>.modal-close,.ink-modal>header>.modal-close{padding-top:2px;text-align:center;color:#fff;width:26px;height:26px;line-height:1.2em;border:0;background:#bfbfbf;font-size:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;text-shadow:rgba(0,0,0,.6) 0 -1px 0;filter:alpha(Opacity=60);opacity:.6;float:right}.ink-modal>.modal-header>.modal-close:after,.ink-modal>header>.modal-close:after{content:"\f00d";font-family:FontAwesome;font-size:medium;line-height:22px}.ink-modal>.modal-header>.modal-close:hover,.ink-modal>header>.modal-close:hover{filter:alpha(Opacity=100);opacity:1}.ink-modal>.modal-footer,.ink-modal>footer{background:#e6e6e6;margin-bottom:0;zoom:1;-webkit-box-shadow:rgba(175,175,175,.2) 0 -1px 2px 0;-moz-box-shadow:rgba(175,175,175,.2) 0 -1px 2px 0;box-shadow:rgba(175,175,175,.2) 0 -1px 2px 0}.ink-modal>.modal-footer,.ink-modal>.modal-header,.ink-modal>footer,.ink-modal>header{padding:.8em 1em .65em}.ink-modal>.modal-footer:after,.ink-modal>.modal-footer:before,.ink-modal>.modal-header:after,.ink-modal>.modal-header:before,.ink-modal>footer:after,.ink-modal>footer:before,.ink-modal>header:after,.ink-modal>header:before{content:".";display:block;height:0;clear:both;visibility:hidden}.ink-modal-open{overflow:hidden}.ink-progress-bar{margin-bottom:1em;overflow:hidden;background:#f2f2f2;position:relative;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-box-shadow:0,1px,3px,0,rgba(0,0,0,.2),inset;-moz-box-shadow:0,1px,3px,0,rgba(0,0,0,.2),inset;box-shadow:0,1px,3px,0,rgba(0,0,0,.2),inset}.ink-progress-bar .caption{position:absolute;top:0;left:0;width:100%;height:100%;line-height:1.7;text-align:center;color:#000;font-size:.813em;z-index:10}.ink-progress-bar .bar{height:1.3em;text-shadow:rgba(0,0,0,.25),0,1px,0;-webkit-box-shadow:0,1px,1px,0,rgba(0,0,0,.1),inset;-moz-box-shadow:0,1px,1px,0,rgba(0,0,0,.1),inset;box-shadow:0,1px,1px,0,rgba(0,0,0,.1),inset;-webkit-transition-property:width;-moz-transition-property:width;-o-transition-property:width;transition-property:width;-webkit-transition-duration:.6s;-moz-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s;-webkit-transition-timing-function:ease;-moz-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.ink-progress-bar .bar.grey{background:#ccc;color:#555}.ink-progress-bar .bar.green{background:#4a9b17;color:#fff}.ink-progress-bar .bar.blue{background:#0f75da;color:#fff}.ink-progress-bar .bar.red{background:#c91111;color:#fff}.ink-progress-bar .bar.orange{background:#ff9c00;color:#555}.ink-progress-bar .bar.black{background:#000;color:#fff}.dragging,.ink-sortable-list li{cursor:move;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none;-ms-user-drag:none;-moz-user-drag:none;-khtml-user-drag:none;-webkit-user-drag:none;-o-user-drag:none;user-drag:none}.drag,.ink-sortable-list li.placeholder{-webkit-box-shadow:0,0,10px,0,rgba(0,0,0,.3);-moz-box-shadow:0,0,10px,0,rgba(0,0,0,.3);box-shadow:0,0,10px,0,rgba(0,0,0,.3)}.ink-sortable-list li{margin:0;border-bottom:1px solid #ccc;line-height:40px}.ink-sortable-list li.placeholder,.ink-sortable-list li:hover{background:#ccc;background:rgba(204,204,204,.2)}.ink-sortable-list li .ink-label{margin:0 .8em}.ink-sticky-stuck{position:fixed}.ink-tabs .tabs-nav{list-style:none;padding:0;*zoom:1}.ink-tabs .tabs-nav li{line-height:1.7;position:relative;margin:0}.ink-tabs .tabs-nav li a{padding:.5em 1em;display:block}.ink-tabs .tabs-nav li a:hover{background:#f0f0f0}.ink-tabs .tabs-nav li.active a{color:#555;cursor:default;text-decoration:none;background:#fff;border:1px solid #ccc}.ink-tabs .tabs-nav:after{content:"";display:table;clear:both}.ink-tabs .tabs-content{margin-top:1.5em;overflow:auto}.ink-tabs.top>.tabs-nav{border-bottom:1px solid #ccc}.ink-tabs.top>.tabs-nav li{float:left}.ink-tabs.top>.tabs-nav li a{margin-right:.4em;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-ms-border-radius:4px 4px 0 0;-o-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.ink-tabs.top>.tabs-nav li.active{margin:0 0 -2px 0}.ink-tabs.top>.tabs-nav li.active a{border-bottom-color:transparent}.ink-tabs.bottom>.tabs-nav{border-top:1px solid #ccc}.ink-tabs.bottom>.tabs-nav li{float:left}.ink-tabs.bottom>.tabs-nav li a{margin-right:.4em;-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-ms-border-radius:0 0 4px 4px;-o-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.ink-tabs.bottom>.tabs-nav li.active{margin:-2px 0 0 0}.ink-tabs.bottom>.tabs-nav li.active a{border-top-color:transparent}.ink-tabs.left>.tabs-nav{border-right:1px solid #ccc;float:left;margin-right:2em}.ink-tabs.left>.tabs-nav li{float:none;text-align:right}.ink-tabs.left>.tabs-nav li a{margin-bottom:.4em;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;-ms-border-radius:4px 0 0 4px;-o-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.ink-tabs.left>.tabs-nav li.active{margin:0 -2px 0 0}.ink-tabs.left>.tabs-nav li.active a{border-right-color:transparent}.ink-tabs.right>.tabs-nav{border-left:1px solid #ccc;float:right;margin-left:2em}.ink-tabs.right>.tabs-nav li{float:none}.ink-tabs.right>.tabs-nav li a{margin-bottom:.4em;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-ms-border-radius:0 4px 4px 0;-o-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.ink-tabs.right>.tabs-nav li.active{margin:0 0 0 -2px}.ink-tabs.right>.tabs-nav li.active a{border-left-color:transparent}.ink-tagfield input[type=text].new-tag-input{background-color:#fff;border:1px solid #ccc;line-height:1em;margin:0;padding:5px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.ink-tagfield input[type=text].new-tag-input:focus{-webkit-box-shadow:0,0,0,3px,#eaeaea;-moz-box-shadow:0,0,0,3px,#eaeaea;box-shadow:0,0,0,3px,#eaeaea;border:1px solid #c3c3c3}.ink-tagfield span.ink-tag{background-color:#1b1b1b;color:#eaeaea;text-shadow:none;font-size:.9em;font-weight:400;border:1px solid #000;padding:4px 6px}.ink-tagfield span.ink-tag i.icon-remove{color:#ccc;font-size:.9em;font-weight:400;margin-left:4px}.ink-tagfield span.ink-tag i.icon-remove:hover{cursor:pointer;color:red}.ink-tree-view li{list-style-type:none}.ink-tree-view [data-open]>:before{margin-left:-1.3em;margin-right:.4em;text-decoration:none} \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/FontAwesome.otf b/ajax/libs/ink/3.0.0/fonts/FontAwesome.otf new file mode 100644 index 000000000..70125459f Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/FontAwesome.otf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.eot new file mode 100644 index 000000000..60f0e2204 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.svg new file mode 100644 index 000000000..2b52414de --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.svg @@ -0,0 +1,8652 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.ttf new file mode 100644 index 000000000..c34016571 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.woff new file mode 100644 index 000000000..266eba46d Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-black-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.eot new file mode 100644 index 000000000..d9fafc543 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.svg new file mode 100644 index 000000000..ea0260045 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.svg @@ -0,0 +1,8652 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.ttf new file mode 100644 index 000000000..7a26899d8 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.woff new file mode 100644 index 000000000..b8d75fbc5 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-blackitalic-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.eot new file mode 100644 index 000000000..6261bf0d9 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.svg new file mode 100644 index 000000000..dcdc06969 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.svg @@ -0,0 +1,7496 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.ttf new file mode 100644 index 000000000..c601e563c Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.woff new file mode 100644 index 000000000..aeae6e4fc Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bold-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.eot new file mode 100644 index 000000000..3e5e6058b Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.svg new file mode 100644 index 000000000..aaac4361a --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.svg @@ -0,0 +1,8652 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.ttf new file mode 100644 index 000000000..9f6c031aa Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.woff new file mode 100644 index 000000000..16528514e Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-bolditalic-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.eot new file mode 100644 index 000000000..e024f6630 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.svg new file mode 100644 index 000000000..bc9fcf5bb --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.svg @@ -0,0 +1,8164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.ttf new file mode 100644 index 000000000..c33f1fcc4 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.woff new file mode 100644 index 000000000..508446408 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-italic-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.eot new file mode 100644 index 000000000..3c3bb4b76 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.svg new file mode 100644 index 000000000..99c124274 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.svg @@ -0,0 +1,8162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.ttf new file mode 100644 index 000000000..50efac8af Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.woff new file mode 100644 index 000000000..c2daccb42 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-light-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.eot new file mode 100644 index 000000000..fd1887751 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.svg new file mode 100644 index 000000000..6921cecaa --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.svg @@ -0,0 +1,8162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.ttf new file mode 100644 index 000000000..6d6d04a55 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.woff new file mode 100644 index 000000000..c972aadd6 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-lightitalic-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.eot new file mode 100644 index 000000000..1cd777444 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.svg new file mode 100644 index 000000000..6c04fe10f --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.svg @@ -0,0 +1,7496 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.ttf new file mode 100644 index 000000000..d42a7e703 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.woff new file mode 100644 index 000000000..e62aea7d0 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-medium-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.eot new file mode 100644 index 000000000..00fc0ebfb Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.svg new file mode 100644 index 000000000..9d0bb6417 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.svg @@ -0,0 +1,8652 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.ttf new file mode 100644 index 000000000..672018738 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.woff new file mode 100644 index 000000000..34b0bb555 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-mediumitalic-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.eot new file mode 100644 index 000000000..ea3f5d5c2 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.svg new file mode 100644 index 000000000..ad68c9aae --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.svg @@ -0,0 +1,7606 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.ttf new file mode 100644 index 000000000..c1117892c Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.woff new file mode 100644 index 000000000..8bb88d92a Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-regular-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.eot new file mode 100644 index 000000000..6977e840e Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.svg new file mode 100644 index 000000000..650c596a4 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.svg @@ -0,0 +1,8020 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.ttf new file mode 100644 index 000000000..9cda002ac Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.woff new file mode 100644 index 000000000..179793417 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thin-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.eot new file mode 100644 index 000000000..50fca175b Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.svg new file mode 100644 index 000000000..3dbb53e2e --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.svg @@ -0,0 +1,8020 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.ttf new file mode 100644 index 000000000..537140ad6 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.woff new file mode 100644 index 000000000..364305d47 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto/roboto-thinitalic-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.eot new file mode 100644 index 000000000..9efd87b05 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.svg new file mode 100644 index 000000000..fe2c14f85 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.svg @@ -0,0 +1,8164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.ttf new file mode 100644 index 000000000..204212098 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.woff new file mode 100644 index 000000000..cd0030f8a Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bold-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.eot new file mode 100644 index 000000000..158770c14 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.svg new file mode 100644 index 000000000..7bdf0329f --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.svg @@ -0,0 +1,8164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.ttf new file mode 100644 index 000000000..940693335 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.woff new file mode 100644 index 000000000..808f98bf9 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-bolditalic-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.eot new file mode 100644 index 000000000..9be7c55b8 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.svg new file mode 100644 index 000000000..abb6549a5 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.svg @@ -0,0 +1,8165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.ttf new file mode 100644 index 000000000..ec005772e Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.woff new file mode 100644 index 000000000..89251fd20 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-italic-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.eot new file mode 100644 index 000000000..762eaa647 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.svg new file mode 100644 index 000000000..eabb0348a --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.svg @@ -0,0 +1,8164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.ttf new file mode 100644 index 000000000..68f30cbfd Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.woff new file mode 100644 index 000000000..a0b66cba0 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-light-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.eot new file mode 100644 index 000000000..559a83c58 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.svg new file mode 100644 index 000000000..5d18d8936 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.svg @@ -0,0 +1,8164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.ttf new file mode 100644 index 000000000..00516c656 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.woff new file mode 100644 index 000000000..5b4f9cc60 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-lightitalic-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.eot new file mode 100644 index 000000000..a9dbc9c49 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.svg new file mode 100644 index 000000000..8055de591 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.svg @@ -0,0 +1,8165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.ttf new file mode 100644 index 000000000..f113561b1 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.woff new file mode 100644 index 000000000..ead331948 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_condensed/robotocondensed-regular-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.eot new file mode 100644 index 000000000..1dba9e41a Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.svg new file mode 100644 index 000000000..17de38883 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.svg @@ -0,0 +1,8554 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.ttf new file mode 100644 index 000000000..c99c82e9f Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.woff new file mode 100644 index 000000000..34933d437 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-bold-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.eot new file mode 100644 index 000000000..23ca73b54 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.svg new file mode 100644 index 000000000..aa8c5279b --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.svg @@ -0,0 +1,8176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.ttf new file mode 100644 index 000000000..f580f941b Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.woff new file mode 100644 index 000000000..f3d5dfe2a Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-light-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.eot new file mode 100644 index 000000000..dc13d4554 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.svg new file mode 100644 index 000000000..d68904769 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.svg @@ -0,0 +1,8176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.ttf new file mode 100644 index 000000000..3452f9f2a Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.woff new file mode 100644 index 000000000..31c35344e Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-regular-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.eot b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.eot new file mode 100644 index 000000000..41dce4beb Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.svg b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.svg new file mode 100644 index 000000000..4e621a254 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.svg @@ -0,0 +1,8176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.ttf new file mode 100644 index 000000000..0d5ed9482 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.woff b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.woff new file mode 100644 index 000000000..7340240ef Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/Roboto_slab/robotoslab-thin-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.eot b/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.eot new file mode 100644 index 000000000..0662cb96b Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.eot differ diff --git a/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.svg b/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.svg new file mode 100644 index 000000000..2edb4ec34 --- /dev/null +++ b/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.svg @@ -0,0 +1,399 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.ttf b/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.ttf new file mode 100644 index 000000000..d36592469 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.ttf differ diff --git a/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.woff b/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.woff new file mode 100644 index 000000000..b9bd17e15 Binary files /dev/null and b/ajax/libs/ink/3.0.0/fonts/fontawesome-webfont.woff differ diff --git a/ajax/libs/ink/3.0.0/js/autoload.js b/ajax/libs/ink/3.0.0/js/autoload.js new file mode 100644 index 000000000..320621ac8 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/autoload.js @@ -0,0 +1,86 @@ +/** + * @module Ink.Autoload + * @version 1 + */ +Ink.createModule('Ink.Autoload', 1, ['Ink.Dom.Selector_1', 'Ink.Dom.Loaded_1', 'Ink.UI.SmoothScroller_1', 'Ink.UI.Close_1'], function( Selector, Loaded, Scroller, Close ){ + 'use strict'; + + /** + * @namespace Ink.Autoload + * @static + */ + + var Autoload = { + selectors: { + /* Match module names to element classes (or more complex selectors) + * which get the UI modules instantiated automatically. */ + 'Animate_1' : '.ink-animate', + 'Carousel_1' : '.ink-carousel', + 'DatePicker_1' : '.ink-datepicker', + 'Dropdown_1' : '.ink-dropdown', + 'Gallery_1' : 'ul.ink-gallery-source', + 'Modal_1' : '.ink-modal', + 'ProgressBar_1' : '.ink-progress-bar', + 'SortableList_1': '.ink-sortable-list', + 'Spy_1' : '[data-spy="true"]', + 'Stacker_1' : '.ink-stacker', + 'Sticky_1' : '.ink-sticky, .sticky', + 'Table_1' : '.ink-table', + 'Tabs_1' : '.ink-tabs', + 'Toggle_1' : '.ink-toggle, .toggle', + 'Tooltip_1' : '.ink-tooltip, .tooltip', + 'TreeView_1' : '.ink-tree-view' + }, + defaultOptions: {}, + run: function (parentEl, options){ + options = options || {}; + + if (options.waitForDOMLoaded) { + Loaded.run(autoload); + } else { + autoload(); + } + + function autoload() { + for(var mod in Autoload.selectors) if (Autoload.selectors.hasOwnProperty(mod)) { + // `elements` need to be in a closure because requireModules is async. + findElements(mod); + } + if (options.createClose) { + new Close(); + } + if (options.createSmoothScroller) { + Scroller.init(); + } + } + + function findElements(mod) { + var modName = 'Ink.UI.' + mod; + var elements = Selector.select( Autoload.selectors[mod], parentEl ); + if( elements.length ){ + Ink.requireModules( [modName], function( Component ) { + for (var i = 0, len = elements.length; i < len; i++) { + new Component(elements[i], Autoload.defaultOptions[modName]); + } + }); + } + } + } + }; + + for (var k in Autoload.selectors) if (Autoload.selectors.hasOwnProperty(k)) { + Autoload.defaultOptions[k] = {}; + } + + if (!window.INK_NO_AUTO_LOAD) { + Autoload.run(document, { + waitForDOMLoaded: true, + createSmoothScroller: true, + createClose: true + }); + Autoload.firstRunDone = true; + } + + return Autoload; +}); + diff --git a/ajax/libs/ink/3.0.0/js/autoload.min.js b/ajax/libs/ink/3.0.0/js/autoload.min.js new file mode 100644 index 000000000..f17fe6521 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/autoload.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.Autoload",1,["Ink.Dom.Selector_1","Ink.Dom.Loaded_1","Ink.UI.SmoothScroller_1","Ink.UI.Close_1"],function(e,o,t,r){"use strict";var n={selectors:{Animate_1:".ink-animate",Carousel_1:".ink-carousel",DatePicker_1:".ink-datepicker",Dropdown_1:".ink-dropdown",Gallery_1:"ul.ink-gallery-source",Modal_1:".ink-modal",ProgressBar_1:".ink-progress-bar",SortableList_1:".ink-sortable-list",Spy_1:'[data-spy="true"]',Stacker_1:".ink-stacker",Sticky_1:".ink-sticky, .sticky",Table_1:".ink-table",Tabs_1:".ink-tabs",Toggle_1:".ink-toggle, .toggle",Tooltip_1:".ink-tooltip, .tooltip",TreeView_1:".ink-tree-view"},defaultOptions:{},run:function(i,l){function a(){for(var e in n.selectors)n.selectors.hasOwnProperty(e)&&s(e);l.createClose&&new r,l.createSmoothScroller&&t.init()}function s(o){var t="Ink.UI."+o,r=e.select(n.selectors[o],i);r.length&&Ink.requireModules([t],function(e){for(var o=0,i=r.length;i>o;o++)new e(r[o],n.defaultOptions[t])})}l=l||{},l.waitForDOMLoaded?o.run(a):a()}};for(var i in n.selectors)n.selectors.hasOwnProperty(i)&&(n.defaultOptions[i]={});return window.INK_NO_AUTO_LOAD||(n.run(document,{waitForDOMLoaded:!0,createSmoothScroller:!0,createClose:!0}),n.firstRunDone=!0),n}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/holder.js b/ajax/libs/ink/3.0.0/js/holder.js new file mode 100644 index 000000000..f85fc5457 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/holder.js @@ -0,0 +1,440 @@ +/* + +Holder - 1.9 - client side image placeholders +(c) 2012-2013 Ivan Malopinsky / http://imsky.co + +Provided under the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0 +Commercial use requires attribution. + +*/ + +var Holder = Holder || {}; +(function (app, win) { + +var preempted = false, +fallback = false, +canvas = document.createElement('canvas'); + +//getElementsByClassName polyfill +document.getElementsByClassName||(document.getElementsByClassName=function(e){var t=document,n,r,i,s=[];if(t.querySelectorAll)return t.querySelectorAll("."+e);if(t.evaluate){r=".//*[contains(concat(' ', @class, ' '), ' "+e+" ')]",n=t.evaluate(r,t,null,0,null);while(i=n.iterateNext())s.push(i)}else{n=t.getElementsByTagName("*"),r=new RegExp("(^|\\s)"+e+"(\\s|$)");for(i=0;i 1) { + text_height = template.size / (ctx.measureText(text).width / width); + } + //Resetting font size if necessary + ctx.font = "bold " + (text_height * ratio) + "px " + font; + ctx.fillText(text, (width / 2), (height / 2), width); + return canvas.toDataURL("image/png"); +} + +function render(mode, el, holder, src) { + var dimensions = holder.dimensions, + theme = holder.theme, + text = holder.text ? decodeURIComponent(holder.text) : holder.text; + var dimensions_caption = dimensions.width + "x" + dimensions.height; + + theme = (text ? extend(theme, { + text: text + }) : theme); + theme = (holder.font ? extend(theme, { + font: holder.font + }) : theme); + + if (mode == "image") { + el.setAttribute("data-src", src); + el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption); + + if (fallback || !holder.auto) { + el.style.width = dimensions.width + "px"; + el.style.height = dimensions.height + "px"; + } + + if (fallback) { + el.style.backgroundColor = theme.background; + + } else { + el.setAttribute("src", draw(ctx, dimensions, theme, ratio)); + } + } else { + if (!fallback) { + el.style.backgroundImage = "url(" + draw(ctx, dimensions, theme, ratio) + ")"; + el.style.backgroundSize = dimensions.width + "px " + dimensions.height + "px"; + } + } +}; + +function fluid(el, holder, src) { + var dimensions = holder.dimensions, + theme = holder.theme, + text = holder.text; + var dimensions_caption = dimensions.width + "x" + dimensions.height; + theme = (text ? extend(theme, { + text: text + }) : theme); + + var fluid = document.createElement("div"); + + if (el.fluidRef) { + fluid = el.fluidRef; + } + + fluid.style.backgroundColor = theme.background; + fluid.style.color = theme.foreground; + fluid.className = el.className + " holderjs-fluid"; + fluid.style.width = holder.dimensions.width + (holder.dimensions.width.indexOf("%") > 0 ? "" : "px"); + fluid.style.height = holder.dimensions.height + (holder.dimensions.height.indexOf("%") > 0 ? "" : "px"); + fluid.id = el.id; + + el.style.width = 0; + el.style.height = 0; + + if (!el.fluidRef) { + + if (theme.text) { + fluid.appendChild(document.createTextNode(theme.text)) + } else { + fluid.appendChild(document.createTextNode(dimensions_caption)) + fluid_images.push(fluid); + setTimeout(fluid_update, 0); + } + + } + + el.fluidRef = fluid; + el.parentNode.insertBefore(fluid, el.nextSibling) + + if (window.jQuery) { + jQuery(function ($) { + $(el).on("load", function () { + el.style.width = fluid.style.width; + el.style.height = fluid.style.height; + $(el).show(); + $(fluid).remove(); + }); + }) + } +} + +function fluid_update() { + for (i in fluid_images) { + if (!fluid_images.hasOwnProperty(i)) continue; + var el = fluid_images[i], + label = el.firstChild; + + el.style.lineHeight = el.offsetHeight + "px"; + label.data = el.offsetWidth + "x" + el.offsetHeight; + } +} + +function parse_flags(flags, options) { + + var ret = { + theme: settings.themes.gray + }, render = false; + + for (sl = flags.length, j = 0; j < sl; j++) { + var flag = flags[j]; + if (app.flags.dimensions.match(flag)) { + render = true; + ret.dimensions = app.flags.dimensions.output(flag); + } else if (app.flags.fluid.match(flag)) { + render = true; + ret.dimensions = app.flags.fluid.output(flag); + ret.fluid = true; + } else if (app.flags.colors.match(flag)) { + ret.theme = app.flags.colors.output(flag); + } else if (options.themes[flag]) { + //If a theme is specified, it will override custom colors + ret.theme = options.themes[flag]; + } else if (app.flags.text.match(flag)) { + ret.text = app.flags.text.output(flag); + } else if (app.flags.font.match(flag)) { + ret.font = app.flags.font.output(flag); + } else if (app.flags.auto.match(flag)) { + ret.auto = true; + } + } + + return render ? ret : false; + +}; + + + +if (!canvas.getContext) { + fallback = true; +} else { + if (canvas.toDataURL("image/png") + .indexOf("data:image/png") < 0) { + //Android doesn't support data URI + fallback = true; + } else { + var ctx = canvas.getContext("2d"); + } +} + +var dpr = 1, bsr = 1; + +if(!fallback){ + dpr = window.devicePixelRatio || 1, + bsr = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; +} + +var ratio = dpr / bsr; + +var fluid_images = []; + +var settings = { + domain: "holder.js", + images: "img", + bgnodes: ".holderjs", + themes: { + "gray": { + background: "#eee", + foreground: "#aaa", + size: 12 + }, + "social": { + background: "#3a5a97", + foreground: "#fff", + size: 12 + }, + "industrial": { + background: "#434A52", + foreground: "#C2F200", + size: 12 + }, + "ink": { + background: "#222", + foreground: "#fff", + size: 18 + } + }, + stylesheet: ".holderjs-fluid {font-size:16px;font-weight:bold;text-align:center;font-family:sans-serif;margin:0}" +}; + + +app.flags = { + dimensions: { + regex: /^(\d+)x(\d+)$/, + output: function (val) { + var exec = this.regex.exec(val); + return { + width: +exec[1], + height: +exec[2] + } + } + }, + fluid: { + regex: /^([0-9%]+)x([0-9%]+)$/, + output: function (val) { + var exec = this.regex.exec(val); + return { + width: exec[1], + height: exec[2] + } + } + }, + colors: { + regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i, + output: function (val) { + var exec = this.regex.exec(val); + return { + size: settings.themes.gray.size, + foreground: "#" + exec[2], + background: "#" + exec[1] + } + } + }, + text: { + regex: /text\:(.*)/, + output: function (val) { + return this.regex.exec(val)[1]; + } + }, + font: { + regex: /font\:(.*)/, + output: function (val) { + return this.regex.exec(val)[1]; + } + }, + auto: { + regex: /^auto$/ + } +} + +for (var flag in app.flags) { + if (!app.flags.hasOwnProperty(flag)) continue; + app.flags[flag].match = function (val) { + return val.match(this.regex) + } +} + +app.add_theme = function (name, theme) { + name != null && theme != null && (settings.themes[name] = theme); + return app; +}; + +app.add_image = function (src, el) { + var node = selector(el); + if (node.length) { + for (var i = 0, l = node.length; i < l; i++) { + var img = document.createElement("img") + img.setAttribute("data-src", src); + node[i].appendChild(img); + } + } + return app; +}; + +app.run = function (o) { + var options = extend(settings, o), + images = [], imageNodes = [], bgnodes = []; + + if(typeof(options.images) == "string"){ + imageNodes = selector(options.images); + } + else if (window.NodeList && options.images instanceof window.NodeList) { + imageNodes = options.images; + } else if (window.Node && options.images instanceof window.Node) { + imageNodes = [options.images]; + } + + if(typeof(options.bgnodes) == "string"){ + bgnodes = selector(options.bgnodes); + } else if (window.NodeList && options.elements instanceof window.NodeList) { + bgnodes = options.bgnodes; + } else if (window.Node && options.bgnodes instanceof window.Node) { + bgnodes = [options.bgnodes]; + } + + preempted = true; + + for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]); + + var holdercss = document.getElementById("holderjs-style"); + if (!holdercss) { + holdercss = document.createElement("style"); + holdercss.setAttribute("id", "holderjs-style"); + holdercss.type = "text/css"; + document.getElementsByTagName("head")[0].appendChild(holdercss); + } + + if (!options.nocss) { + if (holdercss.styleSheet) { + holdercss.styleSheet.cssText += options.stylesheet; + } else { + holdercss.appendChild(document.createTextNode(options.stylesheet)); + } + } + + + + var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)"); + + for (var l = bgnodes.length, i = 0; i < l; i++) { + var src = window.getComputedStyle(bgnodes[i], null) + .getPropertyValue("background-image"); + var flags = src.match(cssregex); + if (flags) { + var holder = parse_flags(flags[1].split("/"), options); + if (holder) { + render("background", bgnodes[i], holder, src); + } + } + } + + for (l = images.length, i = 0; i < l; i++) { + + var attr_src = attr_data_src = src = null; + + try{ + attr_src = images[i].getAttribute("src"); + attr_datasrc = images[i].getAttribute("data-src"); + }catch(e){} + + if (attr_datasrc == null && !! attr_src && attr_src.indexOf(options.domain) >= 0) { + src = attr_src; + } else if ( !! attr_datasrc && attr_datasrc.indexOf(options.domain) >= 0) { + src = attr_datasrc; + } + + if (src) { + var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1) + .split("/"), options); + if (holder) { + if (holder.fluid) { + fluid(images[i], holder, src); + } else { + render("image", images[i], holder, src); + } + } + } + } + return app; +}; + +contentLoaded(win, function () { + if (window.addEventListener) { + window.addEventListener("resize", fluid_update, false); + window.addEventListener("orientationchange", fluid_update, false); + } else { + window.attachEvent("onresize", fluid_update) + } + preempted || app.run(); +}); + +if (typeof define === "function" && define.amd) { + define("Holder", [], function () { + return app; + }); +} + +})(Holder, window); diff --git a/ajax/libs/ink/3.0.0/js/holder.min.js b/ajax/libs/ink/3.0.0/js/holder.min.js new file mode 100644 index 000000000..0566927e8 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/holder.min.js @@ -0,0 +1 @@ +var Holder=Holder||{};!function(e,t){function n(e,t){var n="complete",i="readystatechange",o=!1,a=o,r=!0,s=e.document,d=s.documentElement,l=s.addEventListener?"addEventListener":"attachEvent",u=s.addEventListener?"removeEventListener":"detachEvent",c=s.addEventListener?"":"on",f=function(r){(r.type!=i||s.readyState==n)&&(("load"==r.type?e:s)[u](c+r.type,f,o),!a&&(a=!0)&&t.call(e,null))},g=function(){try{d.doScroll("left")}catch(e){return void setTimeout(g,50)}f("poll")};if(s.readyState==n)t.call(e,"lazy");else{if(s.createEventObject&&d.doScroll){try{r=!e.frameElement}catch(h){}r&&g()}s[l](c+"DOMContentLoaded",f,o),s[l](c+i,f,o),e[l](c+"load",f,o)}}function o(e){e=e.match(/^(\W)?(.*)/);var t=document["getElement"+(e[1]?"#"==e[1]?"ById":"sByClassName":"sByTagName")](e[2]),n=[];return null!=t&&(n=t.length?t:0==t.length?t:[t]),n}function a(e,t){var n={};for(var i in e)n[i]=e[i];for(var o in t)n[o]=t[o];return n}function r(e,t,n){var i=[t,e].sort(),o=Math.round(i[1]/16),a=(Math.round(i[0]/16),Math.max(n.size,o));return{height:a}}function s(e,t,n,i){var o=r(t.width,t.height,n),a=o.height,s=t.width*i,d=t.height*i,l=n.font?n.font:"sans-serif";h.width=s,h.height=d,e.textAlign="center",e.textBaseline="middle",e.fillStyle=n.background,e.fillRect(0,0,s,d),e.fillStyle=n.foreground,e.font="bold "+a+"px "+l;var u=n.text?n.text:t.width+"x"+t.height;return e.measureText(u).width/s>1&&(a=n.size/(e.measureText(u).width/s)),e.font="bold "+a*i+"px "+l,e.fillText(u,s/2,d/2,s),h.toDataURL("image/png")}function d(e,t,n,i){var o=n.dimensions,r=n.theme,d=n.text?decodeURIComponent(n.text):n.text,l=o.width+"x"+o.height;r=d?a(r,{text:d}):r,r=n.font?a(r,{font:n.font}):r,"image"==e?(t.setAttribute("data-src",i),t.setAttribute("alt",d?d:r.text?r.text+" ["+l+"]":l),(g||!n.auto)&&(t.style.width=o.width+"px",t.style.height=o.height+"px"),g?t.style.backgroundColor=r.background:t.setAttribute("src",s(m,o,r,y))):g||(t.style.backgroundImage="url("+s(m,o,r,y)+")",t.style.backgroundSize=o.width+"px "+o.height+"px")}function l(e,t){var n=t.dimensions,i=t.theme,o=t.text,r=n.width+"x"+n.height;i=o?a(i,{text:o}):i;var s=document.createElement("div");e.fluidRef&&(s=e.fluidRef),s.style.backgroundColor=i.background,s.style.color=i.foreground,s.className=e.className+" holderjs-fluid",s.style.width=t.dimensions.width+(t.dimensions.width.indexOf("%")>0?"":"px"),s.style.height=t.dimensions.height+(t.dimensions.height.indexOf("%")>0?"":"px"),s.id=e.id,e.style.width=0,e.style.height=0,e.fluidRef||(i.text?s.appendChild(document.createTextNode(i.text)):(s.appendChild(document.createTextNode(r)),w.push(s),setTimeout(u,0))),e.fluidRef=s,e.parentNode.insertBefore(s,e.nextSibling),window.jQuery&&jQuery(function(t){t(e).on("load",function(){e.style.width=s.style.width,e.style.height=s.style.height,t(e).show(),t(s).remove()})})}function u(){for(i in w)if(w.hasOwnProperty(i)){var e=w[i],t=e.firstChild;e.style.lineHeight=e.offsetHeight+"px",t.data=e.offsetWidth+"x"+e.offsetHeight}}function c(t,n){var i={theme:v.themes.gray},o=!1;for(sl=t.length,j=0;sl>j;j++){var a=t[j];e.flags.dimensions.match(a)?(o=!0,i.dimensions=e.flags.dimensions.output(a)):e.flags.fluid.match(a)?(o=!0,i.dimensions=e.flags.fluid.output(a),i.fluid=!0):e.flags.colors.match(a)?i.theme=e.flags.colors.output(a):n.themes[a]?i.theme=n.themes[a]:e.flags.text.match(a)?i.text=e.flags.text.output(a):e.flags.font.match(a)?i.font=e.flags.font.output(a):e.flags.auto.match(a)&&(i.auto=!0)}return o?i:!1}var f=!1,g=!1,h=document.createElement("canvas");if(document.getElementsByClassName||(document.getElementsByClassName=function(e){var t,n,i,o=document,a=[];if(o.querySelectorAll)return o.querySelectorAll("."+e);if(o.evaluate)for(n=".//*[contains(concat(' ', @class, ' '), ' "+e+" ')]",t=o.evaluate(n,o,null,0,null);i=t.iterateNext();)a.push(i);else for(t=o.getElementsByTagName("*"),n=new RegExp("(^|\\s)"+e+"(\\s|$)"),i=0;ia;a++){var s=document.createElement("img");s.setAttribute("data-src",t),i[a].appendChild(s)}return e},e.run=function(t){var n=a(v,t),i=[],r=[],s=[];for("string"==typeof n.images?r=o(n.images):window.NodeList&&n.images instanceof window.NodeList?r=n.images:window.Node&&n.images instanceof window.Node&&(r=[n.images]),"string"==typeof n.bgnodes?s=o(n.bgnodes):window.NodeList&&n.elements instanceof window.NodeList?s=n.bgnodes:window.Node&&n.bgnodes instanceof window.Node&&(s=[n.bgnodes]),f=!0,m=0,h=r.length;h>m;m++)i.push(r[m]);var u=document.getElementById("holderjs-style");u||(u=document.createElement("style"),u.setAttribute("id","holderjs-style"),u.type="text/css",document.getElementsByTagName("head")[0].appendChild(u)),n.nocss||(u.styleSheet?u.styleSheet.cssText+=n.stylesheet:u.appendChild(document.createTextNode(n.stylesheet)));for(var g=new RegExp(n.domain+'/(.*?)"?\\)'),h=s.length,m=0;h>m;m++){var x=window.getComputedStyle(s[m],null).getPropertyValue("background-image"),p=x.match(g);if(p){var y=c(p[1].split("/"),n);y&&d("background",s[m],y,x)}}for(h=i.length,m=0;h>m;m++){var w=attr_data_src=x=null;try{w=i[m].getAttribute("src"),attr_datasrc=i[m].getAttribute("data-src")}catch(b){}if(null==attr_datasrc&&w&&w.indexOf(n.domain)>=0?x=w:attr_datasrc&&attr_datasrc.indexOf(n.domain)>=0&&(x=attr_datasrc),x){var y=c(x.substr(x.lastIndexOf(n.domain)+n.domain.length+1).split("/"),n);y&&(y.fluid?l(i[m],y,x):d("image",i[m],y,x))}}return e},n(t,function(){window.addEventListener?(window.addEventListener("resize",u,!1),window.addEventListener("orientationchange",u,!1)):window.attachEvent("onresize",u),f||e.run()}),"function"==typeof define&&define.amd&&define("Holder",[],function(){return e})}(Holder,window); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/html5shiv-printshiv.js b/ajax/libs/ink/3.0.0/js/html5shiv-printshiv.js new file mode 100644 index 000000000..b12379e0d --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/html5shiv-printshiv.js @@ -0,0 +1,11 @@ +/* + HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(j,f){function s(a,b){var c=a.createElement("p"),m=a.getElementsByTagName("head")[0]||a.documentElement;c.innerHTML="x";return m.insertBefore(c.lastChild,m.firstChild)}function o(){var a=d.elements;return"string"==typeof a?a.split(" "):a}function n(a){var b=t[a[u]];b||(b={},p++,a[u]=p,t[p]=b);return b}function v(a,b,c){b||(b=f);if(e)return b.createElement(a);c||(c=n(b));b=c.cache[a]?c.cache[a].cloneNode():y.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a); +return b.canHaveChildren&&!z.test(a)?c.frag.appendChild(b):b}function A(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!d.shivMethods?b.createElem(c):v(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+o().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(d,b.frag)} +function w(a){a||(a=f);var b=n(a);if(d.shivCSS&&!q&&!b.hasCSS)b.hasCSS=!!s(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}");e||A(a,b);return a}function B(a){for(var b,c=a.attributes,m=c.length,f=a.ownerDocument.createElement(l+":"+a.nodeName);m--;)b=c[m],b.specified&&f.setAttribute(b.nodeName,b.nodeValue);f.style.cssText=a.style.cssText;return f}function x(a){function b(){clearTimeout(d._removeSheetTimer); +c&&c.removeNode(!0);c=null}var c,f,d=n(a),e=a.namespaces,j=a.parentWindow;if(!C||a.printShived)return a;"undefined"==typeof e[l]&&e.add(l);j.attachEvent("onbeforeprint",function(){b();var g,i,d;d=a.styleSheets;for(var e=[],h=d.length,k=Array(h);h--;)k[h]=d[h];for(;d=k.pop();)if(!d.disabled&&D.test(d.media)){try{g=d.imports,i=g.length}catch(j){i=0}for(h=0;h+~])("+o().join("|")+")(?=[[\\s,>+~#.:]|$)", +"gi");for(k="$1"+l+"\\:$2";i--;)e=g[i]=g[i].split("}"),e[e.length-1]=e[e.length-1].replace(h,k),g[i]=e.join("}");e=g.join("{");i=a.getElementsByTagName("*");h=i.length;k=RegExp("^(?:"+o().join("|")+")$","i");for(d=[];h--;)g=i[h],k.test(g.nodeName)&&d.push(g.applyElement(B(g)));f=d;c=s(a,e)});j.attachEvent("onafterprint",function(){for(var a=f,c=a.length;c--;)a[c].removeNode();clearTimeout(d._removeSheetTimer);d._removeSheetTimer=setTimeout(b,500)});a.printShived=!0;return a}var r=j.html5||{},z=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i, +y=/^(?: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,q,u="_html5shiv",p=0,t={},e;(function(){try{var a=f.createElement("a");a.innerHTML="";q="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}e=b}catch(d){e=q=!0}})();var d={elements:r.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video", +version:"3.7.0",shivCSS:!1!==r.shivCSS,supportsUnknownElements:e,shivMethods:!1!==r.shivMethods,type:"default",shivDocument:w,createElement:v,createDocumentFragment:function(a,b){a||(a=f);if(e)return a.createDocumentFragment();for(var b=b||n(a),c=b.frag.cloneNode(),d=0,j=o(),l=j.length;d",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=y.elements;return"string"==typeof e?e.split(" "):e}function a(e){var t=g[e[p]];return t||(t={},v++,e[p]=v,g[v]=t),t}function o(e,n,r){return n||(n=t),d?n.createElement(e):(r||(r=a(n)),n=r.cache[e]?r.cache[e].cloneNode():f.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),n.canHaveChildren&&!h.test(e)?r.frag.appendChild(n):n)}function i(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?o(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/\w+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function c(e){e||(e=t);var r=a(e);return!y.shivCSS||m||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),d||i(e,r),e}function l(e){for(var t,n=e.attributes,r=n.length,a=e.ownerDocument.createElement(b+":"+e.nodeName);r--;)t=n[r],t.specified&&a.setAttribute(t.nodeName,t.nodeValue);return a.style.cssText=e.style.cssText,a}function s(e){function t(){clearTimeout(c._removeSheetTimer),o&&o.removeNode(!0),o=null}var o,i,c=a(e),s=e.namespaces,m=e.parentWindow;return!S||e.printShived?e:("undefined"==typeof s[b]&&s.add(b),m.attachEvent("onbeforeprint",function(){t();var a,c,s;s=e.styleSheets;for(var m=[],d=s.length,u=Array(d);d--;)u[d]=s[d];for(;s=u.pop();)if(!s.disabled&&E.test(s.media)){try{a=s.imports,c=a.length}catch(h){c=0}for(d=0;c>d;d++)u.push(a[d]);try{m.push(s.cssText)}catch(f){}}for(a=m.reverse().join("").split("{"),c=a.length,d=RegExp("(^|[\\s,>+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),u="$1"+b+"\\:$2";c--;)m=a[c]=a[c].split("}"),m[m.length-1]=m[m.length-1].replace(d,u),a[c]=m.join("}");for(m=a.join("{"),c=e.getElementsByTagName("*"),d=c.length,u=RegExp("^(?:"+r().join("|")+")$","i"),s=[];d--;)a=c[d],u.test(a.nodeName)&&s.push(a.applyElement(l(a)));i=s,o=n(e,m)}),m.attachEvent("onafterprint",function(){for(var e=i,n=e.length;n--;)e[n].removeNode();clearTimeout(c._removeSheetTimer),c._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var m,d,u=e.html5||{},h=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?: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,p="_html5shiv",v=0,g={};!function(){try{var e=t.createElement("a");e.innerHTML="",m="hidden"in e;var n;if(!(n=1==e.childNodes.length)){t.createElement("a");var r=t.createDocumentFragment();n="undefined"==typeof r.cloneNode||"undefined"==typeof r.createDocumentFragment||"undefined"==typeof r.createElement}d=n}catch(a){d=m=!0}}();var y={elements:u.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==u.shivCSS,supportsUnknownElements:d,shivMethods:!1!==u.shivMethods,type:"default",shivDocument:c,createElement:o,createDocumentFragment:function(e,n){if(e||(e=t),d)return e.createDocumentFragment();for(var n=n||a(e),o=n.frag.cloneNode(),i=0,c=r(),l=c.length;l>i;i++)o.createElement(c[i]);return o}};e.html5=y,c(t);var E=/^$|\b(?:all|print)\b/,b="html5shiv",S=!d&&function(){var n=t.documentElement;return!("undefined"==typeof t.namespaces||"undefined"==typeof t.parentWindow||"undefined"==typeof n.applyElement||"undefined"==typeof n.removeNode||"undefined"==typeof e.attachEvent)}();y.type+=" print",y.shivPrint=s,s(t)}(this,document); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/html5shiv.js b/ajax/libs/ink/3.0.0/js/html5shiv.js new file mode 100644 index 000000000..448cebd79 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/html5shiv.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?: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,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); +if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;darticle,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}",r=o.insertBefore(r.lastChild,o.firstChild),n.hasCSS=!!r}return l||c(e,n),e}var i,l,m=e.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,d=/^(?: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,u="_html5shiv",h=0,f={};!function(){try{var e=t.createElement("a");e.innerHTML="",i="hidden"in e;var n;if(!(n=1==e.childNodes.length)){t.createElement("a");var a=t.createDocumentFragment();n="undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}l=n}catch(r){l=i=!0}}();var g={elements:m.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==m.shivCSS,supportsUnknownElements:l,shivMethods:!1!==m.shivMethods,type:"default",shivDocument:o,createElement:r,createDocumentFragment:function(e,r){if(e||(e=t),l)return e.createDocumentFragment();for(var r=r||a(e),c=r.frag.cloneNode(),o=0,i=n(),m=i.length;m>o;o++)c.createElement(i[o]);return c}};e.html5=g,o(t)}(this,document); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink-all.js b/ajax/libs/ink/3.0.0/js/ink-all.js new file mode 100644 index 000000000..e3a3c7e0c --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink-all.js @@ -0,0 +1,24934 @@ +/** + * @module Ink_1 + * Ink Core. + * This module provides the necessary methods to create and load the modules using Ink. + */ + +;(function(window, document) { + + 'use strict'; + + // skip redefinition of Ink core + if ('Ink' in window) { return; } + + + // internal data + + /* + * NOTE: + * invoke Ink.setPath('Ink', '/Ink/'); before requiring local modules + */ + var paths = {}; + var modules = {}; + var modulesLoadOrder = []; + var modulesRequested = {}; + var pendingRMs = []; + var modulesWaitingForDeps = {}; + + var apply = Function.prototype.apply; + + // auxiliary fns + var isEmptyObject = function(o) { + /*jshint unused:false */ + if (typeof o !== 'object') { return false; } + for (var k in o) { + if (o.hasOwnProperty(k)) { + return false; + } + } + return true; + }; + + /** + * @namespace Ink_1 + */ + + window.Ink = { + _checkPendingRequireModules: function() { + var I, F, o, dep, mod, cb, pRMs = []; + for (I = 0, F = pendingRMs.length; I < F; ++I) { + o = pendingRMs[I]; + + if (!o) { continue; } + + for (dep in o.left) { + if (o.left.hasOwnProperty(dep)) { + mod = modules[dep]; + if (mod) { + o.args[o.left[dep] ] = mod; + delete o.left[dep]; + --o.remaining; + } + } + } + + if (o.remaining > 0) { + pRMs.push(o); + } + else { + cb = o.cb; + if (!cb) { continue; } + delete o.cb; // to make sure I won't call this more than once! + cb.apply(false, o.args); + } + } + + pendingRMs = pRMs; + + if (pendingRMs.length > 0) { + setTimeout( function() { Ink._checkPendingRequireModules(); }, 0 ); + } + }, + + /** + * Get the full path of a module. + * This method looks up the paths given in setPath (and ultimately the default Ink's path). + * + * @method getPath + * @param {String} key Name of the module you want to get the path + * @param {Boolean} [noLib] Flag to skip appending 'lib.js' to the returned path. + */ + getPath: function(key, noLib) { + var split = key.split(/[._]/g); + var curKey; + var i; + var root; + var path; + // Look for Ink.Dom.Element.1, Ink.Dom.Element, Ink.Dom, Ink in this order. + for (i = split.length; i >= 0; i -= 1) { + curKey = split.slice(0, i + 1).join('.'); // See comment in setPath + if (paths[curKey]) { + root = curKey; + break; + } + } + path = paths[root || 'Ink']; + if (!/\/$/.test(path)) { + path += '/'; + } + if (i < split.length) { + path += split.slice(i + 1).join('/') + '/'; + } + if (!noLib) { + path += 'lib.js'; + } + return path; + }, + + /** + * Sets the URL path for a namespace. + * Use this to customize where requireModules and createModule will load dependencies from. + * This can be useful to set your own CDN for dynamic module loading or simply to change your module folder structure + * + * @method setPath + * + * @param {String} key Module or namespace + * @param {String} rootURI Base URL path and schema to be appended to the module or namespace + * + * @example + * Ink.setPath('Ink', 'http://my-cdn/Ink/'); + * Ink.setPath('Lol', 'http://my-cdn/Lol/'); + * + * // Loads from http://my-cdn/Ink/Dom/Whatever/lib.js + * Ink.requireModules(['Ink.Dom.Whatever'], function () { ... }); + * // Loads from http://my-cdn/Lol/Whatever/lib.js + * Ink.requireModules(['Lol.Whatever'], function () { ... }); + */ + setPath: function(key, rootURI) { + // Replacing version separator with dot because the difference + // between a submodule and a version doesn't matter here. + // It would also overcomplicate the implementation of getPath + paths[key.replace(/_/, '.')] = rootURI; + }, + + /** + * Loads a script URL. + * This creates a `script` tag in the `head` of the document. + * Reports errors by listening to 'error' and 'readystatechange' events. + * + * @method loadScript + * @param {String} uri Can be an external URL or a module name + * @param {String} [contentType]='text/javascript' The `type` attribute of the new script tag. + */ + loadScript: function(uri, contentType) { + /*jshint evil:true */ + + if (uri.indexOf('/') === -1) { + uri = this.getPath(uri); + } + + var scriptEl = document.createElement('script'); + scriptEl.setAttribute('type', contentType || 'text/javascript'); + scriptEl.setAttribute('src', uri); + + scriptEl.onerror = scriptEl.onreadystatechange = function (err) { + err = err || window.event; + if (err.type === 'readystatechange' && scriptEl.readyState !== 'loaded') { + // if not readyState == 'loaded' it's not an error. + return; + } + Ink.error(['Failed to load script ', uri, '. (', err || 'unspecified error', ')'].join('')); + }; + // CHECK ON ALL BROWSERS + /*if (document.readyState !== 'complete' && !document.body) { + document.write( scriptEl.outerHTML ); + } + else {*/ + var aHead = document.getElementsByTagName('head'); + if(aHead.length > 0) { + aHead[0].appendChild(scriptEl); + } + //} + }, + + _loadLater: function (dep) { + setTimeout(function () { + if (modules[dep] || modulesRequested[dep] || + modulesWaitingForDeps[dep]) { + return; + } + modulesRequested[dep] = true; + Ink.loadScript(dep); + }, 0); + }, + + /** + * Defines a module namespace. + * + * @method namespace + * @param {String} ns Namespace to define. + * @param {Boolean} [returnParentAndKey] Flag to change the return value to an array containing the namespace parent and the namespace key + * @return {Object|Array} Returns the created namespace object + */ + namespace: function(ns, returnParentAndKey) { + if (!ns || !ns.length) { return null; } + + var levels = ns.split('.'); + var nsobj = window; + var parent; + + for (var i = 0, f = levels.length; i < f; ++i) { + nsobj[ levels[i] ] = nsobj[ levels[i] ] || {}; + parent = nsobj; + nsobj = nsobj[ levels[i] ]; + } + + if (returnParentAndKey) { + return [ + parent, + levels[i-1] + ]; + } + + return nsobj; + }, + + /** + * Loads a module. + * A synchronous method to get the module from the registry. It assumes the module is defined and loaded already! + * + * @method getModule + * @param {String} mod Module name + * @param {Number} [version] Version number of the module + * @return {Object|Function} Module object or function, depending how the module is defined + */ + getModule: function(mod, version) { + var key = version ? [mod, '_', version].join('') : mod; + return modules[key]; + }, + + /** + * Creates a new module. + * Use this to wrap your code and benefit from the module loading used throughout the Ink library + * + * @method createModule + * @uses requireModules + * @param {String} mod Module name, separated by dots. Like Ink.Dom.Selector, Ink.UI.Modal + * @param {Number} version Version number + * @param {Array} deps Array of module names which are dependencies of the module being created. The order in which they are passed here will define the order they will be passed to the callback function. + * @param {Function} modFn The callback function to be executed when all the dependencies are resolved. The dependencies are passed as arguments, in the same order they were declared. The function itself should return the module. + * @sample Ink_1_createModule.html + * + */ + createModule: function(mod, ver, deps, modFn) { // define + if (typeof mod !== 'string') { + throw new Error('module name must be a string!'); + } + + // validate version correctness + if (!(typeof ver === 'number' || (typeof ver === 'string' && ver.length > 0))) { + throw new Error('version number missing!'); + } + + var modAll = [mod, '_', ver].join(''); + + modulesWaitingForDeps[modAll] = true; + + var cb = function() { + //console.log(['createModule(', mod, ', ', ver, ', [', deps.join(', '), '], ', !!modFn, ')'].join('')); + + // make sure module in not loaded twice + if (modules[modAll]) { + //console.warn(['Ink.createModule ', modAll, ': module has been defined already.'].join('')); + return; + } + + + // delete related pending tasks + delete modulesRequested[modAll]; + delete modulesRequested[mod]; + + + // run module's supplied factory + var args = Array.prototype.slice.call(arguments); + var moduleContent = modFn.apply(window, args); + modulesLoadOrder.push(modAll); + // console.log('** loaded module ' + modAll + '**'); + + + // set version + if (typeof moduleContent === 'object') { // Dom.Css Dom.Event + moduleContent._version = ver; + } + else if (typeof moduleContent === 'function') { + moduleContent.prototype._version = ver; // if constructor + moduleContent._version = ver; // if regular function + } + + + // add to global namespace... + var isInkModule = mod.indexOf('Ink.') === 0; + var t; + if (isInkModule) { + t = Ink.namespace(mod, true); // for mod 'Ink.Dom.Css', t[0] gets 'Ink.Dom' object and t[1] 'Css' + } + + + // versioned + modules[ modAll ] = moduleContent; // in modules + delete modulesWaitingForDeps[ modAll ]; + + if (isInkModule) { + t[0][ t[1] + '_' + ver ] = moduleContent; // in namespace + } + + + // unversioned + modules[ mod ] = moduleContent; // in modules + + if (isInkModule) { + if (isEmptyObject( t[0][ t[1] ] )) { + t[0][ t[1] ] = moduleContent; // in namespace + } + // else { + // console.warn(['Ink.createModule ', modAll, ': module has been defined already with a different version!'].join('')); + // } + } + + + if (this) { // there may be pending requires expecting this module, check... + Ink._checkPendingRequireModules(); + } + }; + + this.requireModules(deps, cb); + }, + + /** + * Requires modules asynchronously + * Use this to get modules, even if they're not loaded yet + * + * @method requireModules + * @param {Array} deps Array of module names. The order in which they are passed here will define the order they will be passed to the callback function. + * @param {Function} cbFn The callback function to be executed when all the dependencies are resolved. The dependencies are passed as arguments, in the same order they were declared. + * @sample Ink_1_requireModules.html + */ + requireModules: function(deps, cbFn) { // require + //console.log(['requireModules([', deps.join(', '), '], ', !!cbFn, ')'].join('')); + var i, f, o, dep, mod; + f = deps.length; + o = { + args: new Array(f), + left: {}, + remaining: f, + cb: cbFn + }; + + if (!(typeof deps === 'object' && deps.length !== undefined)) { + throw new Error('Dependency list should be an array!'); + } + if (typeof cbFn !== 'function') { + throw new Error('Callback should be a function!'); + } + + for (i = 0; i < f; ++i) { + if (Ink._moduleRenames[deps[i]]) { + Ink.warn(deps[i] + ' was renamed to ' + Ink._moduleRenames[deps[i]]); + dep = Ink._moduleRenames[deps[i]]; + } else { + dep = deps[i]; + } + mod = modules[dep]; + if (mod) { + o.args[i] = mod; + --o.remaining; + continue; + } + else if (!modulesRequested[dep]) { + Ink._loadLater(dep); + } + o.left[dep] = i; + } + + if (o.remaining > 0) { + pendingRMs.push(o); + } + else { + cbFn.apply(true, o.args); + } + }, + + _moduleRenames: { + 'Ink.UI.Aux_1': 'Ink.UI.Common_1' + }, + + /** + * Lists loaded module names. + * The list is ordered by loaded time (oldest module comes first) + * + * @method getModulesLoadOrder + * @return {Array} returns the order in which modules were resolved and correctly loaded + */ + getModulesLoadOrder: function() { + return modulesLoadOrder.slice(); + }, + + /** + * Builds the markup needed to load the modules. + * This method builds the script tags needed to load the currently used modules + * + * @method getModuleScripts + * @uses getModulesLoadOrder + * @return {String} The script markup + */ + getModuleScripts: function() { + var mlo = this.getModulesLoadOrder(); + mlo.unshift('Ink_1'); + mlo = mlo.map(function(m) { + return [''].join(''); + }); + + return mlo.join('\n'); + }, + + /** + * Creates an Ink.Ext module + * + * Does exactly the same as createModule but creates the module in the Ink.Ext namespace + * + * @method createExt + * @uses createModule + * @param {String} moduleName Extension name + * @param {String} version Extension version + * @param {Array} dependencies Extension dependencies + * @param {Function} modFn Function returning the extension + * @sample Ink_1_createExt.html + */ + createExt: function (moduleName, version, dependencies, modFn) { + return Ink.createModule('Ink.Ext.' + moduleName, version, dependencies, modFn); + }, + + /** + * Function.prototype.bind alternative. + * Creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called. + * + * @method bind + * @param {Function} fn The function + * @param {Object} context The value to be passed as the this parameter to the target function when the bound function is called. If used as false, it preserves the original context and just binds the arguments. + * @param {Any} [args*] Additional arguments will be sent to the original function as prefix arguments. + * @return {Function} + * @sample Ink_1_bind.html + */ + bind: function(fn, context) { + var args = Array.prototype.slice.call(arguments, 2); + return function() { + var innerArgs = Array.prototype.slice.call(arguments); + var finalArgs = args.concat(innerArgs); + return fn.apply(context === false ? this : context, finalArgs); + }; + }, + + /** + * Function.prototype.bind alternative for class methods + * Creates a new function that, when called, has this k + * @method bindMethod + * @uses bind + * @param {Object} object The object that contains the method to bind + * @param {String} methodName The name of the method that will be bound + * @param {Any} [args*] Additional arguments will be sent to the new method as prefix arguments. + * @return {Function} + * @sample Ink_1_bindMethod.html + * + * @example + * // Build a function which calls Ink.Dom.Element.remove on an element. + * var removeMyElem = Ink.bindMethod(Ink.Dom.Element, 'remove', someElement); + * + * removeMyElem(); // no arguments, nor Ink.Dom.Element, needed + * @example + * // (comparison with using Ink.bind to the same effect). + * // The following two calls are equivalent + * + * Ink.bind(this.remove, this, myElem); + * Ink.bindMethod(this, 'remove', myElem); + */ + bindMethod: function (object, methodName) { + return Ink.bind.apply(Ink, + [object[methodName], object].concat([].slice.call(arguments, 2))); + }, + + /** + * Function.prototype.bind alternative for event handlers. + * Same as bind but keeps first argument of the call the original event. + * Set "context" to `false` to preserve the original context of the function and just bind the arguments. + * + * @method bindEvent + * @param {Function} fn The function + * @param {Object} context The value to be passed as the this parameter to the target + * @param {Any} [args*] Additional arguments will be sent to the original function as prefix arguments + * @return {Function} + * @sample Ink_1_bindEvent.html + */ + bindEvent: function(fn, context) { + var args = Array.prototype.slice.call(arguments, 2); + return function(event) { + var finalArgs = args.slice(); + finalArgs.unshift(event || window.event); + return fn.apply(context === false ? this : context, finalArgs); + }; + }, + + /** + * Alias to document.getElementById + * + * @method i + * @param {String} id Element ID + * @return {DOMElement} + * @sample Ink_1_i.html + */ + i: function(id) { + if(!id) { + throw new Error('Ink.i => id or element must be passed'); + } + if(typeof(id) === 'string') { + return document.getElementById(id); + } + return id; + }, + + /** + * Alias for Ink.Dom.Selector + * + * @method ss + * @uses Ink.Dom.Selector.select + * @param {String} rule + * @param {DOMElement} [from] + * @return {Array} array of DOMElements + * @sample Ink_1_ss.html + */ + ss: function(rule, from) + { + if(typeof(Ink.Dom) === 'undefined' || typeof(Ink.Dom.Selector) === 'undefined') { + throw new Error('This method requires Ink.Dom.Selector'); + } + return Ink.Dom.Selector.select(rule, (from || document)); + }, + + /** + * Alias for Ink.Dom.Selector first result + * + * @method s + * @uses Ink.Dom.Selector.select + * @param {String} rule Selector string + * @param {DOMElement} [from] Context element. If set to a DOM element, the rule will only look for descendants of this DOM Element. + * @return {DOMElement} + * @sample Ink_1_s.html + */ + s: function(rule, from) + { + if(typeof(Ink.Dom) === 'undefined' || typeof(Ink.Dom.Selector) === 'undefined') { + throw new Error('This method requires Ink.Dom.Selector'); + } + return Ink.Dom.Selector.select(rule, (from || document))[0] || null; + }, + + /** + * Extends an object with another + * Copy all of the properties in one or more source objects over to the destination object, and return the destination object. It's in-order, so the last source will override properties of the same name in previous arguments. + * + * @method extendObj + * @param {Object} destination The object that will receive the new/updated properties + * @param {Object} source The object whose properties will be copied over to the destination object + * @param {Object} [args*] Additional source objects. The last source will override properties of the same name in the previous defined sources + * @return destination object, enriched with defaults from the sources + * @sample Ink_1_extendObj.html + */ + extendObj: function(destination, source) { + if (arguments.length > 2) { + source = Ink.extendObj.apply(this, [].slice.call(arguments, 1)); + } + if (source) { + for (var property in source) { + if(Object.prototype.hasOwnProperty.call(source, property)) { + destination[property] = source[property]; + } + } + } + return destination; + }, + + /** + * Calls native console.log if available. + * + * @method log + * @param {Any} [args*] Arguments to be evaluated + * @sample Ink_1_log.html + **/ + log: function () { + // IE does not have console.log.apply in IE10 emulated mode + var console = window.console; + if (console && console.log) { + apply.call(console.log, console, arguments); + } + }, + + /** + * Calls native console.warn if available. + * + * @method warn + * @param {Any} [args*] Arguments to be evaluated + * @sample Ink_1_warn.html + **/ + warn: function () { + // IE does not have console.log.apply in IE10 emulated mode + var console = window.console; + if (console && console.warn) { + apply.call(console.warn, console, arguments); + } + }, + + /** + * Calls native console.error if available. + * + * @method error + * @param {Any} [args*] Arguments to be evaluated + * @sample Ink_1_error.html + **/ + error: function () { + // IE does not have console.log.apply in IE10 emulated mode + var console = window.console; + if (console && console.error) { + apply.call(console.error, console, arguments); + } + } + }; + + Ink.setPath('Ink', + ('INK_PATH' in window) ? window.INK_PATH : window.location.protocol + '//js.ink.sapo.pt/Ink/'); + + + + // TODO for debug - to detect pending stuff + /* + var failCount = {}; // fail count per module name + var maxFails = 3; // times + var checkDelta = 0.5; //seconds + + var tmpTmr = setInterval(function() { + var mk = Object.keys(modulesRequested); + var l = mk.length; + + if (l > 0) { + // console.log('** waiting for modules: ' + mk.join(', ') + ' **'); + + for (var i = 0, f = mk.length, k, v; i < f; ++i) { + k = mk[i]; + v = failCount[k]; + failCount[k] = (v === undefined) ? 1 : ++v; + + if (v >= maxFails) { + console.error('** Loading of module ' + k + ' failed! **'); + delete modulesRequested[k]; + } + } + } + else { + // console.log('** Module loads complete. **'); + clearInterval(tmpTmr); + } + }, checkDelta*1000); + */ +}(window, document)); + +/** + * @module Ink.Net.Ajax_1 + * Cross Browser Ajax requests + * @version 1 + */ + +Ink.createModule('Ink.Net.Ajax', '1', [], function() { + + 'use strict'; + + /** + * Creates a new XMLHttpRequest object + * + * @class Ink.Net.Ajax + * @constructor + * + * @param {String} url Request URL + * @param {Object} options Request options + * @param {Boolean} [options.asynchronous]=true If false, the request synchronous. + * @param {Boolean} [options.cors] Flag to activate CORS. Set this to true if you're doing a cross-origin request + * @param {String} [options.method]='POST' HTTP request method. POST by default. + * @param {Object|String} [options.parameters] Request parameters to be sent with the request + * @param {Number} [options.timeout] Request timeout in seconds + * @param {Number} [options.delay] Artificial delay. If the request is completed faster than this delay, wait the remaining time before executing the callbacks + * @param {String} [options.postBody] POST request body. If not specified, it's filled with the contents from parameters + * @param {String} [options.contentType] Content-type header to be sent. Defaults to 'application/x-www-form-urlencoded' + * @param {Object} [options.requestHeaders] Key-value pairs for additional request headers + * @param {Function} [options.onComplete] Callback executed after the request is completed, regardless of what happened during the request. + * @param {Function} [options.onSuccess] Callback executed if the request is successful (requests with 2xx status codes) + * @param {Function} [options.onFailure] Callback executed if the request fails (requests with status codes different from 2xx) + * @param {Function} [options.onException] Callback executed if an exception occurs. Receives the exception as a parameter. + * @param {Function} [options.onCreate] Callback executed after object initialization but before the request is made + * @param {Function} [options.onInit] Callback executed before any initialization + * @param {Function} [options.onTimeout] Callback executed if the request times out + * @param {Boolean|String} [options.evalJS]=true If the request Content-type header is application/json, evaluates the response and populates responseJSON. Use 'force' if you want to force the response evaluation, no matter what Content-type it's using. + * @param {Boolean} [options.sanitizeJSON] Flag to sanitize the content of responseText before evaluation + * @param {String} [options.xhrProxy] URI for proxy service hosted on the same server as the web app, that can fetch documents from other domains. The service must pipe all input and output untouched (some input sanitization is allowed, like clearing cookies). e.g., requesting http://example.org/doc can become /proxy/http%3A%2F%2Fexample.org%2Fdoc The proxy service will be used for cross-domain requests, if set, else a network error is returned as exception. + * + * @example + * new Ajax('test.json', { + * method: 'get', + * onSuccess: function (ajx, responseJSON) { + * // Do stuff with responseJSON or ajx.responseText + * console.log(responseJSON.something.length); + * }, + * onFailure: function (ajx, errorResponse) { + * // Deal with it + * alert(ajx.status); // The HTTP response code + * } + * }); + */ + var Ajax = function(url, options){ + + // start of AjaxMock patch - uncomment to enable it + /*var AM = SAPO.Communication.AjaxMock; + if (AM && !options.inMock) { + if (AM.autoRecordThisUrl && AM.autoRecordThisUrl(url)) { + return new AM.Record(url, options); + } + if (AM.mockThisUrl && AM.mockThisUrl(url)) { + return new AM.Play(url, options, true); + } + }*/ + // end of AjaxMock patch + + this.init(url, options); + }; + + /** + * Options for all requests. These can then be overriden for individual ones. + */ + Ajax.globalOptions = { + parameters: {}, + requestHeaders: {} + }; + + + // IE10 does not need XDomainRequest + var xMLHttpRequestWithCredentials = 'XMLHttpRequest' in window && 'withCredentials' in (new XMLHttpRequest()); + + + + Ajax.prototype = { + + init: function(url, userOptions) { + if (!url) { + throw new Error("WRONG_ARGUMENTS_ERR"); + } + var options = Ink.extendObj({ + asynchronous: true, + method: 'POST', + parameters: null, + timeout: 0, + delay: 0, + postBody: '', + contentType: 'application/x-www-form-urlencoded', + requestHeaders: null, + onComplete: null, + onSuccess: null, + onFailure: null, + onException: null, + onHeaders: null, + onCreate: null, + onInit: null, + onTimeout: null, + sanitizeJSON: false, + evalJS: true, + xhrProxy: '', + cors: false, + debug: false, + useCredentials: false, + signRequest: false + }, Ajax.globalOptions); + + if (userOptions && typeof userOptions === 'object') { + options = Ink.extendObj(options, userOptions); + + + if (typeof userOptions.parameters === 'object') { + options.parameters = Ink.extendObj(Ink.extendObj({}, Ajax.globalOptions.parameters), userOptions.parameters); + } else if (userOptions.parameters !== null) { + var globalParameters = this.paramsObjToStr(Ajax.globalOptions.parameters); + if (globalParameters) { + options.parameters = userOptions.parameters + '&' + globalParameters; + } + } + + options.requestHeaders = Ink.extendObj({}, Ajax.globalOptions.requestHeaders); + options.requestHeaders = Ink.extendObj(options.requestHeaders, userOptions.requestHeaders); + } + + this.options = options; + + this.safeCall('onInit'); + + this.url = url; + + var urlLocation = this._locationFromURL(url); + this.isHTTP = this._locationIsHTTP(urlLocation); + this.isCrossDomain = this._locationIsCrossDomain(urlLocation, location); + + this.requestHasBody = options.method.search(/^get|head$/i) < 0; + + if(this.options.cors) { + this.isCrossDomain = false; + } + + this.transport = this.getTransport(); + + this.request(); + }, + + /** + * Returns a location object from an URL + * + * @method _locationFromUrl + * @param url + * @private + **/ + _locationFromURL: function (url) { + var urlLocation = document.createElementNS ? + document.createElementNS('http://www.w3.org/1999/xhtml', 'a') : + document.createElement('a'); + urlLocation.href = url; + return urlLocation; + }, + + /** + * Checks whether a location is HTTP or HTTPS + * + * @method locationIsHttp + * @param urlLocation + * @private + */ + _locationIsHTTP: function (urlLocation) { + return urlLocation.protocol.match(/^https?:/i) ? true : false; + }, + + /** + * Checks whether a location is cross-domain from another + * + * @method _locationIsCrossDomain + * @param urlLocation {Location} + * @param otherLocation {Location} + */ + _locationIsCrossDomain: function (urlLocation, location) { + location = location || window.location; + if (!Ajax.prototype._locationIsHTTP(urlLocation) || location.protocol === 'widget:' || typeof window.widget === 'object') { + return false; + } else { + return location.protocol !== urlLocation.protocol || + location.host.split(':')[0] !== urlLocation.host.split(':')[0]; + } + }, + + /** + * Creates the appropriate XMLHttpRequest object + * + * @method getTransport + * @return {Object} XMLHttpRequest object + */ + getTransport: function() + { + /*global XDomainRequest:false, ActiveXObject:false */ + if (!xMLHttpRequestWithCredentials && this.options.cors && 'XDomainRequest' in window) { + this.usingXDomainReq = true; + return new XDomainRequest(); + } + else if (typeof XMLHttpRequest !== 'undefined') { + return new XMLHttpRequest(); + } + else if (typeof ActiveXObject !== 'undefined') { + try { + return new ActiveXObject('Msxml2.XMLHTTP'); + } catch (e) { + return new ActiveXObject('Microsoft.XMLHTTP'); + } + } else { + return null; + } + }, + + /** + * Set the necessary headers for an ajax request + * + * @method setHeaders + * @param {String} url The url for the request + */ + setHeaders: function() + { + if (this.transport) { + try { + var headers = { + "Accept": "text/javascript,text/xml,application/xml,application/xhtml+xml,text/html,application/json;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1", + "Accept-Language": navigator.language, + "X-Requested-With": "XMLHttpRequest", + "X-Ink-Version": "2" + }; + if (this.options.cors) { + if (!this.options.signRequest) { + delete headers['X-Requested-With']; + } + delete headers['X-Ink-Version']; + } + + if (this.options.requestHeaders && typeof this.options.requestHeaders === 'object') { + for(var headerReqName in this.options.requestHeaders) { + if (this.options.requestHeaders.hasOwnProperty(headerReqName)) { + headers[headerReqName] = this.options.requestHeaders[headerReqName]; + } + } + } + + if (this.transport.overrideMimeType && (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) { + headers.Connection = 'close'; + } + + for (var headerName in headers) { + if(headers.hasOwnProperty(headerName)) { + this.transport.setRequestHeader(headerName, headers[headerName]); + } + } + } catch(e) {} + } + }, + + /** + * Converts an object with parameters to a querystring + * + * @method paramsObjToStr + * @param {Object|String} optParams parameters object + * @return {String} querystring + */ + paramsObjToStr: function(optParams) { + var k, m, p, a, params = []; + if (typeof optParams === 'object') { + for (p in optParams){ + if (optParams.hasOwnProperty(p)) { + a = optParams[p]; + if (Object.prototype.toString.call(a) === '[object Array]' && !isNaN(a.length)) { + for (k = 0, m = a.length; k < m; k++) { + params = params.concat([ + encodeURIComponent(p), '[]', '=', + encodeURIComponent(a[k]), '&' + ]); + } + } + else { + params = params.concat([ + encodeURIComponent(p), '=', + encodeURIComponent(a), '&' + ]); + } + } + } + if (params.length > 0) { + params.pop(); + } + } + else + { + return optParams; + } + return params.join(''); + }, + + /** + * Set the url parameters for a GET request + * + * @method setParams + */ + setParams: function() + { + var params = null, optParams = this.options.parameters; + + if(typeof optParams === "object"){ + params = this.paramsObjToStr(optParams); + } else { + params = '' + optParams; + } + + if(params){ + if(this.url.indexOf('?') > -1) { + this.url = this.url.split('#')[0] + '&' + params; + } else { + this.url = this.url.split('#')[0] + '?' + params; + } + } + }, + + /** + * Gets an HTTP header from the response + * + * @method getHeader + * @param {String} name Header name + * @return {String} header Content + */ + getHeader: function(name) + { + if (this.usingXDomainReq && name === 'Content-Type') { + return this.transport.contentType; + } + try{ + return this.transport.getResponseHeader(name); + } catch(e) { + return null; + } + }, + + /** + * Gets all the HTTP headers from the response + * + * @method getAllHeaders + * @return {String} The headers, each separated by a newline + */ + getAllHeaders: function() + { + try { + return this.transport.getAllResponseHeaders(); + } catch(e) { + return null; + } + }, + + /** + * Sets the response object + * + * @method getResponse + * @return {Object} the response object + */ + getResponse: function(){ + // setup our own stuff + var t = this.transport, + r = { + headerJSON: null, + responseJSON: null, + getHeader: this.getHeader, + getAllHeaders: this.getAllHeaders, + request: this, + transport: t, + timeTaken: new Date() - this.startTime, + requestedUrl: this.url + }; + + // setup things expected from the native object + r.readyState = t.readyState; + try { r.responseText = t.responseText; } catch(e) {} + try { r.responseXML = t.responseXML; } catch(e) {} + try { r.status = t.status; } catch(e) { r.status = 0; } + try { r.statusText = t.statusText; } catch(e) { r.statusText = ''; } + + return r; + }, + + /** + * Aborts the request if still running. No callbacks are called + * + * @method abort + */ + abort: function(){ + if (this.transport) { + clearTimeout(this.delayTimeout); + clearTimeout(this.stoTimeout); + try { this.transport.abort(); } catch(ex) {} + this.finish(); + } + }, + + /** + * Executes the state changing phase of an ajax request + * + * @method runStateChange + */ + runStateChange: function() + { + var rs = this.transport.readyState; + if (rs === 3) { + if (this.isHTTP) { + this.safeCall('onHeaders'); + } + } else if (rs === 4 || this.usingXDomainReq) { + + if (this.options.asynchronous && this.options.delay && (this.startTime + this.options.delay > new Date().getTime())) { + this.delayTimeout = setTimeout(Ink.bind(this.runStateChange, this), this.options.delay + this.startTime - new Date().getTime()); + return; + } + + var responseJSON, + responseContent = this.transport.responseText, + response = this.getResponse(), + curStatus = this.transport.status; + + if (this.isHTTP && !this.options.asynchronous) { + this.safeCall('onHeaders'); + } + + clearTimeout(this.stoTimeout); + + if (curStatus === 0) { + // Status 0 indicates network error for http requests. + // For http less requests, 0 is always returned. + if (this.isHTTP) { + this.safeCall('onException', this.makeError(18, 'NETWORK_ERR')); + } else { + curStatus = responseContent ? 200 : 404; + } + } + else if (curStatus === 304) { + curStatus = 200; + } + var isSuccess = this.usingXDomainReq || 200 <= curStatus && curStatus < 300; + + var headerContentType = this.getHeader('Content-Type') || ''; + if (this.options.evalJS && + (headerContentType.indexOf("application/json") >= 0 || this.options.evalJS === 'force')){ + try { + responseJSON = this.evalJSON(responseContent, this.sanitizeJSON); + if(responseJSON){ + responseContent = response.responseJSON = responseJSON; + } + } catch(e){ + if (isSuccess) { + // If the request failed, then this is perhaps an error page + // so don't notify error. + this.safeCall('onException', e); + } + } + } + + if (this.usingXDomainReq && headerContentType.indexOf('xml') !== -1 && 'DOMParser' in window) { + // http://msdn.microsoft.com/en-us/library/ie/ff975278(v=vs.85).aspx + var mimeType; + switch (headerContentType) { + case 'application/xml': + case 'application/xhtml+xml': + case 'image/svg+xml': + mimeType = headerContentType; + break; + default: + mimeType = 'text/xml'; + } + var xmlDoc = (new DOMParser()).parseFromString( this.transport.responseText, mimeType); + this.transport.responseXML = xmlDoc; + response.responseXML = xmlDoc; + } + + if (this.transport.responseXML !== null && response.responseJSON === null && this.transport.responseXML.xml !== ""){ + responseContent = this.transport.responseXML; + } + + if (curStatus || this.usingXDomainReq) { + if (isSuccess) { + this.safeCall('onSuccess', response, responseContent); + } else { + this.safeCall('onFailure', response, responseContent); + } + this.safeCall('on'+curStatus, response, responseContent); + } + this.finish(response, responseContent); + } + }, + + /** + * Last step after XHR is complete. Call onComplete and cleanup object + * + * @method finish + * @param {Any} response + * @param {Any} responseContent + */ + finish: function(response, responseContent){ + if (response) { + this.safeCall('onComplete', response, responseContent); + } + clearTimeout(this.stoTimeout); + + if (this.transport) { + // IE6 sometimes barfs on this one + try{ this.transport.onreadystatechange = null; } catch(e){} + + if (typeof this.transport.destroy === 'function') { + // Stuff for Samsung. + this.transport.destroy(); + } + + // Let XHR be collected. + this.transport = null; + } + }, + + /** + * Safely calls a callback function. + * Verifies that the callback is well defined and traps errors + * + * @method safeCall + * @param {Function} listener + */ + safeCall: function(listener, first/*, second*/) { + function rethrow(exception){ + setTimeout(function() { + // Rethrow exception so it'll land in + // the error console, firebug, whatever. + if (exception.message) { + exception.message += '\n'+(exception.stacktrace || exception.stack || ''); + } + throw exception; + }, 1); + } + if (typeof this.options[listener] === 'function') { + //SAPO.safeCall(this, this.options[listener], first, second); + //return object[listener].apply(object, [].slice.call(arguments, 2)); + try { + this.options[listener].apply(this, [].slice.call(arguments, 1)); + } catch(ex) { + rethrow(ex); + } + } else if (first && window.Error && (first instanceof Error)) { + rethrow(first); + } + }, + + /** + * Sets a new request header for the next http request + * + * @method setRequestHeader + * @param {String} name + * @param {String} value + */ + setRequestHeader: function(name, value){ + if (!this.options.requestHeaders) { + this.options.requestHeaders = {}; + } + this.options.requestHeaders[name] = value; + }, + + /** + * Executes the request + * + * @method request + */ + request: function() + { + if(this.transport) { + var params = null; + if(this.requestHasBody) { + if(this.options.postBody !== null && this.options.postBody !== '') { + params = this.options.postBody; + this.setParams(); + } else if (this.options.parameters !== null && this.options.parameters !== ''){ + params = this.options.parameters; + } + + if (typeof params === "object" && !params.nodeType) { + params = this.paramsObjToStr(params); + } else if (typeof params !== "object" && params !== null){ + params = '' + params; + } + + if(this.options.contentType) { + this.setRequestHeader('Content-Type', this.options.contentType); + } + } else { + this.setParams(); + } + + var url = this.url; + var method = this.options.method; + var crossDomain = this.isCrossDomain; + + if (crossDomain && this.options.xhrProxy) { + this.setRequestHeader('X-Url', url); + url = this.options.xhrProxy + encodeURIComponent(url); + crossDomain = false; + } + + try { + this.transport.open(method, url, this.options.asynchronous); + } catch(e) { + this.safeCall('onException', e); + return this.finish(this.getResponse(), null); + } + + this.setHeaders(); + + this.safeCall('onCreate'); + + if(this.options.timeout && !isNaN(this.options.timeout)) { + this.stoTimeout = setTimeout(Ink.bind(function() { + if(this.options.onTimeout) { + this.safeCall('onTimeout'); + this.abort(); + } + }, this), (this.options.timeout * 1000)); + } + + if(this.options.useCredentials && !this.usingXDomainReq) { + this.transport.withCredentials = true; + } + + if(this.options.asynchronous && !this.usingXDomainReq) { + this.transport.onreadystatechange = Ink.bind(this.runStateChange, this); + } + else if (this.usingXDomainReq) { + this.transport.onload = Ink.bind(this.runStateChange, this); + } + + try { + if (crossDomain) { + // Need explicit handling because Mozila aborts + // the script and Chrome fails silently.per the spec + throw this.makeError(18, 'NETWORK_ERR'); + } else { + this.startTime = new Date().getTime(); + this.transport.send(params); + } + } catch(e) { + this.safeCall('onException', e); + return this.finish(this.getResponse(), null); + } + + if(!this.options.asynchronous) { + this.runStateChange(); + } + } + }, + + /** + * Returns a new exception object that can be thrown + * + * @method makeError + * @param code Error Code + * @param message Message + * @returns {Object} + */ + makeError: function(code, message){ + if (typeof Error !== 'function') { + return {code: code, message: message}; + } + var e = new Error(message); + e.code = code; + return e; + }, + + /** + * Checks if a given string is valid JSON + * + * @method isJSON + * @param {String} str String to be evaluated + * @return {Boolean} True if the string is valid JSON + */ + isJSON: function(str) + { + if (typeof str !== "string" || !str){ return false; } + str = str.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); + return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); + }, + + /** + * Evaluates a given string as JSON + * + * @method evalJSON + * @param {String} str String to be evaluated + * @param {Boolean} sanitize Flag to sanitize the content + * @return {Object} JSON content as an object + */ + evalJSON: function(strJSON, sanitize) + { + if (strJSON && (!sanitize || this.isJSON(strJSON))) { + try { + if (typeof JSON !== "undefined" && typeof JSON.parse !== 'undefined'){ + return JSON.parse(strJSON); + } + /*jshint evil:true */ + return eval('(' + strJSON + ')'); + } catch(e) { + throw new Error('ERROR: Bad JSON string...'); + } + } + return null; + } + }; + + /** + * Loads content from a given url through an XMLHttpRequest. + * + * Shortcut function for simple AJAX use cases. Works with JSON, XML and plain text. + * + * @method load + * @param {String} url Request URL + * @param {Function} callback Callback to be executed if the request is successful + * @return {Object} XMLHttpRequest object + * + * @example + * Ajax.load('some/text/file', function (responseText) { + * doSomething(responseText); + * }); + * Ajax.load('some/xml/file', function (responseXML) { + * doSomething(responseXML); + * }); + * Ajax.load('some/json/file', function (responseJSON) { + * doSomething(responseJSON); + * }); + * + */ + Ajax.load = function(url, callback){ + return new Ajax(url, { + method: 'GET', + onSuccess: function(response){ + callback(response.responseJSON || response.responseText, response); + } + }); + }; + + /** + * Loads content from a given url through an XMLHttpRequest. + * Shortcut function for simple AJAX use cases. + * + * @method ping + * @param {String} url Request url + * @param {Function} callback Callback to be executed if the request is successful + * @return {Object} XMLHttpRequest object + */ + Ajax.ping = function(url, callback){ + return new Ajax(url, { + method: 'HEAD', + onSuccess: function(response){ + if (typeof callback === 'function'){ + callback(response); + } + } + }); + }; + + + return Ajax; +}); + +/** + * @module Ink.Net.JsonP_1 + * Cross Browser Ajax requests + * @version 1 + */ + +Ink.createModule('Ink.Net.JsonP', '1', [], function() { + + 'use strict'; + + /** + * Executes a JSONP request + * + * @class Ink.Net.JsonP + * @constructor + * + * @param {String} uri Request URL + * @param {Object} options Request options + * @param {Function} options.onSuccess Success callback + * @param {Function} [options.onFailure] Failure callback + * @param {Object} [options.failureObj] Object to be passed as argument to failure callback + * @param {Number} [options.timeout] Timeout for request fail, in seconds. defaults to 10 + * @param {Object} [options.params] Object with the parameters and respective values to unfold + * @param {String} [options.callbackParam] Parameter to use as callback. defaults to 'jsoncallback' + * @param {String} [options.internalCallback] Name of the callback function stored in the Ink.Net.JsonP object. + * + * @example + * Ink.requireModules(['Ink.Net.JsonP_1'], function (JsonP) { + * var jsonp = new JsonP('http://path.to.jsonp/endpoint', { + * // When the JSONP response arrives, this callback is called: + * onSuccess: function (gameData) { + * game.startGame(gameData); + * }, + * // after options.timeout seconds, this callback gets called: + * onFailure: function () { + * game.error('Could not load game data!'); + * }, + * timeout: 5 + * }); + * }); + */ + var JsonP = function(uri, options) { + this.init(uri, options); + }; + + JsonP.prototype = { + + init: function(uri, options) { + this.options = Ink.extendObj( { + onSuccess: undefined, + onFailure: undefined, + failureObj: {}, + timeout: 10, + params: {}, + callbackParam: 'jsoncallback', + internalCallback: '_cb', + randVar: false + }, options || {}); + + if(this.options.randVar !== false) { + this.randVar = this.options.randVar; + } else { + this.randVar = parseInt(Math.random() * 100000, 10); + } + + this.options.internalCallback += this.randVar; + + this.uri = uri; + + // prevent SAPO legacy onComplete - make it onSuccess + if(typeof(this.options.onComplete) === 'function') { + this.options.onSuccess = this.options.onComplete; + } + + if (typeof this.uri !== 'string') { + throw 'Please define an URI'; + } + + if (typeof this.options.onSuccess !== 'function') { + throw 'please define a callback function on option onSuccess!'; + } + + Ink.Net.JsonP[this.options.internalCallback] = Ink.bind(function() { + window.clearTimeout(this.timeout); + delete window.Ink.Net.JsonP[this.options.internalCallback]; + this._removeScriptTag(); + this.options.onSuccess(arguments[0]); + }, this); + + this._addScriptTag(); + }, + + _addParamsToGet: function(uri, params) { + var hasQuestionMark = uri.indexOf('?') !== -1; + var sep, pKey, pValue, parts = [uri]; + + for (pKey in params) { + if (params.hasOwnProperty(pKey)) { + if (!hasQuestionMark) { sep = '?'; hasQuestionMark = true; } + else { sep = '&'; } + pValue = params[pKey]; + if (typeof pValue !== 'number' && !pValue) { pValue = ''; } + parts = parts.concat([sep, pKey, '=', encodeURIComponent(pValue)]); + } + } + + return parts.join(''); + }, + + _getScriptContainer: function() { + var headEls = document.getElementsByTagName('head'); + if (headEls.length === 0) { + var scriptEls = document.getElementsByTagName('script'); + return scriptEls[0]; + } + return headEls[0]; + }, + + _addScriptTag: function() { + // enrich options will callback and random seed + this.options.params[this.options.callbackParam] = 'Ink.Net.JsonP.' + this.options.internalCallback; + this.options.params.rnd_seed = this.randVar; + this.uri = this._addParamsToGet(this.uri, this.options.params); + // create script tag + var scriptEl = document.createElement('script'); + scriptEl.type = 'text/javascript'; + scriptEl.src = this.uri; + var scriptCtn = this._getScriptContainer(); + scriptCtn.appendChild(scriptEl); + this.timeout = setTimeout(Ink.bind(this._requestFailed, this), (this.options.timeout * 1000)); + }, + + _requestFailed : function () { + delete Ink.Net.JsonP[this.options.internalCallback]; + this._removeScriptTag(); + if(typeof this.options.onFailure === 'function'){ + this.options.onFailure(this.options.failureObj); + } + }, + + _removeScriptTag: function() { + var scriptEl; + var scriptEls = document.getElementsByTagName('script'); + var scriptUri; + for (var i = 0, f = scriptEls.length; i < f; ++i) { + scriptEl = scriptEls[i]; + scriptUri = scriptEl.getAttribute('src') || scriptEl.src; + if (scriptUri !== null && scriptUri === this.uri) { + scriptEl.parentNode.removeChild(scriptEl); + return; + } + } + } + + }; + + return JsonP; + +}); +/** + * @module Ink.Dom.Browser_1 + * @version 1 + * Browser Detection and User Agent sniffing + */ +Ink.createModule('Ink.Dom.Browser', '1', [], function() { + 'use strict'; + + /** + * @namespace Ink.Dom.Browser + * @version 1 + * @static + * @example + * + */ + var Browser = { + /** + * True if the browser is Internet Explorer + * + * @property IE + * @type {Boolean} + * @public + * @static + */ + IE: false, + + /** + * True if the browser is Gecko based + * + * @property GECKO + * @type {Boolean} + * @public + * @static + */ + GECKO: false, + + /** + * True if the browser is Opera + * + * @property OPERA + * @type {Boolean} + * @public + * @static + */ + OPERA: false, + + /** + * True if the browser is Safari + * + * @property SAFARI + * @type {Boolean} + * @public + * @static + */ + SAFARI: false, + + /** + * True if the browser is Konqueror + * + * @property KONQUEROR + * @type {Boolean} + * @public + * @static + */ + KONQUEROR: false, + + /** + * True if browser is Chrome + * + * @property CHROME + * @type {Boolean} + * @public + * @static + */ + CHROME: false, + + /** + * The specific browser model. + * False if it is unavailable. + * + * @property model + * @type {Boolean|String} + * @public + * @static + */ + model: false, + + /** + * The browser version. + * False if it is unavailable. + * + * @property version + * @type {Boolean|String} + * @public + * @static + */ + version: false, + + /** + * The user agent string. + * False if it is unavailable. + * + * @property userAgent + * @type {Boolean|String} + * @public + * @static + */ + userAgent: false, + + /** + * Initialization function for the Browser object. + * + * Is called automatically when this module is loaded, and calls setDimensions, setBrowser and setReferrer. + * + * @method init + * @public + */ + init: function() { + this.detectBrowser(); + this.setDimensions(); + this.setReferrer(); + }, + + /** + * Retrieves and stores window dimensions in this object. Called automatically when this module is loaded. + * + * @method setDimensions + * @public + */ + setDimensions: function() { + //this.windowWidth=window.innerWidth !== null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body !== null ? document.body.clientWidth : null; + //this.windowHeight=window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null; + var myWidth = 0, myHeight = 0; + if ( typeof window.innerWidth=== 'number' ) { + myWidth = window.innerWidth; + myHeight = window.innerHeight; + } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { + myWidth = document.documentElement.clientWidth; + myHeight = document.documentElement.clientHeight; + } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { + myWidth = document.body.clientWidth; + myHeight = document.body.clientHeight; + } + this.windowWidth = myWidth; + this.windowHeight = myHeight; + }, + + /** + * Stores the referrer. Called automatically when this module is loaded. + * + * @method setReferrer + * @public + */ + setReferrer: function() { + if (document.referrer && document.referrer.length) { + this.referrer = window.escape(document.referrer); + } else { + this.referrer = false; + } + }, + + /** + * Detects the browser and stores the found properties. Called automatically when this module is loaded. + * + * @method detectBrowser + * @public + */ + detectBrowser: function() { + this._sniffUserAgent(navigator.userAgent); + }, + + _sniffUserAgent: function (sAgent) { + this.userAgent = sAgent; + + sAgent = sAgent.toLowerCase(); + + if (/applewebkit\//.test(sAgent)) { + this.cssPrefix = '-webkit-'; + this.domPrefix = 'Webkit'; + if(/(chrome|crios)\//.test(sAgent)) { + // Chrome + this.CHROME = true; + this.model = 'chrome'; + this.version = sAgent.replace(/(.*)chrome\/([^\s]+)(.*)/, "$2"); + } else { + // Safari + this.SAFARI = true; + this.model = 'safari'; + var rVersion = /version\/([^) ]+)/; + if (rVersion.test(sAgent)) { + this.version = sAgent.match(rVersion)[1]; + } else { + this.version = sAgent.replace(/(.*)applewebkit\/([^\s]+)(.*)/, "$2"); + } + } + } else if (/opera/.test(sAgent)) { + // Opera + this.OPERA = true; + this.model = 'opera'; + this.version = sAgent.replace(/(.*)opera.([^\s$]+)(.*)/, "$2"); + this.cssPrefix = '-o-'; + this.domPrefix = 'O'; + } else if (/konqueror/.test(sAgent)) { + // Konqueroh + this.KONQUEROR = true; + this.model = 'konqueror'; + this.version = sAgent.replace(/(.*)konqueror\/([^;]+);(.*)/, "$2"); + this.cssPrefix = '-khtml-'; + this.domPrefix = 'Khtml'; + } else if (/(msie|trident)/i.test(sAgent)) { + // MSIE + this.IE = true; + this.model = 'ie'; + if (/rv:((?:\d|\.)+)/.test(sAgent)) { // IE 11 + this.version = sAgent.match(/rv:((?:\d|\.)+)/)[1]; + } else { + this.version = sAgent.replace(/(.*)\smsie\s([^;]+);(.*)/, "$2"); + } + this.cssPrefix = '-ms-'; + this.domPrefix = 'ms'; + } else if (/gecko/.test(sAgent)) { + // GECKO + // Supports only: + // Camino, Chimera, Epiphany, Minefield (firefox 3), Firefox, Firebird, Phoenix, Galeon, + // Iceweasel, K-Meleon, SeaMonkey, Netscape, Songbird, Sylera, + this.cssPrefix = '-moz-'; + this.domPrefix = 'Moz'; + + this.GECKO = true; + + var re = /(camino|chimera|epiphany|minefield|firefox|firebird|phoenix|galeon|iceweasel|k\-meleon|seamonkey|netscape|songbird|sylera)/; + if(re.test(sAgent)) { + this.model = sAgent.match(re)[1]; + this.version = sAgent.replace(new RegExp("(.*)"+this.model+"\/([^;\\s$]+)(.*)"), "$2"); + } else { + // probably is mozilla + this.model = 'mozilla'; + var reVersion = /(.*)rv:([^)]+)(.*)/; + if(reVersion.test(sAgent)) { + this.version = sAgent.replace(reVersion, "$2"); + } + } + } + }, + + /** + * Debug function which displays browser (and Ink.Dom.Browser) information as an alert message. + * + * @method debug + * @public + * + * @example + * + * The following code + * + * Ink.requireModules(['Ink.Dom.Browser_1'], function (Browser) { + * Browser.debug(); + * }); + * + * Alerts (On Firefox 22): + * + * known browsers: (ie, gecko, opera, safari, konqueror) + * false,true,false,false,false + * model -> firefox + * version -> 22.0 + * + * original UA -> Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0 + */ + debug: function() { + /*global alert:false */ + var str = "known browsers: (ie, gecko, opera, safari, konqueror) \n"; + str += [this.IE, this.GECKO, this.OPERA, this.SAFARI, this.KONQUEROR] +"\n"; + str += "model -> "+this.model+"\n"; + str += "version -> "+this.version+"\n"; + str += "\n"; + str += "original UA -> "+this.userAgent; + + alert(str); + } + }; + + Browser.init(); + + return Browser; +}); + +/** + * @module Ink.Dom.Css_1 + * @version 1 + * CSS Utilities and toolbox + */ + +Ink.createModule( 'Ink.Dom.Css', 1, [], function() { + + 'use strict'; + + // getComputedStyle feature detection. + var getCs = ("defaultView" in document) && ("getComputedStyle" in document.defaultView) ? document.defaultView.getComputedStyle : window.getComputedStyle; + + /** + * @namespace Ink.Dom.Css + * @static + */ + + var Css = { + /** + * Adds of removes a class. + * Depending on addRemState, this method either adds a class if it's true or removes if if false. + * + * @method addRemoveClassName + * @param {DOMElement|string} elm DOM element or element id + * @param {string} className class name to add or remove. + * @param {boolean} addRemState Whether to add or remove. `true` to add, `false` to remove. + * + * @example + * Ink.requireModules(['Ink.Dom.Css_1'], function (Css) { + * Css.addRemoveClassName(myElm, 'classss', true); // Adds the `classss` class. + * Css.addRemoveClassName(myElm, 'classss', false); // Removes the `classss` class. + * }); + */ + addRemoveClassName: function(elm, className, addRemState) { + if (addRemState) { + return this.addClassName(elm, className); + } + this.removeClassName(elm, className); + }, + + /** + * Adds a class to a given element + * + * @method addClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String|Array} className Classes + */ + addClassName: function(elm, className) { + elm = Ink.i(elm); + if (!elm || !className) { return null; } + className = ('' + className).split(/[, ]+/); + var i = 0; + var len = className.length; + + for (; i < len; i++) { + if (typeof elm.classList !== "undefined") { + elm.classList.add(className[i]); + } else if (!Css.hasClassName(elm, className[i])) { + elm.className += (elm.className ? ' ' : '') + className[i]; + } + } + }, + + /** + * Removes a class from a given element + * + * @method removeClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String|Array} className Class names to remove. You can either use a space separated string of classnames, comma-separated list or an array + */ + removeClassName: function(elm, className) { + elm = Ink.i(elm); + if (!elm || !className) { return null; } + + className = ('' + className).split(/[, ]+/); + var i = 0; + var len = className.length; + + if (typeof elm.classList !== "undefined"){ + for (; i < len; i++) { + elm.classList.remove(className[i]); + } + } else { + var elmClassName = elm.className || ''; + var re; + for (; i < len; i++) { + re = new RegExp("(^|\\s+)" + className[i] + "(\\s+|$)"); + elmClassName = elmClassName.replace(re, ' '); + } + elm.className = (elmClassName + .replace(/^\s+/, '') + .replace(/\s+$/, '')); + } + }, + + /** + * Alias to addRemoveClassName. + * Utility function, saves many if/elses. + * + * @method setClassName + * @uses addRemoveClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String|Array} className Class names to add\remove. Comma separated, space separated or simply an Array + * @param {Boolean} [add]=false Flag to switch behavior from removal to addition. true to add, false to remove + */ + setClassName: function(elm, className, add) { + this.addRemoveClassName(elm, className, add || false); + }, + + /** + * Checks if an element has a class. + * This method verifies if an element has ONE of a list of classes. If the last argument is flagged as true, instead checks if the element has ALL the classes + * + * @method hasClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String|Array} className Class names to test + * @param {Boolean} [all]=false If flagged as true, it will check if the element contains ALL the CSS classes + * @return {Boolean} true if a given class is applied to a given element + */ + hasClassName: function(elm, className, all) { + elm = Ink.i(elm); + if (!elm || !className) { return false; } + + className = ('' + className).split(/[, ]+/); + var i = 0; + var len = className.length; + var has; + var re; + + for ( ; i < len; i++) { + if (typeof elm.classList !== "undefined"){ + has = elm.classList.contains(className[i]); + } else { + var elmClassName = elm.className; + if (elmClassName === className[i]) { + has = true; + } else { + re = new RegExp("(^|\\s)" + className[i] + "(\\s|$)"); + has = re.test(elmClassName); + } + } + if (has && !all) { return true; } // return if looking for any class + if (!has && all) { return false; } // return if looking for all classes + } + + if (all) { + // if we got here, all classes were found so far + return true; + } else { + // if we got here with all == false, no class was found + return false; + } + }, + + /** + * Blinks a class from an element + * Add and removes the class from the element with a timeout, so it blinks + * + * @method blinkClass + * @uses addRemoveClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String|Array} className Class name(s) to blink + * @param {Boolean} timeout timeout in ms between adding and removing, default 100 ms + * @param {Boolean} negate is true, class is removed then added + */ + blinkClass: function(element, className, timeout, negate){ + element = Ink.i(element); + Css.addRemoveClassName(element, className, !negate); + setTimeout(function() { + Css.addRemoveClassName(element, className, negate); + }, Number(timeout) || 100); + }, + + /** + * Toggles a class name from a given element + * + * @method toggleClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String} className Class name + * @param {Boolean} [forceAdd] Flag to force adding the the classe names if they don't exist yet. + */ + toggleClassName: function(elm, className, forceAdd) { + if (elm && className){ + if (typeof elm.classList !== "undefined" && !/[, ]/.test(className)){ + elm = Ink.i(elm); + if (elm !== null){ + elm.classList.toggle(className); + } + return true; + } + } + + if (typeof forceAdd !== 'undefined') { + if (forceAdd === true) { + Css.addClassName(elm, className); + } + else if (forceAdd === false) { + Css.removeClassName(elm, className); + } + } else { + if (Css.hasClassName(elm, className)) { + Css.removeClassName(elm, className); + } else { + Css.addClassName(elm, className); + } + } + }, + + /** + * Sets the opacity of given element + * + * @method setOpacity + * @param {DOMElement|String} elm DOM element or element id + * @param {Number} value allows 0 to 1(default mode decimal) or percentage (warning using 0 or 1 will reset to default mode) + */ + setOpacity: function(elm, value) { + elm = Ink.i(elm); + if (elm !== null){ + var val = 1; + + if (!isNaN(Number(value))){ + if (value <= 0) { val = 0; } + else if (value <= 1) { val = value; } + else if (value <= 100) { val = value / 100; } + else { val = 1; } + } + + if (typeof elm.style.opacity !== 'undefined') { + elm.style.opacity = val; + } + else { + elm.style.filter = "alpha(opacity:"+(val*100|0)+")"; + } + } + }, + + /** + * Converts a css property name to a string in camelcase to be used with CSSStyleDeclaration. + * @method _camelCase + * @private + * @param {String} str String to convert + * @return {String} Converted string + */ + _camelCase: function(str) { + return str ? str.replace(/-(\w)/g, function (_, $1) { + return $1.toUpperCase(); + }) : str; + }, + + + /** + * Gets the value for an element's style attribute + * + * @method getStyle + * @param {DOMElement|String} elm DOM element or element id + * @param {String} style Which css attribute to fetch + * @return Style value + */ + getStyle: function(elm, style) { + elm = Ink.i(elm); + if (elm !== null) { + style = style === 'float' ? 'cssFloat': this._camelCase(style); + + var value = elm.style[style]; + + if (getCs && (!value || value === 'auto')) { + var css = getCs(elm, null); + value = css ? css[style] : null; + } + else if (!value && elm.currentStyle) { + value = elm.currentStyle[style]; + if (value === 'auto' && (style === 'width' || style === 'height')) { + value = elm["offset" + style.charAt(0).toUpperCase() + style.slice(1)] + "px"; + } + } + + if (style === 'opacity') { + return value ? parseFloat(value, 10) : 1.0; + } + else if (style === 'borderTopWidth' || style === 'borderBottomWidth' || + style === 'borderRightWidth' || style === 'borderLeftWidth' ) { + if (value === 'thin') { return '1px'; } + else if (value === 'medium') { return '3px'; } + else if (value === 'thick') { return '5px'; } + } + + return value === 'auto' ? null : value; + } + }, + + + /** + * Adds CSS rules to an element's style attribute. + * + * @method setStyle + * @param {DOMElement|String} elm DOM element or element id + * @param {String} style Which css attribute to set + * + * @example + * Change his color + *

"He" is me

+ * + * + */ + setStyle: function(elm, style) { + elm = Ink.i(elm); + if (elm === null) { return; } + if (typeof style === 'string') { + elm.style.cssText += '; '+style; + + if (style.indexOf('opacity') !== -1) { + this.setOpacity(elm, style.match(/opacity:\s*(\d?\.?\d*)/)[1]); + } + } + else { + for (var prop in style) { + if (style.hasOwnProperty(prop)){ + if (prop === 'opacity') { + this.setOpacity(elm, style[prop]); + } + else if (prop === 'float' || prop === 'cssFloat') { + if (typeof elm.style.styleFloat === 'undefined') { + elm.style.cssFloat = style[prop]; + } + else { + elm.style.styleFloat = style[prop]; + } + } else { + elm.style[prop] = style[prop]; + } + } + } + } + }, + + + /** + * Shows an element. + * Internally it unsets the display property of an element. You can force a specific display property using forceDisplayProperty + * + * @method show + * @param {DOMElement|String} elm DOM element or element id + * @param {String} [forceDisplayProperty] Css display property to apply on show + */ + show: function(elm, forceDisplayProperty) { + elm = Ink.i(elm); + if (elm !== null) { + elm.style.display = (forceDisplayProperty) ? forceDisplayProperty : ''; + } + }, + + /** + * Hides an element. + * + * @method hide + * @param {DOMElement|String} elm DOM element or element id + */ + hide: function(elm) { + elm = Ink.i(elm); + if (elm !== null) { + elm.style.display = 'none'; + } + }, + + /** + * Shows or hides an element. + * If the show parameter is true, it shows the element. Otherwise, hides it. + * + * @method showHide + * @param {DOMElement|String} elm DOM element or element id + * @param {boolean} [show]=false Whether to show or hide `elm`. + */ + showHide: function(elm, show) { + elm = Ink.i(elm); + if (elm) { + elm.style.display = show ? '' : 'none'; + } + }, + + /** + * Toggles an element visibility. + * + * @method toggle + * @param {DOMElement|String} elm DOM element or element id + * @param {Boolean} forceShow Forces showing if element is hidden + */ + toggle: function(elm, forceShow) { + elm = Ink.i(elm); + if (elm !== null) { + if (typeof forceShow !== 'undefined') { + if (forceShow === true) { + this.show(elm); + } else { + this.hide(elm); + } + } else { + if (this.getStyle(elm,'display').toLowerCase() === 'none') { + this.show(elm); + } + else { + this.hide(elm); + } + } + } + }, + + _getRefTag: function(head){ + if (head.firstElementChild) { + return head.firstElementChild; + } + + for (var child = head.firstChild; child; child = child.nextSibling){ + if (child.nodeType === 1){ + return child; + } + } + return null; + }, + + /** + * Injects style tags with rules to the page. + * + * @method appendStyleTag + * @param {String} selector The css selector for the rule + * @param {String} style The content of the style rule + * @param {Object} options Options for the tag + * @param {String} [options.type]='text/css' File type + * @param {Boolean} [options.force]=false If true, the style tag will be appended to end of head + */ + appendStyleTag: function(selector, style, options){ + options = Ink.extendObj({ + type: 'text/css', + force: false + }, options || {}); + + var styles = document.getElementsByTagName("style"), + oldStyle = false, setStyle = true, i, l; + + for (i=0, l=styles.length; i= 0) { + setStyle = false; + } + } + + if (setStyle) { + var defStyle = document.createElement("style"), + head = document.getElementsByTagName("head")[0], + refTag = false, styleStr = ''; + + defStyle.type = options.type; + + styleStr += selector +" {"; + styleStr += style; + styleStr += "} "; + + if (typeof defStyle.styleSheet !== "undefined") { + defStyle.styleSheet.cssText = styleStr; + } else { + defStyle.appendChild(document.createTextNode(styleStr)); + } + + if (options.force){ + head.appendChild(defStyle); + } else { + refTag = this._getRefTag(head); + if (refTag){ + head.insertBefore(defStyle, refTag); + } + } + } + }, + + /** + * Injects an external link tag. + * This method add a stylesheet to the head of a page + * + * @method appendStylesheet + * @param {String} path File path + * @param {Object} options Options for the tag + * @param {String} [options.media]='screen' Media type + * @param {String} [options.type]='text/css' File type + * @param {Boolean} [options.force]=false If true, tag will be appended to end of head + */ + appendStylesheet: function(path, options){ + options = Ink.extendObj({ + media: 'screen', + type: 'text/css', + force: false + }, options || {}); + + var refTag, + style = document.createElement("link"), + head = document.getElementsByTagName("head")[0]; + + style.media = options.media; + style.type = options.type; + style.href = path; + style.rel = "Stylesheet"; + + if (options.force){ + head.appendChild(style); + } + else { + refTag = this._getRefTag(head); + if (refTag){ + head.insertBefore(style, refTag); + } + } + }, + + /** + * Injects an external link tag. + * Loads CSS via LINK element inclusion in HEAD (skips append if already there) + * + * Works similarly to appendStylesheet but: + * a) supports all browsers; + * b) supports optional callback which gets invoked once the CSS has been applied + * + * @method appendStylesheetCb + * @param {String} cssURI URI of the CSS to load, if empty ignores and just calls back directly + * @param {Function(cssURI)} [callback] optional callback which will be called once the CSS is loaded + */ + _loadingCSSFiles: {}, + _loadedCSSFiles: {}, + appendStylesheetCb: function(url, callback) { + if (!url) { + return callback(url); + } + + if (this._loadedCSSFiles[url]) { + return callback(url); + } + + var cbs = this._loadingCSSFiles[url]; + if (cbs) { + return cbs.push(callback); + } + + this._loadingCSSFiles[url] = [callback]; + + var linkEl = document.createElement('link'); + linkEl.type = 'text/css'; + linkEl.rel = 'stylesheet'; + linkEl.href = url; + + var headEl = document.getElementsByTagName('head')[0]; + headEl.appendChild(linkEl); + + var imgEl = document.createElement('img'); + /* + var _self = this; + (function(_url) { + imgEl.onerror = function() { + //var url = this; + var url = _url; + _self._loadedCSSFiles[url] = true; + var callbacks = _self._loadingCSSFiles[url]; + for (var i = 0, f = callbacks.length; i < f; ++i) { + callbacks[i](url); + } + delete _self._loadingCSSFiles[url]; + }; + })(url); + */ + imgEl.onerror = Ink.bindEvent(function(event, _url) { + //var url = this; + var url = _url; + this._loadedCSSFiles[url] = true; + var callbacks = this._loadingCSSFiles[url]; + for (var i = 0, f = callbacks.length; i < f; ++i) { + callbacks[i](url); + } + delete this._loadingCSSFiles[url]; + }, this, url); + imgEl.src = url; + }, + + /** + * Converts decimal to hexadecimal values + * Useful to convert colors to their hexadecimal representation. + * + * @method decToHex + * @param {String} dec Either a single decimal value, an rgb(r, g, b) string or an Object with r, g and b properties + * @return Hexadecimal value + */ + decToHex: function(dec) { + var normalizeTo2 = function(val) { + if (val.length === 1) { + val = '0' + val; + } + val = val.toUpperCase(); + return val; + }; + + if (typeof dec === 'object') { + var rDec = normalizeTo2(parseInt(dec.r, 10).toString(16)); + var gDec = normalizeTo2(parseInt(dec.g, 10).toString(16)); + var bDec = normalizeTo2(parseInt(dec.b, 10).toString(16)); + return rDec+gDec+bDec; + } + else { + dec += ''; + var rgb = dec.match(/\((\d+),\s?(\d+),\s?(\d+)\)/); + if (rgb !== null) { + return normalizeTo2(parseInt(rgb[1], 10).toString(16)) + + normalizeTo2(parseInt(rgb[2], 10).toString(16)) + + normalizeTo2(parseInt(rgb[3], 10).toString(16)); + } + else { + return normalizeTo2(parseInt(dec, 10).toString(16)); + } + } + }, + + /** + * Converts hexadecimal values to decimal + * Useful to use with CSS colors + * + * @method hexToDec + * @param {String} hex hexadecimal Value with 6, 3, 2 or 1 characters + * @return {Number} Object with properties r, g, b if length of number is >= 3 or decimal value instead. + */ + hexToDec: function(hex){ + if (hex.indexOf('#') === 0) { + hex = hex.substr(1); + } + if (hex.length === 6) { // will return object RGB + return { + r: parseInt(hex.substr(0,2), 16), + g: parseInt(hex.substr(2,2), 16), + b: parseInt(hex.substr(4,2), 16) + }; + } + else if (hex.length === 3) { // will return object RGB + return { + r: parseInt(hex.charAt(0) + hex.charAt(0), 16), + g: parseInt(hex.charAt(1) + hex.charAt(1), 16), + b: parseInt(hex.charAt(2) + hex.charAt(2), 16) + }; + } + else if (hex.length <= 2) { // will return int + return parseInt(hex, 16); + } + }, + + /** + * Get a single property from a stylesheet. + * Use this to obtain the value of a CSS property (searched from loaded CSS documents) + * + * @method getPropertyFromStylesheet + * @param {String} selector a CSS rule. must be an exact match + * @param {String} property a CSS property + * @return {String} value of the found property, or null if it wasn't matched + */ + getPropertyFromStylesheet: function(selector, property) { + var rule = this.getRuleFromStylesheet(selector); + if (rule) { + return rule.style[property]; + } + return null; + }, + + getPropertyFromStylesheet2: function(selector, property) { + var rules = this.getRulesFromStylesheet(selector); + /* + rules.forEach(function(rule) { + var x = rule.style[property]; + if (x !== null && x !== undefined) { + return x; + } + }); + */ + var x; + for(var i=0, t=rules.length; i < t; i++) { + x = rules[i].style[property]; + if (x !== null && x !== undefined) { + return x; + } + } + return null; + }, + + getRuleFromStylesheet: function(selector) { + var sheet, rules, ri, rf, rule; + var s = document.styleSheets; + if (!s) { + return null; + } + + for (var si = 0, sf = document.styleSheets.length; si < sf; ++si) { + sheet = document.styleSheets[si]; + rules = sheet.rules ? sheet.rules : sheet.cssRules; + if (!rules) { return null; } + + for (ri = 0, rf = rules.length; ri < rf; ++ri) { + rule = rules[ri]; + if (!rule.selectorText) { continue; } + if (rule.selectorText === selector) { + return rule; + } + } + } + + return null; + }, + + getRulesFromStylesheet: function(selector) { + var res = []; + var sheet, rules, ri, rf, rule; + var s = document.styleSheets; + if (!s) { return res; } + + for (var si = 0, sf = document.styleSheets.length; si < sf; ++si) { + sheet = document.styleSheets[si]; + rules = sheet.rules ? sheet.rules : sheet.cssRules; + if (!rules) { + return null; + } + + for (ri = 0, rf = rules.length; ri < rf; ++ri) { + rule = rules[ri]; + if (!rule.selectorText) { continue; } + if (rule.selectorText === selector) { + res.push(rule); + } + } + } + + return res; + }, + + getPropertiesFromRule: function(selector) { + var rule = this.getRuleFromStylesheet(selector); + var props = {}; + var prop, i, f; + + /*if (typeof rule.style.length === 'snumber') { + for (i = 0, f = rule.style.length; i < f; ++i) { + prop = this._camelCase( rule.style[i] ); + props[prop] = rule.style[prop]; + } + } + else { // HANDLES IE 8, FIREFOX RULE JOINING... */ + rule = rule.style.cssText; + var parts = rule.split(';'); + var steps, val, pre, pos; + for (i = 0, f = parts.length; i < f; ++i) { + if (parts[i].charAt(0) === ' ') { + parts[i] = parts[i].substring(1); + } + steps = parts[i].split(':'); + prop = this._camelCase( steps[0].toLowerCase() ); + val = steps[1]; + if (val) { + val = val.substring(1); + + if (prop === 'padding' || prop === 'margin' || prop === 'borderWidth') { + + if (prop === 'borderWidth') { pre = 'border'; pos = 'Width'; } + else { pre = prop; pos = ''; } + + if (val.indexOf(' ') !== -1) { + val = val.split(' '); + props[pre + 'Top' + pos] = val[0]; + props[pre + 'Bottom'+ pos] = val[0]; + props[pre + 'Left' + pos] = val[1]; + props[pre + 'Right' + pos] = val[1]; + } + else { + props[pre + 'Top' + pos] = val; + props[pre + 'Bottom'+ pos] = val; + props[pre + 'Left' + pos] = val; + props[pre + 'Right' + pos] = val; + } + } + else if (prop === 'borderRadius') { + if (val.indexOf(' ') !== -1) { + val = val.split(' '); + props.borderTopLeftRadius = val[0]; + props.borderBottomRightRadius = val[0]; + props.borderTopRightRadius = val[1]; + props.borderBottomLeftRadius = val[1]; + } + else { + props.borderTopLeftRadius = val; + props.borderTopRightRadius = val; + props.borderBottomLeftRadius = val; + props.borderBottomRightRadius = val; + } + } + else { + props[prop] = val; + } + } + } + //} + //console.log(props); + + return props; + }, + + /** + * Change the font size of elements. + * Changes the font size of the elements which match the given CSS rule + * For this function to work, the CSS file must be in the same domain than the host page, otherwise JS can't access it. + * + * @method changeFontSize + * @param {String} selector CSS selector rule + * @param {Number} delta Number of pixels to change on font-size + * @param {String} [op] Supported operations are '+' and '*'. defaults to '+' + * @param {Number} [minVal] If result gets smaller than minVal, change does not occurr + * @param {Number} [maxVal] If result gets bigger than maxVal, change does not occurr + */ + changeFontSize: function(selector, delta, op, minVal, maxVal) { + var that = this; + Ink.requireModules(['Ink.Dom.Selector_1'], function(Selector) { + var e; + if (typeof selector !== 'string') { e = '1st argument must be a CSS selector rule.'; } + else if (typeof delta !== 'number') { e = '2nd argument must be a number.'; } + else if (op !== undefined && op !== '+' && op !== '*') { e = '3rd argument must be one of "+", "*".'; } + else if (minVal !== undefined && (typeof minVal !== 'number' || minVal <= 0)) { e = '4th argument must be a positive number.'; } + else if (maxVal !== undefined && (typeof maxVal !== 'number' || maxVal < maxVal)) { e = '5th argument must be a positive number greater than minValue.'; } + if (e) { throw new TypeError(e); } + + var val, el, els = Selector.select(selector); + if (minVal === undefined) { minVal = 1; } + op = (op === '*') ? function(a,b){return a*b;} : function(a,b){return a+b;}; + for (var i = 0, f = els.length; i < f; ++i) { + el = els[i]; + val = parseFloat( that.getStyle(el, 'fontSize')); + val = op(val, delta); + if (val < minVal) { continue; } + if (typeof maxVal === 'number' && val > maxVal) { continue; } + el.style.fontSize = val + 'px'; + } + }); + } + + }; + + return Css; + +}); + +/** + * @module Ink.Dom.Element_1 + * @version 1 + * DOM Traversal and manipulation + */ + +Ink.createModule('Ink.Dom.Element', 1, [], function() { + + 'use strict'; + + var createContextualFragmentSupport = ( + typeof document.createRange === 'function' && + typeof window.Range.prototype.createContextualFragment === 'function'); + + var deleteThisTbodyToken = 'Ink.Dom.Element tbody: ' + Math.random(); + var browserCreatesTbodies = (function () { + var div = document.createElement('div'); + div.innerHTML = ''; + return div.getElementsByTagName('tbody').length !== 0; + }()); + + function rect(elem){ + var dimensions = {}; + try { + dimensions = elem.getBoundingClientRect(); + } catch(e){ + dimensions = { top: elem.offsetTop, left: elem.offsetLeft }; + } + return dimensions; + } + + /** + * @namespace Ink.Dom.Element_1 + */ + + var InkElement = { + + /** + * Shortcut for `document.getElementById` + * + * @method get + * @param {String|DOMElement} elm Either an ID of an element, or an element. + * @return {DOMElement|null} The DOM element with the given id or null when it was not found + * @sample Ink_Dom_Element_1_get.html + */ + get: function(elm) { + if(typeof elm !== 'undefined') { + if(typeof elm === 'string') { + return document.getElementById(elm); + } + return elm; + } + return null; + }, + + /** + * Creates a DOM element + * + * @method create + * @param {String} tag tag name + * @param {Object} properties object with properties to be set on the element. You can also call other functions in Ink.Dom.Element like this + * @sample Ink_Dom_Element_1_create.html + */ + create: function(tag, properties) { + var el = document.createElement(tag); + //Ink.extendObj(el, properties); + for(var property in properties) { + if(properties.hasOwnProperty(property)) { + if (property in InkElement) { + InkElement[property](el, properties[property]); + } else { + if(property === 'className' || property === 'class') { + el.className = properties.className || properties['class']; + } else { + el.setAttribute(property, properties[property]); + } + } + } + } + return el; + }, + + /** + * Removes a DOM Element + * + * @method remove + * @param {DOMElement} elm The element to remove + * @sample Ink_Dom_Element_1_remove.html + */ + remove: function(el) { + el = Ink.i(el); + var parEl; + if (el && (parEl = el.parentNode)) { + parEl.removeChild(el); + } + }, + + /** + * Scrolls the window to an element + * + * @method scrollTo + * @param {DOMElement|String} elm Element where to scroll + * @sample Ink_Dom_Element_1_scrollTo.html + */ + scrollTo: function(elm) { + elm = InkElement.get(elm); + if(elm) { + if (elm.scrollIntoView) { + return elm.scrollIntoView(); + } + + var elmOffset = {}, + elmTop = 0, elmLeft = 0; + + do { + elmTop += elm.offsetTop || 0; + elmLeft += elm.offsetLeft || 0; + + elm = elm.offsetParent; + } while(elm); + + elmOffset = {x: elmLeft, y: elmTop}; + + window.scrollTo(elmOffset.x, elmOffset.y); + } + }, + + /** + * Gets the top offset of an element + * + * @method offsetTop + * @uses Ink.Dom.Browser + * + * @param {DOMElement|String} elm Target element + * @return {Number} Offset from the target element to the top of the document + * @sample Ink_Dom_Element_1_offsetTop.html + */ + offsetTop: function(elm) { + return InkElement.offset(elm)[1]; + }, + + /** + * Gets the left offset of an element + * + * @method offsetLeft + * @uses Ink.Dom.Browser + * + * @param {DOMElement|String} elm Target element + * @return {Number} Offset from the target element to the left of the document + * @sample Ink_Dom_Element_1_offsetLeft.html + */ + offsetLeft: function(elm) { + return InkElement.offset(elm)[0]; + }, + + /** + * Gets the relative offset of an element + * + * @method positionedOffset + * @param {DOMElement|String} elm Target element + * @return {Array} Array with the element offsetleft and offsettop relative to the closest positioned ancestor + * @sample Ink_Dom_Element_1_positionedOffset.html + */ + positionedOffset: function(element) { + var valueTop = 0, valueLeft = 0; + element = InkElement.get(element); + do { + valueTop += element.offsetTop || 0; + valueLeft += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + if (element.tagName.toLowerCase() === 'body') { break; } + + var value = element.style.position; + if (!value && element.currentStyle) { + value = element.currentStyle.position; + } + if ((!value || value === 'auto') && typeof getComputedStyle !== 'undefined') { + var css = getComputedStyle(element, null); + value = css ? css.position : null; + } + if (value === 'relative' || value === 'absolute') { break; } + } + } while (element); + return [valueLeft, valueTop]; + }, + + /** + * Gets the cumulative offset for an element + * + * Returns the top left position of the element on the page + * + * @method offset + * @uses Ink.Dom.Browser + * + * @method offset + * @param {DOMElement|String} elm Target element + * @return {[Number, Number]} Array with pixel distance from the target element to the top left corner of the document + * @sample Ink_Dom_Element_1_offset.html + */ + offset: function(el) { + /*jshint boss:true */ + el = Ink.i(el); + var res = [0, 0]; + var doc = el.ownerDocument, + docElem = doc.documentElement, + box = rect(el), + body = doc.body, + clientTop = docElem.clientTop || body.clientTop || 0, + clientLeft = docElem.clientLeft || body.clientLeft || 0, + scrollTop = doc.pageYOffset || docElem.scrollTop || body.scrollTop, + scrollLeft = doc.pageXOffset || docElem.scrollLeft || body.scrollLeft, + top = box.top + scrollTop - clientTop, + left = box.left + scrollLeft - clientLeft; + res = [left, top]; + return res; + }, + + /** + * Gets the scroll of the element + * + * @method scroll + * @param {DOMElement|String} [elm] Target element or document.body + * @returns {Array} offset values for x and y scroll + * @sample Ink_Dom_Element_1_scroll.html + */ + scroll: function(elm) { + elm = elm ? Ink.i(elm) : document.body; + return [ + ( ( !window.pageXOffset ) ? elm.scrollLeft : window.pageXOffset ), + ( ( !window.pageYOffset ) ? elm.scrollTop : window.pageYOffset ) + ]; + }, + + _getPropPx: function(cs, prop) { + var n, c; + var val = cs.getPropertyValue ? cs.getPropertyValue(prop) : cs[prop]; + if (!val) { n = 0; } + else { + c = val.indexOf('px'); + if (c === -1) { n = 0; } + else { + n = parseFloat(val, 10); + } + } + + //console.log([prop, ' "', val, '" ', n].join('')); + + return n; + }, + + /** + * Alias for offset() + * + * @method offset2 + * @deprecated Kept for historic reasons. Use offset() instead. + */ + offset2: function(el) { + return InkElement.offset(el); + }, + + /** + * Checks if an element has an attribute + * + * @method hasAttribute + * @param {Object} elm Target element + * @param {String} attr Attribute name + * @return {Boolean} Boolean based on existance of attribute + * @sample Ink_Dom_Element_1_hasAttribute.html + */ + hasAttribute: function(elm, attr){ + elm = Ink.i(elm); + return elm.hasAttribute ? elm.hasAttribute(attr) : !!elm.getAttribute(attr); + }, + /** + * Inserts an element right after another + * + * @method insertAfter + * @param {DOMElement} newElm Element to be inserted + * @param {DOMElement|String} targetElm Key element + * @sample Ink_Dom_Element_1_insertAfter.html + */ + insertAfter: function(newElm, targetElm) { + /*jshint boss:true */ + if (targetElm = InkElement.get(targetElm)) { + if (targetElm.nextSibling !== null) { + targetElm.parentNode.insertBefore(newElm, targetElm.nextSibling); + } else { + targetElm.parentNode.appendChild(newElm); + } + } + }, + + /** + * Inserts an element before another + * + * @method insertBefore + * @param {DOMElement} newElm Element to be inserted + * @param {DOMElement|String} targetElm Key element + * @sample Ink_Dom_Element_1_insertBefore.html + */ + insertBefore: function (newElm, targetElm) { + /*jshint boss:true */ + if ( (targetElm = InkElement.get(targetElm)) ) { + targetElm.parentNode.insertBefore(newElm, targetElm); + } + }, + + /** + * Inserts an element as the first child of another + * + * @method insertTop + * @param {DOMElement} newElm Element to be inserted + * @param {DOMElement|String} targetElm Key element + * @sample Ink_Dom_Element_1_insertTop.html + */ + insertTop: function(newElm,targetElm) { + /*jshint boss:true */ + if (targetElm = InkElement.get(targetElm)) { + if (targetElm.firstChild) { + targetElm.insertBefore(newElm, targetElm.firstChild); + } else { + targetElm.appendChild(newElm); + } + } + }, + + /** + * Inserts an element as the last child of another + * + * @method insertBottom + * @param {DOMElement} newElm Element to be inserted + * @param {DOMElement|String} targetElm Key element + * @sample Ink_Dom_Element_1_insertBottom.html + */ + insertBottom: function(newElm, targetElm) { + /*jshint boss:true */ + targetElm = Ink.i(targetElm); + targetElm.appendChild(newElm); + }, + + /** + * Retrieves textContent from node + * + * @method textContent + * @param {DOMNode} node Where to retreive text from. Can be any node type. + * @return {String} the text + * @sample Ink_Dom_Element_1_textContent.html + */ + textContent: function(node){ + node = Ink.i(node); + var text, k, cs, m; + + switch(node && node.nodeType) { + case 9: /*DOCUMENT_NODE*/ + // IE quirks mode does not have documentElement + return InkElement.textContent(node.documentElement || node.body && node.body.parentNode || node.body); + + case 1: /*ELEMENT_NODE*/ + text = node.innerText; + if (typeof text !== 'undefined') { + return text; + } + /* falls through */ + case 11: /*DOCUMENT_FRAGMENT_NODE*/ + text = node.textContent; + if (typeof text !== 'undefined') { + return text; + } + + if (node.firstChild === node.lastChild) { + // Common case: 0 or 1 children + return InkElement.textContent(node.firstChild); + } + + text = []; + cs = node.childNodes; + for (k = 0, m = cs.length; k < m; ++k) { + text.push( InkElement.textContent( cs[k] ) ); + } + return text.join(''); + + case 3: /*TEXT_NODE*/ + case 4: /*CDATA_SECTION_NODE*/ + return node.nodeValue; + } + return ''; + }, + + /** + * Replaces text content of a DOM Node + * This method removes any child node previously present + * + * @method setTextContent + * @param {DOMNode} node node Target node where the text will be added. + * @param {String} text text Text to be added on the node. + * @sample Ink_Dom_Element_1_setTextContent.html + */ + setTextContent: function(node, text){ + node = Ink.i(node); + switch(node && node.nodeType) + { + case 1: /*ELEMENT_NODE*/ + if ('innerText' in node) { + node.innerText = text; + break; + } + /* falls through */ + case 11: /*DOCUMENT_FRAGMENT_NODE*/ + if ('textContent' in node) { + node.textContent = text; + break; + } + /* falls through */ + case 9: /*DOCUMENT_NODE*/ + while(node.firstChild) { + node.removeChild(node.firstChild); + } + if (text !== '') { + var doc = node.ownerDocument || node; + node.appendChild(doc.createTextNode(text)); + } + break; + + case 3: /*TEXT_NODE*/ + case 4: /*CDATA_SECTION_NODE*/ + node.nodeValue = text; + break; + } + }, + + /** + * Checks if an element is a link + * + * @method isLink + * @param {DOMNode} node Node to check if it's link + * @return {Boolean} + * @sample Ink_Dom_Element_1_isLink.html + */ + isLink: function(element){ + var b = element && element.nodeType === 1 && ((/^a|area$/i).test(element.tagName) || + element.hasAttributeNS && element.hasAttributeNS('http://www.w3.org/1999/xlink','href')); + return !!b; + }, + + /** + * Checks if a node is an ancestor of another + * + * @method isAncestorOf + * @param {DOMNode} ancestor Ancestor node + * @param {DOMNode} node Descendant node + * @return {Boolean} + * @sample Ink_Dom_Element_1_isAncestorOf.html + */ + isAncestorOf: function(ancestor, node){ + /*jshint boss:true */ + if (!node || !ancestor) { + return false; + } + if (node.compareDocumentPosition) { + return (ancestor.compareDocumentPosition(node) & 0x10) !== 0;/*Node.DOCUMENT_POSITION_CONTAINED_BY*/ + } + while (node = node.parentNode){ + if (node === ancestor){ + return true; + } + } + return false; + }, + + /** + * Checks if a node is descendant of another + * + * @method descendantOf + * @param {DOMNode} node The ancestor + * @param {DOMNode} descendant The descendant + * @return {Boolean} true if 'descendant' is descendant of 'node' + * @sample Ink_Dom_Element_1_descendantOf.html + */ + descendantOf: function(node, descendant){ + return node !== descendant && InkElement.isAncestorOf(node, descendant); + }, + + /** + * Get first child element of another + * @method firstElementChild + * @param {DOMElement} elm Parent node + * @return {DOMElement} the Element child + * @sample Ink_Dom_Element_1_firstElementChild.html + */ + firstElementChild: function(elm){ + if(!elm) { + return null; + } + if ('firstElementChild' in elm) { + return elm.firstElementChild; + } + var child = elm.firstChild; + while(child && child.nodeType !== 1) { + child = child.nextSibling; + } + return child; + }, + + /** + * Get the last child element of another + * @method lastElementChild + * @param {DOMElement} elm Parent node + * @return {DOMElement} the Element child + * @sample Ink_Dom_Element_1_lastElementChild.html + */ + lastElementChild: function(elm){ + if(!elm) { + return null; + } + if ('lastElementChild' in elm) { + return elm.lastElementChild; + } + var child = elm.lastChild; + while(child && child.nodeType !== 1) { + child = child.previousSibling; + } + return child; + }, + + /** + * Get the first sibling element after the node + * + * @method nextElementSibling + * @param {DOMNode} node The current node + * @return {DOMElement|Null} The first sibling element after node or null if none is found + * @sample Ink_Dom_Element_1_nextElementSibling.html + */ + nextElementSibling: function(node){ + var sibling = null; + + if(!node){ return sibling; } + + if("nextElementSibling" in node){ + return node.nextElementSibling; + } else { + sibling = node.nextSibling; + + // 1 === Node.ELEMENT_NODE + while(sibling && sibling.nodeType !== 1){ + sibling = sibling.nextSibling; + } + + return sibling; + } + }, + + /** + * Get the first sibling element before the node + * + * @method previousElementSibling + * @param {DOMNode} node The current node + * @return {DOMElement|Null} The first element sibling before node or null if none is found + * @sample Ink_Dom_Element_1_previousElementSibling.html + */ + previousElementSibling: function(node){ + var sibling = null; + + if(!node){ return sibling; } + + if("previousElementSibling" in node){ + return node.previousElementSibling; + } else { + sibling = node.previousSibling; + + // 1 === Node.ELEMENT_NODE + while(sibling && sibling.nodeType !== 1){ + sibling = sibling.previousSibling; + } + + return sibling; + } + }, + + /** + * Get an element's width in pixels. + * + * @method elementWidth + * @param {DOMElement|String} element Target DOM element or target ID + * @return {Number} The element's width + * @sample Ink_Dom_Element_1_elementWidth.html + */ + elementWidth: function(element) { + if(typeof element === "string") { + element = document.getElementById(element); + } + return element.offsetWidth; + }, + + /** + * Get an element's height in pixels. + * + * @method elementHeight + * @param {DOMElement|String} element DOM element or target ID + * @return {Number} The element's height + * @sample Ink_Dom_Element_1_elementHeight.html + */ + elementHeight: function(element) { + if(typeof element === "string") { + element = document.getElementById(element); + } + return element.offsetHeight; + }, + + /** + * Deprecated. Alias for offsetLeft() + * + * @method elementLeft + * @param {DOMElement|String} element DOM element or target ID + * @return {Number} Element's left position + */ + elementLeft: function(element) { + return InkElement.offsetLeft(element); + }, + + /** + * Deprecated. Alias for offsetTop() + * + * @method elementTop + * @param {DOMElement|string} element Target DOM element or target ID + * @return {Number} element's top position + */ + elementTop: function(element) { + return InkElement.offsetTop(element); + }, + + /** + * Get an element's dimensions in pixels. + * + * @method elementDimensions + * @param {DOMElement|string} element DOM element or target ID + * @return {Array} Array with element's width and height + * @sample Ink_Dom_Element_1_elementDimensions.html + */ + elementDimensions: function(element) { + element = Ink.i(element); + return [element.offsetWidth, element.offsetHeight]; + }, + + /** + * Get the outer dimensions of an element in pixels. + * + * @method outerDimensions + * @uses Ink.Dom.Css + * + * @param {DOMElement} element Target element + * @return {Array} Array with element width and height. + * @sample Ink_Dom_Element_1_outerDimensions.html + */ + outerDimensions: function (element) { + var bbox = rect(element); + + var Css = Ink.getModule('Ink.Dom.Css_1'); + var getStyle = Ink.bindMethod(Css, 'getStyle', element); + + return [ + bbox.right - bbox.left + parseFloat(getStyle('marginLeft') || 0) + parseFloat(getStyle('marginRight') || 0), // w + bbox.bottom - bbox.top + parseFloat(getStyle('marginTop') || 0) + parseFloat(getStyle('marginBottom') || 0) // h + ]; + }, + + /** + * Check if an element is inside the viewport + * + * @method inViewport + * @param {DOMElement} element DOM Element + * @param {Object} [options] Options object. If you pass a Boolean value here, it is interpreted as `options.partial` + * @param {Boolean} [options.partial]=false Return `true` even if it is only partially visible. + * @param {Number} [options.margin]=0 Consider a margin all around the viewport with `opts.margin` width a dead zone. + * @return {Boolean} + * @sample Ink_Dom_Element_1_inViewport.html + */ + inViewport: function (element, opts) { + var dims = rect(Ink.i(element)); + if (typeof opts === 'boolean') { + opts = {partial: opts, margin: 0}; + } + opts = Ink.extendObj({ partial: false, margin: 0}, opts || {}); + if (opts.partial) { + return dims.bottom + opts.margin > 0 && // from the top + dims.left - opts.margin < InkElement.viewportWidth() && // from the right + dims.top - opts.margin < InkElement.viewportHeight() && // from the bottom + dims.right + opts.margin > 0; // from the left + } else { + return dims.top + opts.margin > 0 && // from the top + dims.right - opts.margin < InkElement.viewportWidth() && // from the right + dims.bottom - opts.margin < InkElement.viewportHeight() && // from the bottom + dims.left + opts.margin > 0; // from the left + } + }, + + /** + * Check if an element is hidden. + * Taken from Mootools Element extras ( https://gist.github.com/cheeaun/73342 ) + * Does not take into account visibility:hidden + * @method isHidden + * @param {DOMElement} element Element to check + * @return {Boolean} + * @sample Ink_Dom_Element_1_isHidden.html + */ + + isHidden: function (element) { + var w = element.offsetWidth, + h = element.offsetHeight, + force = (element.tagName.toLowerCase() === 'tr'); + + var Css = Ink.getModule('Ink.Dom.Css_1'); + + return (w===0 && h===0 && !force) ? true : + (w!==0 && h!==0 && !force) ? false : + Css.getStyle(element, 'display').toLowerCase() === 'none'; + }, + + /** + * Check if an element is visible + * + * @method isVisible + * @uses isHidden + * @param {DOMElement} element Element to check + * @return {Boolean} + * @sample Ink_Dom_Element_1_isVisible.html + */ + + isVisible: function (element) { + return !this.isHidden(element); + }, + + /** + * Clones an element's position to another + * + * @method clonePosition + * @param {DOMElement} cloneTo element to be position cloned + * @param {DOMElement} cloneFrom element to get the cloned position + * @return {DOMElement} The element with positionClone + * @sample Ink_Dom_Element_1_clonePosition.html + */ + clonePosition: function(cloneTo, cloneFrom){ + var pos = InkElement.offset(cloneFrom); + cloneTo.style.left = pos[0]+'px'; + cloneTo.style.top = pos[1]+'px'; + + return cloneTo; + }, + + /** + * Text-overflow: ellipsis emulation + * Slices off a piece of text at the end of the element and adds the ellipsis so all text fits inside. + * + * @method ellipsizeText + * @param {DOMElement} element Element to modify text content + * @param {String} [ellipsis]='\u2026' String to append to the chopped text + */ + ellipsizeText: function(element/*, ellipsis*/){ + if ((element = Ink.i(element))) { + element.style.overflow = 'hidden'; + element.style.whiteSpace = 'nowrap'; + element.style.textOverflow = 'ellipsis'; + } + }, + + /** + * Finds the closest ancestor element matching your test function + * + * + * @method findUpwardsHaving + * @param {DOMElement} element Element to base the search from + * @param {Function} boolTest Testing function + * @return {DOMElement|false} The matched element or false if did not match + * @sample Ink_Dom_Element_1_findUpwardsHaving.html + */ + findUpwardsHaving: function(element, boolTest) { + while (element && element.nodeType === 1) { + if (boolTest(element)) { + return element; + } + element = element.parentNode; + } + return false; + }, + + /** + * Finds the closest ancestor by class name + * + * @method findUpwardsByClass + * @uses findUpwardsHaving + * @param {DOMElement} element Element to base the search from + * @param {String} className Class name to search + * @returns {DOMElement|false} The matched element or false if did not match + * @sample Ink_Dom_Element_1_findUpwardsByClass.html + */ + findUpwardsByClass: function(element, className) { + var re = new RegExp("(^|\\s)" + className + "(\\s|$)"); + var tst = function(el) { + var cls = el.className; + return cls && re.test(cls); + }; + return InkElement.findUpwardsHaving(element, tst); + }, + + /** + * Finds the closest ancestor by tag name + * + * @method findUpwardsByTag + * @param {DOMElement} element Element to base the search from + * @param {String} tag Tag to search + * @returns {DOMElement|false} the matched element or false if did not match + * @sample Ink_Dom_Element_1_findUpwardsByTag.html + */ + findUpwardsByTag: function(element, tag) { + tag = tag.toUpperCase(); + var tst = function(el) { + return el.nodeName && el.nodeName.toUpperCase() === tag; + }; + return InkElement.findUpwardsHaving(element, tst); + }, + + /** + * Finds the closest ancestor by id + * + * @method findUpwardsById + * @param {HtmlElement} element Element to base the search from + * @param {String} id ID to search + * @returns {HtmlElement|false} The matched element or false if did not match + * @sample Ink_Dom_Element_1_findUpwardsById.html + */ + findUpwardsById: function(element, id) { + var tst = function(el) { + return el.id === id; + }; + return InkElement.findUpwardsHaving(element, tst); + }, + + /** + * Finds the closest ancestor by CSS selector + * + * @method findUpwardsBySelector + * @param {HtmlElement} element Element to base the search from + * @param {String} sel CSS selector + * @returns {HtmlElement|false} The matched element or false if did not match + * @sample Ink_Dom_Element_1_findUpwardsBySelector.html + */ + findUpwardsBySelector: function(element, sel) { + var Selector = Ink.getModule('Ink.Dom.Selector', '1'); + if (!Selector) { + throw new Error('This method requires Ink.Dom.Selector'); + } + var tst = function(el) { + return Selector.matchesSelector(el, sel); + }; + return InkElement.findUpwardsHaving(element, tst); + }, + + /** + * Gets the trimmed text of an element + * + * @method getChildrenText + * @param {DOMElement} el Element to base the search from + * @param {Boolean} [removeIt] Flag to remove the text from the element + * @return {String} Text found + * @sample Ink_Dom_Element_1_getChildrenText.html + */ + getChildrenText: function(el, removeIt) { + var node, + j, + part, + nodes = el.childNodes, + jLen = nodes.length, + text = ''; + + if (!el) { + return text; + } + + for (j = 0; j < jLen; ++j) { + node = nodes[j]; + if (!node) { continue; } + if (node.nodeType === 3) { // TEXT NODE + part = InkElement._trimString( String(node.data) ); + if (part.length > 0) { + text += part; + if (removeIt) { el.removeChild(node); } + } + else { el.removeChild(node); } + } + } + + return text; + }, + + /** + * String trim implementation + * Used by getChildrenText + * + * function _trimString + * param {String} text + * return {String} trimmed text + */ + _trimString: function(text) { + return (String.prototype.trim) ? text.trim() : text.replace(/^\s*/, '').replace(/\s*$/, ''); + }, + + /** + * Gets value of a select element + * + * @method getSelectValues + * @param {DOMElement|String} select element + * @return {Array} The selected values + * @sample Ink_Dom_Element_1_getSelectValues.html + */ + getSelectValues: function (select) { + var selectEl = Ink.i(select); + var values = []; + for (var i = 0; i < selectEl.options.length; ++i) { + values.push( selectEl.options[i].value ); + } + return values; + }, + + + /* used by fills */ + _normalizeData: function(data) { + var d, data2 = []; + for (var i = 0, f = data.length; i < f; ++i) { + d = data[i]; + + if (!(d instanceof Array)) { // if not array, wraps primitive twice: val -> [val, val] + d = [d, d]; + } + else if (d.length === 1) { // if 1 element array: [val] -> [val, val] + d.push(d[0]); + } + data2.push(d); + } + return data2; + }, + + + /** + * Fills a select element with options + * + * @method fillSelect + * @param {DOMElement|String} container Select element which will get filled + * @param {Array} data Data to populate the component + * @param {Boolean} [skipEmpty] Flag to skip empty option + * @param {String|Number} [defaultValue] Initial selected value + * + * @sample Ink_Dom_Element_1_fillSelect.html + */ + fillSelect: function(container, data, skipEmpty, defaultValue) { + var containerEl = Ink.i(container); + if (!containerEl) { return; } + + containerEl.innerHTML = ''; + var d, optionEl; + + if (!skipEmpty) { + // add initial empty option + optionEl = document.createElement('option'); + optionEl.setAttribute('value', ''); + containerEl.appendChild(optionEl); + } + + data = InkElement._normalizeData(data); + + for (var i = 0, f = data.length; i < f; ++i) { + d = data[i]; + + optionEl = document.createElement('option'); + optionEl.setAttribute('value', d[0]); + if (d.length > 2) { + optionEl.setAttribute('extra', d[2]); + } + optionEl.appendChild( document.createTextNode(d[1]) ); + + if (d[0] === defaultValue) { + optionEl.setAttribute('selected', 'selected'); + } + + containerEl.appendChild(optionEl); + } + }, + + + /** + * Creates a set of radio buttons from an array of data + * + * @method fillRadios + * @param {DOMElement|String} insertAfterEl Element after which the input elements will be created + * @param {String} name Name for the form field ([] is added if not present as a suffix) + * @param {Array} data Data to populate the component + * @param {Boolean} [skipEmpty] Flag to skip creation of empty options + * @param {String|Number} [defaultValue] Initial selected value + * @param {String} [splitEl] Name of element to add after each input element (example: 'br') + * @return {DOMElement} Wrapper element around the radio buttons + */ + fillRadios: function(insertAfterEl, name, data, skipEmpty, defaultValue, splitEl) { + insertAfterEl = Ink.i(insertAfterEl); + var containerEl = document.createElement('span'); + InkElement.insertAfter(containerEl, insertAfterEl); + + data = InkElement._normalizeData(data); + + /* + if (name.substring(name.length - 1) !== ']') { + name += '[]'; + } + */ + + var d, inputEl; + + if (!skipEmpty) { + // add initial empty option + inputEl = document.createElement('input'); + inputEl.setAttribute('type', 'radio'); + inputEl.setAttribute('name', name); + inputEl.setAttribute('value', ''); + containerEl.appendChild(inputEl); + if (splitEl) { containerEl.appendChild( document.createElement(splitEl) ); } + } + + for (var i = 0; i < data.length; ++i) { + d = data[i]; + + inputEl = document.createElement('input'); + inputEl.setAttribute('type', 'radio'); + inputEl.setAttribute('name', name); + inputEl.setAttribute('value', d[0]); + containerEl.appendChild(inputEl); + containerEl.appendChild( document.createTextNode(d[1]) ); + if (splitEl) { containerEl.appendChild( document.createElement(splitEl) ); } + + if (d[0] === defaultValue) { + inputEl.checked = true; + } + } + + return containerEl; + }, + + + /** + * Creates set of checkbox buttons + * + * @method fillChecks + * @param {DOMElement|String} insertAfterEl Element after which the input elements will be created + * @param {String} name Name for the form field ([] is added if not present as a suffix) + * @param {Array} data Data to populate the component + * @param {Boolean} [skipEmpty] Flag to skip creation of empty options + * @param {String|Number} [defaultValue] Initial selected value + * @param {String} [splitEl] Name of element to add after each input element (example: 'br') + * @return {DOMElement} Wrapper element around the checkboxes + */ + fillChecks: function(insertAfterEl, name, data, defaultValue, splitEl) { + insertAfterEl = Ink.i(insertAfterEl); + var containerEl = document.createElement('span'); + InkElement.insertAfter(containerEl, insertAfterEl); + + data = InkElement._normalizeData(data); + + if (name.substring(name.length - 1) !== ']') { + name += '[]'; + } + + var d, inputEl; + + for (var i = 0; i < data.length; ++i) { + d = data[i]; + + inputEl = document.createElement('input'); + inputEl.setAttribute('type', 'checkbox'); + inputEl.setAttribute('name', name); + inputEl.setAttribute('value', d[0]); + containerEl.appendChild(inputEl); + containerEl.appendChild( document.createTextNode(d[1]) ); + if (splitEl) { containerEl.appendChild( document.createElement(splitEl) ); } + + if (d[0] === defaultValue) { + inputEl.checked = true; + } + } + + return containerEl; + }, + + + /** + * Gets the index of an element relative to a parent + * + * @method parentIndexOf + * @param {DOMElement} parentEl Element to parse + * @param {DOMElement} childEl Child Element to look for + * @return {Number} The index of the childEl inside parentEl. Returns -1 if it's not a direct child + * @sample Ink_Dom_Element_1_parentIndexOf.html + */ + parentIndexOf: function(parentEl, childEl) { + var node, idx = 0; + for (var i = 0, f = parentEl.childNodes.length; i < f; ++i) { + node = parentEl.childNodes[i]; + if (node.nodeType === 1) { // ELEMENT + if (node === childEl) { return idx; } + ++idx; + } + } + return -1; + }, + + + /** + * Gets the next siblings of an element + * + * @method nextSiblings + * @param {String|DOMElement} elm Element + * @return {Array} Array of next sibling elements + * @sample Ink_Dom_Element_1_nextSiblings.html + */ + nextSiblings: function(elm) { + elm = Ink.i(elm); + if(typeof(elm) === 'object' && elm !== null && elm.nodeType && elm.nodeType === 1) { + var elements = [], + siblings = elm.parentNode.children, + index = InkElement.parentIndexOf(elm.parentNode, elm); + + for(var i = ++index, len = siblings.length; i
" + deleteThisTbodyToken + "
"; + } else { + div.innerHTML = "" + html + "
"; + } + return div.firstChild; + }, + TBODY: function (div, html) { + div.innerHTML = '' + html + '
'; + return div.firstChild.getElementsByTagName('tbody')[0]; + }, + THEAD: function (div, html) { + div.innerHTML = '' + html + '
'; + return div.firstChild.getElementsByTagName('thead')[0]; + }, + TFOOT: function (div, html) { + div.innerHTML = '' + html + '
'; + return div.firstChild.getElementsByTagName('tfoot')[0]; + }, + TR: function (div, html) { + div.innerHTML = '' + html + '
'; + return div.firstChild.firstChild.firstChild; + } + }, + + /** + * Gets a wrapper DIV with a certain HTML content to be inserted inside another element. + * This is necessary for appendHTML,prependHTML functions, because they need a container element to copy the children from. + * + * Works around IE table quirks + * @method _getWrapper + * @private + * @param elm + * @param html + */ + _getWrapper: function (elm, html) { + var nodeName = elm.nodeName && elm.nodeName.toUpperCase(); + var wrapper = document.createElement('div'); + var wrapFunc = InkElement._wrapElements[nodeName]; + + if ( !wrapFunc ) { + wrapper.innerHTML = html; + return wrapper; + } + // special cases + wrapper = wrapFunc(wrapper, html); + // worst case: tbody auto-creation even when our HTML has a tbody. + if (browserCreatesTbodies && nodeName === 'TABLE') { + // terrible case. Deal with tbody creation too. + var tds = wrapper.getElementsByTagName('td'); + for (var i = 0, len = tds.length; i < len; i++) { + if (tds[i].innerHTML === deleteThisTbodyToken) { + var tbody = tds[i].parentNode.parentNode; + tbody.parentNode.removeChild(tbody); + } + } + } + return wrapper; + }, + + /** + * Appends HTML to an element. + * This method parses the html string and doesn't modify its contents + * + * @method appendHTML + * @param {String|DOMElement} elm Element + * @param {String} html Markup string + * @sample Ink_Dom_Element_1_appendHTML.html + */ + appendHTML: function(elm, html){ + elm = Ink.i(elm); + if(elm !== null) { + var wrapper = InkElement._getWrapper(elm, html); + while (wrapper.firstChild) { + elm.appendChild(wrapper.firstChild); + } + } + }, + + /** + * Prepends HTML to an element. + * This method parses the html string and doesn't modify its contents + * + * @method prependHTML + * @param {String|DOMElement} elm Element + * @param {String} html Markup string + * @sample Ink_Dom_Element_1_prependHTML.html + */ + prependHTML: function(elm, html){ + elm = Ink.i(elm); + if(elm !== null) { + var wrapper = InkElement._getWrapper(elm, html); + while (wrapper.lastChild) { + elm.insertBefore(wrapper.lastChild, elm.firstChild); + } + } + }, + + /** + * Sets the inner HTML of an element. + * + * @method setHTML + * @param {String|DOMElement} elm Element + * @param {String} html Markup string + * @sample Ink_Dom_Element_1_setHTML.html + */ + setHTML: function (elm, html) { + elm = Ink.i(elm); + if(elm !== null) { + try { + elm.innerHTML = html; + } catch (e) { + // Tables in IE7 + while (elm.firstChild) { + elm.removeChild(elm.firstChild); + } + InkElement.appendHTML(elm, html); + } + } + }, + + /** + * Wraps an element inside a container. + * + * The container may or may not be in the document yet. + * + * @method wrap + * @param {String|DOMElement} target Element to be wrapped + * @param {String|DOMElement} container Element to wrap the target + * @return Container element + * @sample Ink_Dom_Element_1_wrap.html + * + * @example + * before: + * + *
+ * + * call this function to wrap #target with a wrapper div. + * + * InkElement.wrap('target', InkElement.create('div', {id: 'container'}); + * + * after: + * + *
+ */ + wrap: function (target, container) { + target = Ink.i(target); + container = Ink.i(container); + + var nextNode = target.nextSibling; + var parent = target.parentNode; + + container.appendChild(target); + + if (nextNode !== null) { + parent.insertBefore(container, nextNode); + } else { + parent.appendChild(container); + } + + return container; + }, + + /** + * Places an element outside a wrapper. + * + * @method unwrap + * @param {DOMElement} elem The element you're trying to unwrap. This should be an ancestor of the wrapper. + * @param {String} [wrapperSelector] CSS Selector for the ancestor. Use this if your wrapper is not the direct parent of elem. + * @sample Ink_Dom_Element_1_unwrap.html + * + * @example + * + * When you have this: + * + *
+ *
+ *
+ * + * If you do this: + * + * InkElement.unwrap('unwrapMe'); + * + * You get this: + * + *
+ *
+ * + **/ + unwrap: function (elem, wrapperSelector) { + elem = Ink.i(elem); + var wrapper; + if (typeof wrapperSelector === 'string') { + wrapper = InkElement.findUpwardsBySelector(elem, wrapperSelector); + } else if (typeof wrapperSelector === 'object' && wrapperSelector.tagName) { + wrapper = InkElement.findUpwardsHaving(elem, function (ancestor) { + return ancestor === wrapperSelector; + }); + } else { + wrapper = elem.parentNode; + } + if (!wrapper || !wrapper.parentNode) { return; } + + InkElement.insertBefore(elem, wrapper); + }, + + /** + * Replaces an element with another. + * + * @method replace + * @param element The element to be replaced. + * @param replacement The new element. + * @sample Ink_Dom_Element_1_replace.html + * + * @example + * var newelement1 = InkElement.create('div'); + * // ... + * replace(Ink.i('element1'), newelement1); + */ + replace: function (element, replacement) { + element = Ink.i(element); + if(element !== null) { + element.parentNode.replaceChild(replacement, element); + } + }, + + /** + * Removes direct text children. + * Useful to remove nasty layout gaps generated by whitespace on the markup. + * + * @method removeTextNodeChildren + * @param {DOMElement} el Element to remove text from + * @sample Ink_Dom_Element_1_removeTextNodeChildren.html + */ + removeTextNodeChildren: function(el) { + el = Ink.i(el); + if(el !== null) { + var prevEl, toRemove, parent = el; + el = el.firstChild; + while (el) { + toRemove = (el.nodeType === 3); + prevEl = el; + el = el.nextSibling; + if (toRemove) { + parent.removeChild(prevEl); + } + } + } + }, + + /** + * Creates a documentFragment from an HTML string. + * + * @method htmlToFragment + * @param {String} html HTML string + * @return {DocumentFragment} DocumentFragment containing all of the elements from the html string + * @sample Ink_Dom_Element_1_htmlToFragment.html + */ + htmlToFragment: (createContextualFragmentSupport ? + function(html){ + var range; + + if(typeof html !== 'string'){ return document.createDocumentFragment(); } + + range = document.createRange(); + + // set the context to document.body (firefox does this already, webkit doesn't) + range.selectNode(document.body); + + return range.createContextualFragment(html); + } : function (html) { + var fragment = document.createDocumentFragment(), + tempElement, + current; + + if(typeof html !== 'string'){ return fragment; } + + tempElement = document.createElement('div'); + tempElement.innerHTML = html; + + // append child removes elements from the original parent + while( (current = tempElement.firstChild) ){ // intentional assignment + fragment.appendChild(current); + } + + return fragment; + }), + + _camelCase: function(str) + { + return str ? str.replace(/-(\w)/g, function (_, $1){ + return $1.toUpperCase(); + }) : str; + }, + + /** + * Gets data attributes from an element + * + * @method data + * @param {String|DOMElement} selector Element or CSS selector + * @return {Object} Object with the data-* properties. If no data-attributes are present, an empty object is returned. + * @sample Ink_Dom_Element_1_data.html + */ + data: function(selector) { + var el; + if (typeof selector !== 'object' && typeof selector !== 'string') { + throw '[Ink.Dom.Element.data] :: Invalid selector defined'; + } + + if (typeof selector === 'object') { + el = selector; + } + else { + var InkDomSelector = Ink.getModule('Ink.Dom.Selector', 1); + if (!InkDomSelector) { + throw "[Ink.Dom.Element.data] :: this method requires Ink.Dom.Selector - v1"; + } + el = InkDomSelector.select(selector); + if (el.length <= 0) { + throw "[Ink.Dom.Element.data] :: Can't find any element with the specified selector"; + } + el = el[0]; + } + + var dataset = {}; + var attrs = el.attributes || []; + + var curAttr, curAttrName, curAttrValue; + if (attrs) { + for (var i = 0, total = attrs.length; i < total; ++i) { + curAttr = attrs[i]; + curAttrName = curAttr.name; + curAttrValue = curAttr.value; + if (curAttrName && curAttrName.indexOf('data-') === 0) { + dataset[InkElement._camelCase(curAttrName.replace('data-', ''))] = curAttrValue; + } + } + } + + return dataset; + }, + + /** + * Move the cursor on an input or textarea element. + * @method moveCursorTo + * @param {DOMElement} el Input or Textarea element + * @param {Number} t Index of the character to move the cursor to + * @sample Ink_Dom_Element_1_moveCursorTo.html + */ + moveCursorTo: function(el, t) { + el = Ink.i(el); + if(el !== null) { + if (el.setSelectionRange) { + el.setSelectionRange(t, t); + //el.focus(); + } + else { + var range = el.createTextRange(); + range.collapse(true); + range.moveEnd( 'character', t); + range.moveStart('character', t); + range.select(); + } + } + }, + + /** + * Get the page's width. + * @method pageWidth + * @return {Number} Page width in pixels + * @sample Ink_Dom_Element_1_pageWidth.html + */ + pageWidth: function() { + var xScroll; + + if (window.innerWidth && window.scrollMaxX) { + xScroll = window.innerWidth + window.scrollMaxX; + } else if (document.body.scrollWidth > document.body.offsetWidth){ + xScroll = document.body.scrollWidth; + } else { + xScroll = document.body.offsetWidth; + } + + var windowWidth; + + if (window.self.innerWidth) { + if(document.documentElement.clientWidth){ + windowWidth = document.documentElement.clientWidth; + } else { + windowWidth = window.self.innerWidth; + } + } else if (document.documentElement && document.documentElement.clientWidth) { + windowWidth = document.documentElement.clientWidth; + } else if (document.body) { + windowWidth = document.body.clientWidth; + } + + if(xScroll < windowWidth){ + return xScroll; + } else { + return windowWidth; + } + }, + + /** + * Get the page's height. + * @method pageHeight + * @return {Number} Page height in pixels + * @sample Ink_Dom_Element_1_pageHeight.html + */ + pageHeight: function() { + var yScroll; + + if (window.innerHeight && window.scrollMaxY) { + yScroll = window.innerHeight + window.scrollMaxY; + } else if (document.body.scrollHeight > document.body.offsetHeight){ + yScroll = document.body.scrollHeight; + } else { + yScroll = document.body.offsetHeight; + } + + var windowHeight; + + if (window.self.innerHeight) { + windowHeight = window.self.innerHeight; + } else if (document.documentElement && document.documentElement.clientHeight) { + windowHeight = document.documentElement.clientHeight; + } else if (document.body) { + windowHeight = document.body.clientHeight; + } + + if(yScroll < windowHeight){ + return windowHeight; + } else { + return yScroll; + } + }, + + /** + * Get the viewport's width. + * @method viewportWidth + * @return {Number} Viewport width in pixels + * @sample Ink_Dom_Element_1_viewportWidth.html + */ + viewportWidth: function() { + if(typeof window.innerWidth !== "undefined") { + return window.innerWidth; + } + if (document.documentElement && typeof document.documentElement.offsetWidth !== "undefined") { + return document.documentElement.offsetWidth; + } + }, + + /** + * Get the viewport's height. + * @method viewportHeight + * @return {Number} Viewport height in pixels + * @sample Ink_Dom_Element_1_viewportHeight.html + */ + viewportHeight: function() { + if (typeof window.innerHeight !== "undefined") { + return window.innerHeight; + } + if (document.documentElement && typeof document.documentElement.offsetHeight !== "undefined") { + return document.documentElement.offsetHeight; + } + }, + + /** + * Get the scroll's width. + * @method scrollWidth + * @return {Number} Scroll width + */ + scrollWidth: function() { + if (typeof window.self.pageXOffset !== 'undefined') { + return window.self.pageXOffset; + } + if (typeof document.documentElement !== 'undefined' && typeof document.documentElement.scrollLeft !== 'undefined') { + return document.documentElement.scrollLeft; + } + return document.body.scrollLeft; + }, + + /** + * Get the scroll's height. + * @method scrollHeight + * @return {Number} Scroll height + */ + scrollHeight: function() { + if (typeof window.self.pageYOffset !== 'undefined') { + return window.self.pageYOffset; + } + if (typeof document.documentElement !== 'undefined' && typeof document.documentElement.scrollTop !== 'undefined') { + return document.documentElement.scrollTop; + } + return document.body.scrollTop; + } + }; + + return InkElement; + +}); + +/** + * @module Ink.Dom.Event_1 + * @version 1 + * Event management + */ + +Ink.createModule('Ink.Dom.Event', 1, [], function() { + /* jshint + asi:true, + strict:false, + laxcomma:true, + eqeqeq:false, + laxbreak:true, + boss:true, + curly:false, + expr:true + */ + + /** + * @namespace Ink.Dom.Event_1 + * @static + */ + + /*! + * Bean - copyright (c) Jacob Thornton 2011-2012 + * https://github.com/fat/bean + * MIT license + */ + var bean = (function (name, context, definition) { + return definition() + })('bean', this, function (name, context) { + name = name || 'bean' + context = context || this + + var win = window + , old = context[name] + , namespaceRegex = /[^\.]*(?=\..*)\.|.*/ + , nameRegex = /\..*/ + , addEvent = 'addEventListener' + , removeEvent = 'removeEventListener' + , doc = document || {} + , root = doc.documentElement || {} + , W3C_MODEL = root[addEvent] + , eventSupport = W3C_MODEL ? addEvent : 'attachEvent' + , ONE = {} // singleton for quick matching making add() do one() + + , slice = Array.prototype.slice + , str2arr = function (s, d) { return s.split(d || ' ') } + , isString = function (o) { return typeof o == 'string' } + , isFunction = function (o) { return typeof o == 'function' } + + // events that we consider to be 'native', anything not in this list will + // be treated as a custom event + , standardNativeEvents = + 'click dblclick mouseup mousedown contextmenu ' + // mouse buttons + 'mousewheel mousemultiwheel DOMMouseScroll ' + // mouse wheel + 'mouseover mouseout mousemove selectstart selectend ' + // mouse movement + 'keydown keypress keyup ' + // keyboard + 'orientationchange ' + // mobile + 'focus blur change reset select submit ' + // form elements + 'load unload beforeunload resize move DOMContentLoaded ' + // window + 'readystatechange message ' + // window + 'error abort scroll ' // misc + // element.fireEvent('onXYZ'... is not forgiving if we try to fire an event + // that doesn't actually exist, so make sure we only do these on newer browsers + , w3cNativeEvents = + 'show ' + // mouse buttons + 'input invalid ' + // form elements + 'touchstart touchmove touchend touchcancel ' + // touch + 'gesturestart gesturechange gestureend ' + // gesture + 'textinput' + // TextEvent + 'readystatechange pageshow pagehide popstate ' + // window + 'hashchange offline online ' + // window + 'afterprint beforeprint ' + // printing + 'dragstart dragenter dragover dragleave drag drop dragend ' + // dnd + 'loadstart progress suspend emptied stalled loadmetadata ' + // media + 'loadeddata canplay canplaythrough playing waiting seeking ' + // media + 'seeked ended durationchange timeupdate play pause ratechange ' + // media + 'volumechange cuechange ' + // media + 'checking noupdate downloading cached updateready obsolete ' // appcache + + // convert to a hash for quick lookups + , nativeEvents = (function (hash, events, i) { + for (i = 0; i < events.length; i++) events[i] && (hash[events[i]] = 1) + return hash + }({}, str2arr(standardNativeEvents + (W3C_MODEL ? w3cNativeEvents : '')))) + + // custom events are events that we *fake*, they are not provided natively but + // we can use native events to generate them + , customEvents = (function () { + var isAncestor = 'compareDocumentPosition' in root + ? function (element, container) { + return container.compareDocumentPosition && (container.compareDocumentPosition(element) & 16) === 16 + } + : 'contains' in root + ? function (element, container) { + container = container.nodeType === 9 || container === window ? root : container + return container !== element && container.contains(element) + } + : function (element, container) { + while (element = element.parentNode) if (element === container) return 1 + return 0 + } + , check = function (event) { + var related = event.relatedTarget + return !related + ? related == null + : (related !== this && related.prefix !== 'xul' && !/document/.test(this.toString()) + && !isAncestor(related, this)) + } + + return { + mouseenter: { base: 'mouseover', condition: check } + , mouseleave: { base: 'mouseout', condition: check } + , mousewheel: { base: /Firefox/.test(navigator.userAgent) ? 'DOMMouseScroll' : 'mousewheel' } + } + }()) + + // we provide a consistent Event object across browsers by taking the actual DOM + // event object and generating a new one from its properties. + , Event = (function () { + // a whitelist of properties (for different event types) tells us what to check for and copy + var commonProps = str2arr('altKey attrChange attrName bubbles cancelable ctrlKey currentTarget ' + + 'detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey ' + + 'srcElement target timeStamp type view which propertyName') + , mouseProps = commonProps.concat(str2arr('button buttons clientX clientY dataTransfer ' + + 'fromElement offsetX offsetY pageX pageY screenX screenY toElement')) + , mouseWheelProps = mouseProps.concat(str2arr('wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ ' + + 'axis')) // 'axis' is FF specific + , keyProps = commonProps.concat(str2arr('char charCode key keyCode keyIdentifier ' + + 'keyLocation location')) + , textProps = commonProps.concat(str2arr('data')) + , touchProps = commonProps.concat(str2arr('touches targetTouches changedTouches scale rotation')) + , messageProps = commonProps.concat(str2arr('data origin source')) + , stateProps = commonProps.concat(str2arr('state')) + , overOutRegex = /over|out/ + // some event types need special handling and some need special properties, do that all here + , typeFixers = [ + { // key events + reg: /key/i + , fix: function (event, newEvent) { + newEvent.keyCode = event.keyCode || event.which + return keyProps + } + } + , { // mouse events + reg: /click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i + , fix: function (event, newEvent, type) { + newEvent.rightClick = event.which === 3 || event.button === 2 + newEvent.pos = { x: 0, y: 0 } + if (event.pageX || event.pageY) { + newEvent.clientX = event.pageX + newEvent.clientY = event.pageY + } else if (event.clientX || event.clientY) { + newEvent.clientX = event.clientX + doc.body.scrollLeft + root.scrollLeft + newEvent.clientY = event.clientY + doc.body.scrollTop + root.scrollTop + } + if (overOutRegex.test(type)) { + newEvent.relatedTarget = event.relatedTarget + || event[(type == 'mouseover' ? 'from' : 'to') + 'Element'] + } + return mouseProps + } + } + , { // mouse wheel events + reg: /mouse.*(wheel|scroll)/i + , fix: function () { return mouseWheelProps } + } + , { // TextEvent + reg: /^text/i + , fix: function () { return textProps } + } + , { // touch and gesture events + reg: /^touch|^gesture/i + , fix: function () { return touchProps } + } + , { // message events + reg: /^message$/i + , fix: function () { return messageProps } + } + , { // popstate events + reg: /^popstate$/i + , fix: function () { return stateProps } + } + , { // everything else + reg: /.*/ + , fix: function () { return commonProps } + } + ] + , typeFixerMap = {} // used to map event types to fixer functions (above), a basic cache mechanism + + , Event = function (event, element, isNative) { + if (!arguments.length) return + event = event || ((element.ownerDocument || element.document || element).parentWindow || win).event + this.originalEvent = event + this.isNative = isNative + this.isBean = true + + if (!event) return + + var type = event.type + , target = event.target || event.srcElement + , i, l, p, props, fixer + + this.target = target && target.nodeType === 3 ? target.parentNode : target + + if (isNative) { // we only need basic augmentation on custom events, the rest expensive & pointless + fixer = typeFixerMap[type] + if (!fixer) { // haven't encountered this event type before, map a fixer function for it + for (i = 0, l = typeFixers.length; i < l; i++) { + if (typeFixers[i].reg.test(type)) { // guaranteed to match at least one, last is .* + typeFixerMap[type] = fixer = typeFixers[i].fix + break + } + } + } + + props = fixer(event, this, type) + for (i = props.length; i--;) { + if (!((p = props[i]) in this) && p in event) this[p] = event[p] + } + } + } + + // preventDefault() and stopPropagation() are a consistent interface to those functions + // on the DOM, stop() is an alias for both of them together + Event.prototype.preventDefault = function () { + if (this.originalEvent.preventDefault) this.originalEvent.preventDefault() + else this.originalEvent.returnValue = false + } + Event.prototype.stopPropagation = function () { + if (this.originalEvent.stopPropagation) this.originalEvent.stopPropagation() + else this.originalEvent.cancelBubble = true + } + Event.prototype.stop = function () { + this.preventDefault() + this.stopPropagation() + this.stopped = true + } + // stopImmediatePropagation() has to be handled internally because we manage the event list for + // each element + // note that originalElement may be a Bean#Event object in some situations + Event.prototype.stopImmediatePropagation = function () { + if (this.originalEvent.stopImmediatePropagation) this.originalEvent.stopImmediatePropagation() + this.isImmediatePropagationStopped = function () { return true } + } + Event.prototype.isImmediatePropagationStopped = function () { + return this.originalEvent.isImmediatePropagationStopped && this.originalEvent.isImmediatePropagationStopped() + } + Event.prototype.clone = function (currentTarget) { + //TODO: this is ripe for optimisation, new events are *expensive* + // improving this will speed up delegated events + var ne = new Event(this, this.element, this.isNative) + ne.currentTarget = currentTarget + return ne + } + + return Event + }()) + + // if we're in old IE we can't do onpropertychange on doc or win so we use doc.documentElement for both + , targetElement = function (element, isNative) { + return !W3C_MODEL && !isNative && (element === doc || element === win) ? root : element + } + + /** + * Bean maintains an internal registry for event listeners. We don't touch elements, objects + * or functions to identify them, instead we store everything in the registry. + * Each event listener has a RegEntry object, we have one 'registry' for the whole instance. + */ + , RegEntry = (function () { + // each handler is wrapped so we can handle delegation and custom events + var wrappedHandler = function (element, fn, condition, args) { + var call = function (event, eargs) { + return fn.apply(element, args ? slice.call(eargs, event ? 0 : 1).concat(args) : eargs) + } + , findTarget = function (event, eventElement) { + return fn.__beanDel ? fn.__beanDel.ft(event.target, element) : eventElement + } + , handler = condition + ? function (event) { + var target = findTarget(event, this) // deleated event + if (condition.apply(target, arguments)) { + if (event) event.currentTarget = target + return call(event, arguments) + } + } + : function (event) { + if (fn.__beanDel) event = event.clone(findTarget(event)) // delegated event, fix the fix + return call(event, arguments) + } + handler.__beanDel = fn.__beanDel + return handler + } + + , RegEntry = function (element, type, handler, original, namespaces, args, root) { + var customType = customEvents[type] + , isNative + + if (type == 'unload') { + // self clean-up + handler = once(removeListener, element, type, handler, original) + } + + if (customType) { + if (customType.condition) { + handler = wrappedHandler(element, handler, customType.condition, args) + } + type = customType.base || type + } + + this.isNative = isNative = nativeEvents[type] && !!element[eventSupport] + this.customType = !W3C_MODEL && !isNative && type + this.element = element + this.type = type + this.original = original + this.namespaces = namespaces + this.eventType = W3C_MODEL || isNative ? type : 'propertychange' + this.target = targetElement(element, isNative) + this[eventSupport] = !!this.target[eventSupport] + this.root = root + this.handler = wrappedHandler(element, handler, null, args) + } + + // given a list of namespaces, is our entry in any of them? + RegEntry.prototype.inNamespaces = function (checkNamespaces) { + var i, j, c = 0 + if (!checkNamespaces) return true + if (!this.namespaces) return false + for (i = checkNamespaces.length; i--;) { + for (j = this.namespaces.length; j--;) { + if (checkNamespaces[i] == this.namespaces[j]) c++ + } + } + return checkNamespaces.length === c + } + + // match by element, original fn (opt), handler fn (opt) + RegEntry.prototype.matches = function (checkElement, checkOriginal, checkHandler) { + return this.element === checkElement && + (!checkOriginal || this.original === checkOriginal) && + (!checkHandler || this.handler === checkHandler) + } + + return RegEntry + }()) + + , registry = (function () { + // our map stores arrays by event type, just because it's better than storing + // everything in a single array. + // uses '$' as a prefix for the keys for safety and 'r' as a special prefix for + // rootListeners so we can look them up fast + var map = {} + + // generic functional search of our registry for matching listeners, + // `fn` returns false to break out of the loop + , forAll = function (element, type, original, handler, root, fn) { + var pfx = root ? 'r' : '$' + if (!type || type == '*') { + // search the whole registry + for (var t in map) { + if (t.charAt(0) == pfx) { + forAll(element, t.substr(1), original, handler, root, fn) + } + } + } else { + var i = 0, l, list = map[pfx + type], all = element == '*' + if (!list) return + for (l = list.length; i < l; i++) { + if ((all || list[i].matches(element, original, handler)) && !fn(list[i], list, i, type)) return + } + } + } + + , has = function (element, type, original, root) { + // we're not using forAll here simply because it's a bit slower and this + // needs to be fast + var i, list = map[(root ? 'r' : '$') + type] + if (list) { + for (i = list.length; i--;) { + if (!list[i].root && list[i].matches(element, original, null)) return true + } + } + return false + } + + , get = function (element, type, original, root) { + var entries = [] + forAll(element, type, original, null, root, function (entry) { + return entries.push(entry) + }) + return entries + } + + , put = function (entry) { + var has = !entry.root && !this.has(entry.element, entry.type, null, false) + , key = (entry.root ? 'r' : '$') + entry.type + ;(map[key] || (map[key] = [])).push(entry) + return has + } + + , del = function (entry) { + forAll(entry.element, entry.type, null, entry.handler, entry.root, function (entry, list, i) { + list.splice(i, 1) + entry.removed = true + if (list.length === 0) delete map[(entry.root ? 'r' : '$') + entry.type] + return false + }) + } + + // dump all entries, used for onunload + , entries = function () { + var t, entries = [] + for (t in map) { + if (t.charAt(0) == '$') entries = entries.concat(map[t]) + } + return entries + } + + return { has: has, get: get, put: put, del: del, entries: entries } + }()) + + // we need a selector engine for delegated events, use querySelectorAll if it exists + // but for older browsers we need Qwery, Sizzle or similar + , selectorEngine + , setSelectorEngine = function (e) { + if (!arguments.length) { + selectorEngine = doc.querySelectorAll + ? function (s, r) { + return r.querySelectorAll(s) + } + : function () { + throw new Error('Bean: No selector engine installed') // eeek + } + } else { + selectorEngine = e + } + } + + // we attach this listener to each DOM event that we need to listen to, only once + // per event type per DOM element + , rootListener = function (event, type) { + if (!W3C_MODEL && type && event && event.propertyName != '_on' + type) return + + var listeners = registry.get(this, type || event.type, null, false) + , l = listeners.length + , i = 0 + + event = new Event(event, this, true) + if (type) event.type = type + + // iterate through all handlers registered for this type, calling them unless they have + // been removed by a previous handler or stopImmediatePropagation() has been called + for (; i < l && !event.isImmediatePropagationStopped(); i++) { + if (!listeners[i].removed) listeners[i].handler.call(this, event) + } + } + + // add and remove listeners to DOM elements + , listener = W3C_MODEL + ? function (element, type, add) { + // new browsers + element[add ? addEvent : removeEvent](type, rootListener, false) + } + : function (element, type, add, custom) { + // IE8 and below, use attachEvent/detachEvent and we have to piggy-back propertychange events + // to simulate event bubbling etc. + var entry + if (add) { + registry.put(entry = new RegEntry( + element + , custom || type + , function (event) { // handler + rootListener.call(element, event, custom) + } + , rootListener + , null + , null + , true // is root + )) + if (custom && element['_on' + custom] == null) element['_on' + custom] = 0 + entry.target.attachEvent('on' + entry.eventType, entry.handler) + } else { + entry = registry.get(element, custom || type, rootListener, true)[0] + if (entry) { + entry.target.detachEvent('on' + entry.eventType, entry.handler) + registry.del(entry) + } + } + } + + , once = function (rm, element, type, fn, originalFn) { + // wrap the handler in a handler that does a remove as well + return function () { + fn.apply(this, arguments) + rm(element, type, originalFn) + } + } + + , removeListener = function (element, orgType, handler, namespaces) { + var type = orgType && orgType.replace(nameRegex, '') + , handlers = registry.get(element, type, null, false) + , removed = {} + , i, l + + for (i = 0, l = handlers.length; i < l; i++) { + if ((!handler || handlers[i].original === handler) && handlers[i].inNamespaces(namespaces)) { + // TODO: this is problematic, we have a registry.get() and registry.del() that + // both do registry searches so we waste cycles doing this. Needs to be rolled into + // a single registry.forAll(fn) that removes while finding, but the catch is that + // we'll be splicing the arrays that we're iterating over. Needs extra tests to + // make sure we don't screw it up. @rvagg + registry.del(handlers[i]) + if (!removed[handlers[i].eventType] && handlers[i][eventSupport]) + removed[handlers[i].eventType] = { t: handlers[i].eventType, c: handlers[i].type } + } + } + // check each type/element for removed listeners and remove the rootListener where it's no longer needed + for (i in removed) { + if (!registry.has(element, removed[i].t, null, false)) { + // last listener of this type, remove the rootListener + listener(element, removed[i].t, false, removed[i].c) + } + } + } + + // set up a delegate helper using the given selector, wrap the handler function + , delegate = function (selector, fn) { + //TODO: findTarget (therefore $) is called twice, once for match and once for + // setting e.currentTarget, fix this so it's only needed once + var findTarget = function (target, root) { + var i, array = isString(selector) ? selectorEngine(selector, root) : selector + for (; target && target !== root; target = target.parentNode) { + for (i = array.length; i--;) { + if (array[i] === target) return target + } + } + } + , handler = function (e) { + var match = findTarget(e.target, this) + if (match) fn.apply(match, arguments) + } + + // __beanDel isn't pleasant but it's a private function, not exposed outside of Bean + handler.__beanDel = { + ft : findTarget // attach it here for customEvents to use too + , selector : selector + } + return handler + } + + , fireListener = W3C_MODEL ? function (isNative, type, element) { + // modern browsers, do a proper dispatchEvent() + var evt = doc.createEvent(isNative ? 'HTMLEvents' : 'UIEvents') + evt[isNative ? 'initEvent' : 'initUIEvent'](type, true, true, win, 1) + element.dispatchEvent(evt) + } : function (isNative, type, element) { + // old browser use onpropertychange, just increment a custom property to trigger the event + element = targetElement(element, isNative) + isNative ? element.fireEvent('on' + type, doc.createEventObject()) : element['_on' + type]++ + } + + /** + * Public API: off(), on(), add(), (remove()), one(), fire(), clone() + */ + + /** + * off(element[, eventType(s)[, handler ]]) + */ + , off = function (element, typeSpec, fn) { + var isTypeStr = isString(typeSpec) + , k, type, namespaces, i + + if (isTypeStr && typeSpec.indexOf(' ') > 0) { + // off(el, 't1 t2 t3', fn) or off(el, 't1 t2 t3') + typeSpec = str2arr(typeSpec) + for (i = typeSpec.length; i--;) + off(element, typeSpec[i], fn) + return element + } + + type = isTypeStr && typeSpec.replace(nameRegex, '') + if (type && customEvents[type]) type = customEvents[type].base + + if (!typeSpec || isTypeStr) { + // off(el) or off(el, t1.ns) or off(el, .ns) or off(el, .ns1.ns2.ns3) + if (namespaces = isTypeStr && typeSpec.replace(namespaceRegex, '')) namespaces = str2arr(namespaces, '.') + removeListener(element, type, fn, namespaces) + } else if (isFunction(typeSpec)) { + // off(el, fn) + removeListener(element, null, typeSpec) + } else { + // off(el, { t1: fn1, t2, fn2 }) + for (k in typeSpec) { + if (typeSpec.hasOwnProperty(k)) off(element, k, typeSpec[k]) + } + } + + return element + } + + /** + * on(element, eventType(s)[, selector], handler[, args ]) + */ + , on = function(element, events, selector, fn) { + var originalFn, type, types, i, args, entry, first + + //TODO: the undefined check means you can't pass an 'args' argument, fix this perhaps? + if (selector === undefined && typeof events == 'object') { + //TODO: this can't handle delegated events + for (type in events) { + if (events.hasOwnProperty(type)) { + on.call(this, element, type, events[type]) + } + } + return + } + + if (!isFunction(selector)) { + // delegated event + originalFn = fn + args = slice.call(arguments, 4) + fn = delegate(selector, originalFn, selectorEngine) + } else { + args = slice.call(arguments, 3) + fn = originalFn = selector + } + + types = str2arr(events) + + // special case for one(), wrap in a self-removing handler + if (this === ONE) { + fn = once(off, element, events, fn, originalFn) + } + + for (i = types.length; i--;) { + // add new handler to the registry and check if it's the first for this element/type + first = registry.put(entry = new RegEntry( + element + , types[i].replace(nameRegex, '') // event type + , fn + , originalFn + , str2arr(types[i].replace(namespaceRegex, ''), '.') // namespaces + , args + , false // not root + )) + if (entry[eventSupport] && first) { + // first event of this type on this element, add root listener + listener(element, entry.eventType, true, entry.customType) + } + } + + return element + } + + /** + * add(element[, selector], eventType(s), handler[, args ]) + * + * Deprecated: kept (for now) for backward-compatibility + */ + , add = function (element, events, fn, delfn) { + return on.apply( + null + , !isString(fn) + ? slice.call(arguments) + : [ element, fn, events, delfn ].concat(arguments.length > 3 ? slice.call(arguments, 5) : []) + ) + } + + /** + * one(element, eventType(s)[, selector], handler[, args ]) + */ + , one = function () { + return on.apply(ONE, arguments) + } + + /** + * fire(element, eventType(s)[, args ]) + * + * The optional 'args' argument must be an array, if no 'args' argument is provided + * then we can use the browser's DOM event system, otherwise we trigger handlers manually + */ + , fire = function (element, type, args) { + var types = str2arr(type) + , i, j, l, names, handlers + + for (i = types.length; i--;) { + type = types[i].replace(nameRegex, '') + if (names = types[i].replace(namespaceRegex, '')) names = str2arr(names, '.') + if (!names && !args && element[eventSupport]) { + fireListener(nativeEvents[type], type, element) + } else { + // non-native event, either because of a namespace, arguments or a non DOM element + // iterate over all listeners and manually 'fire' + handlers = registry.get(element, type, null, false) + args = [false].concat(args) + for (j = 0, l = handlers.length; j < l; j++) { + if (handlers[j].inNamespaces(names)) { + handlers[j].handler.apply(element, args) + } + } + } + } + return element + } + + /** + * clone(dstElement, srcElement[, eventType ]) + * + * TODO: perhaps for consistency we should allow the same flexibility in type specifiers? + */ + , clone = function (element, from, type) { + var handlers = registry.get(from, type, null, false) + , l = handlers.length + , i = 0 + , args, beanDel + + for (; i < l; i++) { + if (handlers[i].original) { + args = [ element, handlers[i].type ] + if (beanDel = handlers[i].handler.__beanDel) args.push(beanDel.selector) + args.push(handlers[i].original) + on.apply(null, args) + } + } + return element + } + + , bean = { + 'on' : on + , 'add' : add + , 'one' : one + , 'off' : off + , 'remove' : off + , 'clone' : clone + , 'fire' : fire + , 'Event' : Event + , 'setSelectorEngine' : setSelectorEngine + , 'noConflict' : function () { + context[name] = old + return this + } + } + + // for IE, clean up on unload to avoid leaks + if (win.attachEvent) { + var cleanup = function () { + var i, entries = registry.entries() + for (i in entries) { + if (entries[i].type && entries[i].type !== 'unload') off(entries[i].element, entries[i].type) + } + win.detachEvent('onunload', cleanup) + win.CollectGarbage && win.CollectGarbage() + } + win.attachEvent('onunload', cleanup) + } + + // initialize selector engine to internal default (qSA or throw Error) + setSelectorEngine(Ink.ss) + + return bean + }); + + /** + * Keep this declaration here and off Bean as it extends the Event + * object and some properties are readonly in strict mode + */ + 'use strict'; + + var InkEvent = { + + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + KEY_HOME: 36, + KEY_END: 35, + KEY_PAGEUP: 33, + KEY_PAGEDOWN: 34, + KEY_INSERT: 45, + + /** + * Creates a debounced version of a function. + * Returns a function which calls `func`, waiting at least `wait` milliseconds between calls. This is useful for events such as `scroll` or `resize`, which can be triggered too many times per second, slowing down the browser with needless function calls. + * + * *note:* This does not delay the first function call to the function. + * + * @method throttle + * @param {Function} func Function to call. Arguments and context are both passed. + * @param {Number} [wait]=0 Milliseconds to wait between calls. + * + * @example + * + * Suppose you are observing the `scroll` event, but your application is lagging because `scroll` is triggered too many times. + * + * // BEFORE + * InkEvent.observe(window, 'scroll', function () { + * ... + * }); // When scrolling on mobile devices or on firefox's smooth scroll + * // this is expensive because onscroll is called many times + * + * // AFTER + * InkEvent.observe(window, 'scroll', InkEvent.throttle(function () { + * ... + * }, 100)); // The event handler is called only every 100ms. Problem solved. + * + * @example + * var handler = InkEvent.throttle(function () { + * ... + * }, 100); + * + * InkEvent.observe(window, 'scroll', handler); + * InkEvent.observe(window, 'resize', handler); + * + * // on resize, both the "scroll" and the "resize" events are triggered + * // a LOT of times. This prevents both of them being called a lot of + * // times when the window is being resized by a user. + * + **/ + throttle: function (func, wait) { + wait = wait || 0; + var lastCall = 0; // Warning: This breaks on Jan 1st 1970 0:00 + var timeout; + var throttled = function () { + var now = +new Date(); + var timeDiff = now - lastCall; + if (timeDiff >= wait) { + lastCall = now; + return func.apply(this, [].slice.call(arguments)); + } else { + var that = this; + var args = [].slice.call(arguments); + if (!timeout) { + timeout = setTimeout(function () { + timeout = null; + return throttled.apply(that, args); + }, wait - timeDiff); + } + } + }; + return throttled; + }, + + /** + * Gets the event's target element. + * + * @method element + * @param {Object} ev Event object + * @return {DOMNode} The target + */ + element: function(ev) { + var node = ev.delegationTarget || + ev.target || + // IE stuff + (ev.type === 'mouseout' && ev.fromElement) || + (ev.type === 'mouseleave' && ev.fromElement) || + (ev.type === 'mouseover' && ev.toElement) || + (ev.type === 'mouseenter' && ev.toElement) || + ev.srcElement || + null; + return node && (node.nodeType === 3 || node.nodeType === 4) ? node.parentNode : node; + }, + + /** + * Gets the event's related target element. + * + * @method relatedTarget + * @param {Object} ev event object + * @return {DOMNode} The related target + */ + relatedTarget: function(ev){ + var node = ev.relatedTarget || + // IE stuff + (ev.type === 'mouseout' && ev.toElement) || + (ev.type === 'mouseleave' && ev.toElement) || + (ev.type === 'mouseover' && ev.fromElement) || + (ev.type === 'mouseenter' && ev.fromElement) || + null; + return node && (node.nodeType === 3 || node.nodeType === 4) ? node.parentNode : node; + }, + + /** + * Find closest ancestor element by tag name related to the event target. + * Navigate up the DOM tree, looking for a tag with the name `elmTagName`. + * + * If such tag is not found, `document` is returned. + * + * @method findElement + * @param {Object} ev Event object + * @param {String} elmTagName Tag name to find + * @param {Boolean} [force]=false Flag to skip returning `document` and to return `false` instead. + * @return {DOMElement} the first element which matches given tag name or the document element if the wanted tag is not found + */ + findElement: function(ev, elmTagName, force) + { + var node = this.element(ev); + while(true) { + if(node.nodeName.toLowerCase() === elmTagName.toLowerCase()) { + return node; + } else { + node = node.parentNode; + if(!node) { + if(force) { + return false; + } + return document; + } + if(!node.parentNode){ + if(force){ return false; } + return document; + } + } + } + }, + + /** + * Attaches an event to element + * + * @method observe + * @param {DOMElement|String} element Element id or element + * @param {String} eventName Event name + * @param {Function} callBack Receives the event object as a parameter. If you're manually firing custom events, check it's eventName property to make sure you're handling the right event. + * @param {Boolean} [useCapture] Flag to change event listening from bubbling to capture. + * @return {Function} The event handler used. Hang on to this if you want to `stopObserving` later. + */ + observe: function(element, eventName, callBack, useCapture) { + element = Ink.i(element); + if(element) { + if(element.addEventListener) { + element.addEventListener(eventName, callBack, !!useCapture); + } else { + element.attachEvent('on' + eventName, (callBack = Ink.bind(callBack, element))); + } + return callBack; + } + }, + + /** + * Like observe, but listen to the event only once. + * + * @method observeOnce + * @param {DOMElement|String} element Element id or element + * @param {String} eventName Event name + * @param {Function} callBack Receives the event object as a parameter. If you're manually firing custom events, check it's eventName property to make sure you're handling the right event. + * @param {Boolean} [useCapture] Flag to change event listening from bubbling to capture. + * @return {Function} The event handler used. Hang on to this if you want to `stopObserving` later. + */ + observeOnce: function (element, eventName, callBack, useCapture) { + var onceBack = function () { + InkEvent.stopObserving(element, eventName, onceBack); + return callBack(); + }; + return InkEvent.observe(element, eventName, onceBack, useCapture); + }, + + /** + * Attaches an event to a selector or array of elements. + * + * @method observeMulti + * @param {Array|String} elements + * @param {String} eventName Event name + * @param {Function} callBack Receives the event object as a parameter. If you're manually firing custom events, check it's eventName property to make sure you're handling the right event. + * @param {Boolean} [useCapture] Flag change event listening from bubbling to capture. + * @return {Function} The used callback. + */ + observeMulti: function (elements, eventName, callBack, useCapture) { + if (typeof elements === 'string') { + elements = Ink.ss(elements); + } else if ( /* is an element */ elements && elements.nodeType === 1) { + elements = [elements]; + } + if (!elements[0]) { return false; } + + for (var i = 0, len = elements.length; i < len; i++) { + this.observe(elements[i], eventName, callBack, useCapture); + } + return callBack; + }, + + /** + * Observes an event on an element and its descendants matching the selector. + * + * Requires Ink.Dom.Selector if you need to use a selector. + * + * @method observeDelegated + * @param {DOMElement|String} element Element to observe. + * @param {String} eventName Event name to observe. + * @param {String} selector Child element selector. When null, finds any element. + * @param {Function} callback Callback to be called when the event is fired + * @return {Function} The used callback, for ceasing to listen to the event later. + **/ + observeDelegated: function (element, eventName, selector, callback) { + return InkEvent.observe(element, eventName, function (event) { + var fromElement = InkEvent.element(event); + if (!fromElement || fromElement === element) { return; } + + var cursor = fromElement; + + // Go up the document tree until we hit the element itself. + while (cursor !== element && cursor !== document && cursor) { + if (Ink.Dom.Selector_1.matchesSelector(cursor, selector)) { + event.delegationTarget = cursor; + return callback(event); + } + cursor = cursor.parentNode; + } + }); + }, + + /** + * Removes an event attached to an element. + * + * @method stopObserving + * @param {DOMElement|String} element Element id or element + * @param {String} eventName Event name + * @param {Function} callBack Callback function + * @param {Boolean} [useCapture] Set to true if the event was being observed with useCapture set to true as well. + */ + stopObserving: function(element, eventName, callBack, useCapture) { + element = Ink.i(element); + + if(element) { + if(element.removeEventListener) { + element.removeEventListener(eventName, callBack, !!useCapture); + } else { + element.detachEvent('on' + eventName, callBack); + } + } + }, + + /** + * Stops event propagation and bubbling. + * + * @method stop + * @param {Object} event Event handle + */ + stop: function(event) + { + if(event.cancelBubble !== null) { + event.cancelBubble = true; + } + if(event.stopPropagation) { + event.stopPropagation(); + } + if(event.preventDefault) { + event.preventDefault(); + } + if(window.attachEvent) { + event.returnValue = false; + } + if(event.cancel !== null) { + event.cancel = true; + } + }, + + /** + * Stops event propagation. + * + * @method stopPropagation + * @param {Object} event Event handle + */ + stopPropagation: function(event) { + if(event.cancelBubble !== null) { + event.cancelBubble = true; + } + if(event.stopPropagation) { + event.stopPropagation(); + } + }, + + /** + * Stops event default behaviour. + * + * @method stopDefault + * @param {Object} event Event handle + */ + stopDefault: function(event) + { + if(event.preventDefault) { + event.preventDefault(); + } + if(window.attachEvent) { + event.returnValue = false; + } + if(event.cancel !== null) { + event.cancel = true; + } + }, + + /** + * Gets the pointer's coordinates from the event object. + * + * @method pointer + * @param {Object} ev Event object + * @return {Object} An object with the mouse X and Y position + */ + pointer: function(ev) + { + return { + x: this.pointerX(ev), + y: this.pointerY(ev) + }; + }, + + /** + * Gets the pointer's X coordinate. + * + * @method pointerX + * @param {Object} ev Event object + * @return {Number} Mouse X position + */ + pointerX: function(ev) + { + return (ev.touches && ev.touches[0] && ev.touches[0].pageX) || + (ev.pageX) || + (ev.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)); + }, + + /** + * Gets the pointer's Y coordinate. + * + * @method pointerY + * @param {Object} ev Event object + * @return {Number} Mouse Y position + */ + pointerY: function(ev) + { + return (ev.touches && ev.touches[0] && ev.touches[0].pageY) || + (ev.pageY) || + (ev.clientY + (document.documentElement.scrollTop || document.body.scrollTop)); + }, + + /** + * Checks if an event is a left click. + * + * @method isLeftClick + * @param {Object} ev Event object + * @return {Boolean} True if the event is a left click + */ + isLeftClick: function(ev) { + if (window.addEventListener) { + if(ev.button === 0){ + return true; + } else if(ev.type === 'touchend' && ev.button === null){ + // [todo] do the above check for pointerEvents too + return true; + } + } + else { + if(ev.button === 1){ return true; } + } + return false; + }, + + /** + * Checks if an event is a right click. + * + * @method isRightClick + * @param {Object} ev Event object + * @return {Boolean} True if the event is a right click + */ + isRightClick: function(ev) { + return (ev.button === 2); + }, + + /** + * Checks if an event is a middle click. + * + * @method isMiddleClick + * @param {Object} ev Event object + * @return {Boolean} True if the event is a middle click + */ + isMiddleClick: function(ev) { + if (window.addEventListener) { + return (ev.button === 1); + } + else { + return (ev.button === 4); + } + return false; + }, + + /** + * Gets character from an event. + * Used in SAPO.Component.MaskedInput + * + * @method getCharFromKeyboardEvent + * @param {Object} event Keyboard event + * @param {Boolean} [changeCasing] If true uppercases, if false lowercases, otherwise keeps casing + * @return {String} Character representation of pressed key combination + */ + getCharFromKeyboardEvent: function(event, changeCasing) { + var k = event.keyCode; + var c = String.fromCharCode(k); + + var shiftOn = event.shiftKey; + if (k >= 65 && k <= 90) { // A-Z + if (typeof changeCasing === 'boolean') { + shiftOn = changeCasing; + } + return (shiftOn) ? c : c.toLowerCase(); + } + else if (k >= 96 && k <= 105) { // numpad digits + return String.fromCharCode( 48 + (k-96) ); + } + switch (k) { + case 109: case 189: return '-'; + case 107: case 187: return '+'; + } + return c; + }, + + debug: function(){} +}; + +/** + * Lets you attach event listeners to both elements and objects. + * http://github.com/fat/bean#on + * + * @method on + * @param {DOMElement|Object} element An HTML DOM element or any JavaScript Object + * @param {String} eventType An Event (or multiple events, space separated) to listen to + * @param {String} [selector] A CSS DOM Element selector string to bind the listener to child elements matching the selector + * @param {Function} [handler] The callback function + * @param {Object} [args...] Additional arguments to pass to the callback function when triggered + * + * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object + */ + +/** + * Alias for `on` but will only be executed once. + * bean.one() is an alias for bean.on() except that the handler will only be executed once and then removed for the event type(s). + * http://github.com/fat/bean#one + * + * @method one + * @param {DOMElement|Object} element An HTML DOM element or any JavaScript Object + * @param {String} eventType An Event (or multiple events, space separated) to listen to + * @param {String} [selector] A CSS DOM Element selector string to bind the listener to child elements matching the selector + * @param {Function} [handler] The callback function + * @param [args...] Additional arguments to pass to the callback function when triggered + * + * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object + */ + +/** + * Removes event handlers. + * bean.off() is how you get rid of handlers once you no longer want them active. It's also a good idea to call off on elements before you remove them from your DOM; this gives Bean a chance to clean up some things and prevents memory leaks. + * http://github.com/fat/bean#off + * + * @method off + * @param {DOMElement|Object} element An HTML DOM element or any JavaScript Object + * @param {String} eventType An Event (or multiple events, space separated) to remove + * @param {Function} [handler] The specific callback function to remove + * + * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object + */ + +/** + * Clones events from one object to another + * bean.clone() is a method for cloning events from one DOM element or object to another. + * http://github.com/fat/bean#clone + * + * @method clone + * @param {DOMElement|Object} destElement An HTML DOM element or any JavaScript Object to copy events to + * @param {String} srcElement An HTML DOM element or any JavaScript Object to copy events from + * @param {String} [eventType] An Event (or multiple events, space separated) to clone + * + * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object + */ + +/** + * Triggers events. + * http://github.com/fat/bean#fire + * + * @method fire + * @param {DOMElement|Object} destElement An HTML DOM element or any JavaScript Object fire the event on + * @param {String} eventType An Event (or multiple events, space separated) to fire + * @param [args...] Additional arguments to pass to the callback function when triggered + * + * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object + */ + +return Ink.extendObj(InkEvent, bean); + +}); + +/** + * @module Ink.Dom.FormSerialize_1 + * Two way serialization of form data and javascript objects. + * Valid applications are ad hoc AJAX/syndicated submission of forms, restoring form values from server side state, etc. + */ + +Ink.createModule('Ink.Dom.FormSerialize', 1, [], function () { + 'use strict'; + + /** + * @namespace Ink.Dom.FormSerialize + * @static + **/ + var FormSerialize = { + + /** + * Serializes a form element into a JS object + * It turns field names into keys and field values into values. + * + * note: Multi-select and checkboxes with multiple values will result in arrays + * + * @method serialize + * @param {DOMElement|String} form Form element to extract data + * @return {Object} Map of fieldName -> String|String[]|Boolean + * + * @example + *
+ * + * + *
+ * + */ + serialize: function(form) { + form = Ink.i(form); + var map = this._getFieldNameInputsMap(form); + + var map2 = {}; + for (var k in map) if (map.hasOwnProperty(k)) { + if(k !== null) { + var tmpK = k.replace(/\[\]$/, ''); + map2[tmpK] = this._getValuesOfField( map[k] ); + } else { + map2[k] = this._getValuesOfField( map[k] ); + } + } + + delete map2['null']; // this can occur. if so, delete it... + return map2; + }, + + + + + /** + * Sets form elements' values with values from an object + * + * Note: You can't set the values of an input with `type="file"` (browser prohibits it) + * + * @method fillIn + * @param {DOMElement|String} form Form element to be populated + * @param {Object} map2 Map of fieldName -> String|String[]|Boolean + * @example + *
+ * + * + *
+ * + */ + fillIn: function(form, map2) { + form = Ink.i(form); + var map = this._getFieldNameInputsMap(form); + delete map['null']; // this can occur. if so, delete it... + + for (var k in map2) if (map2.hasOwnProperty(k)) { + this._setValuesOfField( map[k], map2[k] ); + } + }, + + + + _getFieldNameInputsMap: function(formEl) { + var name, nodeName, el, map = {}; + for (var i = 0, f = formEl.elements.length; i < f; ++i) { + el = formEl.elements[i]; + name = el.getAttribute('name'); + nodeName = el.nodeName.toLowerCase(); + if (nodeName === 'fieldset') { + continue; + } else if (map[name] === undefined) { + map[name] = [el]; + } else { + map[name].push(el); + } + } + return map; + }, + + + + _getValuesOfField: function(fieldInputs) { + var nodeName = fieldInputs[0].nodeName.toLowerCase(); + var type = fieldInputs[0].getAttribute('type'); + var value = fieldInputs[0].value; + var i, f, j, o, el, m, res = []; + + switch(nodeName) { + case 'select': + for (i = 0, f = fieldInputs.length; i < f; ++i) { + res[i] = []; + m = fieldInputs[i].getAttribute('multiple'); + for (j = 0, o = fieldInputs[i].options.length; j < o; ++j) { + el = fieldInputs[i].options[j]; + if (el.selected) { + if (m) { + res[i].push(el.value); + } else { + res[i] = el.value; + break; + } + } + } + } + return ((fieldInputs.length > 0 && /\[[^\]]*\]$/.test(fieldInputs[0].getAttribute('name'))) ? res : res[0]); + + case 'textarea': + case 'input': + if (type === 'checkbox' || type === 'radio') { + for (i = 0, f = fieldInputs.length; i < f; ++i) { + el = fieldInputs[i]; + if (el.checked) { + res.push( el.value ); + } + } + if (type === 'checkbox') { + return (fieldInputs.length > 1) ? res : !!(res.length); + } + return (fieldInputs.length > 1) ? res[0] : !!(res.length); // on radios only 1 option is selected at most + } + else { + //if (fieldInputs.length > 1) { throw 'Got multiple input elements with same name!'; } + if(fieldInputs.length > 0 && /\[[^\]]*\]$/.test(fieldInputs[0].getAttribute('name'))) { + var tmpValues = []; + for(i=0, f = fieldInputs.length; i < f; ++i) { + tmpValues.push(fieldInputs[i].value); + } + return tmpValues; + } else { + return value; + } + } + break; // to keep JSHint happy... (reply to this comment by gamboa: - ROTFL) + + default: + //throw 'Unsupported element: "' + nodeName + '"!'; + return undefined; + } + }, + + + + _valInArray: function(val, arr) { + for (var i = 0, f = arr.length; i < f; ++i) { + if (arr[i] === val) { return true; } + } + return false; + }, + + + + _setValuesOfField: function(fieldInputs, fieldValues) { + if (!fieldInputs) { return; } + var nodeName = fieldInputs[0].nodeName.toLowerCase(); + var type = fieldInputs[0].getAttribute('type'); + var i, f, el; + + switch(nodeName) { + case 'select': + if (fieldInputs.length > 1) { throw 'Got multiple select elements with same name!'; } + for (i = 0, f = fieldInputs[0].options.length; i < f; ++i) { + el = fieldInputs[0].options[i]; + el.selected = (fieldValues instanceof Array) ? this._valInArray(el.value, fieldValues) : el.value === fieldValues; + } + break; + case 'textarea': + case 'input': + if (type === 'checkbox' || type === 'radio') { + for (i = 0, f = fieldInputs.length; i < f; ++i) { + el = fieldInputs[i]; + //el.checked = (fieldValues instanceof Array) ? this._valInArray(el.value, fieldValues) : el.value === fieldValues; + el.checked = (fieldValues instanceof Array) ? this._valInArray(el.value, fieldValues) : (fieldInputs.length > 1 ? el.value === fieldValues : !!fieldValues); + } + } + else { + if (fieldInputs.length > 1) { throw 'Got multiple input elements with same name!'; } + if (type !== 'file') { + fieldInputs[0].value = fieldValues; + } + } + break; + + default: + throw 'Unsupported element: "' + nodeName + '"!'; + } + } + }; + + return FormSerialize; +}); +/** + * @module Ink.Dom.Loaded_1 + * Execute code only when the DOM is loaded. + * @version 1 + */ + +Ink.createModule('Ink.Dom.Loaded', 1, [], function() { + + 'use strict'; + + /** + * @namespace Ink.Dom.Loaded_1 + **/ + var Loaded = { + + /** + * Callbacks and their contexts. Array of 2-arrays. + * + * [] + * + * @attribute _contexts Array + * @private + * + */ + _contexts: [], // Callbacks' queue + + /** + * Specify a function to execute when the DOM is fully loaded. + * + * @method run + * @param {Object} [win]=window Window object to attach/add the event + * @param {Function} fn Callback function to be executed after the DOM is ready + * @public + * @example + * Ink.requireModules(['Ink.Dom.Loaded_1'], function(Loaded){ + * Loaded.run(function(){ + * console.log('This will run when the page/document is ready/loaded'); + * }); + * }); + */ + run: function(win, fn) { + if (!fn) { + fn = win; + win = window; + } + + var context; + + for (var i = 0, len = this._contexts.length; i < len; i++) { + if (this._contexts[i][0] === win) { + context = this._contexts[i][1]; + break; + } + } + if (!context) { + context = { + cbQueue: [], + win: win, + doc: win.document, + root: win.document.documentElement, + done: false, + top: true + }; + context.handlers = { + checkState: Ink.bindEvent(this._checkState, this, context), + poll: Ink.bind(this._poll, this, context) + }; + this._contexts.push( + [win, context] // Javascript Objects cannot map different windows to + // different values. + ); + } + + var ael = context.doc.addEventListener; + context.add = ael ? 'addEventListener' : 'attachEvent'; + context.rem = ael ? 'removeEventListener' : 'detachEvent'; + context.pre = ael ? '' : 'on'; + context.det = ael ? 'DOMContentLoaded' : 'onreadystatechange'; + context.wet = context.pre + 'load'; + + var csf = context.handlers.checkState; + var alreadyLoaded = ( + context.doc.readyState === 'complete' && + context.win.location.toString() !== 'about:blank'); // https://code.google.com/p/chromium/issues/detail?id=32357 + + if (alreadyLoaded){ + setTimeout(Ink.bind(function () { + fn.call(context.win, 'lazy'); + }, this), 0); + } else { + context.cbQueue.push(fn); + + context.doc[context.add]( context.det , csf ); + context.win[context.add]( context.wet , csf ); + + var frameElement = 1; + try{ + frameElement = context.win.frameElement; + } catch(e) {} + if ( !ael && context.root && context.root.doScroll ) { // IE HACK + try { + context.top = !frameElement; + } catch(e) { } + if (context.top) { + this._poll(context); + } + } + } + }, + + /** + * Function that will be running the callbacks after the page is loaded + * + * @method _checkState + * @param {Event} event Triggered event + * @private + */ + _checkState: function(event, context) { + if ( !event || (event.type === 'readystatechange' && context.doc.readyState !== 'complete')) { + return; + } + var where = (event.type === 'load') ? context.win : context.doc; + where[context.rem](context.pre+event.type, context.handlers.checkState, false); + this._ready(context); + }, + + /** + * Polls the load progress of the page to see if it has already loaded or not + * + * @method _poll + * @private + */ + + /** + * + * function _poll + */ + _poll: function(context) { + try { + context.root.doScroll('left'); + } catch(e) { + return setTimeout(context.handlers.poll, 50); + } + this._ready(context); + }, + + /** + * Function that runs the callbacks from the queue when the document is ready. + * + * @method _ready + * @private + */ + _ready: function(context) { + if (!context.done) { + context.done = true; + for (var i = 0; i < context.cbQueue.length; ++i) { + context.cbQueue[i].call(context.win); + } + context.cbQueue = []; + } + } + }; + + return Loaded; + +}); + +/** + * @module Ink.Dom.Selector_1 + * CSS selector engine + * @version 1 + */ + +Ink.createModule('Ink.Dom.Selector', 1, [], function() { + /*jshint forin:false, eqnull:true, noempty:false, expr:true, boss:true, maxdepth:false*/ + 'use strict'; + +/*! + * Sizzle CSS Selector Engine + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license + * http://sizzlejs.com/ + */ + +var i, + cachedruns, + Expr, + getText, + isXML, + compile, + outermostContext, + recompare, + sortInput, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + support = {}, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + hasDuplicate = false, + sortOrder = function() { return 0; }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Array methods + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + operators = "([*^$|!~]?=)", + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rsibling = /[\x20\t\r\n\f]*[+~]/, + + rnative = /^[^{]+\{\s*\[native code/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, + funescape = function( _, escaped ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + return high !== high ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +/* + * For feature detection + * @param {Function} fn The function to test for native support + */ +function isNative( fn ) { + return rnative.test( fn + "" ); +} + +/* + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var cache, + keys = []; + + return (cache = function( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + }); +} + +/* + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/* + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // release memory in IE + div = null; + } +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && !rbuggyQSA.test(selector) ) { + old = true; + nid = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/* + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/* + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if attributes should be retrieved by attribute nodes + support.attributes = assert(function( div ) { + div.innerHTML = ""; + var type = typeof div.lastChild.getAttribute("multiple"); + // IE8 returns a string for some attributes even when not present + return type !== "boolean" && type !== "string"; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = assert(function( div ) { + // Opera can't find a second classname (in 9.6) + div.innerHTML = ""; + if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { + return false; + } + + // Safari 3.2 caches class attributes and doesn't catch changes + div.lastChild.className = "e"; + return div.getElementsByClassName("e").length === 2; + }); + + // Check if getElementsByName privileges form controls or returns elements by ID + // If so, assume (for broader support) that getElementById returns elements by name + support.getByName = assert(function( div ) { + // Inject content + div.id = expando + 0; + // Support: Windows 8 Native Apps + // Assigning innerHTML with "name" attributes throws uncatchable exceptions + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx + div.appendChild( document.createElement("a") ).setAttribute( "name", expando ); + div.appendChild( document.createElement("i") ).setAttribute( "name", expando ); + docElem.appendChild( div ); + + // Test + var pass = doc.getElementsByName && + // buggy browsers will return fewer than the correct 2 + doc.getElementsByName( expando ).length === 2 + + // buggy browsers will return more than the correct 0 + doc.getElementsByName( expando + 0 ).length; + + // Cleanup + docElem.removeChild( div ); + + return pass; + }); + + // Support: Webkit<537.32 + // Detached nodes confoundingly follow *each other* + support.sortDetached = assert(function( div1 ) { + return div1.compareDocumentPosition && + // Should return 1, but Webkit returns 4 (following) + (div1.compareDocumentPosition( document.createElement("div") ) & 1); + }); + + // IE6/7 return modified attributes + Expr.attrHandle = assert(function( div ) { + div.innerHTML = ""; + return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && + div.firstChild.getAttribute("href") === "#"; + }) ? + {} : + { + "href": function( elem ) { + return elem.getAttribute( "href", 2 ); + }, + "type": function( elem ) { + return elem.getAttribute("type"); + } + }; + + // ID find and filter + if ( support.getByName ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + + return m ? + m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? + [m] : + undefined : + []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Name + Expr.find["NAME"] = support.getByName && function( tag, context ) { + if ( typeof context.getElementsByName !== strundefined ) { + return context.getElementsByName( name ); + } + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21), + // no need to also add to buggyMatches since matches checks buggyQSA + // A support test would require too much code (would include document ready) + rbuggyQSA = [ ":focus" ]; + + if ( (support.qsa = isNative(doc.querySelectorAll)) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // IE8 - Some boolean attributes are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Opera 10-12/IE8 - ^= $= *= and empty values + // Should not select anything + div.innerHTML = ""; + if ( div.querySelectorAll("[i^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || + docElem.mozMatchesSelector || + docElem.webkitMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); + + if ( compare ) { + // Disconnected nodes + if ( compare & 1 || + (recompare && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + // rbuggyQSA always contains :focus, so no need for an existence check + if ( support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + var val; + + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + if ( documentIsHTML ) { + name = name.toLowerCase(); + } + if ( (val = Expr.attrHandle[ name ]) ) { + return val( elem ); + } + if ( !documentIsHTML || support.attributes ) { + return elem.getAttribute( name ); + } + return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? + name : + val && val.specified ? val.value : null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +// Document sorting and removing duplicates +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + // Compensate for sort limitations + recompare = !support.sortDetached; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +/* + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns Returns -1 if a precedes b, 1 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +// Returns a function to use in pseudos for input types +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +// Returns a function to use in pseudos for buttons +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +// Returns a function to use in pseudos for positionals +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/* + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[4] ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeName ) { + if ( nodeName === "*" ) { + return function() { return true; }; + } + + nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push( { + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) + ); + return results; +} + +// Deprecated +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +// Check sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Initialize with the default document +setDocument(); + +// Always assume the presence of duplicates if sort doesn't +// pass them to our comparison function (as in Google Chrome). +[0, 0].sort( sortOrder ); +support.detectDuplicates = hasDuplicate; + +// EXPOSE +/*if ( typeof define === "function" && define.amd ) { + define(function() { return Sizzle; }); +} else { + window.Sizzle = Sizzle; +}*/ +// EXPOSE + +/** + * @namespace Ink.Dom.Selector + * @static + */ + +/** + * Alias for the Sizzle selector engine + * + * @method select + * @param {String} selector CSS selector to search for elements + * @param {DOMElement} [context] By default the search is done in the document element. However, you can specify an element as search context + * @param {Array} [results] By default this is considered an empty array. But if you want to merge it with other searches you did, pass their result array through here. + * @return {Array} Array of resulting DOM Elements + */ + +/** + * Filters elements that match a CSS selector. + * + * @method matches + * @param {String} selector CSS selector to search for elements + * @param {Array} matches Elements to be 'matched' with + * @return {Array} Elements that matched + */ + +/** + * Checks if an element matches a given selector + * + * @method matchesSelector + * @param {DOMElement} element Element to test + * @param {String} selector CSS selector to test the element with + * @return {Boolean} True if element matches the CSS selector + */ + +return { + select: Sizzle, + matches: Sizzle.matches, + matchesSelector: Sizzle.matchesSelector +}; + + +}); //( window ); +/** + * @module Ink.Util.Array_1 + * Array Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.Array', '1', [], function() { + + 'use strict'; + + var arrayProto = Array.prototype; + + var InkArray = { + + /** + * Checks if a value exists in array + * + * @method inArray + * @public + * @static + * @param {Mixed} value Value to check + * @param {Array} arr Array to search in + * @return {Boolean} True if value exists in the array + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray = [ 'value1', 'value2', 'value3' ]; + * if( InkArray.inArray( 'value2', testArray ) === true ){ + * console.log( "Yep it's in the array." ); + * } else { + * console.log( "No it's NOT in the array." ); + * } + * }); + */ + inArray: function(value, arr) { + if (typeof arr === 'object') { + for (var i = 0, f = arr.length; i < f; ++i) { + if (arr[i] === value) { + return true; + } + } + } + return false; + }, + + /** + * Sorts an array of objects by an object property + * + * @method sortMulti + * @param {Array} arr Array of objects to sort + * @param {String} key Property to sort by + * @return {Array|Boolean} False if it's not an array, returns a sorted array if it's an array. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray = [ + * { 'myKey': 'value1' }, + * { 'myKey': 'value2' }, + * { 'myKey': 'value3' } + * ]; + * + * InkArray.sortMulti( testArray, 'myKey' ); + * }); + */ + sortMulti: function(arr, key) { + if (typeof arr === 'undefined' || arr.constructor !== Array) { return false; } + if (typeof key !== 'string') { return arr.sort(); } + if (arr.length > 0) { + if (typeof(arr[0][key]) === 'undefined') { return false; } + arr.sort(function(a, b){ + var x = a[key]; + var y = b[key]; + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }); + } + return arr; + }, + + /** + * Gets the indexes of a value in an array + * + * @method keyValue + * @param {String} value Value to search for. + * @param {Array} arr Array to run the search in. + * @param {Boolean} [first] Flag to stop the search at the first match. It also returns an index number instead of an array of indexes. + * @return {Boolean|Number|Array} False for no matches. Array of matches or first match index. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray = [ 'value1', 'value2', 'value3', 'value2' ]; + * console.log( InkArray.keyValue( 'value2', testArray, true ) ); // Result: 1 + * console.log( InkArray.keyValue( 'value2', testArray ) ); // Result: [1, 3] + * }); + */ + keyValue: function(value, arr, first) { + if (typeof value !== 'undefined' && typeof arr === 'object' && this.inArray(value, arr)) { + var aKeys = []; + for (var i = 0, f = arr.length; i < f; ++i) { + if (arr[i] === value) { + if (typeof first !== 'undefined' && first === true) { + return i; + } else { + aKeys.push(i); + } + } + } + return aKeys; + } + return false; + }, + + /** + * Shuffles an array. + * + * @method shuffle + * @param {Array} arr Array to shuffle + * @return {Array|Boolean} Shuffled Array or false if not an array. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray = [ 'value1', 'value2', 'value3', 'value2' ]; + * console.log( InkArray.shuffle( testArray ) ); // Result example: [ 'value3', 'value2', 'value2', 'value1' ] + * }); + */ + shuffle: function(arr) { + if (typeof(arr) !== 'undefined' && arr.constructor !== Array) { return false; } + var total = arr.length, + tmp1 = false, + rnd = false; + + while (total--) { + rnd = Math.floor(Math.random() * (total + 1)); + tmp1 = arr[total]; + arr[total] = arr[rnd]; + arr[rnd] = tmp1; + } + return arr; + }, + + /** + * Runs a function through each of the elements of an array + * + * @method forEach + * @param {Array} arr The array to be cycled/iterated + * @param {Function} cb The function receives as arguments the value, index and array. + * @return {Array} Iterated array. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray = [ 'value1', 'value2', 'value3', 'value2' ]; + * InkArray.forEach( testArray, function( value, index, arr ){ + * console.log( 'The value is: ' + value + ' | The index is: ' + index ); + * }); + * }); + */ + forEach: function(array, callback, context) { + if (arrayProto.forEach) { + return arrayProto.forEach.call(array, callback, context); + } + for (var i = 0, len = array.length >>> 0; i < len; i++) { + callback.call(context, array[i], i, array); + } + }, + + /** + * Alias for backwards compatibility. See forEach + * + * @method each + */ + each: function () { + InkArray.forEach.apply(InkArray, [].slice.call(arguments)); + }, + + /** + * Runs a function for each item in the array. + * That function will receive each item as an argument and its return value will change the corresponding array item. + * @method map + * @param {Array} array The array to map over + * @param {Function} map The map function. Will take `(item, index, array)` as arguments and `this` will be the `context` argument. + * @param {Object} [context] Object to be `this` in the map function. + * + * @example + * InkArray.map([1, 2, 3, 4], function (item) { + * return item + 1; + * }); // -> [2, 3, 4, 5] + */ + map: function (array, callback, context) { + if (arrayProto.map) { + return arrayProto.map.call(array, callback, context); + } + var mapped = new Array(len); + for (var i = 0, len = array.length >>> 0; i < len; i++) { + mapped[i] = callback.call(context, array[i], i, array); + } + return mapped; + }, + + /** + * Filters an array based on a truth test. + * This method runs a test function on all the array values and returns a new array with all the values that pass the test. + * @param {Array} array The array to filter + * @param {Function} test A test function taking `(item, index, array)` + * @param {Object} [context] Object to be `this` in the test function. + * @return {Array} Returns the filtered array + * + * @example + * InkArray.filter([1, 2, 3, 4, 5], function (val) { + * return val > 2; + * }) // -> [3, 4, 5] + */ + filter: function (array, test, context) { + if (arrayProto.filter) { + return arrayProto.filter.call(array, test, context); + } + var filtered = [], + val = null; + for (var i = 0, len = array.length; i < len; i++) { + val = array[i]; // it might be mutated + if (test.call(context, val, i, array)) { + filtered.push(val); + } + } + return filtered; + }, + + /** + * Checks if some element in the array passes a truth test + * + * @method some + * @param {Array} arr The array to iterate through + * @param {Function} cb The callback to be called on the array's elements. It receives the value, the index and the array as arguments. + * @param {Object} context Object of the callback function + * @return {Boolean} True if the callback returns true at any point, false otherwise + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray1 = [ 10, 20, 50, 100, 30 ]; + * var testArray2 = [ 1, 2, 3, 4, 5 ]; + * + * function myTestFunction( value, index, arr ){ + * if( value > 90 ){ + * return true; + * } + * return false; + * } + * console.log( InkArray.some( testArray1, myTestFunction, null ) ); // Result: true + * console.log( InkArray.some( testArray2, myTestFunction, null ) ); // Result: false + * }); + */ + some: function(arr, cb, context){ + + if (arr === null){ + throw new TypeError('First argument is invalid.'); + } + + var t = Object(arr); + var len = t.length >>> 0; + if (typeof cb !== "function"){ throw new TypeError('Second argument must be a function.'); } + + for (var i = 0; i < len; i++) { + if (i in t && cb.call(context, t[i], i, t)){ return true; } + } + + return false; + }, + + /** + * Compares the values of two arrays and return the matches + * + * @method intersect + * @param {Array} arr1 First array + * @param {Array} arr2 Second array + * @return {Array} Empty array if one of the arrays is false (or do not intersect) | Array with the intersected values + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray1 = [ 'value1', 'value2', 'value3' ]; + * var testArray2 = [ 'value2', 'value3', 'value4', 'value5', 'value6' ]; + * console.log( InkArray.intersect( testArray1,testArray2 ) ); // Result: [ 'value2', 'value3' ] + * }); + */ + intersect: function(arr1, arr2) { + if (!arr1 || !arr2 || arr1 instanceof Array === false || arr2 instanceof Array === false) { + return []; + } + + var shared = []; + for (var i = 0, I = arr1.length; i= from && i < from + rLen){ + continue; + } + + output.push(arr[i]); + } + + return output; + } + }; + + return InkArray; + +}); +/** + * @module Ink.Util.BinPack_1 + * Binary Packing algorithm implementation + * @version 1 + */ + +Ink.createModule('Ink.Util.BinPack', '1', [], function() { + + 'use strict'; + + /*jshint boss:true */ + + // https://github.com/jakesgordon/bin-packing/ + + /* + Copyright (c) 2011, 2012, 2013 Jake Gordon and contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + */ + + + + var Packer = function(w, h) { + this.init(w, h); + }; + + Packer.prototype = { + + init: function(w, h) { + this.root = { x: 0, y: 0, w: w, h: h }; + }, + + fit: function(blocks) { + var n, node, block; + for (n = 0; n < blocks.length; ++n) { + block = blocks[n]; + if (node = this.findNode(this.root, block.w, block.h)) { + block.fit = this.splitNode(node, block.w, block.h); + } + } + }, + + findNode: function(root, w, h) { + if (root.used) { + return this.findNode(root.right, w, h) || this.findNode(root.down, w, h); + } + else if ((w <= root.w) && (h <= root.h)) { + return root; + } + else { + return null; + } + }, + + splitNode: function(node, w, h) { + node.used = true; + node.down = { x: node.x, y: node.y + h, w: node.w, h: node.h - h }; + node.right = { x: node.x + w, y: node.y, w: node.w - w, h: h }; + return node; + } + + }; + + + + var GrowingPacker = function() {}; + + GrowingPacker.prototype = { + + fit: function(blocks) { + var n, node, block, len = blocks.length; + var w = len > 0 ? blocks[0].w : 0; + var h = len > 0 ? blocks[0].h : 0; + this.root = { x: 0, y: 0, w: w, h: h }; + for (n = 0; n < len ; n++) { + block = blocks[n]; + if (node = this.findNode(this.root, block.w, block.h)) { + block.fit = this.splitNode(node, block.w, block.h); + } + else { + block.fit = this.growNode(block.w, block.h); + } + } + }, + + findNode: function(root, w, h) { + if (root.used) { + return this.findNode(root.right, w, h) || this.findNode(root.down, w, h); + } + else if ((w <= root.w) && (h <= root.h)) { + return root; + } + else { + return null; + } + }, + + splitNode: function(node, w, h) { + node.used = true; + node.down = { x: node.x, y: node.y + h, w: node.w, h: node.h - h }; + node.right = { x: node.x + w, y: node.y, w: node.w - w, h: h }; + return node; + }, + + growNode: function(w, h) { + var canGrowDown = (w <= this.root.w); + var canGrowRight = (h <= this.root.h); + + var shouldGrowRight = canGrowRight && (this.root.h >= (this.root.w + w)); // attempt to keep square-ish by growing right when height is much greater than width + var shouldGrowDown = canGrowDown && (this.root.w >= (this.root.h + h)); // attempt to keep square-ish by growing down when width is much greater than height + + if (shouldGrowRight) { + return this.growRight(w, h); + } + else if (shouldGrowDown) { + return this.growDown(w, h); + } + else if (canGrowRight) { + return this.growRight(w, h); + } + else if (canGrowDown) { + return this.growDown(w, h); + } + else { + return null; // need to ensure sensible root starting size to avoid this happening + } + }, + + growRight: function(w, h) { + this.root = { + used: true, + x: 0, + y: 0, + w: this.root.w + w, + h: this.root.h, + down: this.root, + right: { x: this.root.w, y: 0, w: w, h: this.root.h } + }; + var node; + if (node = this.findNode(this.root, w, h)) { + return this.splitNode(node, w, h); + } + else { + return null; + } + }, + + growDown: function(w, h) { + this.root = { + used: true, + x: 0, + y: 0, + w: this.root.w, + h: this.root.h + h, + down: { x: 0, y: this.root.h, w: this.root.w, h: h }, + right: this.root + }; + var node; + if (node = this.findNode(this.root, w, h)) { + return this.splitNode(node, w, h); + } + else { + return null; + } + } + + }; + + + + var sorts = { + random: function() { return Math.random() - 0.5; }, + w: function(a, b) { return b.w - a.w; }, + h: function(a, b) { return b.h - a.h; }, + a: function(a, b) { return b.area - a.area; }, + max: function(a, b) { return Math.max(b.w, b.h) - Math.max(a.w, a.h); }, + min: function(a, b) { return Math.min(b.w, b.h) - Math.min(a.w, a.h); }, + height: function(a, b) { return sorts.msort(a, b, ['h', 'w']); }, + width: function(a, b) { return sorts.msort(a, b, ['w', 'h']); }, + area: function(a, b) { return sorts.msort(a, b, ['a', 'h', 'w']); }, + maxside: function(a, b) { return sorts.msort(a, b, ['max', 'min', 'h', 'w']); }, + msort: function(a, b, criteria) { /* sort by multiple criteria */ + var diff, n; + for (n = 0; n < criteria.length; ++n) { + diff = sorts[ criteria[n] ](a, b); + if (diff !== 0) { + return diff; + } + } + return 0; + } + }; + + + + // end of Jake's code + + + + // aux, used to display blocks in unfitted property + var toString = function() { + return [this.w, ' x ', this.h].join(''); + }; + + + + /** + * Binary Packing algorithm implementation + * + * Based on the work of Jake Gordon + * + * see https://github.com/jakesgordon/bin-packing/ + * + * @namespace Ink.Util.BinPack + * @version 1 + * @static + */ + var BinPack = { + + /** + * @method binPack + * @param {Object} o Options + * @param {Array} o.blocks Array of items with width and height integer attributes. + * @param {Array} [o.dimensions] Flag to fix container dimensions + * @param {String} [o.sorter] Sorting function. One of: random, height, width, area, maxside + * @return {Object} Returns an object containing container dimensions, filled ratio, fitted blocks, unfitted blocks and all blocks + * @static + */ + binPack: function(o) { + var i, f, bl; + + + + // calculate area if not there already + for (i = 0, f = o.blocks.length; i < f; ++i) { + bl = o.blocks[i]; + if (! ('area' in bl) ) { + bl.area = bl.w * bl.h; + } + } + + + + // apply algorithm + var packer = o.dimensions ? new Packer(o.dimensions[0], o.dimensions[1]) : new GrowingPacker(); + + if (!o.sorter) { o.sorter = 'maxside'; } + + o.blocks.sort( sorts[ o.sorter ] ); + + packer.fit(o.blocks); + + var dims2 = [packer.root.w, packer.root.h]; + + + + // layout is done here, generating report data... + var fitted = []; + var unfitted = []; + + for (i = 0, f = o.blocks.length; i < f; ++i) { + bl = o.blocks[i]; + if (bl.fit) { + fitted.push(bl); + } + else { + bl.toString = toString; // TO AID SERIALIZATION + unfitted.push(bl); + } + } + + var area = dims2[0] * dims2[1]; + var fit = 0; + for (i = 0, f = fitted.length; i < f; ++i) { + bl = fitted[i]; + fit += bl.area; + } + + return { + dimensions: dims2, + filled: fit / area, + blocks: o.blocks, + fitted: fitted, + unfitted: unfitted + }; + } + }; + + + + return BinPack; + +}); +/** + * @module Ink.Util.Cookie_1 + * Cookie Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.Cookie', '1', [], function() { + + 'use strict'; + + var Cookie = { + + /** + * Gets an object with the current page cookies. + * + * @method get + * @param {String} name The cookie name. + * @return {String|Object} If the name is specified, it returns the value of that key. Otherwise it returns the full cookie object + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Cookie_1'], function( InkCookie ){ + * var myCookieValue = InkCookie.get('someVarThere'); + * console.log( myCookieValue ); // This will output the value of the cookie 'someVarThere', from the cookie object. + * }); + */ + get: function(name) + { + var cookie = document.cookie || false; + + var _Cookie = {}; + if(cookie) { + cookie = cookie.replace(new RegExp("; ", "g"), ';'); + var aCookie = cookie.split(';'); + var aItem = []; + if(aCookie.length > 0) { + for(var i=0; i < aCookie.length; i++) { + aItem = aCookie[i].split('='); + if(aItem.length === 2) { + _Cookie[aItem[0]] = decodeURIComponent(aItem[1]); + } + aItem = []; + } + } + } + if(name) { + if(typeof(_Cookie[name]) !== 'undefined') { + return _Cookie[name]; + } else { + return null; + } + } + return _Cookie; + }, + + /** + * Sets a cookie. + * + * @method set + * @param {String} name Cookie name. + * @param {String} value Cookie value. + * @param {Number} [expires] Number of seconds the cookie will be valid for. + * @param {String} [path] Path for the cookie. Defaults to '/'. + * @param {String} [domain] Domain for the cookie. Defaults to current hostname. + * @param {Boolean} [secure] Flag for secure. Default 'false'. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Cookie_1'], function( InkCookie ){ + * var expireDate = new Date( 2014,00,01, 0,0,0); + * InkCookie.set( 'someVarThere', 'anyValueHere', expireDate.getTime() ); + * }); + */ + set: function(name, value, expires, path, domain, secure) + { + var sName; + if(!name || value===false || typeof(name) === 'undefined' || typeof(value) === 'undefined') { + return false; + } else { + sName = name+'='+encodeURIComponent(value); + } + var sExpires = false; + var sPath = false; + var sDomain = false; + var sSecure = false; + + if(expires && typeof(expires) !== 'undefined' && !isNaN(expires)) { + var oDate = new Date(); + var sDate = (parseInt(Number(oDate.valueOf()), 10) + (Number(parseInt(expires, 10)) * 1000)); + + var nDate = new Date(sDate); + var expiresString = nDate.toGMTString(); + + var re = new RegExp("([^\\s]+)(\\s\\d\\d)\\s(\\w\\w\\w)\\s(.*)"); + expiresString = expiresString.replace(re, "$1$2-$3-$4"); + + sExpires = 'expires='+expiresString; + } else { + if(typeof(expires) !== 'undefined' && !isNaN(expires) && Number(parseInt(expires, 10))===0) { + sExpires = ''; + } else { + sExpires = 'expires=Thu, 01-Jan-2037 00:00:01 GMT'; + } + } + + if(path && typeof(path) !== 'undefined') { + sPath = 'path='+path; + } else { + sPath = 'path=/'; + } + + if(domain && typeof(domain) !== 'undefined') { + sDomain = 'domain='+domain; + } else { + var portClean = new RegExp(":(.*)"); + sDomain = 'domain='+window.location.host; + sDomain = sDomain.replace(portClean,""); + } + + if(secure && typeof(secure) !== 'undefined') { + sSecure = secure; + } else { + sSecure = false; + } + + document.cookie = sName+'; '+sExpires+'; '+sPath+'; '+sDomain+'; '+sSecure; + }, + + /** + * Deletes a cookie. + * + * @method remove + * @param {String} cookieName Cookie name. + * @param {String} [path] Path of the cookie. Defaults to '/'. + * @param {String} [domain] Domain of the cookie. Defaults to current hostname. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Cookie_1'], function( InkCookie ){ + * InkCookie.remove( 'someVarThere' ); + * }); + */ + remove: function(cookieName, path, domain) + { + //var expiresDate = 'Thu, 01-Jan-1970 00:00:01 GMT'; + var sPath = false; + var sDomain = false; + var expiresDate = -999999999; + + if(path && typeof(path) !== 'undefined') { + sPath = path; + } else { + sPath = '/'; + } + + if(domain && typeof(domain) !== 'undefined') { + sDomain = domain; + } else { + sDomain = window.location.host; + } + + this.set(cookieName, 'deleted', expiresDate, sPath, sDomain); + } + }; + + return Cookie; + +}); + +/** + * @module Ink.Util.Date_1 + * Date utility functions + * @version 1 + */ + +Ink.createModule('Ink.Util.Date', '1', [], function() { + + 'use strict'; + + var InkDate = { + + /** + * Function that returns the string representation of the month [PT only] + * + * @method _months + * @param {Number} index Month javascript (0 to 11) + * @return {String} The month's name + * @private + * @static + * @example + * console.log( InkDate._months(0) ); // Result: Janeiro + */ + _months: function(index){ + var _m = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro']; + return _m[index]; + }, + + /** + * Function that returns the month [PT only] ( 0 to 11 ) + * + * @method _iMonth + * @param {String} month Month javascript (0 to 11) + * @return {Number} The month's number + * @private + * @static + * @example + * console.log( InkDate._iMonth('maio') ); // Result: 4 + */ + _iMonth : function( month ) + { + if ( Number( month ) ) { return +month - 1; } + return { + 'janeiro' : 0 , + 'jan' : 0 , + 'fevereiro' : 1 , + 'fev' : 1 , + 'março' : 2 , + 'mar' : 2 , + 'abril' : 3 , + 'abr' : 3 , + 'maio' : 4 , + 'mai' : 4 , + 'junho' : 5 , + 'jun' : 5 , + 'julho' : 6 , + 'jul' : 6 , + 'agosto' : 7 , + 'ago' : 7 , + 'setembro' : 8 , + 'set' : 8 , + 'outubro' : 9 , + 'out' : 9 , + 'novembro' : 10 , + 'nov' : 10 , + 'dezembro' : 11 , + 'dez' : 11 + }[ month.toLowerCase( ) ]; + } , + + /** + * Function that returns the representation the day of the week [PT Only] + * + * @method _wDays + * @param {Number} index Week's day index + * @return {String} The week's day name + * @private + * @static + * @example + * console.log( InkDate._wDays(0) ); // Result: Domingo + */ + _wDays: function(index){ + var _d = ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado']; + return _d[index]; + }, + + /** + * Function that returns day of the week in javascript 1 to 7 + * + * @method _iWeek + * @param {String} week Week's day name + * @return {Number} The week's day index + * @private + * @static + * @example + * console.log( InkDate._iWeek('quarta') ); // Result: 3 + */ + _iWeek: function( week ) + { + if ( Number( week ) ) { return +week || 7; } + return { + 'segunda' : 1 , + 'seg' : 1 , + 'terça' : 2 , + 'ter' : 2 , + 'quarta' : 3 , + 'qua' : 3 , + 'quinta' : 4 , + 'qui' : 4 , + 'sexta' : 5 , + 'sex' : 5 , + 'sábado' : 6 , + 'sáb' : 6 , + 'domingo' : 7 , + 'dom' : 7 + }[ week.toLowerCase( ) ]; + }, + + /** + * Function that returns the number of days of a given month (m) on a given year (y) + * + * @method _daysInMonth + * @param {Number} _m Month + * @param {Number} _y Year + * @return {Number} Number of days of a give month on a given year + * @private + * @static + * @example + * console.log( InkDate._daysInMonth(2,2013) ); // Result: 28 + */ + _daysInMonth: function(_m,_y){ + var nDays; + + if(_m===1 || _m===3 || _m===5 || _m===7 || _m===8 || _m===10 || _m===12) + { + nDays= 31; + } + else if ( _m===4 || _m===6 || _m===9 || _m===11) + { + nDays = 30; + } + else + { + if((_y%400===0) || (_y%4===0 && _y%100!==0)) + { + nDays = 29; + } + else + { + nDays = 28; + } + } + return nDays; + }, + + /** + * Formats a date object. + * This works exactly as php date() function. http://php.net/manual/en/function.date.php + * + * @method get + * @param {String} format The format in which the date it will be formatted. + * @param {Date} [_date] The date to format. Can receive unix timestamp or a date object. Defaults to current time. + * @return {String} Formatted date + * @public + * @static + * @example + * + */ + get: function(format, _date){ + /*jshint maxcomplexity:65 */ + if(typeof(format) === 'undefined' || format === ''){ + format = "Y-m-d"; + } + + + var iFormat = format.split(""); + var result = new Array(iFormat.length); + var escapeChar = "\\"; + var jsDate; + + if (typeof(_date) === 'undefined'){ + jsDate = new Date(); + } else if (typeof(_date)==='number'){ + jsDate = new Date(_date*1000); + } else { + jsDate = new Date(_date); + } + + var jsFirstDay, jsThisDay, jsHour; + /* This switch is presented in the same order as in php date function (PHP 5.2.2) */ + for (var i = 0; i < iFormat.length; i++) { + switch(iFormat[i]) { + case escapeChar: + result[i] = iFormat[i+1]; + i++; + break; + + + /* DAY */ + case "d": /* Day of the month, 2 digits with leading zeros; ex: 01 to 31 */ + var jsDay = jsDate.getDate(); + result[i] = (String(jsDay).length > 1) ? jsDay : "0" + jsDay; + break; + + case "D": /* A textual representation of a day, three letters; Seg to Dom */ + result[i] = this._wDays(jsDate.getDay()).substring(0, 3); + break; + + case "j": /* Day of the month without leading zeros; ex: 1 to 31 */ + result[i] = jsDate.getDate(); + break; + + case "l": /* A full textual representation of the day of the week; Domingo to Sabado */ + result[i] = this._wDays(jsDate.getDay()); + break; + + case "N": /* ISO-8601 numeric representation of the day of the week; 1 (Segunda) to 7 (Domingo) */ + result[i] = jsDate.getDay() || 7; + break; + + case "S": /* English ordinal suffix for the day of the month, 2 characters; st, nd, rd or th. Works well with j */ + var temp = jsDate.getDate(); + var suffixes = ["st", "nd", "rd"]; + var suffix = ""; + + if (temp >= 11 && temp <= 13) { + result[i] = "th"; + } else { + result[i] = (suffix = suffixes[String(temp).substr(-1) - 1]) ? (suffix) : ("th"); + } + break; + + case "w": /* Numeric representation of the day of the week; 0 (for Sunday) through 6 (for Saturday) */ + result[i] = jsDate.getDay(); + break; + + case "z": /* The day of the year (starting from 0); 0 to 365 */ + jsFirstDay = Date.UTC(jsDate.getFullYear(), 0, 0); + jsThisDay = Date.UTC(jsDate.getFullYear(), jsDate.getMonth(), jsDate.getDate()); + result[i] = Math.floor((jsThisDay - jsFirstDay) / (1000 * 60 * 60 * 24)); + break; + + /* WEEK */ + case "W": /* ISO-8601 week number of year, weeks starting on Monday; ex: 42 (the 42nd week in the year) */ + var jsYearStart = new Date( jsDate.getFullYear( ) , 0 , 1 ); + jsFirstDay = jsYearStart.getDay() || 7; + + var days = Math.floor( ( jsDate - jsYearStart ) / ( 24 * 60 * 60 * 1000 ) + 1 ); + + result[ i ] = Math.ceil( ( days - ( 8 - jsFirstDay ) ) / 7 ) + 1; + break; + + + /* MONTH */ + case "F": /* A full textual representation of a month, such as Janeiro or Marco; Janeiro a Dezembro */ + result[i] = this._months(jsDate.getMonth()); + break; + + case "m": /* Numeric representation of a month, with leading zeros; 01 to 12 */ + var jsMonth = String(jsDate.getMonth() + 1); + result[i] = (jsMonth.length > 1) ? jsMonth : "0" + jsMonth; + break; + + case "M": /* A short textual representation of a month, three letters; Jan a Dez */ + result[i] = this._months(jsDate.getMonth()).substring(0,3); + break; + + case "n": /* Numeric representation of a month, without leading zeros; 1 a 12 */ + result[i] = jsDate.getMonth() + 1; + break; + + case "t": /* Number of days in the given month; ex: 28 */ + result[i] = this._daysInMonth(jsDate.getMonth()+1,jsDate.getYear()); + break; + + /* YEAR */ + case "L": /* Whether it's a leap year; 1 if it is a leap year, 0 otherwise. */ + var jsYear = jsDate.getFullYear(); + result[i] = (jsYear % 4) ? false : ( (jsYear % 100) ? true : ( (jsYear % 400) ? false : true ) ); + break; + + case "o": /* ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. */ + throw '"o" not implemented!'; + + case "Y": /* A full numeric representation of a year, 4 digits; 1999 */ + result[i] = jsDate.getFullYear(); + break; + + case "y": /* A two digit representation of a year; 99 */ + result[i] = String(jsDate.getFullYear()).substring(2); + break; + + /* TIME */ + case "a": /* Lowercase Ante meridiem and Post meridiem; am or pm */ + result[i] = (jsDate.getHours() < 12) ? "am" : "pm"; + break; + + case "A": /* Uppercase Ante meridiem and Post meridiem; AM or PM */ + result[i] = (jsDate.getHours < 12) ? "AM" : "PM"; + break; + + case "B": /* Swatch Internet time; 000 through 999 */ + throw '"B" not implemented!'; + + case "g": /* 12-hour format of an hour without leading zeros; 1 to 12 */ + jsHour = jsDate.getHours(); + result[i] = (jsHour <= 12) ? jsHour : (jsHour - 12); + break; + + case "G": /* 24-hour format of an hour without leading zeros; 1 to 23 */ + result[i] = String(jsDate.getHours()); + break; + + case "h": /* 12-hour format of an hour with leading zeros; 01 to 12 */ + jsHour = String(jsDate.getHours()); + jsHour = (jsHour <= 12) ? jsHour : (jsHour - 12); + result[i] = (jsHour.length > 1) ? jsHour : "0" + jsHour; + break; + + case "H": /* 24-hour format of an hour with leading zeros; 01 to 24 */ + jsHour = String(jsDate.getHours()); + result[i] = (jsHour.length > 1) ? jsHour : "0" + jsHour; + break; + + case "i": /* Minutes with leading zeros; 00 to 59 */ + var jsMinute = String(jsDate.getMinutes()); + result[i] = (jsMinute.length > 1) ? jsMinute : "0" + jsMinute; + break; + + case "s": /* Seconds with leading zeros; 00 to 59; */ + var jsSecond = String(jsDate.getSeconds()); + result[i] = (jsSecond.length > 1) ? jsSecond : "0" + jsSecond; + break; + + case "u": /* Microseconds */ + throw '"u" not implemented!'; + + + /* TIMEZONE */ + + case "e": /* Timezone identifier */ + throw '"e" not implemented!'; + + case "I": /* "1" if Daylight Savings Time, "0" otherwise. Works only on the northern hemisphere */ + jsFirstDay = new Date(jsDate.getFullYear(), 0, 1); + result[i] = (jsDate.getTimezoneOffset() !== jsFirstDay.getTimezoneOffset()) ? (1) : (0); + break; + + case "O": /* Difference to Greenwich time (GMT) in hours */ + var jsMinZone = jsDate.getTimezoneOffset(); + var jsMinutes = jsMinZone % 60; + jsHour = String(((jsMinZone - jsMinutes) / 60) * -1); + + if (jsHour.charAt(0) !== "-") { + jsHour = "+" + jsHour; + } + + jsHour = (jsHour.length === 3) ? (jsHour) : (jsHour.replace(/([+\-])(\d)/, "$1" + 0 + "$2")); + result[i] = jsHour + jsMinutes + "0"; + break; + + case "P": /* Difference to Greenwich time (GMT) with colon between hours and minutes */ + throw '"P" not implemented!'; + + case "T": /* Timezone abbreviation */ + throw '"T" not implemented!'; + + case "Z": /* Timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive. */ + result[i] = jsDate.getTimezoneOffset() * 60; + break; + + + /* FULL DATE/TIME */ + + case "c": /* ISO 8601 date */ + throw '"c" not implemented!'; + + case "r": /* RFC 2822 formatted date */ + var jsDayName = this._wDays(jsDate.getDay()).substr(0, 3); + var jsMonthName = this._months(jsDate.getMonth()).substr(0, 3); + result[i] = jsDayName + ", " + jsDate.getDate() + " " + jsMonthName + this.get(" Y H:i:s O",jsDate); + break; + + case "U": /* Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) */ + result[i] = Math.floor(jsDate.getTime() / 1000); + break; + + default: + result[i] = iFormat[i]; + } + } + + return result.join(''); + + }, + + /** + * Creates a date object based on a format string. + * This works exactly as php date() function. http://php.net/manual/en/function.date.php + * + * @method set + * @param {String} [format] The format in which the date will be formatted. Defaults to 'Y-m-d' + * @param {String} str_date The date formatted. + * @return {Date} Date object based on the formatted date and format + * @public + * @static + */ + set : function( format , str_date ) { + if ( typeof str_date === 'undefined' ) { return ; } + if ( typeof format === 'undefined' || format === '' ) { format = "Y-m-d"; } + + var iFormat = format.split(""); + var result = new Array( iFormat.length ); + var escapeChar = "\\"; + var mList; + + var objIndex = { + year : undefined , + month : undefined , + day : undefined , + dayY : undefined , + dayW : undefined , + week : undefined , + hour : undefined , + hourD : undefined , + min : undefined , + sec : undefined , + msec : undefined , + ampm : undefined , + diffM : undefined , + diffH : undefined , + date : undefined + }; + + var matches = 0; + + /* This switch is presented in the same order as in php date function (PHP 5.2.2) */ + for ( var i = 0; i < iFormat.length; i++) { + switch( iFormat[ i ] ) { + case escapeChar: + result[i] = iFormat[ i + 1 ]; + i++; + break; + + /* DAY */ + case "d": /* Day of the month, 2 digits with leading zeros; ex: 01 to 31 */ + result[ i ] = '(\\d{2})'; + objIndex.day = { original : i , match : matches++ }; + break; + + case "j": /* Day of the month without leading zeros; ex: 1 to 31 */ + result[ i ] = '(\\d{1,2})'; + objIndex.day = { original : i , match : matches++ }; + break; + + case "D": /* A textual representation of a day, three letters; Seg to Dom */ + result[ i ] = '([\\wá]{3})'; + objIndex.dayW = { original : i , match : matches++ }; + break; + + case "l": /* A full textual representation of the day of the week; Domingo to Sabado */ + result[i] = '([\\wá]{5,7})'; + objIndex.dayW = { original : i , match : matches++ }; + break; + + case "N": /* ISO-8601 numeric representation of the day of the week; 1 (Segunda) to 7 (Domingo) */ + result[ i ] = '(\\d)'; + objIndex.dayW = { original : i , match : matches++ }; + break; + + case "w": /* Numeric representation of the day of the week; 0 (for Sunday) through 6 (for Saturday) */ + result[ i ] = '(\\d)'; + objIndex.dayW = { original : i , match : matches++ }; + break; + + case "S": /* English ordinal suffix for the day of the month, 2 characters; st, nd, rd or th. Works well with j */ + result[ i ] = '\\w{2}'; + break; + + case "z": /* The day of the year (starting from 0); 0 to 365 */ + result[ i ] = '(\\d{1,3})'; + objIndex.dayY = { original : i , match : matches++ }; + break; + + /* WEEK */ + case "W": /* ISO-8601 week number of year, weeks starting on Monday; ex: 42 (the 42nd week in the year) */ + result[ i ] = '(\\d{1,2})'; + objIndex.week = { original : i , match : matches++ }; + break; + + /* MONTH */ + case "F": /* A full textual representation of a month, such as Janeiro or Marco; Janeiro a Dezembro */ + result[ i ] = '([\\wç]{4,9})'; + objIndex.month = { original : i , match : matches++ }; + break; + + case "M": /* A short textual representation of a month, three letters; Jan a Dez */ + result[ i ] = '(\\w{3})'; + objIndex.month = { original : i , match : matches++ }; + break; + + case "m": /* Numeric representation of a month, with leading zeros; 01 to 12 */ + result[ i ] = '(\\d{2})'; + objIndex.month = { original : i , match : matches++ }; + break; + + case "n": /* Numeric representation of a month, without leading zeros; 1 a 12 */ + result[ i ] = '(\\d{1,2})'; + objIndex.month = { original : i , match : matches++ }; + break; + + case "t": /* Number of days in the given month; ex: 28 */ + result[ i ] = '\\d{2}'; + break; + + /* YEAR */ + case "L": /* Whether it's a leap year; 1 if it is a leap year, 0 otherwise. */ + result[ i ] = '\\w{4,5}'; + break; + + case "o": /* ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. */ + throw '"o" not implemented!'; + + case "Y": /* A full numeric representation of a year, 4 digits; 1999 */ + result[ i ] = '(\\d{4})'; + objIndex.year = { original : i , match : matches++ }; + break; + + case "y": /* A two digit representation of a year; 99 */ + result[ i ] = '(\\d{2})'; + if ( typeof objIndex.year === 'undefined' || iFormat[ objIndex.year.original ] !== 'Y' ) { + objIndex.year = { original : i , match : matches++ }; + } + break; + + /* TIME */ + case "a": /* Lowercase Ante meridiem and Post meridiem; am or pm */ + result[ i ] = '(am|pm)'; + objIndex.ampm = { original : i , match : matches++ }; + break; + + case "A": /* Uppercase Ante meridiem and Post meridiem; AM or PM */ + result[ i ] = '(AM|PM)'; + objIndex.ampm = { original : i , match : matches++ }; + break; + + case "B": /* Swatch Internet time; 000 through 999 */ + throw '"B" not implemented!'; + + case "g": /* 12-hour format of an hour without leading zeros; 1 to 12 */ + result[ i ] = '(\\d{1,2})'; + objIndex.hourD = { original : i , match : matches++ }; + break; + + case "G": /* 24-hour format of an hour without leading zeros; 1 to 23 */ + result[ i ] = '(\\d{1,2})'; + objIndex.hour = { original : i , match : matches++ }; + break; + + case "h": /* 12-hour format of an hour with leading zeros; 01 to 12 */ + result[ i ] = '(\\d{2})'; + objIndex.hourD = { original : i , match : matches++ }; + break; + + case "H": /* 24-hour format of an hour with leading zeros; 01 to 24 */ + result[ i ] = '(\\d{2})'; + objIndex.hour = { original : i , match : matches++ }; + break; + + case "i": /* Minutes with leading zeros; 00 to 59 */ + result[ i ] = '(\\d{2})'; + objIndex.min = { original : i , match : matches++ }; + break; + + case "s": /* Seconds with leading zeros; 00 to 59; */ + result[ i ] = '(\\d{2})'; + objIndex.sec = { original : i , match : matches++ }; + break; + + case "u": /* Microseconds */ + throw '"u" not implemented!'; + + /* TIMEZONE */ + case "e": /* Timezone identifier */ + throw '"e" not implemented!'; + + case "I": /* "1" if Daylight Savings Time, "0" otherwise. Works only on the northern hemisphere */ + result[i] = '\\d'; + break; + + case "O": /* Difference to Greenwich time (GMT) in hours */ + result[ i ] = '([-+]\\d{4})'; + objIndex.diffH = { original : i , match : matches++ }; + break; + + case "P": /* Difference to Greenwich time (GMT) with colon between hours and minutes */ + throw '"P" not implemented!'; + + case "T": /* Timezone abbreviation */ + throw '"T" not implemented!'; + + case "Z": /* Timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive. */ + result[ i ] = '(\\-?\\d{1,5})'; + objIndex.diffM = { original : i , match : matches++ }; + break; + + /* FULL DATE/TIME */ + case "c": /* ISO 8601 date */ + throw '"c" not implemented!'; + + case "r": /* RFC 2822 formatted date */ + result[ i ] = '([\\wá]{3}, \\d{1,2} \\w{3} \\d{4} \\d{2}:\\d{2}:\\d{2} [+\\-]\\d{4})'; + objIndex.date = { original : i , match : matches++ }; + break; + + case "U": /* Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) */ + result[ i ] = '(\\d{1,13})'; + objIndex.date = { original : i , match : matches++ }; + break; + + default: + result[ i ] = iFormat[ i ]; + } + } + + var pattr = new RegExp( result.join('') ); + + try { + mList = str_date.match( pattr ); + if ( !mList ) { return; } + } + catch ( e ) { return ; } + + var _haveDatetime = typeof objIndex.date !== 'undefined'; + + var _haveYear = typeof objIndex.year !== 'undefined'; + + var _haveYDay = typeof objIndex.dayY !== 'undefined'; + + var _haveDay = typeof objIndex.day !== 'undefined'; + var _haveMonth = typeof objIndex.month !== 'undefined'; + var _haveMonthDay = _haveMonth && _haveDay; + var _haveOnlyDay = !_haveMonth && _haveDay; + + var _haveWDay = typeof objIndex.dayW !== 'undefined'; + var _haveWeek = typeof objIndex.week !== 'undefined'; + var _haveWeekWDay = _haveWeek && _haveWDay; + var _haveOnlyWDay = !_haveWeek && _haveWDay; + + var _validDate = _haveYDay || _haveMonthDay || !_haveYear && _haveOnlyDay || _haveWeekWDay || !_haveYear && _haveOnlyWDay; + var _noDate = !_haveYear && !_haveYDay && !_haveDay && !_haveMonth && !_haveWDay && !_haveWeek; + + var _haveHour12 = typeof objIndex.hourD !== 'undefined' && typeof objIndex.ampm !== 'undefined'; + var _haveHour24 = typeof objIndex.hour !== 'undefined'; + var _haveHour = _haveHour12 || _haveHour24; + + var _haveMin = typeof objIndex.min !== 'undefined'; + var _haveSec = typeof objIndex.sec !== 'undefined'; + var _haveMSec = typeof objIndex.msec !== 'undefined'; + + var _haveMoreM = !_noDate || _haveHour; + var _haveMoreS = _haveMoreM || _haveMin; + + var _haveDiffM = typeof objIndex.diffM !== 'undefined'; + var _haveDiffH = typeof objIndex.diffH !== 'undefined'; + //var _haveGMT = _haveDiffM || _haveDiffH; + var hour; + var min; + + if ( _haveDatetime ) { + if ( iFormat[ objIndex.date.original ] === 'U' ) { + return new Date( +mList[ objIndex.date.match + 1 ] * 1000 ); + } + + var dList = mList[ objIndex.date.match + 1 ].match( /\w{3}, (\d{1,2}) (\w{3}) (\d{4}) (\d{2}):(\d{2}):(\d{2}) ([+\-]\d{4})/ ); + hour = +dList[ 4 ] + ( +dList[ 7 ].slice( 0 , 3 ) ); + min = +dList[ 5 ] + ( dList[ 7 ].slice( 0 , 1 ) + dList[ 7 ].slice( 3 ) ) / 100 * 60; + + return new Date( dList[ 3 ] , this._iMonth( dList[ 2 ] ) , dList[ 1 ] , hour , min , dList[ 6 ] ); + } + + var _d = new Date( ); + var year; + var month; + var day; + var sec; + var msec; + var gmt; + + if ( !_validDate && !_noDate ) { return ; } + + if ( _validDate ) { + if ( _haveYear ) { + var _y = _d.getFullYear( ) - 50 + ''; + year = mList[ objIndex.year.match + 1 ]; + if ( iFormat[ objIndex.year.original ] === 'y' ) { + year = +_y.slice( 0 , 2 ) + ( year >= ( _y ).slice( 2 ) ? 0 : 1 ) + year; + } + } else { + year = _d.getFullYear(); + } + + if ( _haveYDay ) { + month = 0; + day = mList[ objIndex.dayY.match + 1 ]; + } else if ( _haveDay ) { + if ( _haveMonth ) { + month = this._iMonth( mList[ objIndex.month.match + 1 ] ); + } else { + month = _d.getMonth( ); + } + + day = mList[ objIndex.day.match + 1 ]; + } else { + month = 0; + + var week; + if ( _haveWeek ) { + week = mList[ objIndex.week.match + 1 ]; + } else { + week = this.get( 'W' , _d ); + } + + day = ( week - 2 ) * 7 + ( 8 - ( ( new Date( year , 0 , 1 ) ).getDay( ) || 7 ) ) + this._iWeek( mList[ objIndex.week.match + 1 ] ); + } + + if ( month === 0 && day > 31 ) { + var aux = new Date( year , month , day ); + month = aux.getMonth( ); + day = aux.getDate( ); + } + } + else { + year = _d.getFullYear( ); + month = _d.getMonth( ); + day = _d.getDate( ); + } + + if ( _haveHour12 ) { hour = +mList[ objIndex.hourD.match + 1 ] + ( mList[ objIndex.ampm.match + 1 ] === 'pm' ? 12 : 0 ); } + else if ( _haveHour24 ) { hour = mList[ objIndex.hour.match + 1 ]; } + else if ( _noDate ) { hour = _d.getHours( ); } + else { hour = '00'; } + + if ( _haveMin ) { min = mList[ objIndex.min.match + 1 ]; } + else if ( !_haveMoreM ) { min = _d.getMinutes( ); } + else { min = '00'; } + + if ( _haveSec ) { sec = mList[ objIndex.sec.match + 1 ]; } + else if ( !_haveMoreS ) { sec = _d.getSeconds( ); } + else { sec = '00'; } + + if ( _haveMSec ) { msec = mList[ objIndex.msec.match + 1 ]; } + else { msec = '000'; } + + if ( _haveDiffH ) { gmt = mList[ objIndex.diffH.match + 1 ]; } + else if ( _haveDiffM ) { gmt = String( -1 * mList[ objIndex.diffM.match + 1 ] / 60 * 100 ).replace( /^(\d)/ , '+$1' ).replace( /(^[\-+])(\d{3}$)/ , '$10$2' ); } + else { gmt = '+0000'; } + + return new Date( year, month, day, hour, min, sec ); + } + }; + + + return InkDate; + +}); + +/** + * @module Ink.Util.Dumper_1 + * Dump/Profiling Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.Dumper', '1', [], function() { + + 'use strict'; + + var Dumper = { + + /** + * Hex code for the 'tab' + * + * @property _tab + * @type {String} + * @private + * @readOnly + * @static + * + */ + _tab: '\xA0\xA0\xA0\xA0', + + /** + * Function that returns the argument passed formatted + * + * @method _formatParam + * @param {Mixed} param + * @return {String} The argument passed formatted + * @private + * @static + */ + _formatParam: function(param) + { + var formated = ''; + + switch(typeof(param)) { + case 'string': + formated = '(string) '+param; + break; + case 'number': + formated = '(number) '+param; + break; + case 'boolean': + formated = '(boolean) '+param; + break; + case 'object': + if(param !== null) { + if(param.constructor === Array) { + formated = 'Array \n{\n' + this._outputFormat(param, 0) + '\n}'; + } else { + formated = 'Object \n{\n' + this._outputFormat(param, 0) + '\n}'; + } + } else { + formated = 'null'; + } + break; + default: + formated = false; + } + + return formated; + }, + + /** + * Function that returns the tabs concatenated + * + * @method _getTabs + * @param {Number} numberOfTabs Number of Tabs + * @return {String} Tabs concatenated + * @private + * @static + */ + _getTabs: function(numberOfTabs) + { + var tabs = ''; + for(var _i = 0; _i < numberOfTabs; _i++) { + tabs += this._tab; + } + return tabs; + }, + + /** + * Function that formats the parameter to display. + * + * @method _outputFormat + * @param {Any} param + * @param {Number} dim + * @return {String} The parameter passed formatted to displat + * @private + * @static + */ + _outputFormat: function(param, dim) + { + var formated = ''; + //var _strVal = false; + var _typeof = false; + for(var key in param) { + if(param[key] !== null) { + if(typeof(param[key]) === 'object' && (param[key].constructor === Array || param[key].constructor === Object)) { + if(param[key].constructor === Array) { + _typeof = 'Array'; + } else if(param[key].constructor === Object) { + _typeof = 'Object'; + } + formated += this._tab + this._getTabs(dim) + '[' + key + '] => '+_typeof+'\n'; + formated += this._tab + this._getTabs(dim) + '{\n'; + formated += this._outputFormat(param[key], dim + 1) + this._tab + this._getTabs(dim) + '}\n'; + } else if(param[key].constructor === Function) { + continue; + } else { + formated = formated + this._tab + this._getTabs(dim) + '[' + key + '] => ' + param[key] + '\n'; + } + } else { + formated = formated + this._tab + this._getTabs(dim) + '[' + key + '] => null \n'; + } + } + return formated; + }, + + /** + * Prints variable structure. + * + * @method printDump + * @param {Any} param Variable to be dumped. + * @param {DOMElement|String} [target] Element to print the dump on. + * @public + * @static + */ + printDump: function(param, target) + { + /*jshint evil:true */ + if(!target || typeof(target) === 'undefined') { + document.write('
'+this._formatParam(param)+'
'); + } else { + if(typeof(target) === 'string') { + document.getElementById(target).innerHTML = '
' + this._formatParam(param) + '
'; + } else if(typeof(target) === 'object') { + target.innerHTML = '
'+this._formatParam(param)+'
'; + } else { + throw "TARGET must be an element or an element ID"; + } + } + }, + + /** + * Get a variable's structure. + * + * @method returnDump + * @param {Any} param Variable to get the structure. + * @return {String} The variable's structure. + * @public + * @static + */ + returnDump: function(param) + { + return this._formatParam(param); + }, + + /** + * Alert a variable's structure. + * + * @method alertDump + * @param {Any} param Variable to be dumped. + * @public + * @static + */ + alertDump: function(param) + { + window.alert(this._formatParam(param).replace(/()(Array|Object)(<\/b>)/g, "$2")); + }, + + /** + * Prints the variable structure to a new window. + * + * @method windowDump + * @param {Any} param Variable to be dumped. + * @public + * @static + */ + windowDump: function(param) + { + var dumperwindow = 'dumperwindow_'+(Math.random() * 10000); + var win = window.open('', + dumperwindow, + 'width=400,height=300,left=50,top=50,status,menubar,scrollbars,resizable' + ); + win.document.open(); + win.document.write('
'+this._formatParam(param)+'
'); + win.document.close(); + win.focus(); + } + + }; + + return Dumper; + +}); +/** + * @module Ink.Util.I18n_1 + * Internationalization Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.I18n', '1', [], function () { + 'use strict'; + + var pattrText = /\{(?:(\{.*?})|(?:%s:)?(\d+)|(?:%s)?|([\w-]+))}/g; + + var funcOrVal = function( ret , args ) { + if ( typeof ret === 'function' ) { + return ret.apply(this, args); + } else if (typeof ret !== undefined) { + return ret; + } else { + return ''; + } + }; + + /** + * Creates a new I18n helper object + * + * @class Ink.Util.I18n + * @constructor + * + * @param {Object} dict Object mapping language codes (in the form of `pt_PT`, `pt_BR`, `fr`, `en_US`, etc.) to their Object dictionaries. + * @param {String} [lang]='pt_PT's language code of the target language + * + * @example + * var dictionaries = { // This could come from a JSONP request from your server + * 'pt_PT': { + * 'hello': 'olá', + * 'me': 'eu', + * 'i have a {} for you': 'tenho um {} para ti' // Old syntax using `{%s}` tokens still available + * }, + * 'pt_BR': { + * 'hello': 'oi', + * 'me': 'eu', + * 'i have a {} for you': 'tenho um {} para você' + * } + * }; + * Ink.requireModules(['Ink.Util.I18n_1'], function (I18n) { + * var i18n = new I18n(dictionaries, 'pt_PT'); + * i18n.text('hello'); // returns 'olá' + * i18n.text('i have a {} for you', 'IRON SWORD'); // returns 'tenho um IRON SWORD' para ti + * + * i18n.lang('pt_BR'); // Changes language. pt_BR dictionary is loaded + * i18n.text('hello'); // returns 'oi' + * + * i18n.lang('en_US'); // Missing language. + * i18n.text('hello'); // returns 'hello'. If testMode is on, returns '[hello]' + * }); + * + * @example + * // The old {%s} syntax from libsapo's i18n is still supported + * i18n.text('hello, {%s}!', 'someone'); // -> 'olá, someone!' + */ + var I18n = function( dict , lang , testMode ) { + if ( !( this instanceof I18n ) ) { return new I18n( dict , lang , testMode ); } + + this.reset( ) + .lang( lang ) + .testMode( testMode ) + .append( dict || { } , lang ); + }; + + I18n.prototype = { + reset: function( ) { + this._dicts = [ ]; + this._dict = { }; + this._testMode = false; + this._lang = this._gLang; + + return this; + }, + /** + * Adds translation strings for the helper to use. + * + * @method append + * @param {Object} dict Object containing language objects identified by their language code + * @example + * var i18n = new I18n({}, 'pt_PT'); + * i18n.append({'pt_PT': { + * 'sfraggles': 'braggles' + * }}); + * i18n.text('sfraggles') // -> 'braggles' + */ + append: function( dict ) { + this._dicts.push( dict ); + + this._dict = Ink.extendObj(this._dict , dict[ this._lang ] ); + + return this; + }, + /** + * Gets or sets the language. + * If there are more dictionaries available in cache, they will be loaded. + * + * @method lang + * @param {String} lang Language code to set this instance to. + */ + lang: function( lang ) { + if ( !arguments.length ) { return this._lang; } + + if ( lang && this._lang !== lang ) { + this._lang = lang; + + this._dict = { }; + + for ( var i = 0, l = this._dicts.length; i < l; i++ ) { + this._dict = Ink.extendObj( this._dict , this._dicts[ i ][ lang ] || { } ); + } + } + + return this; + }, + /** + * Sets or unsets test mode. + * In test mode, unknown strings are wrapped in `[ ... ]`. This is useful for debugging your application and to make sure all your translation keys are in place. + * + * @method testMode + * @param {Boolean} bool Flag to set the test mode state + */ + testMode: function( bool ) { + if ( !arguments.length ) { return !!this._testMode; } + + if ( bool !== undefined ) { this._testMode = !!bool; } + + return this; + }, + + /** + * Gest a key from the current dictionary + * + * @method getKey + * @param {String} key + * @return {Any} The object which happened to be in the current language dictionary on the given key. + * + * @example + * _.getKey('astring'); // -> 'a translated string' + * _.getKey('anobject'); // -> {'a': 'translated object'} + * _.getKey('afunction'); // -> function () { return 'this is a localized function' } + */ + getKey: function( key ) { + var ret; + var gLang = this._gLang; + var lang = this._lang; + + if ( key in this._dict ) { + ret = this._dict[ key ]; + } else { + I18n.lang( lang ); + + ret = this._gDict[ key ]; + + I18n.lang( gLang ); + } + + return ret; + }, + + /** + * Translates a string. + * Given a translation key, return a translated string, with replaced parameters. + * When a translated string is not available, the original string is returned unchanged. + * + * @method text + * @param {String} str Key to look for in i18n dictionary (which is returned verbatim if unknown) + * @param {Object} [namedParms] Named replacements. Replaces {named} with values in this object. + * @param {String} [args] Replacement #1 (replaces first {} and all {1}) + * @param {String} [arg2] Replacement #2 (replaces second {} and all {2}) + * @param {String} [argn*] Replacement #n (replaces nth {} and all {n}) + * + * @example + * _('Gosto muito de {} e o céu é {}.', 'carros', 'azul'); + * // returns 'Gosto muito de carros e o céu é azul.' + * + * @example + * _('O {1} é {2} como {2} é a cor do {3}.', 'carro', 'azul', 'FCP'); + * // returns 'O carro é azul como azul é o FCP.' + * + * @example + * _('O {person1} dava-se com a {person2}', {person1: 'coisinho', person2: 'coisinha'}); + * // -> 'O coisinho dava-se com a coisinha' + * + * @example + * // This is a bit more complex + * var i18n = make().lang('pt_PT').append({ + * pt_PT: { + * array: [1, 2], + * object: {'a': '-a-', 'b': '-b-'}, + * func: function (a, b) {return '[[' + a + ',' + b + ']]';} + * } + * }); + * i18n.text('array', 0); // -> '1' + * i18n.text('object', 'a'); // -> '-a-' + * i18n.text('func', 'a', 'b'); // -> '[[a,b]]' + */ + text: function( str /*, replacements...*/ ) { + if ( typeof str !== 'string' ) { return; } // Backwards-compat + + var pars = Array.prototype.slice.call( arguments , 1 ); + var idx = 0; + var isObj = typeof pars[ 0 ] === 'object'; + + var original = this.getKey( str ); + if ( original === undefined ) { original = this._testMode ? '[' + str + ']' : str; } + if ( typeof original === 'number' ) { original += ''; } + + if (typeof original === 'string') { + original = original.replace( pattrText , function( m , $1 , $2 , $3 ) { + var ret = + $1 ? $1 : + $2 ? pars[ $2 - ( isObj ? 0 : 1 ) ] : + $3 ? pars[ 0 ][ $3 ] || '' : + pars[ (idx++) + ( isObj ? 1 : 0 ) ]; + return funcOrVal( ret , [idx].concat(pars) ); + }); + return original; + } + + return ( + typeof original === 'function' ? original.apply( this , pars ) : + original instanceof Array ? funcOrVal( original[ pars[ 0 ] ] , pars ) : + typeof original === 'object' ? funcOrVal( original[ pars[ 0 ] ] , pars ) : + ''); + }, + + /** + * Translates and pluralizes text. + * Given a singular string, a plural string and a number, translates either the singular or plural string. + * + * @method ntext + * @return {String} + * + * @param {String} strSin Word to use when count is 1 + * @param {String} strPlur Word to use otherwise + * @param {Number} count Number which defines which word to use + * @param [args*] Extra arguments, to be passed to `text()` + * + * @example + * i18n.ntext('platypus', 'platypuses', 1); // returns 'ornitorrinco' + * i18n.ntext('platypus', 'platypuses', 2); // returns 'ornitorrincos' + * + * @example + * // The "count" argument is passed to text() + * i18n.ntext('{} platypus', '{} platypuses', 1); // returns '1 ornitorrinco' + * i18n.ntext('{} platypus', '{} platypuses', 2); // returns '2 ornitorrincos' + */ + ntext: function( strSin , strPlur , count ) { + var pars = Array.prototype.slice.apply( arguments ); + var original; + + if ( pars.length === 2 && typeof strPlur === 'number' ) { + original = this.getKey( strSin ); + if ( !( original instanceof Array ) ) { return ''; } + + pars.splice( 0 , 1 ); + original = original[ strPlur === 1 ? 0 : 1 ]; + } else { + pars.splice( 0 , 2 ); + original = count === 1 ? strSin : strPlur; + } + + return this.text.apply( this , [ original ].concat( pars ) ); + }, + + /** + * Gets the ordinal suffix of a number. + * + * This works by using transforms (in the form of Objects or Functions) passed into the function or found in the special key `_ordinals` in the active language dictionary. + * + * @method ordinal + * + * @param {Number} num Input number + * @param {Object|Function} [options]={} Maps for translating. Each of these options' fallback is found in the current language's dictionary. The lookup order is the following: `exceptions`, `byLastDigit`, `default`. Each of these may be either an `Object` or a `Function`. If it's a function, it is called (with `number` and `digit` for any function except for byLastDigit, which is called with the `lastDigit` of the number in question), and if the function returns a string, that is used. If it's an object, the property is looked up using `[...]`. If what is found is a string, it is used. + * @param {Object|Function} [options.byLastDigit]={} If the language requires the last digit to be considered, mappings of last digits to ordinal suffixes can be created here. + * @param {Object|Function} [options.exceptions]={} Map unique, special cases to their ordinal suffixes. + * + * @returns {String} Ordinal suffix for `num`. + * + * @example + * var i18n = new I18n({ + * pt_PT: { // 1º, 2º, 3º, 4º, ... + * _ordinal: { // The _ordinals key each translation dictionary is special. + * 'default': "º" // Usually the suffix is "º" in portuguese... + * } + * }, + * fr: { // 1er, 2e, 3e, 4e, ... + * _ordinal: { // The _ordinals key is special. + * 'default': "e", // Usually the suffix is "e" in french... + * exceptions: { + * 1: "er" // ... Except for the number one. + * } + * } + * }, + * en_US: { // 1st, 2nd, 3rd, 4th, ..., 11th, 12th, ... 21st, 22nd... + * _ordinal: { + * 'default': "th",// Usually the digit is "th" in english... + * byLastDigit: { + * 1: "st", // When the last digit is 1, use "th"... + * 2: "nd", // When the last digit is 2, use "nd"... + * 3: "rd" // When the last digit is 3, use "rd"... + * }, + * exceptions: { // But these numbers are special + * 0: "", + * 11: "th", + * 12: "th", + * 13: "th" + * } + * } + * } + * }, 'pt_PT'); + * + * i18n.ordinal(1); // returns 'º' + * i18n.ordinal(2); // returns 'º' + * i18n.ordinal(11); // returns 'º' + * + * i18n.lang('fr'); + * i18n.ordinal(1); // returns 'er' + * i18n.ordinal(2); // returns 'e' + * i18n.ordinal(11); // returns 'e' + * + * i18n.lang('en_US'); + * i18n.ordinal(1); // returns 'st' + * i18n.ordinal(2); // returns 'nd' + * i18n.ordinal(12); // returns 'th' + * i18n.ordinal(22); // returns 'nd' + * i18n.ordinal(3); // returns 'rd' + * i18n.ordinal(4); // returns 'th' + * i18n.ordinal(5); // returns 'th' + * + **/ + ordinal: function( num ) { + if ( num === undefined ) { return ''; } + + var lastDig = +num.toString( ).slice( -1 ); + + var ordDict = this.getKey( '_ordinals' ); + if ( ordDict === undefined ) { return ''; } + + if ( typeof ordDict === 'string' ) { return ordDict; } + + var ret; + + if ( typeof ordDict === 'function' ) { + ret = ordDict( num , lastDig ); + + if ( typeof ret === 'string' ) { return ret; } + } + + if ( 'exceptions' in ordDict ) { + ret = typeof ordDict.exceptions === 'function' ? ordDict.exceptions( num , lastDig ) : + num in ordDict.exceptions ? funcOrVal( ordDict.exceptions[ num ] , [num , lastDig] ) : + undefined; + + if ( typeof ret === 'string' ) { return ret; } + } + + if ( 'byLastDigit' in ordDict ) { + ret = typeof ordDict.byLastDigit === 'function' ? ordDict.byLastDigit( lastDig , num ) : + lastDig in ordDict.byLastDigit ? funcOrVal( ordDict.byLastDigit[ lastDig ] , [lastDig , num] ) : + undefined; + + if ( typeof ret === 'string' ) { return ret; } + } + + if ( 'default' in ordDict ) { + ret = funcOrVal( ordDict['default'] , [ num , lastDig ] ); + + if ( typeof ret === 'string' ) { return ret; } + } + + return ''; + }, + + /** + * Alias for the text method. + * Returns an alias to `text()`, for convenience. The resulting function is traditionally assigned to "_". + * + * @method alias + * @returns {Function} an alias to `text()`. You can also access the rest of the translation API through this alias. + * + * @example + * var i18n = new I18n({ + * 'pt_PT': { + * 'hi': 'olá', + * '{} day': '{} dia', + * '{} days': '{} dias', + * '_ordinals': { + * 'default': 'º' + * } + * } + * }, 'pt_PT'); + * var _ = i18n.alias(); + * _('hi'); // -> 'olá' + * _('{} days', 3); // -> '3 dias' + * _.ntext('{} day', '{} days', 2); // -> '2 dias' + * _.ntext('{} day', '{} days', 1); // -> '1 dia' + * _.ordinal(3); // -> 'º' + */ + alias: function( ) { + var ret = Ink.bind( I18n.prototype.text , this ); + ret.ntext = Ink.bind( I18n.prototype.ntext , this ); + ret.append = Ink.bind( I18n.prototype.append , this ); + ret.ordinal = Ink.bind( I18n.prototype.ordinal , this ); + ret.testMode = Ink.bind( I18n.prototype.testMode , this ); + + return ret; + } + }; + + /** + * Resets I18n global state (global dictionaries, and default language for instances) + * + * @method reset + * @static + * + **/ + I18n.reset = function( ) { + I18n.prototype._gDicts = [ ]; + I18n.prototype._gDict = { }; + I18n.prototype._gLang = 'pt_PT'; + }; + I18n.reset( ); + + /** + * Adds a dictionary to be used in all I18n instances for the corresponding language. + * + * @method append + * @static + * + * @param dict {Object} Dictionary to be added + * @param lang {String} Language fo the dictionary being added + * + */ + I18n.append = function( dict , lang ) { + if ( lang ) { + if ( !( lang in dict ) ) { + var obj = { }; + + obj[ lang ] = dict; + + dict = obj; + } + + if ( lang !== I18n.prototype._gLang ) { I18n.lang( lang ); } + } + + I18n.prototype._gDicts.push( dict ); + + Ink.extendObj( I18n.prototype._gDict , dict[ I18n.prototype._gLang ] ); + }; + + /** + * Gets or sets the current default language of I18n instances. + * + * @method lang + * @static + * + * @return {String} language code + */ + I18n.lang = function( lang ) { + if ( !arguments.length ) { return I18n.prototype._gLang; } + + if ( lang && I18n.prototype._gLang !== lang ) { + I18n.prototype._gLang = lang; + + I18n.prototype._gDict = { }; + + for ( var i = 0, l = I18n.prototype._gDicts.length; i < l; i++ ) { + Ink.extendObj( I18n.prototype._gDict , I18n.prototype._gDicts[ i ][ lang ] || { } ); + } + } + }; + + return I18n; +}); +/** + * @module Ink.Util.Json_1 + * JSON Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.Json', '1', [], function() { + 'use strict'; + + var function_call = Function.prototype.call; + var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; + + function twoDigits(n) { + var r = '' + n; + if (r.length === 1) { + return '0' + r; + } else { + return r; + } + } + + var dateToISOString = Date.prototype.toISOString ? + Ink.bind(function_call, Date.prototype.toISOString) : + function(date) { + // Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString + return date.getUTCFullYear() + + '-' + twoDigits( date.getUTCMonth() + 1 ) + + '-' + twoDigits( date.getUTCDate() ) + + 'T' + twoDigits( date.getUTCHours() ) + + ':' + twoDigits( date.getUTCMinutes() ) + + ':' + twoDigits( date.getUTCSeconds() ) + + '.' + String( (date.getUTCMilliseconds()/1000).toFixed(3) ).slice( 2, 5 ) + + 'Z'; + }; + + /** + * Use this class to convert JSON strings to JavaScript objects + * `(Json.parse)` and also to do the opposite operation `(Json.stringify)`. + * Internally, the standard JSON implementation is used if available + * Otherwise, the functions mimic the standard implementation. + * + * Here's how to produce JSON from an existing object: + * + * Ink.requireModules(['Ink.Util.Json_1'], function (Json) { + * var obj = { + * key1: 'value1', + * key2: 'value2', + * keyArray: ['arrayValue1', 'arrayValue2', 'arrayValue3'] + * }; + * Json.stringify(obj); // The above object as a JSON string + * }); + * + * And here is how to parse JSON: + * + * Ink.requireModules(['Ink.Util.Json_1'], function (Json) { + * var source = '{"key": "value", "array": [true, null, false]}'; + * Json.parse(source); // The above JSON string as an object + * }); + * @namespace Ink.Util.Json + * @static + * + */ + var InkJson = { + _nativeJSON: window.JSON || null, + + _convertToUnicode: false, + + // Escape characters so as to embed them in JSON strings + _escape: function (theString) { + var _m = { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"': '\\"', '\\': '\\\\' }; + + if (/["\\\x00-\x1f]/.test(theString)) { + theString = theString.replace(/([\x00-\x1f\\"])/g, function(a, b) { + var c = _m[b]; + if (c) { + return c; + } + c = b.charCodeAt(); + return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16); + }); + } + + return theString; + }, + + // A character conversion map + _toUnicode: function (theString) + { + if(!this._convertToUnicode) { + return this._escape(theString); + } else { + var unicodeString = ''; + var inInt = false; + var theUnicode = false; + var i = 0; + var total = theString.length; + while(i < total) { + inInt = theString.charCodeAt(i); + if( (inInt >= 32 && inInt <= 126) || + //(inInt >= 48 && inInt <= 57) || + //(inInt >= 65 && inInt <= 90) || + //(inInt >= 97 && inInt <= 122) || + inInt === 8 || + inInt === 9 || + inInt === 10 || + inInt === 12 || + inInt === 13 || + inInt === 32 || + inInt === 34 || + inInt === 47 || + inInt === 58 || + inInt === 92) { + + if(inInt === 34 || inInt === 92 || inInt === 47) { + theUnicode = '\\'+theString.charAt(i); + } else if(inInt === 8) { + theUnicode = '\\b'; + } else if(inInt === 9) { + theUnicode = '\\t'; + } else if(inInt === 10) { + theUnicode = '\\n'; + } else if(inInt === 12) { + theUnicode = '\\f'; + } else if(inInt === 13) { + theUnicode = '\\r'; + } else { + theUnicode = theString.charAt(i); + } + } else { + if(this._convertToUnicode) { + theUnicode = theString.charCodeAt(i).toString(16)+''.toUpperCase(); + while (theUnicode.length < 4) { + theUnicode = '0' + theUnicode; + } + theUnicode = '\\u' + theUnicode; + } else { + theUnicode = theString.charAt(i); + } + } + unicodeString += theUnicode; + + i++; + } + + return unicodeString; + } + + }, + + _stringifyValue: function(param) { + if (typeof param === 'string') { + return '"' + this._toUnicode(param) + '"'; + } else if (typeof param === 'number' && (isNaN(param) || !isFinite(param))) { // Unusable numbers go null + return 'null'; + } else if (typeof param === 'undefined' || param === null) { // And so does undefined + return 'null'; + } else if (typeof param.toJSON === 'function') { + var t = param.toJSON(); + if (typeof t === 'string') { + return '"' + this._escape(t) + '"'; + } else { + return this._escape(t.toString()); + } + } else if (typeof param === 'number' || typeof param === 'boolean') { // These ones' toString methods return valid JSON. + return '' + param; + } else if (typeof param === 'function') { + return 'null'; // match JSON.stringify + } else if (param.constructor === Date) { + return '"' + this._escape(dateToISOString(param)) + '"'; + } else if (param.constructor === Array) { + var arrayString = ''; + for (var i = 0, len = param.length; i < len; i++) { + if (i > 0) { + arrayString += ','; + } + arrayString += this._stringifyValue(param[i]); + } + return '[' + arrayString + ']'; + } else { // Object + var objectString = ''; + for (var k in param) { + if ({}.hasOwnProperty.call(param, k)) { + if (objectString !== '') { + objectString += ','; + } + objectString += '"' + this._escape(k) + '": ' + this._stringifyValue(param[k]); + } + } + return '{' + objectString + '}'; + } + }, + + /** + * Serializes a JSON object into a string. + * + * @method stringify + * @param {Object} input Data to be serialized into JSON + * @param {Boolean} convertToUnicode When `true`, converts string contents to unicode \uXXXX + * @return {String} Serialized string + * + * @example + * Json.stringify({a:1.23}); // -> string: '{"a": 1.23}' + */ + stringify: function(input, convertToUnicode) { + this._convertToUnicode = !!convertToUnicode; + if(!this._convertToUnicode && this._nativeJSON) { + return this._nativeJSON.stringify(input); + } + return this._stringifyValue(input); // And recurse. + }, + + /** + * Parses a JSON text through a function + * + * @method parse + * @param text {String} Input string + * @param reviver {Function} Function receiving `(key, value)`, and `this`=(containing object), used to walk objects. + * + * @return {Object} JSON object + * @example + * Simple example: + * + * Json.parse('{"a": "3","numbers":false}', + * function (key, value) { + * if (!this.numbers && key === 'a') { + * return "NO NUMBERS"; + * } else { + * return value; + * } + * }); // -> object: {a: 'NO NUMBERS', numbers: false} + */ + /* From https://github.com/douglascrockford/JSON-js/blob/master/json.js */ + parse: function (text, reviver) { + /*jshint evil:true*/ + +// The parse method takes a text and an optional reviver function, and returns +// a JavaScript value if the text is a valid JSON text. + + var j; + + function walk(holder, key) { + +// The walk method is used to recursively walk the resulting structure so +// that modifications can be made. + + var k, v, value = holder[key]; + if (value && typeof value === 'object') { + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + } + } + } + return reviver.call(holder, key, value); + } + + +// Parsing happens in four stages. In the first stage, we replace certain +// Unicode characters with escape sequences. JavaScript handles many characters +// incorrectly, either silently deleting them, or treating them as line endings. + + text = String(text); + cx.lastIndex = 0; + if (cx.test(text)) { + text = text.replace(cx, function (a) { + return '\\u' + + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }); + } + +// In the second stage, we run the text against regular expressions that look +// for non-JSON patterns. We are especially concerned with '()' and 'new' +// because they can cause invocation, and '=' because it can cause mutation. +// But just to be safe, we want to reject all unexpected forms. + +// We split the second stage into 4 regexp operations in order to work around +// crippling inefficiencies in IE's and Safari's regexp engines. First we +// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we +// replace all simple value tokens with ']' characters. Third, we delete all +// open brackets that follow a colon or comma or that begin the text. Finally, +// we look to see that the remaining characters are only whitespace or ']' or +// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. + + if (/^[\],:{}\s]*$/ + .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') + .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') + .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { + +// In the third stage we use the eval function to compile the text into a +// JavaScript structure. The '{' operator is subject to a syntactic ambiguity +// in JavaScript: it can begin a block or an object literal. We wrap the text +// in parens to eliminate the ambiguity. + + j = eval('(' + text + ')'); + +// In the optional fourth stage, we recursively walk the new structure, passing +// each name/value pair to a reviver function for possible transformation. + + return typeof reviver === 'function' ? + walk({'': j}, '') : + j; + } + +// If the text is not JSON parseable, then a SyntaxError is thrown. + + throw new SyntaxError('JSON.parse'); + } + }; + + return InkJson; +}); +/** + * @module Ink.Util.String_1 + * String Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.String', '1', [], function() { + + 'use strict'; + + var InkUtilString = { + + /** + * List of special chars + * + * @property _chars + * @type {Array} + * @private + * @readOnly + * @static + */ + _chars: ['&','à','á','â','ã','ä','å','æ','ç','è','é', + 'ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô', + 'õ','ö','ø','ù','ú','û','ü','ý','þ','ÿ','À', + 'Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë', + 'Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö', + 'Ø','Ù','Ú','Û','Ü','Ý','Þ','€','\"','ß','<', + '>','¢','£','¤','¥','¦','§','¨','©','ª','«', + '¬','\xad','®','¯','°','±','²','³','´','µ','¶', + '·','¸','¹','º','»','¼','½','¾'], + + /** + * List of the special characters' html entities + * + * @property _entities + * @type {Array} + * @private + * @readOnly + * @static + */ + _entities: ['amp','agrave','aacute','acirc','atilde','auml','aring', + 'aelig','ccedil','egrave','eacute','ecirc','euml','igrave', + 'iacute','icirc','iuml','eth','ntilde','ograve','oacute', + 'ocirc','otilde','ouml','oslash','ugrave','uacute','ucirc', + 'uuml','yacute','thorn','yuml','Agrave','Aacute','Acirc', + 'Atilde','Auml','Aring','AElig','Ccedil','Egrave','Eacute', + 'Ecirc','Euml','Igrave','Iacute','Icirc','Iuml','ETH','Ntilde', + 'Ograve','Oacute','Ocirc','Otilde','Ouml','Oslash','Ugrave', + 'Uacute','Ucirc','Uuml','Yacute','THORN','euro','quot','szlig', + 'lt','gt','cent','pound','curren','yen','brvbar','sect','uml', + 'copy','ordf','laquo','not','shy','reg','macr','deg','plusmn', + 'sup2','sup3','acute','micro','para','middot','cedil','sup1', + 'ordm','raquo','frac14','frac12','frac34'], + + /** + * List of accented chars + * + * @property _accentedChars + * @type {Array} + * @private + * @readOnly + * @static + */ + _accentedChars:['à','á','â','ã','ä','å', + 'è','é','ê','ë', + 'ì','í','î','ï', + 'ò','ó','ô','õ','ö', + 'ù','ú','û','ü', + 'ç','ñ', + 'À','Á','Â','Ã','Ä','Å', + 'È','É','Ê','Ë', + 'Ì','Í','Î','Ï', + 'Ò','Ó','Ô','Õ','Ö', + 'Ù','Ú','Û','Ü', + 'Ç','Ñ'], + + /** + * List of the accented chars (above), but without the accents + * + * @property _accentedRemovedChars + * @type {Array} + * @private + * @readOnly + * @static + */ + _accentedRemovedChars:['a','a','a','a','a','a', + 'e','e','e','e', + 'i','i','i','i', + 'o','o','o','o','o', + 'u','u','u','u', + 'c','n', + 'A','A','A','A','A','A', + 'E','E','E','E', + 'I','I','I','I', + 'O','O','O','O','O', + 'U','U','U','U', + 'C','N'], + /** + * Object that contains the basic HTML unsafe chars, as keys, and their HTML entities as values + * + * @property _htmlUnsafeChars + * @type {Object} + * @private + * @readOnly + * @static + */ + _htmlUnsafeChars:{'<':'<','>':'>','&':'&','"':'"',"'":'''}, + + /** + * Capitalizes a word. + * If param as more than one word, it converts first letter of all words that have more than 2 letters + * + * @method ucFirst + * @param {String} string String to capitalize. + * @param {Boolean} [firstWordOnly]=false Flag to capitalize only the first word. + * @return {String} Camel cased string. + * @public + * @static + * + * @example + * InkString.ucFirst('hello world'); // -> 'Hello World' + * InkString.ucFirst('hello world', true); // -> 'Hello world' + */ + ucFirst: function(string, firstWordOnly) { + var replacer = firstWordOnly ? /(^|\s)(\w)(\S{2,})/ : /(^|\s)(\w)(\S{2,})/g; + return string ? String(string).replace(replacer, function(_, $1, $2, $3){ + return $1 + $2.toUpperCase() + $3.toLowerCase(); + }) : string; + }, + + /** + * Trims whitespace from strings + * + * @method trim + * @param {String} string String to be trimmed + * @return {String} Trimmed string + * @public + * @static + */ + trim: function(string) + { + if (typeof string === 'string') { + return string.replace(/^\s+|\s+$|\n+$/g, ''); + } + return string; + }, + + /** + * Strips HTML tags from strings + * + * @method stripTags + * @param {String} string String to strip tags from. + * @param {String} allowed Comma separated list of allowed tags. + * @return {String} Stripped string + * @public + * @static + * @example + * + */ + stripTags: function(string, allowed) + { + if (allowed && typeof allowed === 'string') { + var aAllowed = InkUtilString.trim(allowed).split(','); + var aNewAllowed = []; + var cleanedTag = false; + for(var i=0; i < aAllowed.length; i++) { + if(InkUtilString.trim(aAllowed[i]) !== '') { + cleanedTag = InkUtilString.trim(aAllowed[i].replace(/(<|\>)/g, '').replace(/\s/, '')); + aNewAllowed.push('(<'+cleanedTag+'\\s[^>]+>|<(\\s|\\/)?(\\s|\\/)?'+cleanedTag+'>)'); + } + } + var strAllowed = aNewAllowed.join('|'); + var reAllowed = new RegExp(strAllowed, "i"); + + var aFoundTags = string.match(new RegExp("<[^>]*>", "g")); + + for(var j=0; j < aFoundTags.length; j++) { + if(!aFoundTags[j].match(reAllowed)) { + string = string.replace((new RegExp(aFoundTags[j], "gm")), ''); + } + } + return string; + } else { + return string.replace(/<[^\>]+\>/g, ''); + } + }, + + /** + * Encodes string into HTML entities. + * + * @method htmlEntitiesEncode + * @param {String} string + * @return {String} string encoded + * @public + * @static + */ + htmlEntitiesEncode: function(string) + { + if (string && string.replace) { + var re = false; + for (var i = 0; i < InkUtilString._chars.length; i++) { + re = new RegExp(InkUtilString._chars[i], "gm"); + string = string.replace(re, '&' + InkUtilString._entities[i] + ';'); + } + } + return string; + }, + + /** + * Decodes string from HTML entities. + * + * @method htmlEntitiesDecode + * @param {String} string String to be decoded + * @return {String} Decoded string + * @public + * @static + */ + htmlEntitiesDecode: function(string) + { + if (string && string.replace) { + var re = false; + for (var i = 0; i < InkUtilString._entities.length; i++) { + re = new RegExp("&"+InkUtilString._entities[i]+";", "gm"); + string = string.replace(re, InkUtilString._chars[i]); + } + string = string.replace(/&#[^;]+;?/g, function($0){ + if ($0.charAt(2) === 'x') { + return String.fromCharCode(parseInt($0.substring(3), 16)); + } + else { + return String.fromCharCode(parseInt($0.substring(2), 10)); + } + }); + } + return string; + }, + + /** + * Encode a string to UTF-8. + * + * @method utf8Encode + * @param {String} string String to be encoded + * @return {String} string UTF-8 encoded string + * @public + * @static + */ + utf8Encode: function(string) { + /*jshint bitwise:false*/ + string = string.replace(/\r\n/g,"\n"); + var utfstring = ""; + + for (var n = 0; n < string.length; n++) { + + var c = string.charCodeAt(n); + + if (c < 128) { + utfstring += String.fromCharCode(c); + } + else if((c > 127) && (c < 2048)) { + utfstring += String.fromCharCode((c >> 6) | 192); + utfstring += String.fromCharCode((c & 63) | 128); + } + else { + utfstring += String.fromCharCode((c >> 12) | 224); + utfstring += String.fromCharCode(((c >> 6) & 63) | 128); + utfstring += String.fromCharCode((c & 63) | 128); + } + + } + return utfstring; + }, + + /** + * Truncates a string without breaking words. + * + * @method shortString + * @param {String} str String to truncate + * @param {Number} n Number of chars of the short string + * @return {String} + * @public + * @static + */ + shortString: function(str,n) { + var words = str.split(' '); + var resultstr = ''; + for(var i = 0; i < words.length; i++ ){ + if((resultstr + words[i] + ' ').length>=n){ + resultstr += '…'; + break; + } + resultstr += words[i] + ' '; + } + return resultstr; + }, + + /** + * Truncates a string, breaking words and adding ... at the end. + * + * @method truncateString + * @param {String} str String to truncate + * @param {Number} length Limit for the returned string, ellipsis included. + * @return {String} Truncated String + * @public + * @static + */ + truncateString: function(str, length) { + if(str.length - 1 > length) { + return str.substr(0, length - 1) + "\u2026"; + } else { + return str; + } + }, + + /** + * Decodes a string from UTF-8. + * + * @method utf8Decode + * @param {String} string String to be decoded + * @return {String} Decoded string + * @public + * @static + */ + utf8Decode: function(utfstring) { + /*jshint bitwise:false*/ + var string = ""; + var i = 0, c = 0, c2 = 0, c3 = 0; + + while ( i < utfstring.length ) { + + c = utfstring.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utfstring.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utfstring.charCodeAt(i+1); + c3 = utfstring.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + return string; + }, + + /** + * Removes all accented characters from a string. + * + * @method removeAccentedChars + * @param {String} string String to remove accents from + * @return {String} String without accented chars + * @public + * @static + */ + removeAccentedChars: function(string) + { + var newString = string; + var re = false; + for (var i = 0; i < InkUtilString._accentedChars.length; i++) { + re = new RegExp(InkUtilString._accentedChars[i], "gm"); + newString = newString.replace(re, '' + InkUtilString._accentedRemovedChars[i] + ''); + } + return newString; + }, + + /** + * Count the number of occurrences of a specific needle in a haystack + * + * @method substrCount + * @param {String} haystack String to search in + * @param {String} needle String to search for + * @return {Number} Number of occurrences + * @public + * @static + */ + substrCount: function(haystack,needle) + { + return haystack ? haystack.split(needle).length - 1 : 0; + }, + + /** + * Eval a JSON string to a JS object + * + * @method evalJSON + * @param {String} strJSON JSON string to eval + * @param {Boolean} sanitize Flag to sanitize input + * @return {Object} JS Object + * @public + * @static + */ + evalJSON: function(strJSON, sanitize) { + /* jshint evil:true */ + if( (typeof sanitize === 'undefined' || sanitize === null) || InkUtilString.isJSON(strJSON)) { + try { + if(typeof(JSON) !== "undefined" && typeof(JSON.parse) !== 'undefined'){ + return JSON.parse(strJSON); + } + return eval('('+strJSON+')'); + } catch(e) { + throw new Error('ERROR: Bad JSON string...'); + } + } + }, + + /** + * Checks if a string is a valid JSON object (string encoded) + * + * @method isJSON + * @param {String} str String to check + * @return {Boolean} + * @public + * @static + */ + isJSON: function(str) + { + str = str.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); + return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); + }, + + /** + * Escapes unsafe html chars as HTML entities + * + * @method htmlEscapeUnsafe + * @param {String} str String to escape + * @return {String} Escaped string + * @public + * @static + */ + htmlEscapeUnsafe: function(str){ + var chars = InkUtilString._htmlUnsafeChars; + return str !== null ? String(str).replace(/[<>&'"]/g,function(c){return chars[c];}) : str; + }, + + /** + * Normalizes whitespace in string. + * String is trimmed and sequences of whitespaces are collapsed. + * + * @method normalizeWhitespace + * @param {String} str String to normalize + * @return {String} Normalized string + * @public + * @static + */ + normalizeWhitespace: function(str){ + return str !== null ? InkUtilString.trim(String(str).replace(/\s+/g,' ')) : str; + }, + + /** + * Converts string to unicode. + * + * @method toUnicode + * @param {String} str String to convert + * @return {String} Unicoded String + * @public + * @static + */ + toUnicode: function(str) { + if (typeof str === 'string') { + var unicodeString = ''; + var inInt = false; + var theUnicode = false; + var total = str.length; + var i=0; + + while(i < total) + { + inInt = str.charCodeAt(i); + if( (inInt >= 32 && inInt <= 126) || + inInt === 8 || + inInt === 9 || + inInt === 10 || + inInt === 12 || + inInt === 13 || + inInt === 32 || + inInt === 34 || + inInt === 47 || + inInt === 58 || + inInt === 92) { + + /* + if(inInt == 34 || inInt == 92 || inInt == 47) { + theUnicode = '\\'+str.charAt(i); + } else { + } + */ + if(inInt === 8) { + theUnicode = '\\b'; + } else if(inInt === 9) { + theUnicode = '\\t'; + } else if(inInt === 10) { + theUnicode = '\\n'; + } else if(inInt === 12) { + theUnicode = '\\f'; + } else if(inInt === 13) { + theUnicode = '\\r'; + } else { + theUnicode = str.charAt(i); + } + } else { + theUnicode = str.charCodeAt(i).toString(16)+''.toUpperCase(); + while (theUnicode.length < 4) { + theUnicode = '0' + theUnicode; + } + theUnicode = '\\u' + theUnicode; + } + unicodeString += theUnicode; + + i++; + } + return unicodeString; + } + }, + + /** + * Escapes a unicode character. + * + * @method escape + * @param {String} c Character to escape + * @return {String} Escaped character. Returns \xXX if hex smaller than 0x100, otherwise \uXXXX + * @public + * @static + */ + + /** + * @param {String} c char + */ + escape: function(c) { + var hex = (c).charCodeAt(0).toString(16).split(''); + if (hex.length < 3) { + while (hex.length < 2) { hex.unshift('0'); } + hex.unshift('x'); + } + else { + while (hex.length < 4) { hex.unshift('0'); } + hex.unshift('u'); + } + + hex.unshift('\\'); + return hex.join(''); + }, + + /** + * Unescapes a unicode character escape sequence + * + * @method unescape + * @param {String} es Escape sequence + * @return {String} String un-unicoded + * @public + * @static + */ + unescape: function(es) { + var idx = es.lastIndexOf('0'); + idx = idx === -1 ? 2 : Math.min(idx, 2); + //console.log(idx); + var hexNum = es.substring(idx); + //console.log(hexNum); + var num = parseInt(hexNum, 16); + return String.fromCharCode(num); + }, + + /** + * Escapes a string to unicode characters + * + * @method escapeText + * @param {String} txt + * @param {Array} [whiteList] Whitelist of characters + * @return {String} String escaped to Unicode + * @public + * @static + */ + escapeText: function(txt, whiteList) { + if (whiteList === undefined) { + whiteList = ['[', ']', '\'', ',']; + } + var txt2 = []; + var c, C; + for (var i = 0, f = txt.length; i < f; ++i) { + c = txt[i]; + C = c.charCodeAt(0); + if (C < 32 || C > 126 && whiteList.indexOf(c) === -1) { + c = InkUtilString.escape(c); + } + txt2.push(c); + } + return txt2.join(''); + }, + + /** + * Regex to check escaped strings + * + * @property escapedCharRegex + * @type {Regex} + * @public + * @readOnly + * @static + */ + escapedCharRegex: /(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4})/g, + + /** + * Unescapes a string + * + * @method unescapeText + * @param {String} txt + * @return {String} Unescaped string + * @public + * @static + */ + unescapeText: function(txt) { + /*jshint boss:true */ + var m; + while (m = InkUtilString.escapedCharRegex.exec(txt)) { + m = m[0]; + txt = txt.replace(m, InkUtilString.unescape(m)); + InkUtilString.escapedCharRegex.lastIndex = 0; + } + return txt; + }, + + /** + * Compares two strings. + * + * @method strcmp + * @param {String} str1 First String + * @param {String} str2 Second String + * @return {Number} + * @public + * @static + */ + strcmp: function(str1, str2) { + return ((str1 === str2) ? 0 : ((str1 > str2) ? 1 : -1)); + }, + + /** + * Splits a string into smaller chunks + * + * @method packetize + * @param {String} str String to divide + * @param {Number} maxLen Maximum chunk size (in characters) + * @return {Array} Chunks of the original string + * @public + * @static + */ + packetize: function(str, maxLen) { + var len = str.length; + var parts = new Array( Math.ceil(len / maxLen) ); + var chars = str.split(''); + var sz, i = 0; + while (len) { + sz = Math.min(maxLen, len); + parts[i++] = chars.splice(0, sz).join(''); + len -= sz; + } + return parts; + } + }; + + return InkUtilString; + +}); + +/** + * @module Ink.Util.Url_1 + * URL Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.Url', '1', [], function() { + + 'use strict'; + + var Url = { + + /** + * Auxiliary string for encoding + * + * @property _keyStr + * @type {String} + * @readOnly + * @private + */ + _keyStr : 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + + + /** + * Gets URL of current page + * + * @method getUrl + * @return Current URL + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * console.log( InkUrl.getUrl() ); // Will return it's window URL + * }); + */ + getUrl: function() + { + return window.location.href; + }, + + /** + * Generates an URL string. + * + * @method genQueryString + * @param {String} uri Base URL + * @param {Object} params Object to transform to query string + * @return {String} URI with query string set + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * var queryString = InkUrl.genQueryString( 'http://www.sapo.pt/', { + * 'param1': 'valueParam1', + * 'param2': 'valueParam2' + * }); + * + * console.log( queryString ); // Result: http://www.sapo.pt/?param1=valueParam1¶m2=valueParam2 + * }); + */ + genQueryString: function(uri, params) { + var hasQuestionMark = uri.indexOf('?') !== -1; + var sep, pKey, pValue, parts = [uri]; + + for (pKey in params) { + if (params.hasOwnProperty(pKey)) { + if (!hasQuestionMark) { + sep = '?'; + hasQuestionMark = true; + } else { + sep = '&'; + } + pValue = params[pKey]; + if (typeof pValue !== 'number' && !pValue) { + pValue = ''; + } + parts = parts.concat([sep, encodeURIComponent(pKey), '=', encodeURIComponent(pValue)]); + } + } + + return parts.join(''); + }, + + /** + * Gets an object from an URL encoded string. + * + * @method getQueryString + * @param {String} [str] URL String. When not specified it uses the current URL. + * @return {Object} Key-Value pair object + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * var queryStringParams = InkUrl.getQueryString( 'http://www.sapo.pt/?var1=valueVar1&var2=valueVar2' ); + * console.log( queryStringParams ); + * // Result: + * // { + * // var1: 'valueVar1', + * // var2: 'valueVar2' + * // } + * }); + */ + getQueryString: function(str) + { + var url; + if(str && typeof(str) !== 'undefined') { + url = str; + } else { + url = this.getUrl(); + } + var aParams = {}; + if(url.match(/\?(.+)/i)) { + var queryStr = url.replace(/^(.*)\?([^\#]+)(\#(.*))?/g, "$2"); + if(queryStr.length > 0) { + var aQueryStr = queryStr.split(/[;&]/); + for(var i=0; i < aQueryStr.length; i++) { + var pairVar = aQueryStr[i].split('='); + aParams[decodeURIComponent(pairVar[0])] = (typeof(pairVar[1]) !== 'undefined' && pairVar[1]) ? decodeURIComponent(pairVar[1]) : false; + } + } + } + return aParams; + }, + + /** + * Gets the URL hash value + * + * @method getAnchor + * @param {String} [str] URL String. Defaults to current page URL. + * @return {String|Boolean} Hash in the URL. If there's no hash, returns false. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * var anchor = InkUrl.getAnchor( 'http://www.sapo.pt/page.php#TEST' ); + * console.log( anchor ); // Result: TEST + * }); + */ + getAnchor: function(str) + { + var url; + if(str && typeof(str) !== 'undefined') { + url = str; + } else { + url = this.getUrl(); + } + var anchor = false; + if(url.match(/#(.+)/)) { + anchor = url.replace(/([^#]+)#(.*)/, "$2"); + } + return anchor; + }, + + /** + * Gets the anchor string of an URL + * + * @method getAnchorString + * @param {String} [string] URL to parse. Defaults to current URL. + * @return {Object} Key-value pair object of the URL's hashtag 'variables' + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * var hashParams = InkUrl.getAnchorString( 'http://www.sapo.pt/#var1=valueVar1&var2=valueVar2' ); + * console.log( hashParams ); + * // Result: + * // { + * // var1: 'valueVar1', + * // var2: 'valueVar2' + * // } + * }); + */ + getAnchorString: function(string) + { + var url; + if(string && typeof(string) !== 'undefined') { + url = string; + } else { + url = this.getUrl(); + } + var aParams = {}; + if(url.match(/#(.+)/i)) { + var anchorStr = url.replace(/^([^#]+)#(.*)?/g, "$2"); + if(anchorStr.length > 0) { + var aAnchorStr = anchorStr.split(/[;&]/); + for(var i=0; i < aAnchorStr.length; i++) { + var pairVar = aAnchorStr[i].split('='); + aParams[decodeURIComponent(pairVar[0])] = (typeof(pairVar[1]) !== 'undefined' && pairVar[1]) ? decodeURIComponent(pairVar[1]) : false; + } + } + } + return aParams; + }, + + + /** + * Parses URL string into URL parts + * + * @method parseUrl + * @param {String} url URL to be parsed + * @return {Object} Parsed URL as a key-value object. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * var parsedURL = InkUrl.parseUrl( 'http://www.sapo.pt/index.html?var1=value1#anchor' ) + * console.log( parsedURL ); + * // Result: + * // { + * // 'scheme' => 'http', + * // 'host' => 'www.sapo.pt', + * // 'path' => '/index.html', + * // 'query' => 'var1=value1', + * // 'fragment' => 'anchor' + * // } + * }); + * + */ + parseUrl: function(url) { + var aURL = {}; + if(url && typeof url === 'string') { + if(url.match(/^([^:]+):\/\//i)) { + var re = /^([^:]+):\/\/([^\/]*)\/?([^\?#]*)\??([^#]*)#?(.*)/i; + if(url.match(re)) { + aURL.scheme = url.replace(re, "$1"); + aURL.host = url.replace(re, "$2"); + aURL.path = '/'+url.replace(re, "$3"); + aURL.query = url.replace(re, "$4") || false; + aURL.fragment = url.replace(re, "$5") || false; + } + } else { + var re1 = new RegExp("^([^\\?]+)\\?([^#]+)#(.*)", "i"); + var re2 = new RegExp("^([^\\?]+)\\?([^#]+)#?", "i"); + var re3 = new RegExp("^([^\\?]+)\\??", "i"); + if(url.match(re1)) { + aURL.scheme = false; + aURL.host = false; + aURL.path = url.replace(re1, "$1"); + aURL.query = url.replace(re1, "$2"); + aURL.fragment = url.replace(re1, "$3"); + } else if(url.match(re2)) { + aURL.scheme = false; + aURL.host = false; + aURL.path = url.replace(re2, "$1"); + aURL.query = url.replace(re2, "$2"); + aURL.fragment = false; + } else if(url.match(re3)) { + aURL.scheme = false; + aURL.host = false; + aURL.path = url.replace(re3, "$1"); + aURL.query = false; + aURL.fragment = false; + } + } + if(aURL.host) { + var regPort = /^(.*?)\\:(\\d+)$/i; + // check for port + if(aURL.host.match(regPort)) { + var tmpHost1 = aURL.host; + aURL.host = tmpHost1.replace(regPort, "$1"); + aURL.port = tmpHost1.replace(regPort, "$2"); + } else { + aURL.port = false; + } + // check for user and pass + if(aURL.host.match(/@/i)) { + var tmpHost2 = aURL.host; + aURL.host = tmpHost2.split('@')[1]; + var tmpUserPass = tmpHost2.split('@')[0]; + if(tmpUserPass.match(/\:/)) { + aURL.user = tmpUserPass.split(':')[0]; + aURL.pass = tmpUserPass.split(':')[1]; + } else { + aURL.user = tmpUserPass; + aURL.pass = false; + } + } + } + } + return aURL; + }, + + /** + * Formats an URL object into an URL string. + * + * @method format + * @param urlObj Window.location, a.href, or parseUrl object to format + * @return {String} Full URL. + */ + format: function (urlObj) { + var protocol = ''; + var host = ''; + var path = ''; + var frag = ''; + var query = ''; + + if (typeof urlObj.protocol === 'string') { + protocol = urlObj.protocol + '//'; // here it comes with the colon + } else if (typeof urlObj.scheme === 'string') { + protocol = urlObj.scheme + '://'; + } + + host = urlObj.host || urlObj.hostname || ''; + path = urlObj.path || ''; + + if (typeof urlObj.query === 'string') { + query = urlObj.query; + } else if (typeof urlObj.search === 'string') { + query = urlObj.search.replace(/^\?/, ''); + } + if (typeof urlObj.fragment === 'string') { + frag = urlObj.fragment; + } else if (typeof urlObj.hash === 'string') { + frag = urlObj.hash.replace(/#$/, ''); + } + + return [ + protocol, + host, + path, + query && '?' + query, + frag && '#' + frag + ].join(''); + }, + + /** + * Gets the last loaded script element + * + * @method currentScriptElement + * @param {String} [match] String to match against the script src attribute + * @return {DOMElement|Boolean} Returns the + * + * @sample Ink_UI_Close_1.html + */ + var Close = function() { + InkEvent.observe(document.body, 'click', function(ev) { + var el = InkEvent.element(ev); + + el = InkElement.findUpwardsByClass(el, 'ink-close') || + InkElement.findUpwardsByClass(el, 'ink-dismiss'); + + if (!el) { + return; // ink-close or ink-dismiss class not found + } + + var toRemove = el; + toRemove = InkElement.findUpwardsByClass(el, 'ink-alert') || + InkElement.findUpwardsByClass(el, 'ink-alert-block'); + + if (toRemove) { + InkEvent.stop(ev); + InkElement.remove(toRemove); + } + }); + }; + + return Close; + +}); + +/** + * @module Ink.UI.Common_1 + * Auxiliar utilities for UI Modules + * @version 1 + */ + +Ink.createModule('Ink.UI.Common', '1', ['Ink.Dom.Element_1', 'Ink.Net.Ajax_1','Ink.Dom.Css_1','Ink.Dom.Selector_1','Ink.Util.Url_1'], function(InkElement, Ajax,Css,Selector,Url) { + + 'use strict'; + + var instances = {}; + var lastIdNum = 0; + var nothing = {} /* a marker, for reference comparison. */; + + var keys = Object.keys || function (obj) { + var ret = []; + for (var k in obj) if (obj.hasOwnProperty(k)) { + ret.push(k); + } + return ret; + }; + + var Common = { + + /** + * Supported Ink Layouts + * + * @property Layouts + * @type Object + * @readOnly + */ + Layouts: { + TINY: 'tiny', + SMALL: 'small', + MEDIUM: 'medium', + LARGE: 'large', + XLARGE: 'xlarge' + }, + + /** + * Checks if an item is a valid DOM Element. + * + * @method isDOMElement + * @static + * @param {Mixed} o The object to be checked. + * @return {Boolean} True if it's a valid DOM Element. + * @example + * var el = Ink.s('#element'); + * if( Ink.UI.Common.isDOMElement( el ) === true ){ + * // It is a DOM Element. + * } else { + * // It is NOT a DOM Element. + * } + */ + isDOMElement: function(o) { + return o && typeof o === 'object' && 'nodeType' in o && o.nodeType === 1; + }, + + /** + * Checks if an item is a valid integer. + * + * @method isInteger + * @static + * @param {Mixed} n The value to be checked. + * @return {Boolean} True if it's a valid integer. + * @example + * var value = 1; + * if( Ink.UI.Common.isInteger( value ) === true ){ + * // It is an integer. + * } else { + * // It is NOT an integer. + * } + */ + isInteger: function(n) { + return (typeof n === 'number' && n % 1 === 0); + }, + + /** + * Gets a DOM Element. + * + * @method elOrSelector + * @static + * @param {DOMElement|String} elOrSelector DOM Element or CSS Selector + * @param {String} fieldName The name of the field. Commonly used for debugging. + * @return {DOMElement} Returns the DOMElement passed or the first result of the CSS Selector. Otherwise it throws an exception. + * @example + * // In case there are several .myInput, it will retrieve the first found + * var el = Ink.UI.Common.elOrSelector('.myInput','My Input'); + */ + elOrSelector: function(elOrSelector, fieldName) { + if (!this.isDOMElement(elOrSelector)) { + var t = Selector.select(elOrSelector); + if (t.length === 0) { + Ink.warn(fieldName + ' must either be a DOM Element or a selector expression!\nThe script element must also be after the DOM Element itself.'); + return null; + } + return t[0]; + } + return elOrSelector; + }, + + /** + * Alias for `elOrSelector` but returns an array of elements. + * + * @method elsOrSelector + * + * @static + * @param {DOMElement|String} elOrSelector DOM Element or CSS Selector + * @param {String} fieldName The name of the field. Commonly used for debugging. + * @return {DOMElement} Returns the DOMElement passed or the first result of the CSS Selector. Otherwise it throws an exception. + * @param {Boolean} required Flag to accept an empty array as output. + * @return {Array} The selected DOM Elements. + * @example + * var elements = Ink.UI.Common.elsOrSelector('input.my-inputs', 'My Input'); + */ + elsOrSelector: function(elsOrSelector, fieldName, required) { + var ret; + if (typeof elsOrSelector === 'string') { + ret = Selector.select(elsOrSelector); + } else if (Common.isDOMElement(elsOrSelector)) { + ret = [elsOrSelector]; + } else if (elsOrSelector && typeof elsOrSelector === 'object' && typeof elsOrSelector.length === 'number') { + ret = elsOrSelector; + } + + if (ret && ret.length) { + return ret; + } else { + if (required || arguments.length === 2) { + throw new TypeError(fieldName + ' must either be a DOM Element, an Array of elements, or a selector expression!\nThe script element must also be after the DOM Element itself.'); + } else { + return []; + } + } + }, + + /** + * Gets options an object and element's metadata. + * + * The element's data attributes take precedence. Values from the element's data-atrributes are coerced into the required type. + * + * @method options + * + * @param {Object} [fieldId] Name to be used in debugging features. + * @param {Object} defaults Object with the options' types and defaults. + * @param {Object} overrides Options to override the defaults. Usually passed when instantiating an UI module. + * @param {DOMElement} [element] Element with data-attributes + * + * @example + * + * this._options = Ink.UI.Common.options('MyComponent', { + * 'anobject': ['Object', null], // Defaults to null + * 'target': ['Element', null], + * 'stuff': ['Number', 0.1], + * 'stuff2': ['Integer', 0], + * 'doKickFlip': ['Boolean', false], + * 'targets': ['Elements'], // Required option since no default was given + * 'onClick': ['Function', null] + * }, options || {}, elm) + * + * @example + * + * ### Note about booleans + * + * Here is how options are read from the markup + * data-attributes, for several values`data-a-boolean`. + * + * Options considered true: + * + * - `data-a-boolean="true"` + * - (Every other value which is not on the list below.) + * + * Options considered false: + * + * - `data-a-boolean="false"` + * - `data-a-boolean=""` + * - `data-a-boolean` + * + * Options which go to default: + * + * - (no attribute). When `data-a-boolean` is ommitted, the + * option is not considered true nor false, and as such + * defaults to what is in the `defaults` argument. + * + **/ + options: function (fieldId, defaults, overrides, element) { + if (typeof fieldId !== 'string') { + element = overrides; + overrides = defaults; + defaults = fieldId; + fieldId = ''; + } + overrides = overrides || {}; + var out = {}; + var dataAttrs = element ? InkElement.data(element) : {}; + var fromDataAttrs; + var type; + var lType; + var defaultVal; + + var invalidStr = function (str) { + if (fieldId) { str = fieldId + ': "' + ('' + str).replace(/"/, '\\"') + '"'; } + return str; + }; + + var quote = function (str) { + return '"' + ('' + str).replace(/"/, '\\"') + '"'; + }; + + var invalidThrow = function (str) { + throw new Error(invalidStr(str)); + }; + + var invalid = function (str) { + Ink.error(invalidStr(str) + '. Ignoring option.'); + }; + + function optionValue(key) { + type = defaults[key][0]; + lType = type.toLowerCase(); + defaultVal = defaults[key].length === 2 ? defaults[key][1] : nothing; + + if (!type) { + invalidThrow('Ink.UI.Common.options: Always specify a type!'); + } + if (!(lType in Common._coerce_funcs)) { + invalidThrow('Ink.UI.Common.options: ' + defaults[key][0] + ' is not a valid type. Use one of ' + keys(Common._coerce_funcs).join(', ')); + + } + if (!defaults[key].length || defaults[key].length > 2) { + invalidThrow('the "defaults" argument must be an object mapping option names to [typestring, optional] arrays.'); + } + + if (key in dataAttrs) { + fromDataAttrs = Common._coerce_from_string(lType, dataAttrs[key], key, fieldId); + // (above can return `nothing`) + } else { + fromDataAttrs = nothing; + } + + if (fromDataAttrs !== nothing) { + if (!Common._options_validate(fromDataAttrs, lType)) { + invalid('(' + key + ' option) Invalid ' + lType + ' ' + quote(fromDataAttrs)); + return defaultVal; + } else { + return fromDataAttrs; + } + } else if (key in overrides) { + return overrides[key]; + } else if (defaultVal !== nothing) { + return defaultVal; + } else { + invalidThrow('Option ' + key + ' is required!'); + } + } + + for (var key in defaults) { + if (defaults.hasOwnProperty(key)) { + out[key] = optionValue(key); + } + } + + return out; + }, + + _coerce_from_string: function (type, val, paramName, fieldId) { + if (type in Common._coerce_funcs) { + return Common._coerce_funcs[type](val, paramName, fieldId); + } else { + return val; + } + }, + + _options_validate: function (val, type) { + if (type in Common._options_validate_types) { + return Common._options_validate_types[type].call(Common, val); + } else { + // 'object' options cannot be passed through data-attributes. + // Json you say? Not any good to embed in HTML. + return false; + } + }, + + _coerce_funcs: (function () { + var ret = { + element: function (val) { + return Common.elOrSelector(val, ''); + }, + elements: function (val) { + return Common.elsOrSelector(val, '', false /*not required, so don't throw an exception now*/); + }, + object: function (val) { return val; }, + number: function (val) { return parseFloat(val); }, + 'boolean': function (val) { + return !(val === 'false' || val === '' || val === null); + }, + string: function (val) { return val; }, + 'function': function (val, paramName, fieldId) { + Ink.error(fieldId + ': You cannot specify the option "' + paramName + '" through data-attributes because it\'s a function'); + return nothing; + } + }; + ret['float'] = ret.integer = ret.number; + return ret; + }()), + + _options_validate_types: (function () { + var types = { + string: function (val) { + return typeof val === 'string'; + }, + number: function (val) { + return typeof val === 'number' && !isNaN(val) && isFinite(val); + }, + integer: function (val) { + return val === Math.round(val); + }, + element: function (val) { + return Common.isDOMElement(val); + }, + elements: function (val) { + return val && typeof val === 'object' && typeof val.length === 'number' && val.length; + }, + 'boolean': function (val) { + return typeof val === 'boolean'; + } + }; + types['float'] = types.number; + return types; + }()), + + /** + * Deep copy (clone) an object. + * Note: The object cannot have referece loops. + * + * @method clone + * @static + * @param {Object} o The object to be cloned/copied. + * @return {Object} Returns the result of the clone/copy. + * @example + * var originalObj = { + * key1: 'value1', + * key2: 'value2', + * key3: 'value3' + * }; + * var cloneObj = Ink.UI.Common.clone( originalObj ); + */ + clone: function(o) { + try { + return JSON.parse( JSON.stringify(o) ); + } catch (ex) { + throw new Error('Given object cannot have loops!'); + } + }, + + + /** + * Gets an element's one-base index relative to its parent. + * + * @method childIndex + * @static + * @param {DOMElement} childEl Valid DOM Element. + * @return {Number} Numerical position of an element relatively to its parent. + * @example + * + *
    + *
  • One
  • + *
  • Two
  • + *
  • Three
  • + *
  • Four
  • + *
+ * + * + */ + childIndex: function(childEl) { + if( Common.isDOMElement(childEl) ){ + var els = Selector.select('> *', childEl.parentNode); + for (var i = 0, f = els.length; i < f; ++i) { + if (els[i] === childEl) { + return i; + } + } + } + throw 'not found!'; + }, + + + /** + * AJAX JSON request shortcut method + * It provides a more convenient way to do an AJAX request and expect a JSON response. + * It offers a callback option, as third parameter, for better async handling. + * + * @method ajaxJSON + * @static + * @async + * @param {String} endpoint Valid URL to be used as target by the request. + * @param {Object} params This field is used in the thrown Exception to identify the parameter. + * @param {Function} cb Callback for the request. + * @example + * // In case there are several .myInput, it will retrieve the first found + * var el = Ink.UI.Common.elOrSelector('.myInput','My Input'); + */ + ajaxJSON: function(endpoint, params, cb) { + new Ajax( + endpoint, + { + evalJS: 'force', + method: 'POST', + parameters: params, + + onSuccess: function( r) { + try { + r = r.responseJSON; + if (r.status !== 'ok') { + throw 'server error: ' + r.message; + } + cb(null, r); + } catch (ex) { + cb(ex); + } + }, + + onFailure: function() { + cb('communication failure'); + } + } + ); + }, + + + /** + * Gets the current Ink layout. + * + * @method currentLayout + * @static + * @return {String} A string representation of the current layout name. + * @example + * var inkLayout = Ink.UI.Common.currentLayout(); + * if (inkLayout === 'small') { + * // ... + * } + */ + currentLayout: function() { + var i, f, k, v, el, detectorEl = Selector.select('#ink-layout-detector')[0]; + if (!detectorEl) { + detectorEl = document.createElement('div'); + detectorEl.id = 'ink-layout-detector'; + for (k in this.Layouts) { + if (this.Layouts.hasOwnProperty(k)) { + v = this.Layouts[k]; + el = document.createElement('div'); + el.className = 'show-' + v + ' hide-all'; + el.setAttribute('data-ink-layout', v); + detectorEl.appendChild(el); + } + } + document.body.appendChild(detectorEl); + } + + var result = ''; + var resultCount = 0; + for (i = 0, f = detectorEl.childNodes.length; i < f; ++i) { + el = detectorEl.childNodes[i]; + if (Css.getStyle(el, 'display') === 'block') { + result = el.getAttribute('data-ink-layout'); + resultCount += 1; + } + } + + if (resultCount === 1) { + return result; + } else { + return 'large'; + } + }, + + + /** + * Sets the location's hash (window.location.hash). + * + * @method hashSet + * @static + * @param {Object} o Object with the info to be placed in the location's hash. + * @example + * // It will set the location's hash like: #key1=value1&key2=value2&key3=value3 + * Ink.UI.Common.hashSet({ + * key1: 'value1', + * key2: 'value2', + * key3: 'value3' + * }); + */ + hashSet: function(o) { + if (typeof o !== 'object') { throw new TypeError('o should be an object!'); } + var hashParams = Url.getAnchorString(); + hashParams = Ink.extendObj(hashParams, o); + window.location.hash = Url.genQueryString('', hashParams).substring(1); + }, + + /** + * Removes children nodes from a given object. + * This method was initially created to help solve a problem in Internet Explorer(s) that occurred when trying to set the innerHTML of some specific elements like 'table'. + * + * @method cleanChildren + * @static + * @param {DOMElement} parentEl Valid DOM Element + * @example + * + *
    + *
  • One
  • + *
  • Two
  • + *
  • Three
  • + *
  • Four
  • + *
+ * + * + * + * + *
    + */ + cleanChildren: function(parentEl) { + if( !Common.isDOMElement(parentEl) ){ + throw 'Please provide a valid DOMElement'; + } + var prevEl, el = parentEl.lastChild; + while (el) { + prevEl = el.previousSibling; + parentEl.removeChild(el); + el = prevEl; + } + }, + + /** + * Stores the id and/or classes of an element in an object. + * + * @method storeIdAndClasses + * @static + * @param {DOMElement} fromEl Valid DOM Element to get the id and classes from. + * @param {Object} inObj Object where the id and classes will be saved. + * @example + *
    + * + * + */ + storeIdAndClasses: function(fromEl, inObj) { + if( !Common.isDOMElement(fromEl) ){ + throw 'Please provide a valid DOMElement as first parameter'; + } + + var id = fromEl.id; + if (id) { + inObj._id = id; + } + + var classes = fromEl.className; + if (classes) { + inObj._classes = classes; + } + }, + + /** + * Sets the id and className properties of an element based + * + * @method restoreIdAndClasses + * @static + * @param {DOMElement} toEl Valid DOM Element to set the id and classes on. + * @param {Object} inObj Object where the id and classes to be set are. This method uses the same format as the one given in `storeIdAndClasses` + * @example + *
    + * + * + * + * + *
    + */ + restoreIdAndClasses: function(toEl, inObj) { + + if( !Common.isDOMElement(toEl) ){ + throw 'Please provide a valid DOMElement as first parameter'; + } + + if (inObj._id && toEl.id !== inObj._id) { + toEl.id = inObj._id; + } + + if (inObj._classes && toEl.className.indexOf(inObj._classes) === -1) { + if (toEl.className) { toEl.className += ' ' + inObj._classes; } + else { toEl.className = inObj._classes; } + } + + if (inObj._instanceId && !toEl.getAttribute('data-instance')) { + toEl.setAttribute('data-instance', inObj._instanceId); + } + }, + + /** + * Saves a component's instance reference for later retrieval. + * + * @method registerInstance + * @static + * @param {Object} inst Object that holds the instance. + * @param {DOMElement} el DOM Element to associate with the object. + * @param {Object} [optionalPrefix] Defaults to 'instance' + */ + registerInstance: function(inst, el, optionalPrefix) { + if (inst._instanceId) { return; } + + if (typeof inst !== 'object') { throw new TypeError('1st argument must be a JavaScript object!'); } + + if (inst._options && inst._options.skipRegister) { return; } + + if (!this.isDOMElement(el)) { throw new TypeError('2nd argument must be a DOM element!'); } + if (optionalPrefix !== undefined && typeof optionalPrefix !== 'string') { throw new TypeError('3rd argument must be a string!'); } + var id = (optionalPrefix || 'instance') + (++lastIdNum); + instances[id] = inst; + inst._instanceId = id; + var dataInst = el.getAttribute('data-instance'); + dataInst = (dataInst !== null) ? [dataInst, id].join(' ') : id; + el.setAttribute('data-instance', dataInst); + }, + + /** + * Deletes an instance with a given id. + * + * @method unregisterInstance + * @static + * @param {String} id Id of the instance to be destroyed. + */ + unregisterInstance: function(id) { + delete instances[id]; + }, + + /** + * Gets an UI instance from an element or instance id. + * + * @method getInstance + * @static + * @param {String|DOMElement} instanceIdOrElement Instance's id or DOM Element from which we want the instances. + * @return {Object|Array} Returns an instance or a collection of instances. + */ + getInstance: function(instanceIdOrElement) { + var ids; + if (this.isDOMElement(instanceIdOrElement)) { + ids = instanceIdOrElement.getAttribute('data-instance'); + if (ids === null) { throw new Error('argument is not a DOM instance element!'); } + } + else { + ids = instanceIdOrElement; + } + + ids = ids.split(' '); + var inst, id, i, l = ids.length; + + var res = []; + for (i = 0; i < l; ++i) { + id = ids[i]; + if (!id) { throw new Error('Element is not a JS instance!'); } + inst = instances[id]; + if (!inst) { throw new Error('Instance "' + id + '" not found!'); } + res.push(inst); + } + + return (l === 1) ? res[0] : res; + }, + + /** + * Gets an instance based on a selector. + * + * @method getInstanceFromSelector + * @static + * @param {String} selector CSS selector to get the instances from. + * @return {Object|Array} Returns an instance or a collection of instances. + */ + getInstanceFromSelector: function(selector) { + var el = Selector.select(selector)[0]; + if (!el) { throw new Error('Element not found!'); } + return this.getInstance(el); + }, + + /** + * Gets all the instance ids + * + * @method getInstanceIds + * @static + * @return {Array} Collection of instance ids + */ + getInstanceIds: function() { + var res = []; + for (var id in instances) { + if (instances.hasOwnProperty(id)) { + res.push( id ); + } + } + return res; + }, + + /** + * Gets all the instances + * + * @method getInstances + * @static + * @return {Array} Collection of existing instances. + */ + getInstances: function() { + var res = []; + for (var id in instances) { + if (instances.hasOwnProperty(id)) { + res.push( instances[id] ); + } + } + return res; + }, + + /** + * Boilerplate method to destroy a component. + * Components should copy this method as its destroy method and modify it. + * + * @method destroyComponent + * @static + */ + destroyComponent: function() { + Common.unregisterInstance(this._instanceId); + this._element.parentNode.removeChild(this._element); + } + + }; + + return Common; + +}); +/** + * @module Ink.UI.DatePicker_1 + * @version 1 + * Date selector + */ + +Ink.createModule('Ink.UI.DatePicker', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1','Ink.Util.Date_1', 'Ink.Dom.Browser_1'], function(Common, Event, Css, InkElement, Selector, InkArray, InkDate ) { + 'use strict'; + + // Repeat a string. Long version of (new Array(n)).join(str); + function strRepeat(n, str) { + var ret = ''; + for (var i = 0; i < n; i++) { + ret += str; + } + return ret; + } + + // Clamp a number into a min/max limit + function clamp(n, min, max) { + if (n > max) { n = max; } + if (n < min) { n = min; } + + return n; + } + + function dateishFromYMDString(YMD) { + var split = YMD.split('-'); + return dateishFromYMD(+split[0], +split[1] - 1, +split[2]); + } + + function dateishFromYMD(year, month, day) { + return {_year: year, _month: month, _day: day}; + } + + function dateishFromDate(date) { + return {_year: date.getFullYear(), _month: date.getMonth(), _day: date.getDate()}; + } + + /** + * @class Ink.UI.DatePicker + * @constructor + * @version 1 + * + * @param {String|DOMElement} selector + * @param {Object} [options] Options + * @param {Boolean} [options.autoOpen] Flag to automatically open the datepicker. + * @param {String} [options.cleanText] Text for the clean button. Defaults to 'Limpar'. + * @param {String} [options.closeText] Text for the close button. Defaults to 'Fechar'. + * @param {String} [options.cssClass] CSS class to be applied on the datepicker + * @param {String} [options.dateRange] Enforce limits to year, month and day for the Date, ex: '1990-08-25:2020-11' + * @param {Boolean} [options.displayInSelect] Flag to display the component in a select element. + * @param {String|DOMElement} [options.dayField] (if using options.displayInSelect) `select` field with days. + * @param {String|DOMElement} [options.monthField] (if using options.displayInSelect) `select` field with months. + * @param {String|DOMElement} [options.yearField] (if using options.displayInSelect) `select` field with years. + * @param {String} [options.format] Date format string + * @param {String} [options.instance] Unique id for the datepicker + * @param {Object} [options.month] Hash of month names. Defaults to portuguese month names. January is 1. + * @param {String} [options.nextLinkText] Text for the previous button. Defaults to '«'. + * @param {String} [options.ofText] Text to show between month and year. Defaults to ' of '. + * @param {Boolean} [options.onFocus] If the datepicker should open when the target element is focused. Defaults to true. + * @param {Function} [options.onMonthSelected] Callback to execute when the month is selected. + * @param {Function} [options.onSetDate] Callback to execute when the date is set. + * @param {Function} [options.onYearSelected] Callback to execute when the year is selected. + * @param {String} [options.position] Position for the datepicker. Either 'right' or 'bottom'. Defaults to 'right'. + * @param {String} [options.prevLinkText] Text for the previous button. Defaults to '«'. + * @param {Boolean} [options.showClean] If the clean button should be visible. Defaults to true. + * @param {Boolean} [options.showClose] If the close button should be visible. Defaults to true. + * @param {Boolean} [options.shy] If the datepicker should start automatically. Defaults to true. + * @param {String} [options.startDate] Date to define initial month. Must be in yyyy-mm-dd format. + * @param {Number} [options.startWeekDay] First day of the week. Sunday is zero. Defaults to 1 (Monday). + * @param {Function} [options.validYearFn] Callback to execute when 'rendering' the month (in the month view) + * @param {Function} [options.validMonthFn] Callback to execute when 'rendering' the month (in the month view) + * @param {Function} [options.validDayFn] Callback to execute when 'rendering' the day (in the month view) + * @param {Function} [options.nextValidDateFn] Function to calculate the next valid date, given the current. Useful when there's invalid dates or time frames. + * @param {Function} [options.prevValidDateFn] Function to calculate the previous valid date, given the current. Useful when there's invalid dates or time frames. + * @param {Object} [options.wDay] Hash of weekdays. Defaults to portuguese names. Sunday is 0. + * @param {String} [options.yearRange] Enforce limits to year for the Date, ex: '1990:2020' (deprecated) + * + * @sample Ink_UI_DatePicker_1.html + */ + var DatePicker = function(selector, options) { + this._element = selector && + Common.elOrSelector(selector, '[Ink.UI.DatePicker_1]: selector argument'); + + this._options = Common.options('Ink.UI.DatePicker_1', { + autoOpen: ['Boolean', false], + cleanText: ['String', 'Clear'], + closeText: ['String', 'Close'], + containerElement:['Element', null], + cssClass: ['String', 'ink-calendar bottom'], + dateRange: ['String', null], + + // use this in a must be a direct child of .control, and if not, remove this block. + this._wrapper = this._element.parentNode; + this._wrapperIsControl = true; + } else { + this._wrapper = InkElement.create('div', { className: 'ink-datepicker-wrapper' }); + InkElement.wrap(this._element, this._wrapper); + } + InkElement.insertAfter(this._containerObject, this._element); + }, + + /** + * Render the topmost bar with the "close" and "clear" buttons. + */ + _renderSuperTopBar: function () { + if((!this._options.showClose) || (!this._options.showClean)){ return; } + + this._superTopBar = document.createElement("div"); + this._superTopBar.className = 'ink-calendar-top-options'; + if(this._options.showClean){ + this._superTopBar.appendChild(InkElement.create('a', { + className: 'clean', + setHTML: this._options.cleanText + })); + } + if(this._options.showClose){ + this._superTopBar.appendChild(InkElement.create('a', { + className: 'close', + setHTML: this._options.closeText + })); + } + this._containerObject.appendChild(this._superTopBar); + }, + + _listenToContainerObjectEvents: function () { + Event.observe(this._containerObject,'mouseover',Ink.bindEvent(function(e){ + Event.stop( e ); + this._hoverPicker = true; + },this)); + + Event.observe(this._containerObject,'mouseout',Ink.bindEvent(function(e){ + Event.stop( e ); + this._hoverPicker = false; + },this)); + + Event.observe(this._containerObject,'click',Ink.bindEvent(this._onClick, this)); + }, + + _onClick: function(e){ + var elem = Event.element(e); + + if (Css.hasClassName(elem, 'ink-calendar-off')) { + Event.stopDefault(e); + return null; + } + + Event.stop(e); + + // Relative changers + this._onRelativeChangerClick(elem); + + // Absolute changers + this._onAbsoluteChangerClick(elem); + + // Mode changers + if (Css.hasClassName(elem, 'ink-calendar-link-month')) { + this._showMonthSelector(); + } else if (Css.hasClassName(elem, 'ink-calendar-link-year')) { + this._showYearSelector(); + } else if(Css.hasClassName(elem, 'clean')){ + this._clean(); + } else if(Css.hasClassName(elem, 'close')){ + this._hide(false); + } + + this._updateDescription(); + }, + + /** + * Handles click events on a changer (« ») for next/prev year/month + * @method _onChangerClick + * @private + **/ + _onRelativeChangerClick: function (elem) { + var changeYear = { + change_year_next: 1, + change_year_prev: -1 + }; + var changeMonth = { + change_month_next: 1, + change_month_prev: -1 + }; + + if( elem.className in changeMonth ) { + this._updateCal(changeMonth[elem.className]); + } else if( elem.className in changeYear ) { + this._showYearSelector(changeYear[elem.className]); + } + }, + + /** + * Handles click events on an atom-changer (day button, month button, year button) + * + * @method _onAbsoluteChangerClick + * @private + */ + _onAbsoluteChangerClick: function (elem) { + var elemData = InkElement.data(elem); + + if( Number(elemData.calDay) ){ + this.setDate( [this._year, this._month + 1, elemData.calDay].join('-') ); + this._hide(); + } else if( Number(elemData.calMonth) ) { + this._month = Number(elemData.calMonth) - 1; + this._showDefaultView(); + this._updateCal(); + } else if( Number(elemData.calYear) ){ + this._changeYear(Number(elemData.calYear)); + } + }, + + _changeYear: function (year) { + year = +year; + if(year){ + this._year = year; + if( typeof this._options.onYearSelected === 'function' ){ + this._options.onYearSelected(this, { + 'year': this._year + }); + } + this._showMonthSelector(); + } + }, + + _clean: function () { + if(this._options.displayInSelect){ + this._options.yearField.selectedIndex = 0; + this._options.monthField.selectedIndex = 0; + this._options.dayField.selectedIndex = 0; + } else { + this._element.value = ''; + } + }, + + /** + * Hides the DatePicker. + * If the component is shy (options.shy), behaves differently. + * + * @method _hide + * @param {Boolean} [blur] If false, forces hiding even if the component is shy. + */ + _hide: function(blur) { + blur = blur === undefined ? true : blur; + if (blur === false || (blur && this._options.shy)) { + Css.addClassName(this._containerObject, 'hide-all'); + } + }, + + /** + * Sets the range of dates allowed to be selected in the Date Picker + * + * @method _setMinMax + * @param {String} dateRange Two dates separated by a ':'. Example: 2013-01-01:2013-12-12 + * @private + */ + _setMinMax: function( dateRange ) { + var self = this; + + var noMinLimit = { + _year: -Number.MAX_VALUE, + _month: 0, + _day: 1 + }; + + var noMaxLimit = { + _year: Number.MAX_VALUE, + _month: 11, + _day: 31 + }; + + function noLimits() { + self._min = noMinLimit; + self._max = noMaxLimit; + } + + if (!dateRange) { return noLimits(); } + + var dates = dateRange.split( ':' ); + var rDate = /^(\d{4})((\-)(\d{1,2})((\-)(\d{1,2}))?)?$/; + + InkArray.each([ + {name: '_min', date: dates[0], noLim: noMinLimit}, + {name: '_max', date: dates[1], noLim: noMaxLimit} + ], Ink.bind(function (data) { + + var lim = data.noLim; + + if ( data.date.toUpperCase() === 'NOW' ) { + var now = new Date(); + lim = dateishFromDate(now); + } else if (data.date.toUpperCase() === 'EVER') { + lim = data.noLim; + } else if ( rDate.test( data.date ) ) { + lim = dateishFromYMDString(data.date); + + lim._month = clamp(lim._month, 0, 11); + lim._day = clamp(lim._day, 1, this._daysInMonth( lim._year, lim._month + 1 )); + } + + this[data.name] = lim; + }, this)); + + // Should be equal, or min should be smaller + var valid = this._dateCmp(this._max, this._min) !== -1; + + if (!valid) { + noLimits(); + } + }, + + /** + * Checks if a date is between the valid range. + * Starts by checking if the date passed is valid. If not, will fallback to the 'today' date. + * Then checks if the all params are inside of the date range specified. If not, it will fallback to the nearest valid date (either Min or Max). + * + * @method _fitDateToRange + * @param {Number} year Year with 4 digits (yyyy) + * @param {Number} month Month + * @param {Number} day Day + * @return {Array} Array with the final processed date. + * @private + */ + _fitDateToRange: function( date ) { + if ( !this._isValidDate( date ) ) { + date = dateishFromDate(new Date()); + } + + if (this._dateCmp(date, this._min) === -1) { + return Ink.extendObj({}, this._min); + } else if (this._dateCmp(date, this._max) === 1) { + return Ink.extendObj({}, this._max); + } + + return Ink.extendObj({}, date); // date is okay already, just copy it. + }, + + /** + * Checks whether a date is within the valid date range + * @method _dateWithinRange + * @param year + * @param month + * @param day + * @return {Boolean} + * @private + */ + _dateWithinRange: function (date) { + if (!arguments.length) { + date = this; + } + + return (!this._dateAboveMax(date) && + (!this._dateBelowMin(date))); + }, + + _dateAboveMax: function (date) { + return this._dateCmp(date, this._max) === 1; + }, + + _dateBelowMin: function (date) { + return this._dateCmp(date, this._min) === -1; + }, + + _dateCmp: function (self, oth) { + return this._dateCmpUntil(self, oth, '_day'); + }, + + /** + * _dateCmp with varied precision. You can compare down to the day field, or, just to the month. + * // the following two dates are considered equal because we asked + * // _dateCmpUntil to just check up to the years. + * + * _dateCmpUntil({_year: 2000, _month: 10}, {_year: 2000, _month: 11}, '_year') === 0 + */ + _dateCmpUntil: function (self, oth, depth) { + var props = ['_year', '_month', '_day']; + var i = -1; + + do { + i++; + if (self[props[i]] > oth[props[i]]) { return 1; } + else if (self[props[i]] < oth[props[i]]) { return -1; } + } while (props[i] !== depth && + self[props[i + 1]] !== undefined && oth[props[i + 1]] !== undefined); + + return 0; + }, + + /** + * Sets the markup in the default view mode (showing the days). + * Also disables the previous and next buttons in case they don't meet the range requirements. + * + * @method _showDefaultView + * @private + */ + _showDefaultView: function(){ + this._yearSelector.style.display = 'none'; + this._monthSelector.style.display = 'none'; + this._monthPrev.childNodes[0].className = 'change_month_prev'; + this._monthNext.childNodes[0].className = 'change_month_next'; + + if ( !this._getPrevMonth() ) { + this._monthPrev.childNodes[0].className = 'action_inactive'; + } + + if ( !this._getNextMonth() ) { + this._monthNext.childNodes[0].className = 'action_inactive'; + } + + this._monthContainer.style.display = 'block'; + }, + + /** + * Updates the date shown on the datepicker + * + * @method _updateDate + * @private + */ + _updateDate: function(){ + var dataParsed; + if(!this._options.displayInSelect && this._element.value){ + dataParsed = this._parseDate(this._element.value); + } else if (this._options.displayInSelect) { + dataParsed = { + _year: this._options.yearField[this._options.yearField.selectedIndex].value, + _month: this._options.monthField[this._options.monthField.selectedIndex].value - 1, + _day: this._options.dayField[this._options.dayField.selectedIndex].value + }; + } + + if (dataParsed) { + dataParsed = this._fitDateToRange(dataParsed); + this._year = dataParsed._year; + this._month = dataParsed._month; + this._day = dataParsed._day; + } + this.setDate(); + this._updateDescription(); + this._renderMonth(); + }, + + /** + * Updates the date description shown at the top of the datepicker + * + * EG "12 de November" + * + * @method _updateDescription + * @private + */ + _updateDescription: function(){ + this._monthChanger.innerHTML = this._options.month[ this._month + 1 ]; + this._ofText.innerHTML = this._options.ofText; + this._yearChanger.innerHTML = this._year; + }, + + /** + * Renders the year selector view of the datepicker + * + * @method _showYearSelector + * @private + */ + _showYearSelector: function(inc){ + this._incrementViewingYear(inc); + + var firstYear = this._year - (this._year % 10); + var thisYear = firstYear - 1; + var str = "
    • "; + + if (thisYear > this._min._year) { + str += '
    • ' + this._options.prevLinkText + '
    • '; + } else { + str += '
    •  
    • '; + } + + for (var i=1; i < 11; i++){ + if (i % 4 === 0){ + str+='
      '; + } + + thisYear = firstYear + i - 1; + + str += this._getYearButtonHtml(thisYear); + } + + if( thisYear < this._max._year){ + str += '
    • ' + this._options.nextLinkText + '
    • '; + } else { + str += '
    •  
    • '; + } + + str += "
  • "; + + this._yearSelector.innerHTML = str; + this._monthPrev.childNodes[0].className = 'action_inactive'; + this._monthNext.childNodes[0].className = 'action_inactive'; + this._monthSelector.style.display = 'none'; + this._monthContainer.style.display = 'none'; + this._yearSelector.style.display = 'block'; + }, + + /** + * For the year selector. + * + * Update this._year, to find the next decade or use nextValidDateFn to find it. + */ + _incrementViewingYear: function (inc) { + if (!inc) { return; } + + var year = +this._year + inc*10; + year = year - year % 10; + if ( year > this._max._year || year + 9 < this._min._year){ + return; + } + this._year = +this._year + inc*10; + }, + + _getYearButtonHtml: function (thisYear) { + if ( this._acceptableYear({_year: thisYear}) ){ + var className = (thisYear === this._year) ? ' class="ink-calendar-on"' : ''; + return '
  • ' + thisYear +'
  • '; + } else { + return '
  • ' + thisYear +'
  • '; + + } + }, + + /** + * Show the month selector (happens when you click a year, or the "month" link. + * @method _showMonthSelector + * @private + */ + _showMonthSelector: function () { + this._yearSelector.style.display = 'none'; + this._monthContainer.style.display = 'none'; + this._monthPrev.childNodes[0].className = 'action_inactive'; + this._monthNext.childNodes[0].className = 'action_inactive'; + this._addMonthClassNames(); + this._monthSelector.style.display = 'block'; + }, + + /** + * This function returns the given date in the dateish format + * + * @method _parseDate + * @param {String} dateStr A date on a string. + * @private + */ + _parseDate: function(dateStr){ + var date = InkDate.set( this._options.format , dateStr ); + if (date) { + return dateishFromDate(date); + } + return null; + }, + + /** + * Checks if a date is valid + * + * @method _isValidDate + * @param {Dateish} date + * @private + * @return {Boolean} True if the date is valid, false otherwise + */ + _isValidDate: function(date){ + var yearRegExp = /^\d{4}$/; + var validOneOrTwo = /^\d{1,2}$/; + return ( + yearRegExp.test(date._year) && + validOneOrTwo.test(date._month) && + validOneOrTwo.test(date._day) && + +date._month + 1 >= 1 && + +date._month + 1 <= 12 && + +date._day >= 1 && + +date._day <= this._daysInMonth(date._year, date._month + 1) + ); + }, + + /** + * Checks if a given date is an valid format. + * + * @method _isDate + * @param {String} format A date format. + * @param {String} dateStr A date on a string. + * @private + * @return {Boolean} True if the given date is valid according to the given format + */ + _isDate: function(format, dateStr){ + try { + if (typeof format === 'undefined'){ + return false; + } + var date = InkDate.set( format , dateStr ); + if( date && this._isValidDate( dateishFromDate(date) )) { + return true; + } + } catch (ex) {} + + return false; + }, + + _acceptableDay: function (date) { + return this._acceptableDateComponent(date, 'validDayFn'); + }, + + _acceptableMonth: function (date) { + return this._acceptableDateComponent(date, 'validMonthFn'); + }, + + _acceptableYear: function (date) { + return this._acceptableDateComponent(date, 'validYearFn'); + }, + + /** DRY base for the above 2 functions */ + _acceptableDateComponent: function (date, userCb) { + if (this._options[userCb]) { + return this._callUserCallbackBool(this._options[userCb], date); + } else { + return this._dateWithinRange(date); + } + }, + + /** + * This method returns the date written with the format specified on the options + * + * @method _writeDateInFormat + * @private + * @return {String} Returns the current date of the object in the specified format + */ + _writeDateInFormat:function(){ + return InkDate.get( this._options.format , this.getDate()); + }, + + /** + * This method allows the user to set the DatePicker's date on run-time. + * + * @method setDate + * @param {String} dateString A date string in yyyy-mm-dd format. + * @public + */ + setDate: function( dateString ) { + if ( /\d{4}-\d{1,2}-\d{1,2}/.test( dateString ) ) { + var auxDate = dateString.split( '-' ); + this._year = +auxDate[ 0 ]; + this._month = +auxDate[ 1 ] - 1; + this._day = +auxDate[ 2 ]; + } + + this._setDate( ); + }, + + /** + * Gets the current date as a JavaScript date. + * + * @method getDate + */ + getDate: function () { + if (!this._day) { + throw 'Ink.UI.DatePicker: Still picking a date. Cannot getDate now!'; + } + return new Date(this._year, this._month, this._day); + }, + + /** + * Sets the chosen date on the target input field + * + * @method _setDate + * @param {DOMElement} objClicked Clicked object inside the DatePicker's calendar. + * @private + */ + _setDate : function( objClicked ) { + if (objClicked) { + var data = InkElement.data(objClicked); + this._day = (+data.calDay) || this._day; + } + + var dt = this._fitDateToRange(this); + + this._year = dt._year; + this._month = dt._month; + this._day = dt._day; + + if(!this._options.displayInSelect){ + this._element.value = this._writeDateInFormat(); + } else { + this._options.dayField.value = this._day; + this._options.monthField.value = this._month + 1; + this._options.yearField.value = this._year; + } + + if(this._options.onSetDate) { + this._options.onSetDate( this , { date : this.getDate() } ); + } + }, + + /** + * Makes the necessary work to update the calendar + * when choosing a different month + * + * @method _updateCal + * @param {Number} inc Indicates previous or next month + * @private + */ + _updateCal: function(inc){ + if( typeof this._options.onMonthSelected === 'function' ){ + this._options.onMonthSelected(this, { + 'year': this._year, + 'month' : this._month + }); + } + if (inc && this._updateMonth(inc) === null) { + return; + } + this._renderMonth(); + }, + + /** + * Function that returns the number of days on a given month on a given year + * + * @method _daysInMonth + * @param {Number} _y - year + * @param {Number} _m - month + * @private + * @return {Number} The number of days on a given month on a given year + */ + _daysInMonth: function(_y,_m){ + var exceptions = { + 2: ((_y % 400 === 0) || (_y % 4 === 0 && _y % 100 !== 0)) ? 29 : 28, + 4: 30, + 6: 30, + 9: 30, + 11: 30 + }; + + return exceptions[_m] || 31; + }, + + + /** + * Updates the calendar when a different month is chosen + * + * @method _updateMonth + * @param {Number} incValue - indicates previous or next month + * @private + */ + _updateMonth: function(incValue){ + var date; + if (incValue > 0) { + date = this._getNextMonth(); + } else if (incValue < 0) { + date = this._getPrevMonth(); + } + if (!date) { return null; } + this._year = date._year; + this._month = date._month; + this._day = date._day; + }, + + /** + * Get the next month we can show. + */ + _getNextMonth: function (date) { + return this._tryLeap( date, 'Month', 'next', function (d) { + d._month += 1; + if (d._month > 11) { + d._month = 0; + d._year += 1; + } + return d; + }); + }, + + /** + * Get the previous month we can show. + */ + _getPrevMonth: function (date) { + return this._tryLeap( date, 'Month', 'prev', function (d) { + d._month -= 1; + if (d._month < 0) { + d._month = 11; + d._year -= 1; + } + return d; + }); + }, + + /** + * Get the next year we can show. + */ + _getPrevYear: function (date) { + return this._tryLeap( date, 'Year', 'prev', function (d) { + d._year -= 1; + return d; + }); + }, + + /** + * Get the next year we can show. + */ + _getNextYear: function (date) { + return this._tryLeap( date, 'Year', 'next', function (d) { + d._year += 1; + return d; + }); + }, + + /** + * DRY base for a function which tries to get the next or previous valid year or month. + * + * It checks if we can go forward by using _dateCmp with atomic + * precision (this means, {_year} for leaping years, and + * {_year, month} for leaping months), then it tries to get the + * result from the user-supplied callback (nextDateFn or prevDateFn), + * and when this is not present, advance the date forward using the + * `advancer` callback. + */ + _tryLeap: function (date, atomName, directionName, advancer) { + date = date || { _year: this._year, _month: this._month, _day: this._day }; + + var maxOrMin = directionName === 'prev' ? '_min' : '_max'; + var boundary = this[maxOrMin]; + + // Check if we're by the boundary of min/max year/month + if (this._dateCmpUntil(date, boundary, atomName) === 0) { + return null; // We're already at the boundary. Bail. + } + + var leapUserCb = this._options[directionName + 'ValidDateFn']; + if (leapUserCb) { + return this._callUserCallbackDate(leapUserCb, date); + } else { + date = advancer(date); + } + + date = this._fitDateToRange(date); + + return this['_acceptable' + atomName](date) ? date : null; + }, + + _getNextDecade: function (date) { + date = date || { _year: this._year, _month: this._month, _day: this._day }; + var decade = this._getCurrentDecade(date); + if (decade + 10 > this._max._year) { return null; } + return decade + 10; + }, + + _getPrevDecade: function (date) { + date = date || { _year: this._year, _month: this._month, _day: this._day }; + var decade = this._getCurrentDecade(date); + if (decade - 10 < this._min._year) { return null; } + return decade - 10; + }, + + /** Returns the decade given a date or year*/ + _getCurrentDecade: function (year) { + year = year ? (year._year || year) : this._year; + return Math.floor(year / 10) * 10; // Round to first place + }, + + _callUserCallbackBase: function (cb, date) { + return cb.call(this, date._year, date._month + 1, date._day); + }, + + _callUserCallbackBool: function (cb, date) { + return !!this._callUserCallbackBase(cb, date); + }, + + _callUserCallbackDate: function (cb, date) { + var ret = this._callUserCallbackBase(cb, date); + return ret ? dateishFromDate(ret) : null; + }, + + /** + * Key-value object that (for a given key) points to the correct parsing format for the DatePicker + * @property _dateParsers + * @type {Object} + * @readOnly + */ + _dateParsers: { + 'yyyy-mm-dd' : 'Y-m-d' , + 'yyyy/mm/dd' : 'Y/m/d' , + 'yy-mm-dd' : 'y-m-d' , + 'yy/mm/dd' : 'y/m/d' , + 'dd-mm-yyyy' : 'd-m-Y' , + 'dd/mm/yyyy' : 'd/m/Y' , + 'dd-mm-yy' : 'd-m-y' , + 'dd/mm/yy' : 'd/m/y' , + 'mm/dd/yyyy' : 'm/d/Y' , + 'mm-dd-yyyy' : 'm-d-Y' + }, + + /** + * Renders the current month + * + * @method _renderMonth + * @private + */ + _renderMonth: function(){ + var month = this._month; + var year = this._year; + + this._showDefaultView(); + + var html = ''; + + html += this._getMonthCalendarHeaderHtml(this._options.startWeekDay); + + var counter = 0; + html+='
      '; + + var emptyHtml = '
    •  
    • '; + + var firstDayIndex = this._getFirstDayIndex(year, month); + + // Add padding if the first day of the month is not monday. + if(firstDayIndex > 0) { + counter += firstDayIndex; + html += strRepeat(firstDayIndex, emptyHtml); + } + + html += this._getDayButtonsHtml(year, month); + + html += '
    '; + + this._monthContainer.innerHTML = html; + }, + + /** + * Figure out where the first day of a month lies + * in the first row of the calendar. + * + * having options.startWeekDay === 0 + * + * Su Mo Tu We Th Fr Sa + * 1 <- The "1" is in the 7th day. return 6. + * 2 3 4 5 6 7 8 + * 9 10 11 12 13 14 15 + * 16 17 18 19 20 21 22 + * 23 24 25 26 27 28 29 + * 30 31 + * + * This obviously changes according to the user option "startWeekDay" + **/ + _getFirstDayIndex: function (year, month) { + var wDayFirst = (new Date( year , month , 1 )).getDay(); // Sunday=0 + var startWeekDay = this._options.startWeekDay || 0; // Sunday=0 + + var result = wDayFirst - startWeekDay; + + result %= 7; + + if (result < 0) { + result += 6; + } + + return result; + }, + + _getDayButtonsHtml: function (year, month) { + var counter = this._getFirstDayIndex(year, month); + var daysInMonth = this._daysInMonth(year, month + 1); + var ret = ''; + for (var day = 1; day <= daysInMonth; day++) { + if (counter === 7){ // new week + counter=0; + ret += '
      '; + } + + ret += this._getDayButtonHtml(year, month, day); + + counter++; + if(counter === 7){ + ret += '
    '; + } + } + return ret; + }, + + /** + * Get the HTML markup for a single day in month view, given year, month, day. + * + * @method _getDayButtonHtml + * @private + */ + _getDayButtonHtml: function (year, month, day) { + var attrs = ' '; + var date = dateishFromYMD(year, month, day); + if (!this._acceptableDay(date)) { + attrs += 'class="ink-calendar-off"'; + } else { + attrs += 'data-cal-day="' + day + '"'; + } + + if (this._day && this._dateCmp(date, this) === 0) { + attrs += 'class="ink-calendar-on" data-cal-day="' + day + '"'; + } + + return '
  • ' + day + '
  • '; + }, + + /** Write the top bar of the calendar (M T W T F S S) */ + _getMonthCalendarHeaderHtml: function (startWeekDay) { + var ret = '
      '; + var wDay; + for(var i=0; i<7; i++){ + wDay = (startWeekDay + i) % 7; + ret += '
    • ' + + this._options.wDay[wDay].substring(0,1) + + '
    • '; + } + return ret + '
    '; + }, + + /** + * This method adds class names to month buttons, to visually distinguish. + * + * @method _addMonthClassNames + * @param {DOMElement} parent DOMElement where all the months are. + * @private + */ + _addMonthClassNames: function(parent){ + InkArray.forEach( + (parent || this._monthSelector).getElementsByTagName('a'), + Ink.bindMethod(this, '_addMonthButtonClassNames')); + }, + + /** + * Add the ink-calendar-on className if the given button is the current month, + * otherwise add the ink-calendar-off className if the given button refers to + * an unacceptable month (given dateRange and validMonthFn) + */ + _addMonthButtonClassNames: function (btn) { + var data = InkElement.data(btn); + if (!data.calMonth) { throw 'not a calendar month button!'; } + + var month = +data.calMonth - 1; + + if ( month === this._month ) { + Css.addClassName( btn, 'ink-calendar-on' ); // This month + Css.removeClassName( btn, 'ink-calendar-off' ); + } else { + Css.removeClassName( btn, 'ink-calendar-on' ); // Not this month + + var toDisable = !this._acceptableMonth({_year: this._year, _month: month}); + Css.addRemoveClassName( btn, 'ink-calendar-off', toDisable); + } + }, + + /** + * Prototype's method to allow the 'i18n files' to change all objects' language at once. + * @param {Object} options Object with the texts' configuration. + * @param {String} options.closeText Text of the close anchor + * @param {String} options.cleanText Text of the clean text anchor + * @param {String} options.prevLinkText "Previous" link's text + * @param {String} options.nextLinkText "Next" link's text + * @param {String} options.ofText The text "of", present in 'May of 2013' + * @param {Object} options.month An object with keys from 1 to 12 for the full months' names + * @param {Object} options.wDay An object with keys from 0 to 6 for the full weekdays' names + * @public + */ + lang: function( options ){ + this._lang = options; + }, + + /** + * This calls the rendering of the selected month. (Deprecated: use show() instead) + * + */ + showMonth: function(){ + this._renderMonth(); + }, + + /** + * Checks if the calendar screen is in 'select day' mode + * + * @return {Boolean} True if the calendar screen is in 'select day' mode + * @public + */ + isMonthRendered: function(){ + var header = Selector.select('.ink-calendar-header', this._containerObject)[0]; + + return ((Css.getStyle(header.parentNode,'display') !== 'none') && + (Css.getStyle(header.parentNode.parentNode,'display') !== 'none') ); + }, + + /** + * Destroys this datepicker, removing it from the page. + * + * @public + **/ + destroy: function () { + InkElement.unwrap(this._element); + InkElement.remove(this._wrapper); + InkElement.remove(this._containerObject); + Common.unregisterInstance.call(this); + } + }; + + return DatePicker; +}); +/** + * @module Ink.UI.Draggable_1 + * Dragging elements around + * @version 1 + */ + +Ink.createModule("Ink.UI.Draggable","1",["Ink.Dom.Element_1", "Ink.Dom.Event_1", "Ink.Dom.Css_1", "Ink.Dom.Browser_1", "Ink.Dom.Selector_1", "Ink.UI.Common_1"],function( InkElement, InkEvent, Css, Browser, Selector, Common) { + 'use strict'; + + var x = 0, + y = 1; // For accessing coords in [x, y] arrays + + // Get a value between two boundaries + function between (val, min, max) { + val = Math.min(val, max); + val = Math.max(val, min); + return val; + } + + /** + * @class Ink.UI.Draggable + * @version 1 + * @constructor + * @param {String|DOMElement} target Target element. + * @param {Object} [options] Optional object to configure the component. + * @param {String} [options.constraint] Movement constraint. None by default. Can be `vertical`, `horizontal`, or `both`. + * @param {String|DOMElement} [options.constraintElm] Constrain dragging to be within this element. None by default. + * @param {Number} [options.top] Limits to constrain draggable movement. + * @param {Number} [options.right] Limits to constrain draggable movement. + * @param {Number} [options.bottom] Limits to constrain draggable movement. + * @param {Number} [options.left] Limits to constrain draggable movement. + * @param {String|DOMElement} [options.handle] If specified, this element or CSS ID will be used as a handle for dragging. + * @param {Boolean} [options.revert] Flag to revert the draggable to the original position when dragging stops. + * @param {String} [options.cursor] Cursor type (CSS `cursor` value) used when the mouse is over the draggable object. + * @param {Number} [options.zIndex] Z-index applied to the draggable element while dragged. + * @param {Number} [options.fps] If set, throttles the drag effect to this number of frames per second. + * @param {DOMElement} [options.droppableProxy] If set, a shallow copy of this element will be moved around with transparent background. + * @param {String} [options.mouseAnchor] Anchor for the drag. Can be one of: 'left','center','right','top','center','bottom'. + * @param {String} [options.dragClass] Class to add when the draggable is being dragged. Defaults to drag. + * @param {Function} [options.onStart] Callback called when dragging starts. + * @param {Function} [options.onEnd] Callback called when dragging stops. + * @param {Function} [options.onDrag] Callback called while dragging, prior to position updates. + * @param {Function} [options.onChange] Callback called while dragging, after position updates. + * + * @example + * Ink.requireModules( ['Ink.UI.Draggable_1'], function( Draggable ){ + * new Draggable( '#myElementId' ); + * }); + * + * @sample Ink_UI_Swipe_1.html + */ + var Draggable = function(element, options) { + this.init(element, options); + }; + + Draggable.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @param {String|DOMElement} element Element ID of the element or DOM Element. + * @param {Object} [options] Options object for configuration of the module. + * @private + */ + init: function(element, options) { + var o = Ink.extendObj( { + constraint: false, + constraintElm: false, + top: false, + right: false, + bottom: false, + left: false, + handle: options.handler /* old option name */ || false, + revert: false, + cursor: 'move', + zindex: options.zindex /* old option name */ || 9999, + dragClass: 'drag', + onStart: false, + onEnd: false, + onDrag: false, + onChange: false, + droppableProxy: false, + mouseAnchor: undefined, + skipChildren: true, + fps: 100, + debug: false + }, options || {}, InkElement.data(element)); + + this.options = o; + this.element = Common.elOrSelector(element); + this.constraintElm = o.constraintElm && Common.elOrSelector(o.constraintElm); + + this.handle = false; + this.elmStartPosition = false; + this.active = false; + this.dragged = false; + this.prevCoords = false; + this.placeholder = false; + + this.position = false; + this.zindex = false; + this.firstDrag = true; + + if (o.fps) { + this.deltaMs = 1000 / o.fps; + this.lastRunAt = 0; + } + + this.handlers = {}; + this.handlers.start = Ink.bindEvent(this._onStart,this); + this.handlers.dragFacade = Ink.bindEvent(this._onDragFacade,this); + this.handlers.drag = Ink.bindEvent(this._onDrag,this); + this.handlers.end = Ink.bindEvent(this._onEnd,this); + this.handlers.selectStart = function(event) { InkEvent.stop(event); return false; }; + + // set handle + this.handle = (this.options.handle) ? + Common.elOrSelector(this.options.handle) : this.element; + this.handle.style.cursor = o.cursor; + + InkEvent.observe(this.handle, 'touchstart', this.handlers.start); + InkEvent.observe(this.handle, 'mousedown', this.handlers.start); + + if (Browser.IE) { + InkEvent.observe(this.element, 'selectstart', this.handlers.selectStart); + } + }, + + /** + * Removes the ability of the element of being dragged + * + * @method destroy + * @public + */ + destroy: function() { + InkEvent.stopObserving(this.handle, 'touchstart', this.handlers.start); + InkEvent.stopObserving(this.handle, 'mousedown', this.handlers.start); + + if (Browser.IE) { + InkEvent.stopObserving(this.element, 'selectstart', this.handlers.selectStart); + } + }, + + /** + * Gets coordinates for a given event (with added page scroll) + * + * @method _getCoords + * @param {Object} e window.event object. + * @return {Array} Array where the first position is the x coordinate, the second is the y coordinate + * @private + */ + _getCoords: function(e) { + var ps = [InkElement.scrollWidth(), InkElement.scrollHeight()]; + return { + x: (e.touches ? e.touches[0].clientX : e.clientX) + ps[x], + y: (e.touches ? e.touches[0].clientY : e.clientY) + ps[y] + }; + }, + + /** + * Clones src element's relevant properties to dst + * + * @method _cloneStyle + * @param {DOMElement} src Element from where we're getting the styles + * @param {DOMElement} dst Element where we're placing the styles. + * @private + */ + _cloneStyle: function(src, dst) { + dst.className = src.className; + dst.style.borderWidth = '0'; + dst.style.padding = '0'; + dst.style.position = 'absolute'; + dst.style.width = InkElement.elementWidth(src) + 'px'; + dst.style.height = InkElement.elementHeight(src) + 'px'; + dst.style.left = InkElement.elementLeft(src) + 'px'; + dst.style.top = InkElement.elementTop(src) + 'px'; + dst.style.cssFloat = Css.getStyle(src, 'float'); + dst.style.display = Css.getStyle(src, 'display'); + }, + + /** + * onStart event handler + * + * @method _onStart + * @param {Object} e window.event object + * @return {Boolean|void} In some cases return false. Otherwise is void + * @private + */ + _onStart: function(e) { + if (!this.active && InkEvent.isLeftClick(e) || typeof e.button === 'undefined') { + + var tgtEl = InkEvent.element(e); + if (this.options.skipChildren && tgtEl !== this.handle) { return; } + + InkEvent.stop(e); + + Css.addClassName(this.element, this.options.dragClass); + + this.elmStartPosition = [ + InkElement.elementLeft(this.element), + InkElement.elementTop( this.element) + ]; + + var pos = [ + parseInt(Css.getStyle(this.element, 'left'), 10), + parseInt(Css.getStyle(this.element, 'top'), 10) + ]; + + var dims = InkElement.elementDimensions(this.element); + + this.originalPosition = [ pos[x] ? pos[x]: null, pos[y] ? pos[y] : null ]; + this.delta = this._getCoords(e); // mouse coords at beginning of drag + + this.active = true; + this.position = Css.getStyle(this.element, 'position'); + this.zindex = Css.getStyle(this.element, 'zIndex'); + + var div = document.createElement('div'); + div.style.position = this.position; + div.style.width = dims[x] + 'px'; + div.style.height = dims[y] + 'px'; + div.style.marginTop = Css.getStyle(this.element, 'margin-top'); + div.style.marginBottom = Css.getStyle(this.element, 'margin-bottom'); + div.style.marginLeft = Css.getStyle(this.element, 'margin-left'); + div.style.marginRight = Css.getStyle(this.element, 'margin-right'); + div.style.borderWidth = '0'; + div.style.padding = '0'; + div.style.cssFloat = Css.getStyle(this.element, 'float'); + div.style.display = Css.getStyle(this.element, 'display'); + div.style.visibility = 'hidden'; + + this.delta2 = [ this.delta.x - this.elmStartPosition[x], this.delta.y - this.elmStartPosition[y] ]; // diff between top-left corner of obj and mouse + if (this.options.mouseAnchor) { + var parts = this.options.mouseAnchor.split(' '); + var ad = [dims[x], dims[y]]; // starts with 'right bottom' + if (parts[0] === 'left') { ad[x] = 0; } else if(parts[0] === 'center') { ad[x] = parseInt(ad[x]/2, 10); } + if (parts[1] === 'top') { ad[y] = 0; } else if(parts[1] === 'center') { ad[y] = parseInt(ad[y]/2, 10); } + this.applyDelta = [this.delta2[x] - ad[x], this.delta2[y] - ad[y]]; + } + + var dragHandlerName = this.options.fps ? 'dragFacade' : 'drag'; + + this.placeholder = div; + + if (this.options.onStart) { this.options.onStart(this.element, e); } + + if (this.options.droppableProxy) { // create new transparent div to optimize DOM traversal during drag + this.proxy = document.createElement('div'); + dims = [ + window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, + window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight + ]; + var fs = this.proxy.style; + fs.width = dims[x] + 'px'; + fs.height = dims[y] + 'px'; + fs.position = 'fixed'; + fs.left = '0'; + fs.top = '0'; + fs.zIndex = this.options.zindex + 1; + fs.backgroundColor = '#FF0000'; + Css.setOpacity(this.proxy, 0); + + var firstEl = document.body.firstChild; + while (firstEl && firstEl.nodeType !== 1) { firstEl = firstEl.nextSibling; } + document.body.insertBefore(this.proxy, firstEl); + + + InkEvent.observe(this.proxy, 'mousemove', this.handlers[dragHandlerName]); + InkEvent.observe(this.proxy, 'touchmove', this.handlers[dragHandlerName]); + } + else { + InkEvent.observe(document, 'mousemove', this.handlers[dragHandlerName]); + } + + this.element.style.position = 'absolute'; + this.element.style.zIndex = this.options.zindex; + this.element.parentNode.insertBefore(this.placeholder, this.element); + + this._onDrag(e); + + InkEvent.observe(document, 'mouseup', this.handlers.end); + InkEvent.observe(document, 'touchend', this.handlers.end); + + return false; + } + }, + + /** + * Function that gets the timestamp of the current run from time to time. (FPS) + * + * @method _onDragFacade + * @param {Object} window.event object. + * @private + */ + _onDragFacade: function(e) { + var now = +new Date(); + if (!this.lastRunAt || now > this.lastRunAt + this.deltaMs) { + this.lastRunAt = now; + this._onDrag(e); + } + }, + + /** + * Function that handles the dragging movement + * + * @method _onDrag + * @param {Object} window.event object. + * @private + */ + _onDrag: function(e) { + if (this.active) { + InkEvent.stop(e); + this.dragged = true; + var mouseCoords = this._getCoords(e), + mPosX = mouseCoords.x, + mPosY = mouseCoords.y, + o = this.options, + newX = false, + newY = false; + + if (this.prevCoords && mPosX !== this.prevCoords.x || mPosY !== this.prevCoords.y) { + if (o.onDrag) { o.onDrag(this.element, e); } + this.prevCoords = mouseCoords; + + newX = this.elmStartPosition[x] + mPosX - this.delta.x; + newY = this.elmStartPosition[y] + mPosY - this.delta.y; + + var draggableSize = InkElement.elementDimensions(this.element); + + if (this.constraintElm) { + var offset = InkElement.offset(this.constraintElm); + var size = InkElement.elementDimensions(this.constraintElm); + var constTop = offset[y] + (o.top || 0), + constBottom = offset[y] + size[y] - (o.bottom || 0), + constLeft = offset[x] + (o.left || 0), + constRight = offset[x] + size[x] - (o.right || 0); + + newY = between(newY, constTop, constBottom - draggableSize[y]); + newX = between(newX, constLeft, constRight - draggableSize[x]); + } else if (o.constraint) { + var right = o.right === false ? InkElement.pageWidth() - draggableSize[x] : o.right, + left = o.left === false ? 0 : o.left, + top = o.top === false ? 0 : o.top, + bottom = o.bottom === false ? InkElement.pageHeight() - draggableSize[y] : o.bottom; + if (o.constraint === 'horizontal' || o.constraint === 'both') { + newX = between(newX, left, right); + } + if (o.constraint === 'vertical' || o.constraint === 'both') { + newY = between(newY, top, bottom); + } + } + + var Droppable = Ink.getModule('Ink.UI.Droppable_1'); + if (this.firstDrag) { + if (Droppable) { Droppable.updateAll(); } + /*this.element.style.position = 'absolute'; + this.element.style.zIndex = this.options.zindex; + this.element.parentNode.insertBefore(this.placeholder, this.element);*/ + this.firstDrag = false; + } + + if (newX) { this.element.style.left = newX + 'px'; } + if (newY) { this.element.style.top = newY + 'px'; } + + if (Droppable) { + // apply applyDelta defined on drag init + var mouseCoords2 = this.options.mouseAnchor ? + {x: mPosX - this.applyDelta[x], y: mPosY - this.applyDelta[y]} : + mouseCoords; + Droppable.action(mouseCoords2, 'drag', e, this.element); + } + if (o.onChange) { o.onChange(this); } + } + } + }, + + /** + * Function that handles the end of the dragging process + * + * @method _onEnd + * @param {Object} window.event object. + * @private + */ + _onEnd: function(e) { + InkEvent.stopObserving(document, 'mousemove', this.handlers.drag); + InkEvent.stopObserving(document, 'touchmove', this.handlers.drag); + + if (this.options.fps) { + this._onDrag(e); + } + + Css.removeClassName(this.element, this.options.dragClass); + + if (this.active && this.dragged) { + + if (this.options.droppableProxy) { // remove transparent div... + document.body.removeChild(this.proxy); + } + + if (this.pt) { // remove debugging element... + InkElement.remove(this.pt); + this.pt = undefined; + } + + /*if (this.options.revert) { + this.placeholder.parentNode.removeChild(this.placeholder); + }*/ + + if(this.placeholder) { + InkElement.remove(this.placeholder); + } + + if (this.options.revert) { + this.element.style.position = this.position; + if (this.zindex !== null) { + this.element.style.zIndex = this.zindex; + } + else { + this.element.style.zIndex = 'auto'; + } // restore default zindex of it had none + + this.element.style.left = (this.originalPosition[x]) ? this.originalPosition[x] + 'px' : ''; + this.element.style.top = (this.originalPosition[y]) ? this.originalPosition[y] + 'px' : ''; + } + + if (this.options.onEnd) { + this.options.onEnd(this.element, e); + } + + var Droppable = Ink.getModule('Ink.UI.Droppable_1'); + if (Droppable) { + Droppable.action(this._getCoords(e), 'drop', e, this.element); + } + + this.position = false; + this.zindex = false; + this.firstDrag = true; + } + + this.active = false; + this.dragged = false; + } + }; + + return Draggable; + +}); +/** + * @module Ink.UI.Drawer_1 + * Off-canvas menu + * @version 1 + */ + +Ink.createModule('Ink.UI.Drawer', '1', ['Ink.UI.Common_1', 'Ink.Dom.Loaded_1', 'Ink.Dom.Selector_1', 'Ink.Dom.Element_1', 'Ink.Dom.Event_1', 'Ink.Dom.Css_1'], function(Common, Loaded, Selector, Element, Event, Css) { + 'use strict'; + + function elNotFound(el) { + Ink.warn( 'Ink.UI.Drawer_1: Could not find the "' + + el + '" element on this page. Please make sure it exists.' ); + } + + function Drawer(options) { + this._init(options); + } + + Drawer.prototype = { + /** + * Displays off-canvas content which can be triggered by clicking elements with the 'left-drawer-trigger' and 'right-drawer-trigger', respectively. + * + * The left drawer has the 'left-drawer' class, and the right drawer has the 'right-drawer' class. + * + * The content drawer (EG your `
    `) must have the 'content-drawer' class. + * + * For more, see the example below, or try the sample. + * + * @class Ink.UI.Drawer_1 + * @constructor + * + * @xparam {Object} [options] Configuration options. + * @xparam {String} [options.parentSelector] The class you are using in your wrapper (in the example below, it's the `body` tag. + * @xparam {String} [options.leftDrawer] Selector for the left drawer element. This element is placed outside the screen and shown when you click the `leftTrigger` element. + * @xparam {String} [options.leftTrigger] Selector for the left drawer trigger(s). When you click this trigger, the `leftDrawer` is shown. + * @xparam {String} [options.rightDrawer] Right drawer selector. (see `options.leftDrawer`) + * @xparam {String} [options.rightTrigger] Right trigger selector (see `options.leftTrigger`) + * @xparam {String} [options.contentDrawer] Selector for the content drawer. + * @param {Boolean} [options.closeOnContentClick] Flag to close the drawer when someone clicks on the `.contentDrawer` + * @param {String} [options.mode] This can be 'push' or 'hide'. + * @param {String} [options.sides] Can be 'left', 'right', or 'both'. Controls from which sides the content + * + * @example + * + * + *
    + * Right drawer content... + *
    + *
    + * Left drawer content... + *
    + *
    + * Open left drawer + * Open right drawer + * Content... + *
    + * + * + * + */ + _init: function (options) { + this._options = Common.options({ + parentSelector: ['String', '.ink-drawer'], + leftDrawer: ['String', '.left-drawer'], + leftTrigger: ['String', '.left-drawer-trigger'], + rightDrawer: ['String', '.right-drawer'], + rightTrigger: ['String', '.right-drawer-trigger'], + contentDrawer: ['String', '.content-drawer'], + closeOnContentClick: ['Boolean', true], + closeOnLinkClick: ['Boolean', true], + mode: ['String', 'push'], + sides: ['String', 'both'] + }, options || {}); + + // make sure we have the required elements acording to the config options + + this._contentDrawers = Ink.ss(this._options.contentDrawer); + + this._leftDrawer = Ink.s(this._options.leftDrawer); + this._leftTriggers = Ink.ss(this._options.leftTrigger); + + this._rightDrawer = Ink.s(this._options.rightDrawer); + this._rightTriggers = Ink.ss(this._options.rightTrigger); + + // The body might not have it + Css.addClassName(document.body, 'ink-drawer'); + + if(this._contentDrawers.length === 0) { + Ink.warn( 'Ink.UI.Drawer_1: Could not find any "' + + this._options.contentDrawer + '" elements on this page. ' + + 'Please make sure you have at least one.' ); + } + + switch (this._options.sides) { + case 'both': + if( !this._leftDrawer ){ + elNotFound(this._options.leftDrawer); + } + + if(this._leftTriggers.length === 0){ + elNotFound(this._options.leftTrigger); + } + + if( !this._rightDrawer ){ + elNotFound(this._options.rightDrawer); + } + + if( this._rightTriggers.length === 0 ){ + elNotFound(this._options.rightTrigger); + } + this._triggers = this._options.leftTrigger + ', ' + this._options.rightTrigger + ', ' + this._options.contentDrawer; + break; + + case 'left': + if( !this._leftDrawer ){ + elNotFound(this._options.leftDrawer); + } + + if(this._leftTriggers.length === 0){ + elNotFound(this._options.leftTrigger); + } + this._triggers = this._options.leftTrigger + ', ' + this._options.contentDrawer; + break; + + case 'right': + if( !this._rightDrawer ){ + elNotFound(this._options.rightDrawer); + } + + if( this._rightTriggers.length === 0 ){ + elNotFound(this._options.rightTrigger); + } + this._triggers = this._options.rightTrigger + ', ' + this._options.contentDrawer; + break; + } + + + this._isOpen = false; + this._direction = undefined; + + this._handlers = { + click: Ink.bindEvent(this._onClick, this), + afterTransition: Ink.bindEvent(this._afterTransition, this) + }; + this._delay = 10; + this._addEvents(); + }, + + /** + * Click event handler. + * Listens to the body's click event + * + * @method _onClick + * @private + **/ + _onClick: function(ev){ + var triggerClicked = Ink.bind(function (side) { + // When clicking on the trigger, the corresponding side is toggled. + if (this._isOpen) { + this.close(); + } else { + this.open(side); + } + }, this); + + if(Selector.matchesSelector(ev.currentTarget,this._options.leftTrigger)){ + // Clicked on the left trigger + triggerClicked('left'); + } else if(Selector.matchesSelector(ev.currentTarget,this._options.rightTrigger)){ + triggerClicked('right'); + } else if(Selector.matchesSelector(ev.currentTarget,this._options.contentDrawer)){ + // Clicked on the rest of the body + if(this._options.closeOnContentClick) { + this.close(); + } + } + + // Clicked on a link + if (this._options.closeOnLinkClick && Element.isLink(ev.target)) { + this.close(); + } + }, + + _afterTransition: function(){ + if(!this._isOpen){ + if(this._direction === 'left') { + Css.removeClassName(this._leftDrawer, 'show'); + } else { + Css.removeClassName(this._rightDrawer, 'show'); + } + } + }, + + _addEvents: function(){ + Event.on(document.body, 'click', this._triggers + ', a[href*="#"]', this._handlers.click); + }, + + open: function(direction) { + this._isOpen = true; + this._direction = direction; + + var open = direction === 'left' ? + this._leftDrawer : + this._rightDrawer; + + Css.addClassName(open,'show'); + setTimeout(Ink.bind(function(){ + Css.addClassName(document.body, [this._options.mode, direction]); + },this), this._delay); + }, + + close: function() { + if (this._isOpen === false) { return; } + this._isOpen = false; + // TODO detect transitionEnd exists, otherwise don't rely on it + Event.one(document.body, 'transitionend oTransitionEnd transitionend webkitTransitionEnd', this._handlers.afterTransition); + Css.removeClassName(document.body, [this._options.mode, this._direction]); + } + + }; + + return Drawer; +}); +/** + * @module Ink.UI.Dropdown_1 + * Dropdown menus + * @version 1 + */ + +Ink.createModule('Ink.UI.Dropdown', '1', ['Ink.UI.Common_1', 'Ink.UI.Toggle_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1'], function(Common, Toggle, InkEvent, InkElement) { + 'use strict'; + + function Dropdown(trigger, options) { + this._init(trigger, options); + } + + Dropdown.prototype = { + /** + * Use this UI module to achieve a dropdown menu. + * + * @class Ink.UI.Dropdown + * + * @constructor + * @param {DOMElement|String} trigger Trigger Element + * @param {Object} options Options Object + * @param {DOMElement|String} options.target Target of the dropdown action. + * + * @sample Ink_UI_Dropdown_1.html + */ + _init: function(trigger, options) { + this._element = Common.elOrSelector(trigger); + this._options = Common.options('Ink.UI.Dropdown_1', { + 'target': ['Element'], + 'hoverOpen': ['Number', null], + 'dismissOnInsideClick': ['Boolean', false], + 'dismissOnOutsideClick': ['Boolean', true], + 'dismissAfter': ['Number', null], + 'onInsideClick': ['Function', null], + 'onOutsideClick': ['Function', null], + 'onOpen': ['Function', null], + 'onDismiss': ['Function', null] + }, options || {}, this._element); + + this._toggle = new Toggle(this._element, { + target: this._options.target, + closeOnInsideClick: null, + closeOnClick: false, + onChangeState: Ink.bind(function (newState) { + return this._openOrDismiss(newState, true, true); + }, this) + }); + + // Event where we set this._dismissTimeout and clear this._openTimeout + InkEvent.observeMulti([this._options.target, this._element], + 'mouseout', Ink.bindMethod(this, '_onMouseOut')); + + // Events to keep clearing this._dismissTimeout and set this._openTimeout + InkEvent.observeMulti([this._options.target, this._element], + 'mouseover', Ink.bindMethod(this, '_onMouseOver')); + + // to call dismissOnInsideClick and onInsideClick + InkEvent.observe(this._options.target, 'click', Ink.bindMethod(this, '_onInsideClick')); + // to call dismissOnOutsideClick and onOutsideClick + InkEvent.observe(document, 'click', Ink.bindMethod(this, '_onOutsideClick')); + }, + + /** + * Called when the mouse is over the toggler, or the dropdown. + * + * Deals with "hoverOpen" by setting the dropdown to open later. Also cancels "dismissAfter". + * @method _onMouseOver + * @private + **/ + _onMouseOver: function () { + if (typeof this._options.hoverOpen === 'number' && this._toggle.getState() === false) { + clearTimeout(this._openTimeout); + this._openTimeout = setTimeout( + Ink.bindMethod(this, 'open', true), + this._options.hoverOpen * 1000); + } + if (typeof this._options.dismissAfter === 'number') { + clearTimeout(this._dismissTimeout); + } + }, + + /** + * Called when the mouse leaves either the toggler, or the dropdown. + * + * Deals with "dismissAfter" by setting the dropdown to be dismissed later. Also cancels "hoverOpen". + * @method _onMouseOut + * @private + **/ + _onMouseOut: function () { + if (typeof this._options.dismissAfter === 'number' && this._toggle.getState() === true) { + clearTimeout(this._dismissTimeout); + this._dismissTimeout = setTimeout( + Ink.bindMethod(this, 'dismiss', true), + this._options.dismissAfter * 1000); + } + if (typeof this._options.hoverOpen === 'number') { + clearTimeout(this._openTimeout); + } + }, + + /** + * Handle clicks on the dropdown. + * @method _onInsideClick + * @private + */ + _onInsideClick: function (event) { + var ret = this._handlerCall('onInsideClick', InkEvent.element(event)); + if (ret === false) { return false; } + if (this._options.dismissOnInsideClick) { + this.dismiss(true); + } + InkEvent.stop(event); + }, + + /** + * Handle clicks outside the dropdown. + * @method _onInsideClick + * @private + */ + _onOutsideClick: function (event) { + var target = InkEvent.element(event); + var foundElem = InkElement.findUpwardsHaving(target, Ink.bind(function (needle) { + return needle === this._element; + }, this)); + var foundTarget = InkElement.findUpwardsHaving(target, Ink.bind(function (needle) { + return needle === this._options.target; + }, this)); + + if (!foundElem && !foundTarget) { + var ret = this._handlerCall('onOutsideClick', target); + if (ret === false) { return false; } + if (this._options.dismissOnOutsideClick) { + this.dismiss(true); + } + InkEvent.stop(event); + } + }, + + /** + * Closes the dropdown. + * + * @method dismiss + * @param [callHandler=false] call onDismiss handler + */ + dismiss: function (callHandler, doNotInformToggle) { + this._openOrDismiss(false, callHandler, doNotInformToggle); + }, + + /** + * Opens the dropdown + * + * @method open + * @param [callHandler=false] call onOpen handler + */ + open: function (callHandler, _doNotInformToggle) { + this._openOrDismiss(true, callHandler, _doNotInformToggle); + }, + + /** + * DRY'ing up open() and dismiss() + * + * @method _openOrDismiss + * @param [newState=false] + * @param [callHandler=false] + * @private + */ + _openOrDismiss: function (newState, callHandler, _doNotInformToggle) { + if (this._toggle && this._toggle.getState() === newState) { return; } + if (callHandler) { + if (this._handlerCall(newState ? 'onOpen' : 'onDismiss') === false) { + return false; // canceled by event handler + } + } + if (!_doNotInformToggle) { + this._toggle.setState(newState); + } + clearTimeout(this._dismissTimeout); + clearTimeout(this._openTimeout); + }, + + /** + * call a method given by the user through the options + * + * @method _handlerCall + * @param handler {String} The handler name in this._options + * @param [args*] Arguments to pass to function + */ + _handlerCall: function (handler/*, ... */) { + if (this._options[handler]) { + return this._options[handler].call(this, [].slice.call(arguments, 1)); + } + } + }; + + return Dropdown; +}); +/** + * @module Ink.UI.Droppable_1 + * Drop elements around + * @version 1 + */ + +Ink.createModule("Ink.UI.Droppable","1",["Ink.Dom.Element_1", "Ink.Dom.Event_1", "Ink.Dom.Css_1", "Ink.UI.Common_1", "Ink.Util.Array_1", "Ink.Dom.Selector_1"], function( InkElement, InkEvent, Css, Common, InkArray, Selector) { + 'use strict'; + + // Higher order functions + var hAddClassName = function (element) { + return function (className) {return Css.addClassName(element, className);}; + }; + var hRemoveClassName = function (element) { + return function (className) {return Css.removeClassName(element, className);}; + }; + + /** + * @namespace Ink.UI.Droppable + * @version 1 + * @static + */ + var Droppable = { + /** + * Flag to activate debug mode + * + * @property debug + * @type {Boolean} + * @private + */ + debug: false, + + /** + * Array with the data of each element (`{element: ..., data: ..., options: ...}`) + * + * @property _droppables + * @type {Array} + * @private + */ + _droppables: [], + + /** + * Array of data for each draggable. (`{element: ..., data: ...}`) + * + * @property _draggables + * @type {Array} + * @private + */ + _draggables: [], + + /** + * Makes an element droppable. + * This method adds it to the stack of droppable elements. + * Can consider it a constructor of droppable elements, but where no Droppable object is returned. + * + * In the following arguments, any events/callbacks you may pass, can be either functions or strings. If the 'move' or 'copy' strings are passed, the draggable gets moved into this droppable. If 'revert' is passed, an acceptable droppable is moved back to the element it came from. + + * + * @method add + * @param {String|DOMElement} element Target element + * @param {Object} [options] Options object + * @param {String} [options.hoverClass] Classname(s) applied when an acceptable draggable element is hovering the element + * @param {String} [options.accept] Selector for choosing draggables which can be dropped in this droppable. + * @param {Function} [options.onHover] Callback when an acceptable draggable element is hovering the droppable. Gets the draggable and the droppable element as parameters. + * @param {Function|String} [options.onDrop] Callback when an acceptable draggable element is dropped. Gets the draggable, the droppable and the event as parameters. + * @param {Function|String} [options.onDropOut] Callback when a droppable is dropped outside this droppable. Gets the draggable, the droppable and the event as parameters. (see above for string options). + * @public + * + * @sample Ink_UI_Droppable_1.html + * + */ + add: function(element, options) { + element = Common.elOrSelector(element, 'Droppable.add target element'); + + var opt = Ink.extendObj( { + hoverClass: options.hoverclass /* old name */ || false, + accept: false, + onHover: false, + onDrop: false, + onDropOut: false + }, options || {}, InkElement.data(element)); + + if (typeof opt.hoverClass === 'string') { + opt.hoverClass = opt.hoverClass.split(/\s+/); + } + + function cleanStyle(draggable) { + draggable.style.position = 'inherit'; + } + var that = this; + var namedEventHandlers = { + move: function (draggable, droppable/*, event*/) { + cleanStyle(draggable); + droppable.appendChild(draggable); + }, + copy: function (draggable, droppable/*, event*/) { + cleanStyle(draggable); + droppable.appendChild(draggable.cloneNode); + }, + revert: function (draggable/*, droppable, event*/) { + that._findDraggable(draggable).originalParent.appendChild(draggable); + cleanStyle(draggable); + } + }; + var name; + + if (typeof opt.onHover === 'string') { + name = opt.onHover; + opt.onHover = namedEventHandlers[name]; + if (opt.onHover === undefined) { + throw new Error('Unknown hover event handler: ' + name); + } + } + if (typeof opt.onDrop === 'string') { + name = opt.onDrop; + opt.onDrop = namedEventHandlers[name]; + if (opt.onDrop === undefined) { + throw new Error('Unknown drop event handler: ' + name); + } + } + if (typeof opt.onDropOut === 'string') { + name = opt.onDropOut; + opt.onDropOut = namedEventHandlers[name]; + if (opt.onDropOut === undefined) { + throw new Error('Unknown dropOut event handler: ' + name); + } + } + + var elementData = { + element: element, + data: {}, + options: opt + }; + this._droppables.push(elementData); + this._update(elementData); + }, + + /** + * Finds droppable data about `element`. this data is added in `.add` + * + * @method _findData + * @param {DOMElement} element Needle + * @return {object} Droppable data of the element + * @private + */ + _findData: function (element) { + var elms = this._droppables; + for (var i = 0, len = elms.length; i < len; i++) { + if (elms[i].element === element) { + return elms[i]; + } + } + }, + /** + * Finds draggable data about `element` + * + * @method _findDraggable + * @param {DOMElement} element Needle + * @return {Object} Draggable data queried + * @private + */ + _findDraggable: function (element) { + var elms = this._draggables; + for (var i = 0, len = elms.length; i < len; i++) { + if (elms[i].element === element) { + return elms[i]; + } + } + }, + + /** + * Invoke every time a drag starts + * + * @method updateAll + * @private + */ + updateAll: function() { + InkArray.each(this._droppables, Droppable._update); + }, + + /** + * Updates location and size of droppable element + * + * @method update + * @param {String|DOMElement} element Target element + * @public + */ + update: function(element) { + this._update(this._findData(element)); + }, + + _update: function(elementData) { + var data = elementData.data; + var element = elementData.element; + data.left = InkElement.offsetLeft(element); + data.top = InkElement.offsetTop( element); + data.right = data.left + InkElement.elementWidth( element); + data.bottom = data.top + InkElement.elementHeight(element); + }, + + /** + * Removes an element from the droppable stack and removes the droppable behavior + * + * @method remove + * @param {String|DOMElement} elOrSelector Droppable element to disable. + * @return {Boolean} Whether the object was found and deleted + * @public + */ + remove: function(el) { + el = Common.elOrSelector(el); + var len = this._droppables.length; + for (var i = 0; i < len; i++) { + if (this._droppables[i].element === el) { + this._droppables.splice(i, 1); + break; + } + } + return len !== this._droppables.length; + }, + + /** + * Executes an action on a droppable + * + * @method action + * @param {Object} coords Coordinates where the action happened + * @param {String} type Type of action. 'drag' or 'drop'. + * @param {Object} ev Event object + * @param {Object} draggable Draggable element + * @private + */ + action: function(coords, type, ev, draggable) { + // check all droppable elements + InkArray.each(this._droppables, Ink.bind(function(elementData) { + var data = elementData.data; + var opt = elementData.options; + var element = elementData.element; + + if (opt.accept && !Selector.matches(opt.accept, [draggable]).length) { + return; + } + + if (type === 'drag' && !this._findDraggable(draggable)) { + this._draggables.push({ + element: draggable, + originalParent: draggable.parentNode + }); + } + + // check if our draggable is over our droppable + if (coords.x >= data.left && coords.x <= data.right && + coords.y >= data.top && coords.y <= data.bottom) { + // INSIDE + if (type === 'drag') { + if (opt.hoverClass) { + InkArray.each(opt.hoverClass, + hAddClassName(element)); + } + if (opt.onHover) { + opt.onHover(draggable, element); + } + } else if (type === 'drop') { + if (opt.hoverClass) { + InkArray.each(opt.hoverClass, + hRemoveClassName(element)); + } + if (opt.onDrop) { + opt.onDrop(draggable, element, ev); + } + } + } else { + // OUTSIDE + + if (type === 'drag' && opt.hoverClass) { + InkArray.each(opt.hoverClass, hRemoveClassName(element)); + } else if (type === 'drop') { + if(opt.onDropOut){ + opt.onDropOut(draggable, element, ev); + } + } + } + }, this)); + } + }; + + return Droppable; +}); +/** + * @module Ink.UI.FormValidator_1 + * Form Validation + * @version 1 + **/ + +Ink.createModule('Ink.UI.FormValidator', '1', ['Ink.Dom.Element_1', 'Ink.Dom.Css_1','Ink.Util.Validator_1','Ink.Dom.Selector_1'], function( InkElement, Css, InkValidator , Selector) { + 'use strict'; + + function elementsWithSameName(elm) { + if (!elm.name) { return []; } + if (!elm.form) { + return Selector.select('name="' + elm.name + '"'); + } + var ret = elm.form[elm.name]; + if(typeof(ret.length) === 'undefined') { + ret = [ret]; + } + return ret; + } + /** + * @namespace Ink.UI.FormValidator + * @version 1 + */ + var FormValidator = { + + /** + * Specifies the version of the component + * + * @property version + * @type {String} + * @readOnly + * @public + */ + version: '1', + + /** + * Available flags to use in the validation process. + * The keys are the 'rules', and their values are objects with the key 'msg', determining + * what is the error message. + * + * @property _flagMap + * @type {Object} + * @readOnly + * @private + */ + _flagMap: { + //'ink-fv-required': {msg: 'Campo obrigatório'}, + 'ink-fv-required': {msg: 'Required field'}, + //'ink-fv-email': {msg: 'E-mail inválido'}, + 'ink-fv-email': {msg: 'Invalid e-mail address'}, + //'ink-fv-url': {msg: 'URL inválido'}, + 'ink-fv-url': {msg: 'Invalid URL'}, + //'ink-fv-number': {msg: 'Número inválido'}, + 'ink-fv-number': {msg: 'Invalid number'}, + //'ink-fv-phone_pt': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_pt': {msg: 'Invalid phone number'}, + //'ink-fv-phone_cv': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_cv': {msg: 'Invalid phone number'}, + //'ink-fv-phone_mz': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_mz': {msg: 'Invalid phone number'}, + //'ink-fv-phone_ao': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_ao': {msg: 'Invalid phone number'}, + //'ink-fv-date': {msg: 'Data inválida'}, + 'ink-fv-date': {msg: 'Invalid date'}, + //'ink-fv-confirm': {msg: 'Confirmação inválida'}, + 'ink-fv-confirm': {msg: 'Confirmation does not match'}, + 'ink-fv-custom': {msg: ''} + }, + + /** + * This property holds all form elements for later validation + * + * @property elements + * @type {Object} + * @public + */ + elements: {}, + + /** + * This property holds the objects needed to cross-check for the 'confirm' rule + * + * @property confirmElms + * @type {Object} + * @public + */ + confirmElms: {}, + + /** + * This property holds the previous elements in the confirmElms property, but with a + * true/false specifying if it has the class ink-fv-confirm. + * + * @property hasConfirm + * @type {Object} + */ + hasConfirm: {}, + + /** + * Defined class name to use in error messages label + * + * @property _errorClassName + * @type {String} + * @readOnly + * @private + */ + _errorClassName: 'tip error', + + /** + * @property _errorValidationClassName + * @type {String} + * @readOnly + * @private + */ + _errorValidationClassName: 'validaton', + + /** + * @property _errorTypeWarningClassName + * @type {String} + * @readOnly + * @private + */ + _errorTypeWarningClassName: 'warning', + + /** + * @property _errorTypeErrorClassName + * @type {String} + * @readOnly + * @private + */ + _errorTypeErrorClassName: 'error', + + /** + * Checks if a form is valid + * + * @method validate + * @param {DOMElement|String} elm DOM form element or form id + * @param {Object} options Configuration options + * @param {Function} [options.onSuccess] Callback to run when form is valid + * @param {Function} [options.onError] Callback to run when form is not valid + * @param {Array} [options.customFlag] Custom flags to use to validate form fields + * @public + * @return {Boolean} Whether the form is deemed valid or not. + * + * @sample Ink_UI_FormValidator_1.html + */ + validate: function(elm, options) { + this._free(); + + options = Ink.extendObj({ + onSuccess: false, + onError: false, + customFlag: false, + confirmGroup: [] + }, options || {}); + + if(typeof(elm) === 'string') { + elm = document.getElementById(elm); + } + if(elm === null){ + return false; + } + this.element = elm; + + if(typeof(this.element.id) === 'undefined' || this.element.id === null || this.element.id === '') { + // generate a random ID + // TODO ugly and potentially problematic, and you know Murphy's law. + this.element.id = 'ink-fv_randomid_'+(Math.round(Math.random() * 99999)); + } + + this.custom = options.customFlag; + + this.confirmGroup = options.confirmGroup; + + var fail = this._validateElements(); + + if(fail.length > 0) { + if(options.onError) { + options.onError(fail); + } else { + this._showError(elm, fail); + } + return false; + } else { + if(!options.onError) { + this._clearError(elm); + } + this._clearCache(); + if(options.onSuccess) { + options.onSuccess(); + } + return true; + } + + }, + + /** + * Resets previously generated validation errors + * + * @method reset + * @public + */ + reset: function() + { + this._clearError(); + this._clearCache(); + }, + + /** + * Cleans the object + * + * @method _free + * @private + */ + _free: function() + { + this.element = null; + //this.elements = []; + this.custom = false; + this.confirmGroup = false; + }, + + /** + * Cleans the properties responsible for caching + * + * @method _clearCache + * @private + */ + _clearCache: function() + { + this.element = null; + this.elements = []; + this.custom = false; + this.confirmGroup = false; + }, + + /** + * Gets the form elements and stores them in the caching properties + * + * @method _getElements + * @private + */ + _getElements: function() + { + //this.elements = []; + // if(typeof(this.elements[this.element.id]) !== 'undefined') { + // return; + // } + + var elements = this.elements[this.element.id] = []; + this.confirmElms[this.element.id] = []; + //console.log(this.element); + //console.log(this.element.elements); + var formElms = Selector.select(':input', this.element); + var curElm = false; + for(var i=0, totalElm = formElms.length; i < totalElm; i++) { + curElm = formElms[i]; + var type = (curElm.getAttribute('type') + '').toLowerCase(); + + if (type === 'radio' || type === 'checkbox') { + if(elements.length === 0 || + ( + curElm.getAttribute('type') !== elements[elements.length - 1].getAttribute('type') && + curElm.getAttribute('name') !== elements[elements.length - 1].getAttribute('name') + )) { + for(var flag in this._flagMap) { + if(Css.hasClassName(curElm, flag)) { + elements.push(curElm); + break; + } + } + } + } else { + for(var flag2 in this._flagMap) { + if(Css.hasClassName(curElm, flag2) && flag2 !== 'ink-fv-confirm') { + /*if(flag2 == 'ink-fv-confirm') { + this.confirmElms[this.element.id].push(curElm); + this.hasConfirm[this.element.id] = true; + }*/ + elements.push(curElm); + break; + } + } + + if(Css.hasClassName(curElm, 'ink-fv-confirm')) { + this.confirmElms[this.element.id].push(curElm); + this.hasConfirm[this.element.id] = true; + } + + } + } + }, + + /** + * Runs the validation for each element + * + * @method _validateElements + * @private + */ + _validateElements: function() { + var oGroups; + this._getElements(); + if(this.hasConfirm[this.element.id] === true) { + oGroups = this._makeConfirmGroups(); + } + + var errors = []; + + var curElm = false; + var customErrors = false; + var inArray; + for(var i=0, totalElm = this.elements[this.element.id].length; i < totalElm; i++) { + inArray = false; + curElm = this.elements[this.element.id][i]; + + if(!curElm.disabled) { + for(var flag in this._flagMap) { + if(Css.hasClassName(curElm, flag)) { + if(flag !== 'ink-fv-custom' && flag !== 'ink-fv-confirm') { + if(!this._isValid(curElm, flag)) { + if(!inArray) { + errors.push({elm: curElm, errors:[flag]}); + inArray = true; + } else { + errors[(errors.length - 1)].errors.push(flag); + } + } + } else if(flag !== 'ink-fv-confirm'){ + customErrors = this._isCustomValid(curElm); + if(customErrors.length > 0) { + errors.push({elm: curElm, errors:[flag], custom: customErrors}); + } + } else if(flag === 'ink-fv-confirm'){ + continue; + } + } + } + } + } + errors = this._validateConfirmGroups(oGroups, errors); + //console.log(InkDumper.returnDump(errors)); + return errors; + }, + + /** + * Runs the 'confirm' validation for each group of elements + * + * @method _validateConfirmGroups + * @param {Array} oGroups Array/Object that contains the group of confirm objects + * @param {Array} errors Array that will store the errors + * @private + * @return {Array} Array of errors that was passed as 2nd parameter (either changed, or not, depending if errors were found). + */ + _validateConfirmGroups: function(oGroups, errors) { + //console.log(oGroups); + var curGroup = false; + for(var i in oGroups) if (oGroups.hasOwnProperty(i)) { + curGroup = oGroups[i]; + if(curGroup.length === 2) { + if(curGroup[0].value !== curGroup[1].value) { + errors.push({elm:curGroup[1], errors:['ink-fv-confirm']}); + } + } + } + return errors; + }, + + /** + * Creates the groups of 'confirm' objects + * + * @method _makeConfirmGroups + * @private + * @return {Array|Boolean} Returns the array of confirm elements or false on error. + */ + _makeConfirmGroups: function() + { + var oGroups; + if(this.confirmGroup && this.confirmGroup.length > 0) { + oGroups = {}; + var curElm = false; + var curGroup = false; + //this.confirmElms[this.element.id]; + for(var i=0, total=this.confirmElms[this.element.id].length; i < total; i++) { + curElm = this.confirmElms[this.element.id][i]; + for(var j=0, totalG=this.confirmGroup.length; j < totalG; j++) { + curGroup = this.confirmGroup[j]; + if(Css.hasClassName(curElm, curGroup)) { + if(typeof(oGroups[curGroup]) === 'undefined') { + oGroups[curGroup] = [curElm]; + } else { + oGroups[curGroup].push(curElm); + } + } + } + } + return oGroups; + } else { + if(this.confirmElms[this.element.id].length === 2) { + oGroups = { + "ink-fv-confirm": [ + this.confirmElms[this.element.id][0], + this.confirmElms[this.element.id][1] + ] + }; + } + return oGroups; + } + return false; + }, + + /** + * Validates an element with a custom validation + * + * @method _isCustomValid + * @param {DOMElemenmt} elm Element to be validated + * @private + * @return {Array} Array of errors. If no errors are found, results in an empty array. + */ + _isCustomValid: function(elm) + { + var customErrors = []; + var curFlag = false; + for(var i=0, tCustom = this.custom.length; i < tCustom; i++) { + curFlag = this.custom[i]; + if(Css.hasClassName(elm, curFlag.flag)) { + if(!curFlag.callback(elm, curFlag.msg)) { + customErrors.push({flag: curFlag.flag, msg: curFlag.msg}); + } + } + } + return customErrors; + }, + + /** + * Runs the normal validation functions for a specific element + * + * @method _isValid + * @param {DOMElement} elm DOMElement that will be validated + * @param {String} fieldType Rule to be validated. This must be one of the keys present in the _flagMap property. + * @private + * @return {Boolean} The result of the validation. + */ + _isValid: function(elm, fieldType) { + var nodeName = elm.nodeName.toLowerCase(); + var inputType = (elm.getAttribute('type') || '').toLowerCase(); + var value = this._trim(elm.value); + + // When we're analyzing emails, telephones, etc, and the field is + // empty, we check if it is required. If not required, it's valid. + if (fieldType !== 'ink-fv-required' && + inputType !== 'checkbox' && inputType !== 'radio' && + value === '') { + return !Css.hasClassName(elm, 'ink-fv-required'); + } + + switch(fieldType) { + case 'ink-fv-required': + if(nodeName === 'select') { + if(elm.selectedIndex > 0) { + return true; + } else { + return false; + } + } + if(inputType !== 'checkbox' && inputType !== 'radio' && + value !== '') { + return true; // A input type=text,email,etc. + } else if(inputType === 'checkbox' || inputType === 'radio') { + var aFormRadios = elementsWithSameName(elm); + var isChecked = false; + // check if any input of the radio is checked + for(var i=0, totalRadio = aFormRadios.length; i < totalRadio; i++) { + if(aFormRadios[i].checked === true) { + isChecked = true; + break; + } + } + return isChecked; + } + return false; + + case 'ink-fv-email': + return InkValidator.mail(elm.value); + + case 'ink-fv-url': + return InkValidator.url(elm.value); + + case 'ink-fv-number': + return !isNaN(Number(elm.value)) && isFinite(Number(elm.value)); + + case 'ink-fv-phone_pt': + return InkValidator.isPTPhone(elm.value); + + case 'ink-fv-phone_cv': + return InkValidator.isCVPhone(elm.value); + + case 'ink-fv-phone_ao': + return InkValidator.isAOPhone(elm.value); + + case 'ink-fv-phone_mz': + return InkValidator.isMZPhone(elm.value); + + case 'ink-fv-date': + var Element = Ink.getModule('Ink.Dom.Element',1); + var dataset = Element.data( elm ); + var validFormat = 'yyyy-mm-dd'; + + if( Css.hasClassName(elm, 'ink-datepicker') && ('format' in dataset) ){ + validFormat = dataset.format; + } else if( ('validFormat' in dataset) ){ + validFormat = dataset.validFormat; + } + + if( !(validFormat in InkValidator._dateParsers ) ){ + var validValues = []; + for( var val in InkValidator._dateParsers ){ + if (InkValidator._dateParsers.hasOwnProperty(val)) { + validValues.push(val); + } + } + throw new Error( + 'The attribute data-valid-format must be one of ' + + 'the following values: ' + validValues.join(', ')); + } + + return InkValidator.isDate( validFormat, elm.value ); + case 'ink-fv-custom': + break; + } + + return false; + }, + + /** + * Makes the necessary changes to the markup to show the errors of a given element + * + * @method _showError + * @param {DOMElement} formElm The form element to be changed to show the errors + * @param {Array} aFail An array with the errors found. + * @private + */ + _showError: function(formElm, aFail) { + this._clearError(formElm); + + //ink-warning-field + + //console.log(aFail); + var curElm = false; + for(var i=0, tFail = aFail.length; i < tFail; i++) { + curElm = aFail[i].elm; + if (curElm) { + this._showAnErrorOnElement(curElm, aFail[i]); + } + } + }, + + _showAnErrorOnElement: function (curElm, error) { + /* jshint noempty:false */ + + var controlGroupElm = InkElement.findUpwardsByClass( + curElm, 'control-group'); + var controlElm = InkElement.findUpwardsByClass( + curElm, 'control'); + + var errorClasses = [ + this._errorClassName, + this._errorTypeClassName].join(' '); + + var errorMsg = InkElement.create('p', { + className: errorClasses + }); + + if(error.errors[0] !== 'ink-fv-custom') { + errorMsg.innerHTML = this._flagMap[error.errors[0]].msg; + } else { + errorMsg.innerHTML = error.custom[0].msg; + } + + var target = (controlElm || controlGroupElm); + if (target) { + target.appendChild(errorMsg); + } else { + InkElement.insertAfter(errorMsg, curElm); + } + + if (controlElm) { + if(error.errors[0] === 'ink-fv-required') { + Css.addClassName(controlGroupElm, 'validation error'); + } else { + Css.addClassName(controlGroupElm, 'validation warning'); + } + } + }, + + /** + * Clears the error of a given element. Normally executed before any validation, for all elements, as a reset. + * + * @method _clearErrors + * @param {DOMElement} formElm Form element to be cleared. + * @private + */ + _clearError: function(formElm) { + //return; + var aErrorLabel = formElm.getElementsByTagName('p'); + + var curElm; + var control; + + for(var i = (aErrorLabel.length - 1); i >= 0; i--) { + curElm = aErrorLabel[i]; + if(Css.hasClassName(curElm, this._errorClassName)) { + control = InkElement.findUpwardsBySelector(curElm, '.control-group'); + if (control) { + Css.removeClassName(control, ['validation', 'error', 'warning']); + } + + if(Css.hasClassName(curElm, this._errorClassName, true /*both*/)) { + InkElement.remove(curElm); + } + } + } + + var aErrorLabel2 = formElm.getElementsByTagName('ul'); + for(i = (aErrorLabel2.length - 1); i >= 0; i--) { + curElm = aErrorLabel2[i]; + if(Css.hasClassName(curElm, 'control-group')) { + Css.removeClassName(curElm, 'validation error'); + } + } + }, + + /** + * Removes unnecessary spaces to the left or right of a string + * + * @method _trim + * @param {String} stri String to be trimmed + * @private + * @return {String|undefined} String trimmed. + */ + _trim: function(str) + { + if(typeof(str) === 'string') + { + return str.replace(/^\s+|\s+$|\n+$/g, ''); + } + } + }; + + return FormValidator; + +}); +/** + * @module Ink.UI.FormValidator_2 + * Form Validation + * @version 2 + */ + +Ink.createModule('Ink.UI.FormValidator', '2', [ 'Ink.UI.Common_1','Ink.Dom.Element_1','Ink.Dom.Event_1','Ink.Dom.Selector_1','Ink.Dom.Css_1','Ink.Util.Array_1','Ink.Util.I18n_1','Ink.Util.Validator_1'], function( Common, Element, Event, Selector, Css, InkArray, I18n, InkValidator ) { + 'use strict'; + + /** + * Validation Functions to be used + * Some functions are a port from PHP, others are the 'best' solutions available + * + * @private + * @static + */ + var validationFunctions = { + + /** + * Checks if a value is defined and not empty + * @method required + * @param {String} value Value to be checked + * @return {Boolean} True case is defined, false if it's empty or not defined. + */ + 'required': function( value ){ + return ( (typeof value !== 'undefined') && ( !(/^\s*$/).test(value) ) ); + }, + + /** + * Checks if a value has a minimum length + * + * @method min_length + * @param {String} value Value to be checked. + * @param {String|Number} minSize Minimum number of characters. + * @return {Boolean} True if the length of value is equal or bigger than the minimum chars defined. False if not. + */ + 'min_length': function( value, minSize ){ + return ( (typeof value === 'string') && ( value.length >= parseInt(minSize,10) ) ); + }, + + /** + * Checks if a value has a maximum length + * + * @method max_length + * @param {String} value Value to be checked. + * @param {String|Number} maxSize Maximum number of characters. + * @return {Boolean} True if the length of value is equal or smaller than the maximum chars defined. False if not. + */ + 'max_length': function( value, maxSize ){ + return ( (typeof value === 'string') && ( value.length <= parseInt(maxSize,10) ) ); + }, + + /** + * Checks if a value has an exact length + * + * @method exact_length + * @param {String} value Value to be checked + * @param {String|Number} exactSize Exact number of characters. + * @return {Boolean} True if the length of value is equal to the size defined. False if not. + */ + 'exact_length': function( value, exactSize ){ + return ( (typeof value === 'string') && ( value.length === parseInt(exactSize,10) ) ); + }, + + /** + * Checks if a value is a valid email address + * + * @method email + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid email address. False if not. + */ + 'email': function( value ){ + return ( ( typeof value === 'string' ) && InkValidator.mail( value ) ); + }, + + /** + * Checks if a value has a valid URL + * + * @method url + * @param {String} value Value to be checked + * @param {Boolean} fullCheck Flag to validate a full url (with the protocol). + * @return {Boolean} True if the URL is considered valid. False if not. + */ + 'url': function( value, fullCheck ){ + fullCheck = fullCheck || false; + return ( (typeof value === 'string') && InkValidator.url( value, fullCheck ) ); + }, + + /** + * Checks if a value is a valid IP. Supports ipv4 and ipv6 + * + * @method ip + * @param {String} value Value to be checked + * @param {String} ipType Type of IP to be validated. The values are: ipv4, ipv6. By default is ipv4. + * @return {Boolean} True if the value is a valid IP address. False if not. + */ + 'ip': function( value, ipType ){ + if( typeof value !== 'string' ){ + return false; + } + + return InkValidator.isIP(value, ipType); + }, + + /** + * Checks if a value is a valid phone number. + * Supports several countries, based in the Ink.Util.Validator class. + * + * @method phone + * @param {String} value Value to be checked + * @param {String} phoneType Country's initials to specify the type of phone number to be validated. Ex: 'AO'. + * @return {Boolean} True if it's a valid phone number. False if not. + */ + 'phone': function( value, phoneType ){ + if( typeof value !== 'string' ){ + return false; + } + + var countryCode = phoneType ? phoneType.toUpperCase() : ''; + + return InkValidator['is' + countryCode + 'Phone'](value); + }, + + /** + * Checks if a value is a valid credit card. + * + * @method credit_card + * @param {String} value Value to be checked + * @param {String} cardType Type of credit card to be validated. The card types available are in the Ink.Util.Validator class. + * @return {Boolean} True if the value is a valid credit card number. False if not. + */ + 'credit_card': function( value, cardType ){ + if( typeof value !== 'string' ){ + return false; + } + + return InkValidator.isCreditCard( value, cardType || 'default' ); + }, + + /** + * Checks if a value is a valid date. + * + * @method date + * @param {String} value Value to be checked + * @param {String} format Specific format of the date. + * @return {Boolean} True if the value is a valid date. False if not. + */ + 'date': function( value, format ){ + return ( (typeof value === 'string' ) && InkValidator.isDate(format, value) ); + }, + + /** + * Checks if a value only contains alphabetical values. + * + * @method alpha + * @param {String} value Value to be checked + * @param {Boolean} supportSpaces Allow whitespace + * @return {Boolean} True if the value is alphabetical-only. False if not. + */ + 'alpha': function( value, supportSpaces ){ + return InkValidator.ascii(value, {singleLineWhitespace: supportSpaces}); + }, + + /* + * Checks if a value contains only printable BMP unicode characters + * Optionally allow punctuation and whitespace + * + * @method text + * @param {String} value Value to be checked + * @return {Boolean} Whether the value only contains printable text characters + **/ + 'text': function (value, whitespace, punctuation) { + return InkValidator.unicode(value, { + singleLineWhitespace: whitespace, + unicodePunctuation: punctuation}); + }, + + /* + * Checks if a value contains only printable latin-1 text characters. + * Optionally allow punctuation and whitespace. + * + * @method text + * @param {String} value Value to be checked + * @return {Boolean} Whether the value only contains printable text characters + **/ + 'latin': function (value, punctuation, whitespace) { + if ( typeof value !== 'string') { return false; } + return InkValidator.latin1(value, {latin1Punctuation: punctuation, singleLineWhitespace: whitespace}); + }, + + /** + * Checks if a value contains only alphabetical or numerical characters. + * + * @method alpha_numeric + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid alphanumerical. False if not. + */ + 'alpha_numeric': function( value ){ + return InkValidator.ascii(value, {numbers: true}); + }, + + /** + * Checks if a value contains only alphabetical, dash or underscore characteres. + * + * @method alpha_dashes + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid. False if not. + */ + 'alpha_dash': function( value ){ + return InkValidator.ascii(value, {dash: true, underscore: true}); + }, + + /** + * Checks if a value is a single digit. + * + * @method digit + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid digit. False if not. + */ + 'digit': function( value ){ + return ((typeof value === 'string') && /^[0-9]{1}$/.test(value)); + }, + + /** + * Checks if a value is a valid integer. + * + * @method integer + * @param {String} value Value to be checked + * @param {String} positive Flag that specifies if the integer is must be positive (unsigned). + * @return {Boolean} True if the value is a valid integer. False if not. + */ + 'integer': function( value, positive ){ + return InkValidator.number(value, { + negative: !positive, + decimalPlaces: 0 + }); + }, + + /** + * Checks if a value is a valid decimal number. + * + * @method decimal + * @param {String} value Value to be checked + * @param {String} decimalSeparator Character that splits the integer part from the decimal one. By default is '.'. + * @param {String} [decimalPlaces] Maximum number of digits that the decimal part must have. + * @param {String} [leftDigits] Maximum number of digits that the integer part must have, when provided. + * @return {Boolean} True if the value is a valid decimal number. False if not. + */ + 'decimal': function( value, decimalSeparator, decimalPlaces, leftDigits ){ + return InkValidator.number(value, { + decimalSep: decimalSeparator || '.', + decimalPlaces: +decimalPlaces || null, + maxDigits: +leftDigits + }); + }, + + /** + * Checks if a value is a numeric value. + * + * @method numeric + * @param {String} value Value to be checked + * @param {String} decimalSeparator Checks if it's a valid decimal. Otherwise checks if it's a valid integer. + * @param {String} [decimalPlaces] Maximum number of digits the decimal part must have. + * @param {String} [leftDigits] Maximum number of digits the integer part must have, when provided. + * @return {Boolean} True if the value is numeric. False if not. + */ + 'numeric': function( value, decimalSeparator, decimalPlaces, leftDigits ){ + decimalSeparator = decimalSeparator || '.'; + if( value.indexOf(decimalSeparator) !== -1 ){ + return validationFunctions.decimal( value, decimalSeparator, decimalPlaces, leftDigits ); + } else { + return validationFunctions.integer( value ); + } + }, + + /** + * Checks if a value is in a specific range of values. + * The parameters after the first one are used to specify the range, and are similar in function to python's range() function. + * + * @method range + * @param {String} value Value to be checked + * @param {String} minValue Left limit of the range. + * @param {String} maxValue Right limit of the range. + * @param {String} [multipleOf] In case you want numbers that are only multiples of another number. + * @return {Boolean} True if the value is within the range. False if not. + */ + 'range': function( value, minValue, maxValue, multipleOf ){ + value = +value; + minValue = +minValue; + maxValue = +maxValue; + + if (isNaN(value) || isNaN(minValue) || isNaN(maxValue)) { + return false; + } + + if( value < minValue || value > maxValue ){ + return false; + } + + if (multipleOf) { + return (value - minValue) % multipleOf === 0; + } else { + return true; + } + }, + + /** + * Checks if a value is a valid color. + * + * @method color + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid color. False if not. + */ + 'color': function( value ){ + return InkValidator.isColor(value); + }, + + /** + * Checks if a value matches the value of a different field. + * + * @method matches + * @param {String} value Value to be checked + * @param {String} fieldToCompare Name or ID of the field to compare. + * @return {Boolean} True if the values match. False if not. + */ + 'matches': function( value, fieldToCompare ){ + return ( value === this.getFormElements()[fieldToCompare][0].getValue() ); + } + + }; + + /** + * Error messages for the validation functions above + * @private + * @static + */ + var validationMessages = new I18n({ + en_US: { + 'formvalidator.required' : 'The {field} filling is mandatory', + 'formvalidator.min_length': 'The {field} must have a minimum size of {param1} characters', + 'formvalidator.max_length': 'The {field} must have a maximum size of {param1} characters', + 'formvalidator.exact_length': 'The {field} must have an exact size of {param1} characters', + 'formvalidator.email': 'The {field} must have a valid e-mail address', + 'formvalidator.url': 'The {field} must have a valid URL', + 'formvalidator.ip': 'The {field} does not contain a valid {param1} IP address', + 'formvalidator.phone': 'The {field} does not contain a valid {param1} phone number', + 'formvalidator.credit_card': 'The {field} does not contain a valid {param1} credit card', + 'formvalidator.date': 'The {field} should contain a date in the {param1} format', + 'formvalidator.alpha': 'The {field} should only contain letters', + 'formvalidator.text': 'The {field} should only contain alphabetic characters', + 'formvalidator.latin': 'The {field} should only contain alphabetic characters', + 'formvalidator.alpha_numeric': 'The {field} should only contain letters or numbers', + 'formvalidator.alpha_dashes': 'The {field} should only contain letters or dashes', + 'formvalidator.digit': 'The {field} should only contain a digit', + 'formvalidator.integer': 'The {field} should only contain an integer', + 'formvalidator.decimal': 'The {field} should contain a valid decimal number', + 'formvalidator.numeric': 'The {field} should contain a number', + 'formvalidator.range': 'The {field} should contain a number between {param1} and {param2}', + 'formvalidator.color': 'The {field} should contain a valid color', + 'formvalidator.matches': 'The {field} should match the field {param1}', + 'formvalidator.validation_function_not_found': 'The rule {rule} has not been defined' + }, + pt_PT: { + 'formvalidator.required' : 'Preencher {field} é obrigatório', + 'formvalidator.min_length': '{field} deve ter no mínimo {param1} caracteres', + 'formvalidator.max_length': '{field} tem um tamanho máximo de {param1} caracteres', + 'formvalidator.exact_length': '{field} devia ter exactamente {param1} caracteres', + 'formvalidator.email': '{field} deve ser um e-mail válido', + 'formvalidator.url': 'O {field} deve ser um URL válido', + 'formvalidator.ip': '{field} não tem um endereço IP {param1} válido', + 'formvalidator.phone': '{field} deve ser preenchido com um número de telefone {param1} válido.', + 'formvalidator.credit_card': '{field} não tem um cartão de crédito {param1} válido', + 'formvalidator.date': '{field} deve conter uma data no formato {param1}', + 'formvalidator.alpha': 'O campo {field} deve conter apenas caracteres alfabéticos', + 'formvalidator.text': 'O campo {field} deve conter apenas caracteres alfabéticos', + 'formvalidator.latin': 'O campo {field} deve conter apenas caracteres alfabéticos', + 'formvalidator.alpha_numeric': '{field} deve conter apenas letras e números', + 'formvalidator.alpha_dashes': '{field} deve conter apenas letras e traços', + 'formvalidator.digit': '{field} destina-se a ser preenchido com apenas um dígito', + 'formvalidator.integer': '{field} deve conter um número inteiro', + 'formvalidator.decimal': '{field} deve conter um número válido', + 'formvalidator.numeric': '{field} deve conter um número válido', + 'formvalidator.range': '{field} deve conter um número entre {param1} e {param2}', + 'formvalidator.color': '{field} deve conter uma cor válida', + 'formvalidator.matches': '{field} deve corresponder ao campo {param1}', + 'formvalidator.validation_function_not_found': '[A regra {rule} não foi definida]' + } + }, 'en_US'); + + /** + * Constructor of a FormElement. + * This type of object has particular methods to parse rules and validate them in a specific DOM Element. + * + * @param {DOMElement} element DOM Element + * @param {Object} options Object with configuration options + * @return {FormElement} FormElement object + */ + var FormElement = function( element, options ){ + this._element = Common.elOrSelector( element, 'Invalid FormElement' ); + this._errors = {}; + this._rules = {}; + this._value = null; + + this._options = Ink.extendObj( { + label: this._getLabel() + }, Element.data(this._element) ); + + this._options = Ink.extendObj( this._options, options || {} ); + + }; + + /** + * FormElement's prototype + */ + FormElement.prototype = { + + /** + * Function to get the label that identifies the field. + * If it can't find one, it will use the name or the id + * (depending on what is defined) + * + * @method _getLabel + * @return {String} Label to be used in the error messages + * @private + */ + _getLabel: function(){ + + var controlGroup = Element.findUpwardsByClass(this._element,'control-group'); + var label = Ink.s('label',controlGroup); + if( label ){ + label = Element.textContent(label); + } else { + label = this._element.name || this._element.id || ''; + } + + return label; + }, + + /** + * Function to parse a rules' string. + * Ex: required|number|max_length[30] + * + * @method _parseRules + * @param {String} rules String with the rules + * @private + */ + _parseRules: function( rules ){ + this._rules = {}; + rules = rules.split("|"); + var i, rulesLength = rules.length, rule, params, paramStartPos ; + if( rulesLength > 0 ){ + for( i = 0; i < rulesLength; i++ ){ + rule = rules[i]; + if( !rule ){ + continue; + } + + if( ( paramStartPos = rule.indexOf('[') ) !== -1 ){ + params = rule.substr( paramStartPos+1 ); + params = params.split(']'); + params = params[0]; + params = params.split(','); + for (var p = 0, len = params.length; p < len; p++) { + params[p] = + params[p] === 'true' ? true : + params[p] === 'false' ? false : + params[p]; + } + params.splice(0,0,this.getValue()); + + rule = rule.substr(0,paramStartPos); + + this._rules[rule] = params; + } else { + this._rules[rule] = [this.getValue()]; + } + } + } + }, + + /** + * Function to add an error to the FormElement's 'errors' object. + * It basically receives the rule where the error occurred, the parameters passed to it (if any) + * and the error message. + * Then it replaces some tokens in the message for a more 'custom' reading + * + * @method _addError + * @param {String|null} rule Rule that failed, or null if no rule was found. + * @private + * @static + */ + _addError: function(rule){ + var params = this._rules[rule] || []; + + var paramObj = { + field: this._options.label, + value: this.getValue() + }; + + for( var i = 1; i < params.length; i++ ){ + paramObj['param' + i] = params[i]; + } + + var i18nKey = 'formvalidator.' + rule; + + this._errors[rule] = validationMessages.text(i18nKey, paramObj); + + if (this._errors[rule] === i18nKey) { + this._errors[rule] = 'Validation message not found'; + } + }, + + /** + * Gets an element's value + * + * @method getValue + * @return {mixed} The DOM Element's value + * @public + */ + getValue: function(){ + + switch(this._element.nodeName.toLowerCase()){ + case 'select': + return Ink.s('option:selected',this._element).value; + case 'textarea': + return this._element.innerHTML; + case 'input': + if( "type" in this._element ){ + if( (this._element.type === 'radio') && (this._element.type === 'checkbox') ){ + if( this._element.checked ){ + return this._element.value; + } + } else if( this._element.type !== 'file' ){ + return this._element.value; + } + } else { + return this._element.value; + } + return; + default: + return this._element.innerHTML; + } + }, + + /** + * Gets the constructed errors' object. + * + * @method getErrors + * @return {Object} Errors' object + * @public + */ + getErrors: function(){ + return this._errors; + }, + + /** + * Gets the DOM element related to the instance. + * + * @method getElement + * @return {Object} DOM Element + * @public + */ + getElement: function(){ + return this._element; + }, + + /** + * Gets other elements in the same form. + * + * @method getFormElements + * @return {Object} A mapping of keys to other elements in this form. + * @public + */ + getFormElements: function () { + return this._options.form._formElements; + }, + + /** + * Validates the element based on the rules defined. + * It parses the rules defined in the _options.rules property. + * + * @method validate + * @return {Boolean} True if every rule was valid. False if one fails. + * @public + */ + validate: function(){ + this._errors = {}; + + if( "rules" in this._options || 1){ + this._parseRules( this._options.rules ); + } + + if( ("required" in this._rules) || (this.getValue() !== '') ){ + for(var rule in this._rules) { + if (this._rules.hasOwnProperty(rule)) { + if( (typeof validationFunctions[rule] === 'function') ){ + if( validationFunctions[rule].apply(this, this._rules[rule] ) === false ){ + + this._addError( rule ); + return false; + + } + + } else { + + this._addError( null ); + return false; + } + } + } + } + + return true; + + } + }; + + + + /** + * @class Ink.UI.FormValidator_2 + * @version 2 + * @constructor + * @param {String|DOMElement} selector Either a CSS Selector string, or the form's DOMElement + * @param {String} [options.eventTrigger] Event that will trigger the validation. Defaults to 'submit'. + * @param {Boolean} [options.neverSubmit] Flag to cancel the submit event. Use this to avoid submitting the form. + * @param {Selector} [options.searchFor] Selector containing the validation data-attributes. Defaults to 'input, select, textarea, .control-group'. + * @param {Function} [options.beforeValidation] Callback to be executed before validating the form + * @param {Function} [options.onError] Validation error callback + * @param {Function} [options.onSuccess] Validation success callback + * + * @example + * Ink.requireModules( ['Ink.UI.FormValidator_2'], function( FormValidator ){ + * var myValidator = new FormValidator( '#my-form' ); + * }); + */ + var FormValidator = function( selector, options ){ + + /** + * DOMElement of the form being validated + * + * @property _rootElement + * @type {DOMElement} + */ + this._rootElement = Common.elOrSelector( selector ); + + /** + * Object that will gather the form elements by name + * + * @property _formElements + * @type {Object} + */ + this._formElements = {}; + + /** + * Error message DOMElements + * + * @property _errorMessages + */ + this._errorMessages = []; + + /** + * Array of elements marked with validation errors + * + * @property _markedErrorElements + */ + this._markedErrorElements = []; + + /** + * Configuration options. Fetches the data attributes first, then the ones passed when executing the constructor. + * By doing that, the latter will be the one with highest priority. + * + * @property _options + * @type {Object} + */ + this._options = Ink.extendObj({ + eventTrigger: 'submit', + neverSubmit: 'false', + searchFor: 'input, select, textarea, .control-group', + beforeValidation: undefined, + onError: undefined, + onSuccess: undefined + },Element.data(this._rootElement)); + + this._options = Ink.extendObj( this._options, options || {} ); + + // Sets an event listener for a specific event in the form, if defined. + // By default is the 'submit' event. + if( typeof this._options.eventTrigger === 'string' ){ + Event.observe( this._rootElement,this._options.eventTrigger, Ink.bindEvent(this.validate,this) ); + } + + this._init(); + }; + + /** + * Sets or modifies validation functions + * + * @method setRule + * @param {String} name Name of the function. E.g. 'required' + * @param {String} errorMessage Error message to be displayed in case of returning false. E.g. 'Oops, you passed {param1} as parameter1, lorem ipsum dolor...' + * @param {Function} cb Function to be executed when calling this rule + * @public + * @static + */ + FormValidator.setRule = function( name, errorMessage, cb ){ + validationFunctions[ name ] = cb; + if (validationMessages.getKey('formvalidator.' + name) !== errorMessage) { + var langObj = {}; langObj['formvalidator.' + name] = errorMessage; + var dictObj = {}; dictObj[validationMessages.lang()] = langObj; + validationMessages.append(dictObj); + } + }; + + /** + * Gets the i18n object in charge of the error messages + * + * @method getI18n + * @return {Ink.Util.I18n} The i18n object the FormValidator is using. + */ + FormValidator.getI18n = function () { + return validationMessages; + }; + + /** + * Sets the I18n object for validation error messages + * + * @method setI18n + * @param {Ink.Util.I18n} i18n The I18n object. + */ + FormValidator.setI18n = function (i18n) { + validationMessages = i18n; + }; + + /** + * Add to the I18n dictionary. + * See `Ink.Util.I18n.append()` documentation. + * + * @method AppendI18n + */ + FormValidator.appendI18n = function () { + validationMessages.append.apply(validationMessages, [].slice.call(arguments)); + }; + + /** + * Sets the language of the error messages. + * pt_PT and en_US are available, but you can add new languages by using append() + * + * See the `Ink.Util.I18n.lang()` setter + * + * @method setLanguage + * @param language The language to set i18n to. + */ + FormValidator.setLanguage = function (language) { + validationMessages.lang(language); + }; + + /** + * Method used to get the existing defined validation functions + * + * @method getRules + * @return {Object} Object with the rules defined + * @public + * @static + */ + FormValidator.getRules = function(){ + return validationFunctions; + }; + + FormValidator.prototype = { + _init: function(){ + + }, + + /** + * Searches for the elements in the form. + * This method is based in the this._options.searchFor configuration. + * + * @method getElements + * @return {Object} An object with the elements in the form, indexed by name/id + * @public + */ + getElements: function(){ + this._formElements = {}; + var formElements = Selector.select( this._options.searchFor, this._rootElement ); + if( formElements.length ){ + var i, element; + for( i=0; i'); + this._errorMessages.push(paragraph); + }, this)); + return false; + } + } + }; + + /** + * Returns the FormValidator's Object + */ + return FormValidator; + +}); +/** + * @module Ink.UI.ImageQuery_1 + * Responsive image loading + * @version 1 + */ + +Ink.createModule('Ink.UI.ImageQuery', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Element_1','Ink.Util.Array_1'], function(Common, Event, Element, InkArray ) { + 'use strict'; + + /** + * @class Ink.UI.ImageQuery + * @constructor + * @version 1 + * + * @param {String|DOMElement} selector Selector or element + * @param {Object} [options] Options object + * @param {String|Function} [options.src] String or Callback function (that returns a string) with the path to be used to get the images. + * @param {String|Function} [options.retina] String or Callback function (that returns a string) with the path to be used to get RETINA specific images. + * @param {Array} [options.queries] Array of queries + * @param {String} [options.queries.label] Label of the query. Ex. 'small' + * @param {Number} [options.queries.width] Min-width to use this query + * @param {Function} [options.onLoad] Date format string + * + * @example + *
    + * + *
    + * + */ + var ImageQuery = function(selector, options){ + + /** + * Get elements, create more ImageQueries if selector finds more than one + * + * [improvement] This is a useful pattern. More UI modules could use it. + */ + this._element = Common.elsOrSelector(selector, 'Ink.UI.ImageQuery', /*required=*/true); + + // In case we have several elements + for (var i = 1 /* start from second element*/; i < this._element.length; i++) { + new ImageQuery(this._element[i], options); + } + + this._element = this._element[0]; + + /** + * Default options, overriden by data-attributes if any. + * The parameters are: + * @xparam {array} queries Array of objects that determine the label/name and its min-width to be applied. + * @xparam {boolean} allowFirstLoad Boolean flag to allow the loading of the first element. + */ + this._options = Ink.extendObj({ + queries:[], + onLoad: null + }, options || {}, Element.data(this._element)); + + /** + * Determining the original basename (with the querystring) of the file. + */ + var pos; + if( (pos=this._element.src.lastIndexOf('?')) !== -1 ){ + var search = this._element.src.substr(pos); + this._filename = this._element.src.replace(search,'').split('/').pop()+search; + } else { + this._filename = this._element.src.split('/').pop(); + } + + this._init(); + }; + + ImageQuery.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function(){ + // Sort queries by width, in descendant order. + this._options.queries = InkArray.sortMulti(this._options.queries, 'width').reverse(); + + if( typeof this._options.onLoad === 'function' ){ + Event.observe(this._element, 'onload', Ink.bindEvent(this._onLoad, this)); + } + + Event.observe(window, 'resize', Event.throttle(Ink.bindMethod(this, '_onResize'), 400)); + + // Imediate call to apply the right images based on the current viewport + this._onResize(); + }, + + /** + * Handles the resize event (as specified in the _init function) + * + * @method _onResize + * @private + */ + _onResize: function(){ + if( !this._options.queries.length ){ + return; + } + + var current = this._findCurrentQuery(); + + /** + * Choosing the right src. The rule is: + * + * "If there is specifically defined in the query object, use that. Otherwise uses the global src." + * + * The above rule applies to a retina src. + */ + var src = current.src || this._options.src; + if ( window.devicePixelRatio > 1 && ('retina' in this._options ) ) { + src = current.retina || this._options.retina; + } + + /** + * Injects the file variable for usage in the 'templating system' below + */ + current.file = this._filename; + + /** + * Since we allow the src to be a callback, let's run it and get the results. + * For the inside, we're passing the element (img) being processed and the object of the selected query. + */ + if( typeof src === 'function' ){ + src = src.apply(this,[this._element,current]); + if( typeof src !== 'string' ){ + throw '[ImageQuery] :: "src" callback does not return a string'; + } + } + + /** + * Replace the values of the existing properties on the query object (except src and retina) in the + * defined src and/or retina. + */ + src = src.replace(/{:(.*?)}/g, function(_, prop) { + return current[prop]; + }); + + this._element.src = src; + + // Removes the injected file property + delete current.file; + }, + + /** + * Queries are in a descendant order. We want to find the query with the highest width that fits the viewport, therefore the first one. + */ + _findCurrentQuery: function () { + /** + * Gets viewport width + */ + var viewportWidth = window.innerWidth || + document.documentElement.clientWidth || + document.body.clientWidth; + + var queries = this._options.queries; + var last = queries.length - 1; + + for( var query=0; query < last; query+=1 ){ + if (queries[query].width <= viewportWidth){ + return queries[query]; + } + } + + return queries[last]; + }, + + /** + * Handles the element loading (img onload) event + * + * @method _onLoad + * @private + */ + _onLoad: function(){ + + /** + * Since we allow a callback for this let's run it. + */ + this._options.onLoad.call(this); + } + + }; + + return ImageQuery; + +}); +/** + * @module Ink.UI.LazyLoad_1 + * Delays content loading + * @version 1 + */ + +Ink.createModule('Ink.UI.LazyLoad', '1', ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1'], function(UICommon, InkEvent, InkElement) { +'use strict'; + +var LazyLoad = function(selector, options) { + this._init(selector, options); +}; + +LazyLoad.prototype = { + /** + * Stops the browser from loading a barrage of content at once. + * + * This delays the loading of images and other content until the corresponding elements are visible in the browser viewport. + * This was created to load images later, but can be also used for widgets which are slow to load and are only useful when on screen. + * + * This works through copying the `src` attribute into `data-src`, and placing a `placeholder` string in the `src` attribute. Then, when the element is on screen, the `data-src` attribute is copied back to `src` and the content starts loading. You can use the options below to change what attributes are involved in the exchange. + * + * You can also provide your `onInsideViewport` callback and use it to start widgets which need javascript, such as an interactive map or an animation. + * + * @class Ink.UI.LazyLoad_1 + * @constructor + * + * @param rootElement {String|DOMElement} The element which contains the lazily-loaded items. + * @param {Object} [options] Options object, containing: + * @param {String} [options.item] Item selector. Defaults to '.lazyload-item'. + * @param {String} [options.placeholder] Placeholder value for items which are not 'visible', in case they don't already have a value set. + * @param {String} [options.source] Source attribute. When an item is 'visible', use this attribute's value to set its destination attribute. Defaults to 'data-src'. + * @param {String} [options.destination] Destination attribute. Attribute to change when the element is 'visible'. Defaults to 'src'. + * @param {Number} [options.delay] Milliseconds to wait before trying to load items. Defaults to 100. + * @param {Number} [options.delta] Offset distance in pixels. Determines how far the top of an item must be from the viewport be considered 'visible'. Negative values shrink the considered 'visible' viewport while positive values enlarge it. Defaults to 0. + * @param {Boolean} [options.image] Set to false to make this component do nothing to any elements and just give you the onInsideViewport callback. + * @param {DOMElement} [options.scrollElement] (advanced) What element is to be listened for the scroll event. Defaults to document.window. + * @param {Boolean} [options.touchEvents] Subscribe to touch events in addition to scroll events. Useful in mobile safari because 'scroll' events aren't frequent enough. Defaults to true. + * @param {Function} [options.onInsideViewport] Callback function for when an `item` is 'visible'. Receives an object containing the item's element as an argument. + * @param {Function} [options.onAfterAttributeChange] (advanced) Callback function when an item's attribute changes. Receives an object containing the item's element as an argument. + * @param {Boolean} [options.autoInit] (advanced) Set to false if you want to start LazyLoad yourself with `reload()`. Defaults to true. + * + * @sample Ink_UI_LazyLoad_1.html + */ + _init: function(selector) { + this._rootElm = UICommon.elsOrSelector(selector, 'Ink.UI.LazyLoad root element')[0] || null; + + this._options = UICommon.options({ + item: ['String', '.lazyload-item'], + placeholder: ['String', null], + source: ['String', 'data-src'], + destination: ['String', 'src'], + delay: ['Number', 100], + delta: ['Number', 0], + image: ['Boolean', true], + scrollElement: ['Element', window], + touchEvents: ['Boolean', true], + onInsideViewport: ['Function', false], + onAfterAttributeChange: ['Function', false], + autoInit: ['Boolean', true] + }, arguments[1] || {}, this._rootElm); + + this._aData = []; + this._hasEvents = false; + + if(this._options.autoInit) { + this._activate(); + } + }, + + _activate: function() + { + this._getData(); + if(!this._hasEvents) { + this._addEvents(); + } + this._onScrollThrottled(); + }, + + _getData: function() + { + var aElms = Ink.ss(this._options.item); + var attr = null; + for(var i=0, t=aElms.length; i < t; i++) { + if (this._options.placeholder != null && !InkElement.hasAttribute(aElms[i], this._options.destination)) { + aElms[i].setAttribute(this._options.destination, this._options.placeholder); + } + attr = aElms[i].getAttribute(this._options.source); + if(attr !== null || !this._options.image) { + this._aData.push({elm: aElms[i], original: attr}); + } + } + }, + + _addEvents: function() + { + this._onScrollThrottled = InkEvent.throttle(Ink.bindEvent(this._onScroll, this), this._options.delay); + if('ontouchmove' in document.documentElement && this._options.touchEvents) { + InkEvent.observe(document.documentElement, 'touchmove', this._onScrollThrottled); + } + InkEvent.observe(this._options.scrollElement, 'scroll', this._onScrollThrottled); + this._hasEvents = true; + }, + + _removeEvents: function() { + if('ontouchmove' in document.documentElement && this._options.touchEvents) { + InkEvent.stopObserving(document.documentElement, 'touchmove', this._onScrollThrottled); + } + InkEvent.stopObserving(this._options.scrollElement, 'scroll', this._onScrollThrottled); + this._hasEvents = false; + }, + + _onScroll: function() { + var curElm; + + for(var i=0; i < this._aData.length; i++) { + curElm = this._aData[i]; + + if(InkElement.inViewport(curElm.elm, { partial: true, margin: this._options.delta })) { + this._elInViewport(curElm); + if (this._options.image) { + /* [todo] a seemingly unrelated option creates a branch? Some of this belongs in another module. */ + this._aData.splice(i, 1); + i -= 1; + } + } + } + + if (this._aData.length === 0) { + this._removeEvents(); + } + }, + + /** + * Called when an element is detected inside the viewport + * + * @method _elInViewport + * @param {LazyLoadInternalElementData} curElm + * @private + **/ + _elInViewport: function (curElm) { + this._userCallback('onInsideViewport', { element: curElm.elm }); + + if(this._options.image) { + curElm.elm.setAttribute(this._options.destination, curElm.original); + curElm.elm.removeAttribute(this._options.source); + } + + this._userCallback('onAfterAttributeChange', { element: curElm.elm }); + }, + + /** + * Call a callback if it exists and its `typeof` is `"function"`. + * @method _userCallback + * @param name {String} Callback name in this._options. + * @private + **/ + _userCallback: function (name) { + if (typeof this._options[name] === 'function') { + this._options[name].apply(this, [].slice.call(arguments, 1)); + } + }, + + /** + * Load or reload the component. + * Adding the 'scroll' event listener if necessary and checks if anything needs to be loaded now. + * + * You can use this to manually invoke the loading logic without user action. + * + * @method reload + * @public + */ + reload: function() { + this._activate(); + }, + + /** + * Destroy this component + * @method destroy + * @public + **/ + destroy: function() { + if(this._hasEvents) { + this._removeEvents(); + } + UICommon.destroyComponent.call(this); + } +}; + +return LazyLoad; + +}); + +/** + * @module Ink.UI.Modal_1 + * Modal dialog prompts + * @version 1 + */ +Ink.createModule('Ink.UI.Modal', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1'], function(Common, Event, Css, InkElement, Selector, InkArray ) { + 'use strict'; + + var opacitySupported = (function (div) { + div.style.opacity = 'invalid'; + return div.style.opacity !== 'invalid'; + }(InkElement.create('div', {style: 'opacity: 1'}))); + + /** + * @class Ink.UI.Modal + * @constructor + * @version 1 + * @param {String|DOMElement} selector Element or ID + * @param {Object} [options] Options + * @param {String} [options.width] Default/Initial width. Ex: '600px' + * @param {String} [options.height] Default/Initial height. Ex: '400px' + * @param {String} [options.shadeClass] Custom class to be added to the div.ink-shade + * @param {String} [options.modalClass] Custom class to be added to the div.ink-modal + * @param {String} [options.trigger] CSS Selector for target elements that will trigger the Modal. + * @param {String} [options.triggerEvent] Trigger's event to be listened. Defaults to 'click'. + * @param {Boolean} [options.autoDisplay] Displays the Modal automatically when constructed. + * @param {String} [options.markup] Markup to be placed in the Modal when created + * @param {Function} [options.onShow] Callback function to run when the Modal is opened. + * @param {Function} [options.onDismiss] Callback function to run when the Modal is closed. Return `false` to cancel dismissing the Modal. + * @param {Boolean} [options.closeOnClick] Flag to close the modal when clicking outside of it. + * @param {Boolean} [options.closeOnEscape] Determines if the Modal should close when "Esc" key is pressed. Defaults to true. + * @param {Boolean} [options.responsive] Determines if the Modal should behave responsively (adapt to smaller viewports). + * @param {Boolean} [options.disableScroll] Determines if the Modal should 'disable' the page's scroll (not the Modal's body). + * + * @sample Ink_UI_Modal_1.html + */ + + function upName(dimension) { + // omg IE + var firstCharacter = dimension.match(/^./)[0]; + return firstCharacter.toUpperCase() + dimension.replace(/^./, ''); + } + function maxName(dimension) { + return 'max' + upName(dimension); + } + + var openModals = []; + + var Modal = function(selector, options) { + if (!selector) { + this._element = null; + } else { + this._element = Common.elOrSelector(selector, 'Ink.UI.Modal markup'); + } + + this._options = { + /** + * Width, height and markup really optional, as they can be obtained by the element + */ + width: undefined, + height: undefined, + + /** + * To add extra classes + */ + shadeClass: undefined, + modalClass: undefined, + + /** + * Optional trigger properties + */ + trigger: undefined, + triggerEvent: 'click', + autoDisplay: true, + + /** + * Remaining options + */ + markup: undefined, + onShow: undefined, + onDismiss: undefined, + closeOnClick: false, + closeOnEscape: true, + responsive: true, + disableScroll: true + }; + + + this._handlers = { + click: Ink.bindEvent(this._onShadeClick, this), + keyDown: Ink.bindEvent(this._onKeyDown, this), + resize: Ink.bindEvent(this._onResize, this) + }; + + this._wasDismissed = false; + + /** + * Modal Markup + */ + if( this._element ){ + this._markupMode = Css.hasClassName(this._element,'ink-modal'); // Check if the full modal comes from the markup + } else { + this._markupMode = false; + } + + if( !this._markupMode ){ + this._modalShadow = document.createElement('div'); + this._modalShadowStyle = this._modalShadow.style; + + this._modalDiv = document.createElement('div'); + this._modalDivStyle = this._modalDiv.style; + + if( !!this._element ){ + this._options.markup = this._element.innerHTML; + } + + /** + * Not in full markup mode, let's set the classes and css configurations + */ + Css.addClassName( this._modalShadow,'ink-shade' ); + Css.addClassName( this._modalDiv,'ink-modal ink-space' ); + + /** + * Applying the main css styles + */ + // this._modalDivStyle.position = 'absolute'; + this._modalShadow.appendChild( this._modalDiv); + document.body.appendChild( this._modalShadow ); + } else { + this._modalDiv = this._element; + this._modalDivStyle = this._modalDiv.style; + this._modalShadow = this._modalDiv.parentNode; + this._modalShadowStyle = this._modalShadow.style; + + this._contentContainer = Selector.select(".modal-body", this._modalDiv)[0]; + if( !this._contentContainer){ + throw new Error('Ink.UI.Modal: Missing div with class "modal-body"'); + } + + this._options.markup = this._contentContainer.innerHTML; + + /** + * First, will handle the least important: The dataset + */ + this._options = Ink.extendObj(this._options,InkElement.data(this._element)); + + } + + /** + * Now, the most important, the initialization options + */ + this._options = Ink.extendObj(this._options,options || {}); + + if( !this._markupMode ){ + this.setContentMarkup(this._options.markup); + } + + if( typeof this._options.shadeClass === 'string' ){ + Css.addClassName(this._modalShadow, this._options.shadeClass); + } + + if( typeof this._options.modalClass === 'string' ){ + Css.addClassName(this._modalDiv, this._options.modalClass); + } + + if( ("trigger" in this._options) && ( typeof this._options.trigger !== 'undefined' ) ){ + var triggerElement; + if( typeof this._options.trigger === 'string' ){ + triggerElement = Selector.select( this._options.trigger ); + Event.observeMulti(triggerElement, this._options.triggerEvent, Ink.bindEvent(this.open, this)); + } + } else if ( this._options.autoDisplay.toString() === "true" ) { + this.open(); + } + }; + + Modal.prototype = { + + /** + * Responsible for repositioning the modal + * + * @method _reposition + * @private + */ + _reposition: function(){ + this._modalDivStyle.marginTop = (-InkElement.elementHeight(this._modalDiv)/2) + 'px'; + this._modalDivStyle.marginLeft = (-InkElement.elementWidth(this._modalDiv)/2) + 'px'; + }, + + /** + * Responsible for resizing the modal + * + * @method _onResize + * @param {Boolean|Event} runNow Its executed in the begining to resize/reposition accordingly to the viewport. But usually it's an event object. + * @private + */ + _onResize: function( runNow ){ + if( typeof runNow === 'boolean' ){ + this._timeoutResizeFunction.call(this); + } else if( !this._resizeTimeout && (runNow && typeof runNow === 'object') ){ + this._resizeTimeout = setTimeout(Ink.bind(this._timeoutResizeFunction, this),250); + } + }, + + /** + * Timeout Resize Function + * + * @method _timeoutResizeFunction + * @private + */ + _timeoutResizeFunction: function(){ + /** + * Getting the current viewport size + */ + var isPercentage = { + width: ('' + this._options.width).indexOf('%') !== -1, + height: ('' + this._options.height).indexOf('%') !== -1 + }; + var currentViewport = { + height: InkElement.viewportHeight(), + width: InkElement.viewportWidth() + }; + + InkArray.forEach(['height', 'width'], Ink.bind(function (dimension) { + // Not used for percentage measurements + if (isPercentage[dimension]) { return; } + + if (currentViewport[dimension] > this.originalStatus[dimension]) { + this._modalDivStyle[dimension] = this._modalDivStyle[maxName(dimension)]; + } else { + this._modalDivStyle[dimension] = Math.round(currentViewport[dimension] * 0.9) + 'px'; + } + }, this)); + + this._resizeContainer(); + this._reposition(); + this._resizeTimeout = undefined; + }, + + /** + * Handle clicks on the shade element. + * + * @method _onShadeClick + * @param {Event} ev + * @private + */ + _onShadeClick: function(ev) { + var tgtEl = Event.element(ev); + + if (Css.hasClassName(tgtEl, 'ink-close') || Css.hasClassName(tgtEl, 'ink-dismiss') || + InkElement.findUpwardsBySelector(tgtEl, '.ink-close,.ink-dismiss') || + ( + this._options.closeOnClick && + (!InkElement.descendantOf(this._shadeElement, tgtEl) || (tgtEl === this._shadeElement)) + ) + ) { + var alertsInTheModal = Selector.select('.ink-alert', this._shadeElement), + alertsLength = alertsInTheModal.length; + for( var i = 0; i < alertsLength; i++ ){ + if( InkElement.descendantOf(alertsInTheModal[i], tgtEl) ){ + return; + } + } + + this.dismiss(); + + // Only stop the event if this dismisses this modal + if (this._wasDismissed) { + Event.stop(ev); + } + } + }, + + /** + * Responsible for handling the escape key pressing. + * + * @method _onKeyDown + * @param {Event} ev + * @private + */ + _onKeyDown: function(ev) { + if (ev.keyCode !== 27 || this._wasDismissed) { return; } + if (this._options.closeOnEscape.toString() === 'true' && + openModals[openModals.length - 1] === this) { + this.dismiss(); + if (this._wasDismissed) { + Event.stop(ev); + } + } + }, + + /** + * Responsible for setting the size of the modal (and position) based on the viewport. + * + * @method _resizeContainer + * @private + */ + _resizeContainer: function() { + // [3.0.0] drop this because everyone should have the new CSS now, which has this rule already with .ink-modal-is-open. + this._contentElement.style.overflow = this._contentElement.style.overflowX = this._contentElement.style.overflowY = 'hidden'; + var containerHeight = InkElement.elementHeight(this._modalDiv); + + this._modalHeader = Selector.select('.modal-header',this._modalDiv)[0]; + if( this._modalHeader ){ + containerHeight -= InkElement.elementHeight(this._modalHeader); + } + + this._modalFooter = Selector.select('.modal-footer',this._modalDiv)[0]; + if( this._modalFooter ){ + containerHeight -= InkElement.elementHeight(this._modalFooter); + } + + this._contentContainer.style.height = containerHeight + 'px'; + if( containerHeight !== InkElement.elementHeight(this._contentContainer) ){ + this._contentContainer.style.height = ~~(containerHeight - (InkElement.elementHeight(this._contentContainer) - containerHeight)) + 'px'; + } + + if( this._markupMode ){ return; } + + this._contentContainer.style.overflow = this._contentContainer.style.overflowX = 'hidden'; + this._contentContainer.style.overflowY = 'auto'; + this._contentElement.style.overflow = this._contentElement.style.overflowX = this._contentElement.style.overflowY = 'visible'; + }, + + /** + * Responsible for 'disabling' the page scroll + * + * @method _disableScroll + * @private + */ + _disableScroll: function() { + var htmlEl = document.documentElement; + this._oldHtmlOverflows = [ htmlEl.style.overflowX, + htmlEl.style.overflowY ]; + htmlEl.style.overflowX = htmlEl.style.overflowY = 'hidden'; + }, + + /************** + * PUBLIC API * + **************/ + + /** + * Opens this Modal. + * Useful if you have initialized the modal + * @method open + * @param {Event} [event] (internal) In case its fired by the internal trigger. + */ + open: function(event) { + + if( event ){ Event.stop(event); } + + var elem = (document.compatMode === "CSS1Compat") ? document.documentElement : document.body; + + this._resizeTimeout = null; + + Css.addClassName( this._modalShadow,'ink-shade' ); + this._modalShadowStyle.display = this._modalDivStyle.display = 'block'; + setTimeout(Ink.bind(function() { + Css.addClassName( this._modalShadow, 'visible' ); + Css.addClassName( this._modalDiv, 'visible' ); + }, this), 100); + + /** + * Fallback to the old one + */ + this._contentElement = this._modalDiv; + this._shadeElement = this._modalShadow; + + if( !this._markupMode ){ + /** + * Setting the content of the modal + */ + this.setContentMarkup( this._options.markup ); + } + + /** + * If any size has been user-defined, let's set them as max-width and max-height + */ + + var isPercentage = { + width: ('' + this._options.width).indexOf('%') !== -1, + height: ('' + this._options.height).indexOf('%') !== -1 + }; + + InkArray.forEach(['width', 'height'], Ink.bind(function (dimension) { + if (this._options[dimension] !== undefined) { + this._modalDivStyle[dimension] = this._options[dimension]; + if (!isPercentage[dimension]) { + this._modalDivStyle[maxName(dimension)] = + InkElement['element' + upName(dimension)](this._modalDiv) + 'px'; + } + } else { + this._modalDivStyle[maxName(dimension)] = InkElement['element' + upName(dimension)](this._modalDiv) + 'px'; + } + + if (isPercentage[dimension] && parseInt(elem['client' + maxName(dimension)], 10) <= parseInt(this._modalDivStyle[dimension], 10) ) { + this._modalDivStyle[dimension] = Math.round(parseInt(elem['client' + maxName(dimension)], 10) * 0.9) + 'px'; + } + }, this)); + + this.originalStatus = { + viewportHeight: InkElement.elementHeight(elem), + viewportWidth: InkElement.elementWidth(elem), + height: InkElement.elementHeight(this._modalDiv), + width: InkElement.elementWidth(this._modalDiv) + }; + + /** + * Let's 'resize' it: + */ + if( this._options.responsive.toString() === 'true' ) { + this._onResize(true); + Event.observe( window,'resize',this._handlers.resize ); + } else { + this._resizeContainer(); + this._reposition(); + } + + if (this._options.onShow) { + this._options.onShow(this); + } + + if(this._options.disableScroll.toString() === 'true') { + this._disableScroll(); + } + + // subscribe events + Event.observe(this._shadeElement, 'click', this._handlers.click); + if (this._options.closeOnEscape.toString() === 'true') { + Event.observe(document, 'keydown', this._handlers.keyDown); + } + + Common.registerInstance(this, this._shadeElement, 'modal'); + + this._wasDismissed = false; + openModals.push(this); + + Css.addClassName(document.documentElement, 'ink-modal-is-open'); + }, + + /** + * Closes the modal + * + * @method dismiss + * @public + */ + dismiss: function() { + if (this._wasDismissed) { /* Already dismissed. WTF IE. */ return; } + + if (this._options.onDismiss) { + var ret = this._options.onDismiss(this); + if (ret === false) { return; } + } + + this._wasDismissed = true; + + if( this._options.responsive ){ + Event.stopObserving(window, 'resize', this._handlers.resize); + } + + // this._modalShadow.parentNode.removeChild(this._modalShadow); + + if( !this._markupMode ){ + this._modalShadow.parentNode.removeChild(this._modalShadow); + this.destroy(); + } else { + Css.removeClassName( this._modalDiv, 'visible' ); + Css.removeClassName( this._modalShadow, 'visible' ); + + this._waitForFade(this._modalShadow, Ink.bind(function () { + this._modalShadowStyle.display = 'none'; + }, this)); + } + + openModals = InkArray.remove(openModals, InkArray.keyValue(this, openModals), 1); + + if (openModals.length === 0) { // Document level stuff now there are no modals in play. + var htmlEl = document.documentElement; + + // Reenable scroll + if(this._options.disableScroll) { + htmlEl.style.overflowX = this._oldHtmlOverflows[0]; + htmlEl.style.overflowY = this._oldHtmlOverflows[1]; + } + + // Remove the class from the HTML element. + Css.removeClassName(htmlEl, 'ink-modal-is-open'); + } + }, + + /** + * Utility function to listen to the onTransmissionEnd event, or wait using setTimeouts + * + * Specific to this._element + */ + _waitForFade: function (elem, callback) { + if (!opacitySupported) { return callback(); } + + var transitionEndEventNames = [ + 'transitionEnd', 'oTransitionEnd', 'webkitTransitionEnd']; + var classicName; + var evName; + for (var i = 0, len = transitionEndEventNames.length; i < len; i++) { + evName = transitionEndEventNames[i]; + classicName = 'on' + evName.toLowerCase(); + if (classicName in elem) { + Event.observeOnce(elem, evName, callback); + return; + } + } + var fadeChecker = function () { + if( +Css.getStyle(elem, 'opacity') > 0 ){ + setTimeout(fadeChecker, 250); + } else { + callback(); + } + }; + setTimeout(fadeChecker, 500); + }, + + /** + * Removes the modal from the DOM + * + * @method destroy + * @public + */ + destroy: function() { + Common.unregisterInstance(this._instanceId); + }, + + /** + * Returns the content DOM element + * + * @method getContentElement + * @return {DOMElement} Modal main cointainer. + * @public + */ + getContentElement: function() { + return this._contentContainer; + }, + + /** + * Replaces the content markup + * + * @method setContentMarkup + * @param {String} contentMarkup + * @public + */ + setContentMarkup: function(contentMarkup) { + if( !this._markupMode ){ + this._modalDiv.innerHTML = [contentMarkup].join(''); + this._contentContainer = Selector.select(".modal-body",this._modalDiv); + if( !this._contentContainer.length ){ + // throw 'Missing div with class "modal-body"'; + var tempHeader = Selector.select(".modal-header",this._modalDiv); + var tempFooter = Selector.select(".modal-footer",this._modalDiv); + + InkArray.each(tempHeader, InkElement.remove); + InkArray.each(tempFooter, InkElement.remove); + + var body = document.createElement('div'); + Css.addClassName(body,'modal-body'); + body.innerHTML = this._modalDiv.innerHTML; + this._modalDiv.innerHTML = ''; + + var toAdd = tempHeader.concat([body]).concat(tempFooter); + InkArray.each(toAdd, Ink.bindMethod(this._modalDiv, 'appendChild')); + + // InkArray.each(tempHeader,Ink.bind(function( element ){ this._modalDiv.appendChild(element); },this)); + // this._modalDiv.appendChild(body); + // InkArray.each(tempFooter,Ink.bind(function( element ){ this._modalDiv.appendChild(element); },this)); + + this._contentContainer = Selector.select(".modal-body",this._modalDiv); + } + this._contentContainer = this._contentContainer[0]; + } else { + this._contentContainer.innerHTML = contentMarkup; + } + this._contentElement = this._modalDiv; + this._resizeContainer(); + } + + }; + + return Modal; + +}); +/** + * @module Ink.UI.Pagination_1 + * Pagination elements + * @version 1 + */ + +Ink.createModule('Ink.UI.Pagination', '1', + ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1'], + function(Common, Event, Css, Element, Selector ) { + 'use strict'; + + /** + * Function to create the pagination anchors + * + * @method genAel + * @private + * @param {String} inner HTML to be placed inside the anchor. + * @return {DOMElement} Anchor created + */ + var genAEl = function(inner, index, options) { + var aEl = document.createElement('a'); + aEl.setAttribute('href', '#'); + if (typeof index === 'number') { + aEl.setAttribute('data-index', index); + } + if(options && options.wrapText) { + var spanEl = document.createElement('span'); + aEl.appendChild(spanEl); + spanEl.innerHTML = inner; + } else { + aEl.innerHTML = inner; + } + return aEl; + }; + + /** + * @class Ink.UI.Pagination + * @constructor + * @version 1 + * @param {String|DOMElement} selector Selector or element + * @param {Object} options Options + * @param {Number} [options.size] Number of pages. + * @param {Number} [options.totalItemCount] Total numeber of items to display + * @param {Number} [options.itemsPerPage] Number of items per page. + * @param {Number} [options.maxSize] If passed, only shows at most maxSize items. displays also first|prev page and next page|last buttons + * @param {Number} [options.start] Start page. defaults to 1 + * @param {Boolean} [options.sideButtons=true] Whether to show the first, last, previous, next, previousPage and lastPage buttons. Do not use together with maxSize. + * @param {String} [options.firstLabel] Text for the first page button. Defaults to 'First'. + * @param {String} [options.lastLabel] Text for the last page button. Defaults to 'Last'. + * @param {String} [options.previousLabel] Text for the previous button. Defaults to 'Previous'- + * @param {String} [options.nextLabel] Text for the next button. Defaults to 'Next' + * @param {String} [options.previousPageLabel] Text for the previous page button. Defaults to 'Previous {Items per page}'. + * @param {String} [options.nextPageLabel] Text for the next page button. Defaults to 'Next {Items per page}'. + * @param {Function} [options.onChange] Callback to be called when a page changes. Called with `(thisPaginator, newPageNumber)`. + * @param {String} [options.hashParameter] Parameter to use on setHash. Defaults to 'page'. + * @param {String} [options.parentTag] HTML Tag used as the parent node. + * @param {String} [options.childTag] HTML Tag used as the child nodes. + * @param {String} [options.wrapperClass] CSS Class used in the wrapper element + * @param {String} [options.paginationClass] CSS Class used in the pagination element + * @param {String} [options.activeClass] CSS Class used to mark page as active + * @param {String} [options.disabledClass] CSS Class used to mark page as disabled + * @param {String} [options.hideClass] CSS Class used to hide elements + * @param {String} [options.previousClass] CSS Class used in the previous element + * @param {String} [options.previousPageClass] CSS Class used in the previous page element + * @param {String} [options.nextClass] CSS Class used in the next element + * @param {String} [options.nextPageClass] CSS Class used in the next page element + * @param {Function} [options.numberFormatter] Number formatter function. Receives a 0-indexed number and returns the text for the numbered page button. + * + * @sample Ink_UI_Pagination_1.html + */ + var Pagination = function(selector, options) { + + this._element = Common.elOrSelector(selector, 'Ink.UI.Pagination element'); + + this._options = Common.options('Ink.UI.Pagination_1', { + size: ['Integer', null], + totalItemCount: ['Integer', null], + itemsPerPage: ['Integer', null], + maxSize: ['Integer', null], + start: ['Integer', 1], + sideButtons: ['Boolean', 1 /* actually `true` but we want to see if user is using the default or not. */], + // TODO add pagination-type which accepts color strings, "chevron" and "dotted". Basically classes to add to the UL. + firstLabel: ['String', 'First'], + lastLabel: ['String', 'Last'], + previousLabel: ['String', 'Previous'], + nextLabel: ['String', 'Next'], + previousPageLabel: ['String', null], + nextPageLabel: ['String', null], + onChange: ['Function', undefined], + hashParameter: ['String', 'page'], + parentTag: ['String', 'ul'], + childTag: ['String', 'li'], + wrapperClass: ['String', 'ink-navigation'], + paginationClass: ['String', 'pagination'], + activeClass: ['String', 'active'], + disabledClass: ['String', 'disabled'], + hideClass: ['String', 'hide-all'], + previousClass: ['String', 'previous'], + previousPageClass: ['String', 'previousPage'], + nextClass: ['String', 'next'], + nextPageClass: ['String', 'nextPage'], + + numberFormatter: ['Function', function(i) { return i + 1; }] + }, options || {}, this._element); + + if (!this._options.previousPageLabel) { + this._options.previousPageLabel = this._options.previousLabel + ' ' + this._options.maxSize; + } + + if (!this._options.nextPageLabel) { + this._options.nextPageLabel = this._options.nextLabel + ' ' + this._options.maxSize; + } + + this._handlers = { + click: Ink.bindEvent(this._onClick,this) + }; + + if (Common.isInteger(this._options.totalItemCount) && Common.isInteger(this._options.itemsPerPage)) { + this._size = this._calculateSize(this._options.totalItemCount, this._options.itemsPerPage); + } else if (Common.isInteger(this._options.size)) { + this._size = this._options.size; + } else { + Ink.error('Ink.UI.Pagination: Please supply a size option or totalItemCount and itemsPerPage options.'); + this._size = 0; + } + + this.setOnChange(this._options.onChange); + + this._current = this._options.start - 1; + this._itemLiEls = []; + + this._init(); + }; + + Pagination.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function() { + // generate and apply DOM + this._generateMarkup(this._element); + + this._updateItems(); + + // subscribe events + this._observe(); + + Common.registerInstance(this, this._element, 'pagination'); + }, + + /** + * Responsible for setting listener in the 'click' event of the Pagination element. + * + * @method _observe + * @private + */ + _observe: function() { + Event.observeDelegated(this._element, 'click', '.' + this._options.paginationClass + ' > ' + this._options.childTag, this._handlers.click); + }, + + /** + * Calculate how many pages are necessary for `count` items, and `itemsPerPage` items per page. + * + * @method _calculateSize + * @param count + * @param itemsPerPage + * @private + **/ + _calculateSize: function (count, itemsPerPage) { + return Math.ceil(count / itemsPerPage); + }, + /** + * Updates the markup everytime there's a change in the Pagination object. + * + * @method _updateItems + * @private + */ + _updateItems: function() { + var liEls = this._itemLiEls; + + var isSimpleToggle = this._size === liEls.length; + + var i, f, liEl; + + if (isSimpleToggle) { + // just toggle active class + for (i = 0, f = this._size; i < f; ++i) { + Css.setClassName(liEls[i], this._options.activeClass, i === this._current); + } + } + else { + // remove old items + for (i = liEls.length - 1; i >= 0; --i) { + this._ulEl.removeChild(liEls[i]); + } + + // add new items + liEls = []; + for (i = 0, f = this._size; i < f; ++i) { + liEl = document.createElement(this._options.childTag); + liEl.appendChild( genAEl( this._options.numberFormatter(i), i) ); + // add "active" class if this is the active element. + Css.setClassName(liEl, this._options.activeClass, i === this._current); + this._ulEl.insertBefore(liEl, this._nextEl); + liEls.push(liEl); + } + this._itemLiEls = liEls; + } + + if (this._options.maxSize) { + // toggle visible items + var page = Math.floor( this._current / this._options.maxSize ); + var pi = this._options.maxSize * page; + var pf = pi + this._options.maxSize - 1; + + for (i = 0, f = this._size; i < f; ++i) { + liEl = liEls[i]; + Css.setClassName(liEl, this._options.hideClass, i < pi || i > pf); + } + + this._pageStart = pi; + this._pageEnd = pf; + this._page = page; + + Css.setClassName(this._prevPageEl, this._options.disabledClass, !this.hasPreviousPage()); + Css.setClassName(this._nextPageEl, this._options.disabledClass, !this.hasNextPage()); + + Css.setClassName(this._firstEl, this._options.disabledClass, this.isFirst()); + Css.setClassName(this._lastEl, this._options.disabledClass, this.isLast()); + } + + // update prev and next + if (this._prevEl) { + Css.setClassName(this._prevEl, this._options.disabledClass, !this.hasPrevious()); + } + if (this._nextEl) { + Css.setClassName(this._nextEl, this._options.disabledClass, !this.hasNext()); + } + }, + + /** + * Returns the top element for the gallery DOM representation + * + * @method _generateMarkup + * @param {DOMElement} el + * @private + */ + _generateMarkup: function(el) { + Css.addClassName(el, 'ink-navigation'); + + var ulEl = Ink.s('.' + this._options.paginationClass, el); + var hasUlAlready = false; + + if( !ulEl ){ + ulEl = document.createElement(this._options.parentTag); + Css.addClassName(ulEl, this._options.paginationClass); + } else { + hasUlAlready = true; + } + + var isChevron = Css.hasClassName(ulEl, 'chevron'); + var isDotted = Css.hasClassName(ulEl, 'dotted'); + + // Creates
  • elements for firstPage, nextPage, first, last, etc. + var createLiEl = Ink.bind(function (name, options) { + var liEl = document.createElement(this._options.childTag); + var aEl = genAEl(this._options[name + 'Label'], undefined, { wrapText: options && options.wrapText }); + Css.addClassName(liEl, this._options[name + 'Class']); + liEl.appendChild(aEl); + ulEl.appendChild(liEl); + return liEl; + }, this); + + if (!isDotted && this._options.maxSize) { + this._firstEl = createLiEl('first'); + this._prevPageEl = createLiEl('previousPage'); + } + + // When we're dotted, the default for sideButtons is `false`. When we're note, it's `true`. + // Since the default is actually "1", we do a === true check when we're dotted, and a truthish check when we're not. + if ((isDotted && this._options.sideButtons === true) || (!isDotted && this._options.sideButtons)) { + this._prevEl = createLiEl('previous', { wrapText: isChevron }); + this._nextEl = createLiEl('next', { wrapText: isChevron }); + } + + if (!isDotted && this._options.maxSize) { + this._nextPageEl = createLiEl('nextPage'); + this._lastEl = createLiEl('last'); + } + + if( !hasUlAlready ){ + el.appendChild(ulEl); + } + + this._ulEl = ulEl; + }, + + /** + * Click handler + * + * @method _onClick + * @param {Event} ev + * @private + */ + _onClick: function(ev) { + Event.stop(ev); + + var liEl = Event.element(ev); + if ( Css.hasClassName(liEl, this._options.activeClass) || + Css.hasClassName(liEl, this._options.disabledClass) ) { return; } + + var isPrev = Css.hasClassName(liEl, this._options.previousClass); + var isNext = Css.hasClassName(liEl, this._options.nextClass); + var isPrevPage = Css.hasClassName(liEl, this._options.previousPageClass); + var isNextPage = Css.hasClassName(liEl, this._options.nextPageClass); + var isFirst = Css.hasClassName(liEl, this._options.firstClass); + var isLast = Css.hasClassName(liEl, this._options.lastClass); + + if (isFirst) { + this.setCurrent(0); + } + else if (isLast) { + this.setCurrent(this._size - 1); + } + else if (isPrevPage || isNextPage) { + this.setCurrent( (isPrevPage ? -1 : 1) * this._options.maxSize, true /* relative */); + } + else if (isPrev || isNext) { + this.setCurrent(isPrev ? -1 : 1, true /* relative */); + } + else { + var aElem = Selector.select('[data-index]', liEl)[0]; + var nr = aElem && parseInt( aElem.getAttribute('data-index'), 10); + this.setCurrent(nr); + } + }, + + + /** + * Allows you to subscribe to the onChange event + * + * @method setOnChange + * @param cb {Function} Callback called with `(thisPaginator, newPageNumber)`. + */ + setOnChange: function (onChange) { + if (onChange !== undefined && typeof onChange !== 'function') { + throw new TypeError('onChange option must be a function!'); + } + this._onChange = onChange; + }, + + /************** + * PUBLIC API * + **************/ + + /** + * Sets the number of pages + * + * @method setSize + * @param {Number} sz number of pages + * @public + */ + setSize: function(sz) { + if (!Common.isInteger(sz)) { + throw new TypeError('1st argument must be an integer number!'); + } + + this._size = sz; + this._updateItems(); + this._current = 0; + }, + + /** + * Sets the number of pages, then call setSize(). + * + * @param setSizeInItems + * @param {Number} totalItems Total number of items + * @param {Number} itemsPerPage Items per page + */ + setSizeInItems: function (totalItems, itemsPerPage) { + var pageNumber = Math.ceil(totalItems / itemsPerPage); + this.setSize(pageNumber); + }, + + /** + * Sets the current page. + * + * @method setCurrent + * @param {Number} nr Sets the current page to given number. + * @param {Boolean} isRelative Flag to change the position from absolute to relative. + * @public + */ + setCurrent: function(nr, isRelative) { + if (!Common.isInteger(nr)) { + throw new TypeError('1st argument must be an integer number!'); + } + + if (isRelative) { + nr += this._current; + } + + if (nr > this._size - 1) { + nr = this._size - 1; + } + + if (nr < 0) { + nr = 0; + } + + this._current = nr; + this._updateItems(); + + if (this._onChange) { + this._onChange(this, nr); + } + + /*if (this._options.setHash) { + var o = {}; + o[this._options.hashParameter] = nr; + Common.setHash(o); + }*/ // undocumented option, removing + }, + + /** + * Gets the number of pages + * + * @method getSize + * @return {Number} Number of pages + * @public + */ + getSize: function() { + return this._size; + }, + + /** + * Gets the current page index + * + * @method getCurrent + * @return {Number} Current page + * @public + */ + getCurrent: function() { + return this._current; + }, + + /** + * Checks if it's at the first page + * + * @method isFirst + * @return {Boolean} True if at first page + * @public + */ + isFirst: function() { + return this._current === 0; + }, + + /** + * Checks if it's on the last page + * + * @method isLast + * @return {Boolean} True if at last page + * @public + */ + isLast: function() { + return this._current === this._size - 1; + }, + + /** + * Checks if it has previous pages + * + * @method hasPrevious + * @return {Boolean} True if has prior pages + * @public + */ + hasPrevious: function() { + return this._current > 0; + }, + + /** + * Checks if it has next pages + * + * @method hasNext + * @return {Boolean} True if has pages ahead + * @public + */ + hasNext: function() { + return this._current < this._size - 1; + }, + + /** + * Checks if it has a previous set of pages + * + * @method hasPreviousPage + * @return {Boolean} Returns true iif has prior set of page(s) + * @public + */ + hasPreviousPage: function() { + return this._options.maxSize && this._current > this._options.maxSize - 1; + }, + + /** + * Checks if it has a next set of pages + * + * @method hasNextPage + * @return {Boolean} Returns true iif has set of page(s) ahead + * @public + */ + hasNextPage: function() { + return this._options.maxSize && this._size - this._current >= this._options.maxSize + 1; + }, + + /** + * Unregisters the component and removes its markup + * + * @method destroy + * @public + */ + destroy: Common.destroyComponent + }; + + return Pagination; + +}); +/** + * @module Ink.UI.ProgressBar_1 + * Animated progress bars + * @version 1 + */ + +Ink.createModule('Ink.UI.ProgressBar', '1', ['Ink.UI.Common_1', 'Ink.Dom.Selector_1','Ink.Dom.Element_1'], function( Common, Selector, Element ) { + 'use strict'; + + /** + * Associated to a .ink-progress-bar element, it provides a setValue() method to change the element's value. + * + * @class Ink.UI.ProgressBar + * @constructor + * @version 1 + * @param {String|DOMElement} selector Element or selector + * @param {Object} [options] Options object + * @param {Number} [options.startValue] Percentage of the bar that is filled. Ranges between 0 and 100. Default: 0 + * @param {Function} [options.onStart] Callback called when a change of value is started + * @param {Function} [options.onEnd] Callback called when a change of value ends + * + * @sample Ink_UI_ProgressBar_1.html + */ + var ProgressBar = function( selector, options ){ + this._element = Common.elOrSelector(selector); + + this._options = Ink.extendObj({ + 'startValue': 0, + 'onStart': function(){}, + 'onEnd': function(){} + },Element.data(this._element)); + + this._options = Ink.extendObj( this._options, options || {}); + this._value = this._options.startValue; + + this._init(); + }; + + ProgressBar.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function(){ + this._elementBar = Selector.select('.bar',this._element); + if( this._elementBar.length < 1 ){ + throw '[Ink.UI.ProgressBar] :: Bar element not found'; + } + this._elementBar = this._elementBar[0]; + + this._options.onStart = Ink.bind(this._options.onStart,this); + this._options.onEnd = Ink.bind(this._options.onEnd,this); + this.setValue( this._options.startValue ); + }, + + /** + * Sets the value of the Progressbar + * + * @method setValue + * @param {Number} newValue Numeric value, between 0 and 100, that represents the percentage of the bar. + * @public + */ + setValue: function( newValue ){ + this._options.onStart( this._value); + + newValue = parseInt(newValue,10); + if( isNaN(newValue) || (newValue < 0) ){ + newValue = 0; + } else if( newValue>100 ){ + newValue = 100; + } + this._value = newValue; + this._elementBar.style.width = this._value + '%'; + + this._options.onEnd( this._value ); + } + }; + + return ProgressBar; + +}); +/** + * @module Ink.UI.SmoothScroller_1 + * @author inkdev AT sapo.pt + * @version 1 + */ +Ink.createModule('Ink.UI.SmoothScroller', '1', ['Ink.Dom.Event_1', 'Ink.Dom.Element_1', 'Ink.Dom.Selector_1','Ink.Dom.Loaded_1'], function(Event, InkElement, Selector, Loaded) { + 'use strict'; + + var requestAnimationFrame = + window.requestAnimationFrame || + function (cb) { return setTimeout(cb, 10); }; + + var cancelAnimationFrame = + window.cancelAnimationFrame || + function (id) { clearTimeout(id); }; + + /** + * @namespace Ink.UI.SmoothScroller + * @version 1 + * @static + * + * SmoothScroller is a component which replaces the default scroll-to behaviour of `` tags which refer to IDs on the page. + * + * For example, when you have this: + * + * Todo + * [...] + *
    + * [...] + * + * You can click the `` and the page will scroll until the section you pointed to. + * + * When you use SmoothScroller, instead of immediately scrolling to the element, you get a smooth motion. + * + * Also, you can define the data-margin option if you have a `position:fixed` top menu ruining the behaviour. + * + * @example + * + * go to Part 1 + * + * [lots and lots of content...] + * + *

    Part 1

    + * + * + */ + var SmoothScroller = { + + /** + * Sets the speed of the scrolling + * + * @property speed + * @type {Number} + * @readOnly + * @static + */ + speed: 10, + + /** + * Returns the Y position of an element, relative to the document + * + * @method getTop + * @param {DOMElement} d DOMElement to get the Y position from + * @return {Number} Y position of div 'd' + * @public + * @static + */ + getTop: function(d) { + return Math.round( + SmoothScroller.scrollTop() + d.getBoundingClientRect().top); + }, + + + /** + * Returns the current scroll position + * + * @method scrollTop + * @return {Number} Current scroll position + * @public + * @static + */ + scrollTop: function() { + var body = document.body, + d = document.documentElement; + if (body && body.scrollTop){ + return body.scrollTop; + } + if (d && d.scrollTop){ + return d.scrollTop; + } + if (window.pageYOffset){ + return window.pageYOffset; + } + return 0; + }, + + /** + * Attaches an event for an element + * + * @method add + * @param {DOMElement} el DOMElement to make the listening of the event + * @param {String} event Event name to be listened + * @param {DOMElement} fn Callback function to run when the event is triggered. + * @public + * @static + */ + add: function(el, event, fn) { + Event.observe(el,event,fn); + }, + + + /** + * Kill an event of an element + * + * @method end + * @param {String} e Event to be killed/stopped + * @public + * @static + */ + // kill an event of an element + end: function(e) { + Event.stopDefault(e); + }, + + + /** + * Moves the scrollbar to the target element. This is the function + * which animates the scroll position bit by bit. It calls itself in + * the end through requestAnimationFrame + * + * @method scroll + * @param {Number} d Y coordinate value to stop + * @public + * @static + */ + scroll: function(d, options) { + var a = SmoothScroller.scrollTop(); + var margin = options.margin || 0; + + var endPos = d - margin; + + if (endPos > a) { + a += Math.ceil((endPos - a) / SmoothScroller.speed); + } else { + a = a + (endPos - a) / SmoothScroller.speed; + } + + cancelAnimationFrame(SmoothScroller.interval); + + if (!((a) === endPos || SmoothScroller.offsetTop === a)) { + SmoothScroller.interval = requestAnimationFrame( + Ink.bindMethod(SmoothScroller, 'scroll', d, options), document.body); + } else { + SmoothScroller.onDone(); + } + + window.scrollTo(0, a); + SmoothScroller.offsetTop = a; + }, + + + /** + * Has smooth scrolling applied to relevant elements upon page load. + * + * @method init + * @param [selector='a.scrollableLink,a.ink-smooth-scroll'] Selector string for finding links with smooth scrolling enabled. + * @public + * @static + */ + init: function(selector) { + Loaded.run(Ink.bindMethod(SmoothScroller, 'render', selector)); + }, + + /** + * This method extracts all the anchors and validates them as # and attaches the events + * + * @method render + * @public + * @static + */ + render: function(selector) { + var a = Selector.select(selector || 'a.scrollableLink,a.ink-smooth-scroll'); + + for (var i = 0; i < a.length; i++) { + var _elm = a[i]; + if (_elm.href && _elm.href.indexOf('#') !== -1 && ((_elm.pathname === location.pathname) || ('/' + _elm.pathname === location.pathname))) { + Event.observe(_elm,'click', Ink.bindEvent(SmoothScroller.onClick, this, _elm)); + } + } + }, + + + /** + * Click handler + * + * @method onClick + * @public + * @static + */ + onClick: function(event, _elm) { + SmoothScroller.end(event); + if(_elm != null && _elm.getAttribute('href') !== null) { + var hashIndex = _elm.href.indexOf('#'); + if (hashIndex === -1) { + return; + } + + var data = InkElement.data(_elm); + var hash = _elm.href.substr((hashIndex + 1)); + var activeLiSelector = 'ul > li.active > ' + selector; + + var selector = 'a[name="' + hash + '"],#' + hash; + var elm = Selector.select(selector)[0]; + var activeLi = Selector.select(activeLiSelector)[0]; + activeLi = activeLi && activeLi.parentNode; + + if (typeof(elm) !== 'undefined') { + if (_elm.parentNode.className.indexOf('active') === -1) { + if (activeLi) { + activeLi.className = activeLi.className.replace(/(^|\s+)active($|\s+)/g, ''); + } + _elm.parentNode.className += " active"; + } + SmoothScroller.hash = hash; + var options = {}; + if (parseFloat(data.margin)) { + options.margin = parseFloat(data.margin); + } + SmoothScroller.scroll(SmoothScroller.getTop(elm), options); + } + } + }, + + /** + * Called when the scroll movement is done. Updates browser address. + */ + onDone: function () { + window.location.hash = SmoothScroller.hash; + } + }; + + return SmoothScroller; + +}); + +/** + * @module Ink.UI.SortableList_1 + * Sortable lists + * @version 1 + */ + +Ink.createModule('Ink.UI.SortableList', '1', ['Ink.UI.Common_1','Ink.Dom.Css_1','Ink.Dom.Event_1','Ink.Dom.Element_1','Ink.Dom.Selector_1'], function( Common, Css, Events, Element, Selector ) { + 'use strict'; + var hasTouch = (('ontouchstart' in window) || // html5 browsers + (navigator.maxTouchPoints > 0) || // future IE + (navigator.msMaxTouchPoints > 0)); + + /** + * Adds sortable behaviour to any list. + * + * @class Ink.UI.SortableList + * @constructor + * @version 1 + * @param {String|DOMElement} selector + * @param {String} [options.placeholderClass] CSS class added to the "ghost" element being dragged around. Defaults to 'placeholder'. + * @param {String} [options.draggedClass] CSS class added to the original element being dragged around. Defaults to 'hide-all'. + * @param {String} [options.draggingClass] CSS class added to the html element when the user is dragging. Defaults to 'dragging'. + * @param {String} [options.dragSelector] CSS selector for the drag enabled nodes. Defaults to 'li'. + * @param {String} [options.handleSelector] CSS selector for the drag handle. If present, you can only drag nodes by this selector. + * @param {String} [options.moveSelector] CSS selector to validate a node move. If present, you can only move nodes inside this selector. + * @param {Boolean} [options.swap] Flag to swap dragged element and target element instead of reordering it. + * @param {Boolean} [options.cancelMouseOut] Flag to cancel draggin if mouse leaves the container element. + * + * @sample Ink_UI_SortableList_1.html + */ + var SortableList = function(selector, options) { + + this._element = Common.elOrSelector(selector, 'Ink.UI.SortableList'); + + this._options = Common.options('Sortable', { + 'placeholderClass': ['String', 'placeholder'], + 'draggedClass': ['String', 'hide-all'], + 'draggingClass': ['String', 'dragging'], + 'dragSelector': ['String', 'li'], + 'dragObject': ['String', null], // Deprecated. Use handleSelector instead. + 'handleSelector': ['String', null], + 'moveSelector': ['String', false], + 'swap': ['Boolean', false], + 'cancelMouseOut': ['Boolean', false] + }, options || {}, this._element); + + if (this._options.dragObject != null) { + // [3.0.0] Remove this deprecation notice and stop providing backwards compatibility + Ink.warn('Ink.UI.SortableList: options.dragObject is now deprecated. ' + + 'Please use options.handleSelector instead.'); + this._options.handleSelector = + this._options.handleSelector || this._options.dragObject; + } + + this._handlers = { + down: Ink.bind(this._onDown, this), + move: Ink.bind(this._onMove, this), + up: Ink.bind(this._onUp, this) + }; + + this._isMoving = false; + + this._init(); + }; + + SortableList.prototype = { + + /** + * Init function called by the constructor. + * + * @method _init + * @private + */ + _init: function() { + this._down = hasTouch ? 'touchstart mousedown' : 'mousedown'; + this._move = hasTouch ? 'touchmove mousemove' : 'mousemove'; + this._up = hasTouch ? 'touchend mouseup' : 'mouseup'; + + this._observe(); + Common.registerInstance(this, this._element, 'sortableList'); + }, + + /** + * Sets the event handlers. + * + * @method _observe + * @private + */ + _observe: function() { + Events.on(this._element, this._down, this._options.dragSelector, this._handlers.down); + Events.on(this._element, this._move, this._options.dragSelector, this._handlers.move); + if(this._options.cancelMouseOut) { + Events.on(this._element, 'mouseleave', Ink.bind(this.stopMoving, this)); + } + Events.on(document.documentElement, this._up, this._handlers.up); + }, + + /** + * Mousedown or touchstart handler + * + * @method _onDown + * @param {Event} ev + * @private + */ + _onDown: function(ev) { + if (this._isMoving || this._placeholder) { return; } + if(this._options.handleSelector && !Selector.matchesSelector(ev.target, this._options.handleSelector)) { return; } + var tgtEl = ev.currentTarget; + this._isMoving = tgtEl; + this._placeholder = tgtEl.cloneNode(true); + this._movePlaceholder(tgtEl); + this._addMovingClasses(); + return false; + }, + + /** + * Mousemove or touchmove handler + * + * @method _onMove + * @param {Event} ev + * @private + */ + _onMove: function(ev) { + this.validateMove(ev.currentTarget); + return false; + }, + + /** + * Mouseup or touchend handler + * + * @method _onUp + * @param {Event} ev + * @private + */ + _onUp: function(ev) { + if (!this._isMoving || !this._placeholder) { return; } + if (ev.currentTarget === this._isMoving) { return; } + if (ev.currentTarget === this._placeholder) { return; } + Element.insertBefore(this._isMoving, this._placeholder); + this.stopMoving(); + return false; + }, + + /** + * Adds the CSS classes to interactive elements + * + * @method _addMovingClasses + * @private + */ + _addMovingClasses: function(){ + Css.addClassName(this._placeholder, this._options.placeholderClass); + Css.addClassName(this._isMoving, this._options.draggedClass); + Css.addClassName(document.documentElement, this._options.draggingClass); + }, + + /** + * Removes the CSS classes from interactive elements + * + * @method _removeMovingClasses + * @private + */ + _removeMovingClasses: function(){ + if(this._isMoving) { Css.removeClassName(this._isMoving, this._options.draggedClass); } + if(this._placeholder) { Css.removeClassName(this._placeholder, this._options.placeholderClass); } + Css.removeClassName(document.documentElement, this._options.draggingClass); + }, + + /** + * Moves the placeholder element relative to the target element + * + * @method _movePlaceholder + * @param {Element} target_position + * @private + */ + _movePlaceholder: function(target){ + var placeholder = this._placeholder, + target_position, + placeholder_position, + from_top, + from_left; + if(!placeholder) { + Element.insertAfter(placeholder, target); + } else if(this._options.swap){ + Element.insertAfter(placeholder, target); + Element.insertBefore(target, this._isMoving); + Element.insertBefore(this._isMoving, placeholder); + } else { + target_position = Element.offset(target); + placeholder_position = Element.offset(this._placeholder); + from_top = target_position[1] > placeholder_position[1]; + from_left = target_position[0] > placeholder_position[0]; + if( ( from_top && from_left ) || ( !from_top && !from_left ) ) { + Element.insertBefore(placeholder, target); + } else { + Element.insertAfter(placeholder, target); + } + Element.insertBefore(this._isMoving, placeholder); + } + }, + + /************** + * PUBLIC API * + **************/ + + /** + * Unregisters the component and removes its markup + * + * @method destroy + * @public + */ + destroy: Common.destroyComponent, + + /** + * Visually stops moving. + * Removes the placeholder as well as the styling classes. + * + * @method _movePlaceholder + * @public + */ + stopMoving: function(){ + this._removeMovingClasses(); + Element.remove(this._placeholder); + this._placeholder = false; + this._isMoving = false; + }, + + /** + * Validate a move. + * This method is used by the move handler + * + * @method _movePlaceholder + * @param {Element} elem + * @public + */ + validateMove: function(elem){ + if (!this._isMoving || !this._placeholder) { return; } + if (elem === this._placeholder) { return; } + if (elem === this._isMoving) { return; } + if(!this._options.moveSelector || Selector.matchesSelector(elem, this._options.moveSelector)){ + this._movePlaceholder(elem); + } else { + this.stopMoving(); + } + } + + }; + + return SortableList; +}); +/** + * @module Ink.UI.Spy_1 + * @author inkdev AT sapo.pt + * @version 1 + * + * Highlight elements as you scroll + */ +Ink.createModule('Ink.UI.Spy', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1'], function(Common, Event, Css, Element, Selector ) { + 'use strict'; + + // Maps a spy target (EG a menu with links inside) to spied instances. + var spyTargets = [ + // [target, [spied, spied, spied...]], ... + ]; + + function targetIndex(target) { + for (var i = 0, len = spyTargets.length; i < len; i++) { + if (spyTargets[i][0] === target) { + return i; + } + } + return null; + } + + function addSpied(spied, target) { + var index = targetIndex(target); + + if (index === null) { + spyTargets.push([target, [spied]]); + } else { + spyTargets[index][1].push(spied); + } + } + + var observingOnScroll = false; + function observeOnScroll() { + if (!observingOnScroll) { + observingOnScroll = true; + Event.observe(document, 'scroll', Event.throttle(onScroll, 300)); + } + } + + function onScroll() { + for (var i = 0, len = spyTargets.length; i < len; i++) { + onScrollForTarget(spyTargets[i][0], spyTargets[i][1]); + } + } + + function onScrollForTarget(target, spied) { + var activeEl = findActiveElement(spied); + + // This selector finds li's to deactivate + var toDeactivate = Selector.select('li.active', target); + for (var i = 0, total = toDeactivate.length; i < total; i++) { + Css.removeClassName(toDeactivate[i], 'active'); + } + + if (activeEl === null) { + return; + } + + // The link which should be activated has a "href" ending with "#" + name or id of the element + var menuLinkSelector = 'a[href$="#' + (activeEl.name || activeEl.id) + '"]'; + + var toActivate = Selector.select(menuLinkSelector, target); + for (i = 0, total = toActivate.length; i < total; i++) { + Css.addClassName(Element.findUpwardsByTag(toActivate[i], 'li'), 'active'); + } + } + + function findActiveElement(spied) { + /* + * Find the element above the top of the screen, but closest to it. + * _____ + * |_____| element 1 (active element) + * + * ------------------------ + * | _____ | + * | | | element 2 | + * | | | | + * | |_____| | + * ------- Viewport ------- + */ + + // Remember that getBoundingClientRect returns coordinates + // relative to the top left corner of the screen. + // + // So checking if it's < 0 is used to tell if + // the element is above the top of the screen. + var closest = -Infinity; + var closestIndex; + var bBox; + for( var i = 0, total = spied.length; i < total; i++ ){ + bBox = spied[i].getBoundingClientRect(); + if (bBox.top <= 0 && bBox.top > closest) { + closest = bBox.top; + closestIndex = i; + } + } + if (closestIndex === undefined) { + return null; + } else { + return spied[closestIndex]; + } + } + + /** + * Spy is a UI component which tells the user which section is currently + * visible. + * + * Spy can be used to highlight a menu item for the section which is + * visible to the user. + * + * You need two things: A menu element (which contains your links inside + * `li` tags), and an element containing your section's content. + * + * The links must be inside `li` tags. These will get the 'active' class, + * to signal which item is currently visible. In your CSS you need to add + * styling for this class. + * + * To use Ink.UI.Spy for more than one section, loop through your + * sections (as you see in the sample below), or just load + * `autoload.js` and set add the `data-spy="true"` attribute to + * your sections. + * + * The currently visible element's corresponding link in the menu + * gets the 'visible' class added to it. + * + * @class Ink.UI.Spy + * @constructor + * @version 1 + * @param {String|DOMElement} selector + * @param {Object} [options] Options + * @param {DOMElement|String} options.target Target menu where the spy will highlight the right option. + * + * @sample Ink_UI_Spy_1.html + */ + var Spy = function( selector, options ){ + + this._element = Common.elOrSelector( selector, 'Ink.UI.Spy_1: Section element' ); + + /** + * Setting default options and - if needed - overriding it with the data attributes + */ + this._options = Ink.extendObj({ + target: undefined, + activeClass: 'active' // [todo] Spy#_options.activeClass + }, Element.data( this._element ) ); + + /** + * In case options have been defined when creating the instance, they've precedence + */ + this._options = Ink.extendObj(this._options,options || {}); + + this._options.target = Common.elOrSelector( this._options.target, 'Ink.UI.Spy_1: Target element' ); + + this._init(); + }; + + Spy.prototype = { + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function() { + addSpied(this._element, this._options.target); + observeOnScroll(); + onScroll(); + } + }; + + return Spy; + +}); + +/** + * @module Ink.UI.Stacker_1 + * Stacking items in columns + * @version 1 + **/ + +Ink.createModule('Ink.UI.Stacker', 1, ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1'], function(InkUICommon, InkEvent, InkElement) { + 'use strict'; + +function Stacker(selector, options) { + this._init(selector, options); +} + +Stacker.prototype = { + /** + * This module combines several stacks of items together, in smaller screen sizes. + * + * The purpose is to have several stacks of items which may have different heights and as such cannot be used because of `float: left` quirks. + * + * For example, when you have three different columns of information: + * + * [col. A: 1] [col. B: 1] [col. C: 1] + * [col. B: 2] [col. C: 2] [col. C: 2] + * + * and the screen resizes and you need a layout of 2 columns, Stacker reorders the stacks so that you get: + * + * [col. A: 1] [col. B: 1] + * [col. C: 1] [col. A: 2] + * [col. B: 2] [col. C: 2] + * + * Note: If you just want to use a different amount of columns for your items in several viewports, but these items are guaranteed to have a fixed height, don't use this module. Use the `small-*`, `medium-*` and `large-*` classes instead. + * + * @class Ink.UI.Stacker_1 + * + * @constructor + * @param {DOMElement|String} [container] Element which contains the stacks (identified by the options.column selector) + * @param {Object} [options] Options object. + * @param {String} [options.column] Selector for the the columns inside the container element. Defaults to '.stacker-column'. + * @param {String} [options.item] Selector for the items in your stack. Defaults to '.stacker-item'. + * @param {Object} [options.customBreakPoints] Options for each breakpoint name. Use this if you have more breakpoints than Ink by default (`large`, `medium`, `small`) + * @param {Object} [options.customBreakpoints.BREAKPOINT_NAME] Custom breakpoints object. + * @param {String} options.customBreakpoints.BREAKPOINT_NAME.max Maximum screen size as seen in your media query + * @param {String} options.customBreakpoints.BREAKPOINT_NAME.min Minimum screen size as seen in your media query + * @param {String} options.customBreakpoints.BREAKPOINT_NAME.cols Column count for this size. + * @param {Number} [options.largeMax] Upper bound of `large` breakpoint + * @param {Number} [options.largeMin] Lower bound of `large` breakpoint. Defaults to 961. + * @param {Number} [options.mediumMax] Upper bound of `medium` breakpoint. Defaults to 960. + * @param {Number} [options.mediumMin] Lower bound of `medium` breakpoint. Defaults to 651. + * @param {Number} [options.smallMax] Upper bound of `small` breakpoint. Defaults to 650. + * @param {Number} [options.smallMin] Lower bound of `small` breakpoint + * + * @param {Integer} [options.largeCols] Number of columns in the `large` viewport. Defaults to 3. + * @param {Integer} [options.mediumCols] Number of columns in the `medium` viewport. Defaults to 2. + * @param {Integer} [options.smallCols] Number of columns in the `small` viewport. Defaults to 1. + * + * @param {Boolean} [options.isOrdered] When false, doesn't reorder stacks when combining them. + * @param {Function} [options.onRunCallback] Called when instantiated. + * @param {Function} [options.onResizeCallback] Called when the window resizes. + * @param {Function} [options.onAPIReloadCallback] Called when the reload function executes. + * + * @example + * + * Html: + * + *
    + *
    + *
    a
    + *
    d
    + *
    g
    + *
    + *
    + *
    b
    + *
    e
    + *
    h
    + *
    + *
    + *
    c
    + *
    f
    + *
    i
    + *
    + *
    + * + * Javascript: + * + * Ink.requireModules(['Ink.UI.Stacker_1'], function (Stacker) { + * var stacker = new Stacker('#stacker-container'); + * // Keep the "stacker" variable around if you want to call addItem and reloadItems + * }); + **/ + _init: function(selector, options) { + /* globals console */ + this._rootElm = InkUICommon.elsOrSelector(selector, 'Ink.UI.Stacker root element')[0] || null; + if(this._rootElm === null) { + if(typeof console !== 'undefined') { + console.warn('Ink.UI.Stacker: No root element'); + } + } + + this._options = InkUICommon.options({ + column: ['String', '.stacker-column'], + item: ['String', '.stacker-item'], + + // [3.0.0] review this when we have info about our breakpoints from the CSS + customBreakPoints: ['Object', null], // Must be: {xlarge: {max: 9999, min: 1281, cols: 5}, large:{max:1280, min:1001, cols:4} medium:{max:1000, min:801,cols:3}, ...etc..} + largeMax: ['Number', Number.MAX_VALUE], + largeMin: ['Number', 961], + mediumMax: ['Number', 960], + mediumMin: ['Number', 651], + smallMax: ['Number', 650], + smallMin: ['Number', 0], + + largeCols: ['Integer', 3], + mediumCols: ['Integer', 2], + smallCols: ['Integer', 1], + + isOrdered: ['Boolean', true], + onRunCallback: ['Function', null], + onResizeCallback: ['Function', null], + onAPIReloadCallback: ['Function', null] + }, options || {}, this._rootElm); + + this._aList = []; + + this._curLayout = 'large'; + + // [todo] is this needed? + this._runFirstTime = false; + + this._getPageItemsToList(); + + if(this._canApplyLayoutChange() || !this._runFirstTime) { + this._runFirstTime = true; + this._applyLayoutChange(); + if(typeof(this._options.onRunCallback) === 'function') { + this._options.onRunCallback(this._curLayout); + } + } + this._addEvents(); + }, + + /** + * Adds an item to the end of your stacks. + * Call `reloadItems()` when you are done adding items. + * @method addItem + * @param {DOMElement} item Element + **/ + addItem: function(item) { + this._aList.push(item); + }, + + /** + * Updates the layout of your items. + * Call this method after adding items or changing their dimensions. This method is automatically called when the window resizes. + * + * @method reloadItems + **/ + reloadItems: function() { + this._applyLayoutChange(); + if(typeof(this._options.onAPIReloadCallback) === 'function') { + this._options.onAPIReloadCallback(this._curLayout); + } + }, + + _addEvents: function() { + InkEvent.observe(window, 'resize', Ink.bindEvent(this._onResize, this)); + }, + + _onResize: function() { + if(this._canApplyLayoutChange()) { + this._removeDomItems(); + this._applyLayoutChange(); + if(typeof(this._options.onResizeCallback) === 'function') { + this._options.onResizeCallback(this._curLayout); + } + } + }, + + _setCurLayout: function() { + var viewportWidth = InkElement.viewportWidth(); + if(this._options.customBreakpoints && typeof(this._options.customBreakPoints) === 'object') { + for(var prop in this._options.customBreakPoints) { + if(this._options.customBreakPoints.hasOwnProperty(prop)) { + if(viewportWidth >= Number(this._options.customBreakPoints[prop].min) && viewportWidth <= Number(this._options.customBreakPoints[prop].max) && this._curLayout !== prop) { + this._curLayout = prop; + return; + } + } + } + } else { + if(viewportWidth <= Number(this._options.largeMax) && viewportWidth >= Number(this._options.largeMin) && this._curLayout !== 'large') { + this._curLayout = 'large'; + } else if(viewportWidth >= Number(this._options.mediumMin) && viewportWidth <= Number(this._options.mediumMax) && this._curLayout !== 'medium') { + this._curLayout = 'medium'; + } else if(viewportWidth >= Number(this._options.smallMin) && viewportWidth <= Number(this._options.smallMax) && this._curLayout !== 'small') { + this._curLayout = 'small'; + } + } + }, + + _getColumnsToShow: function() { + if(this._options.customBreakPoints && typeof(this._options.customBreakPoints) === 'object') { + return Number(this._options.customBreakPoints[this._curLayout].cols); + } else { + return Number(this._options[this._curLayout+'Cols']); + } + }, + + _canApplyLayoutChange: function() { + var curLayout = this._curLayout; + this._setCurLayout(); + if(curLayout !== this._curLayout) { + return true; + } + return false; + }, + + _getPageItemsToList: function() { + this._aColumn = Ink.ss(this._options.column, this._rootElm); + var totalCols = this._aColumn.length; + var index = 0; + if(totalCols > 0) { + for(var i=0; i < this._aColumn.length; i++) { + var aItems = Ink.ss(this._options.item, this._aColumn[i]); + for(var j=0; j < aItems.length; j++) { + if(this._options.isOrdered) { + index = i + (j * totalCols); + } + this._aList[index] = aItems[j]; + if(!this._options.isOrdered) { + index++; + } + //aItems[j].style.height = (100 + (Math.random() * 100))+'px'; + aItems[j].parentNode.removeChild(aItems[j]); + } + } + if(this._aList.length > 0 && this._options.isOrdered) { + var aNewList = []; + for(var ii=0; ii < this._aList.length; ii++) { + if(typeof(this._aList[ii]) !== 'undefined') { + aNewList.push(this._aList[ii]); + } + } + this._aList = aNewList; + } + } + }, + + _removeDomItems: function() { + var totalCols = this._aColumn.length; + if(totalCols > 0) { + for(var i=0; i < totalCols; i++) { + var aItems = Ink.ss(this._options.item, this._aColumn[i]); + for(var j=aItems.length - 1; j >= 0; j--) { + aItems[j].parentNode.removeChild(aItems[j]); + } + } + } + }, + + _applyLayoutChange: function() { + var totalCols = this._getColumnsToShow(); + var totalItems = this._aList.length; + var index = 0; + var countCol = 0; + if(totalCols > 0) { + while(countCol < totalCols) { + this._aColumn[countCol].appendChild(this._aList[index]); + index++; + countCol++; + if(index === totalItems) { + return; + } + if(countCol === totalCols) { + countCol = 0; + } + } + } + } +}; + +return Stacker; + +}); +/** + * @module Ink.UI.Sticky_1 + * Stick elements to the viewport + * @version 1 + */ +Ink.createModule('Ink.UI.Sticky', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Element_1','Ink.Dom.Css_1'], function(Common, Event, Element, Css) { + 'use strict'; + + /** + * Ink.UI.Sticky makes an element "stick" to the screen and stay in the same place as the user scrolls. + * + * To use it, just select an element as you create the Sticky. As you scroll past it, it will stick to the top of the screen. + * + * The `activateInLayouts` option controls in what layouts this behaviour happens. By default, it is disabled for the `small` and `tiny` layouts. + * Pass a comma-separated string to choose just the layouts you need. + * + * You can use the `offsetTop` option if you want it to keep some distance from the top of the screen. + * + * To avoid it going under the footer of your page, pass a selector to your footer as the `bottomElement` option. + * + * + * @class Ink.UI.Sticky + * @constructor + * @version 1 + * @param {String|DOMElement} selector Element or selector + * @param {Object} [options] Options Options object. + * @param {Number} [options.offsetBottom] Number of pixels of distance from the bottomElement. Defaults to 0. + * @param {Number} [options.offsetTop] Number of pixels of distance from the topElement. Defaults to 0. + * @param {Boolean} [options.inlineDimensions] Set to false to disable setting inline CSS dimensions. Use this if you want to use CSS to define your own dimensions. Defaults to true. + * @param {Boolean} [options.inlinePosition] Set to false to disable setting inline CSS positions. Use this if you want to use CSS to define your own positioning. Defaults to true. + * @param {String} [options.wrapperClass] CSS class for the wrapper element. Defaults to 'ink-sticky-wrapper'. + * @param {String} [options.stickyClass] CSS class to stick the element to the screen. Defaults to 'ink-sticky-stuck'. + * @param {String} [options.topElement] CSS Selector that specifies a top element with which the component could collide. + * @param {String} [options.bottomElement] CSS Selector that specifies a bottom element with which the component could collide. + * @param {Array|String} [options.activateInLayouts] Layouts in which the sticky behaviour is present. Pass an array or comma-separated string. Defaults to 'medium,large'. + * + * @sample Ink_UI_Sticky_1.html + */ + var Sticky = function( selector, options ){ + this._rootElement = Common.elOrSelector(selector, 'Ink.UI.Sticky_1'); + + this._options = Common.options({ + offsetBottom: ['Integer', 0], + offsetTop: ['Integer', 0], + topElement: ['Element', null], + wrapperClass: ['String', 'ink-sticky-wrapper'], + stickyClass: ['String', 'ink-sticky-stuck'], + inlineDimensions: ['Boolean', true], + inlinePosition: ['Boolean', true], + bottomElement: ['Element', null], + activateInLayouts: ['String', 'medium,large'] + }, options || {}, this._rootElement ); + + // Because String#indexOf is compatible with lt IE8 but not Array#indexOf + this._options.activateInLayouts = this._options.activateInLayouts.toString(); + + this._dims = null; // force a recalculation of the dimensions later + + this._options.offsetTop = parseInt(this._options.offsetTop, 10) || 0; + this._options.offsetBottom = parseInt(this._options.offsetBottom, 10) || 0; + + if (this._options.topElement) { + this._options.topElement = Common.elOrSelector(this._options.topElement, 'Top Element'); + } + if (this._options.bottomElement) { + this._options.bottomElement = Common.elOrSelector(this._options.bottomElement, 'Sticky bottom Element'); + } + + this._wrapper = Element.create('div', { className: this._options.wrapperClass }); + Element.wrap(this._rootElement, this._wrapper); + + this._init(); + }; + + Sticky.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function() { + var scrollTarget = document.addEventListener ? document : window; + this._onScroll = Ink.bind(Event.throttle(this._onScroll, 33), this); // Because this is called directly. + Event.observe( scrollTarget, 'scroll', this._onScroll ); + Event.observe( window, 'resize', Ink.bindEvent(Event.throttle(this._onResize, 100), this) ); + this._onScroll(); + }, + + /** + * Returns whether the sticky is disabled in the current view + * + * @method isDisabledInLayout + * @private + */ + _isDisabledInLayout: function () { + var currentLayout = Common.currentLayout(); + if (!currentLayout) { return false; } + return this._options.activateInLayouts.indexOf(currentLayout) === -1; + }, + + /** + * Scroll handler. + * + * @method _onScroll + * @private + */ + _onScroll: function(){ + var dims = this._getDims(); + var scrollHeight = Element.scrollHeight(); + + var unstick = this._isDisabledInLayout() || + scrollHeight <= dims.top - this._options.offsetTop || + (this._options.topElement && this._options.topElement.getBoundingClientRect().bottom + this._options.offsetTop > 0); + + if( unstick ) { + // We're on top, no sticking. position:static is the "normal" position. + this._unstick(); + return; + } + + // If we stick it now, what will be its boundingClientRect.bottom ? + var bottomOfSticky = this._options.offsetTop + dims.height + Element.scrollHeight(); + var maxBottomOfSticky = document.body.scrollHeight; + + if (this._options.bottomElement) { + maxBottomOfSticky = + this._options.bottomElement.getBoundingClientRect().top + + Element.scrollHeight(); + } + + maxBottomOfSticky -= this._options.offsetBottom; + + if ( bottomOfSticky < maxBottomOfSticky ) { + // Stick to screen! + this._stickTo('screen'); + } else { + // Stick to bottom + this._stickTo('bottom'); + } + }, + + /** + * Have the sticky stick nowhere, to the screen, or to the bottom. + * + * @method _stickTo + * @private + */ + _stickTo: function (where) { + var style = this._rootElement.style; + var dims = this._getDims(); + + Css.addClassName(this._rootElement, this._options.stickyClass); + this._wrapper.style.height = dims.height + 'px'; + + this._inlineDimensions(dims.height + 'px', dims.width + 'px'); + + if (this._options.inlinePosition === false) { + return; + } + + style.left = dims.left + 'px'; + + if (where === 'screen') { + style.bottom = null; + style.top = this._options.offsetTop + 'px'; + } else if (where === 'bottom') { + // Distance between bottom of sticky and bottom of document + var bottom = this._getBottomOffset(); + + // Distance between bottom of viewport and bottom of document + var bottomOfViewport = Element.scrollHeight() + Element.viewportHeight(); + var toBottomOfDocument = Element.pageHeight() - bottomOfViewport; + + style.bottom = bottom - toBottomOfDocument + 'px'; + style.top = 'auto'; + } + }, + + /** + * "unstick" the sticky from the screen or bottom of the document + * @method _unstick + * @private + */ + _unstick: function () { + Css.removeClassName(this._rootElement, this._options.stickyClass); + // deinline dimensions of our root element + this._inlineDimensions(null, null); + + // deinline the position of our root element + if (this._options.inlinePosition) { + this._rootElement.style.left = null; + this._rootElement.style.top = null; + this._rootElement.style.bottom = null; + } + + // deinline dimensions of wrapper + this._wrapper.style.height = null; + this._wrapper.style.width = null; + + // Break the "getDims" cache + this._dims = null; + }, + + /** + * Resize handler + * + * @method _onResize + * @private + */ + _onResize: function(){ + this._dims = null; // Blow the cache so _getDims recalculates + this._onScroll(); + }, + + /** + * Recalculate the "dims" cache, or get it. + * + * The "dims" cache is to be set to null when the element is liable to have changed dimensions + * + * (eg: on resize) + * + **/ + _getDims: function () { + if (this._dims !== null) { return this._dims; } + + var style = this._rootElement.style; + + // We unstick the sticky so we can measure. + var oldPosition = style.position; + var oldWidth = style.width; + + style.position = 'static'; // [todo] this should be a class toggle + style.width = null; + + var dimensionsInStatic = Element.outerDimensions(this._rootElement); + var rect = this._wrapper.getBoundingClientRect(); + this._dims = { + height: dimensionsInStatic[1], + width: dimensionsInStatic[0], + left: rect.left + Element.scrollWidth(), + top: rect.top + Element.scrollHeight() + }; + + style.position = oldPosition; + style.width = oldWidth; + + return this._dims; + }, + + /** + * Set style.height and style.width, but not if options.inlineDimensions === false + * + * @method _inlineDimensions + * @private + */ + _inlineDimensions: function (height, width) { + if (this._options.inlineDimensions) { + this._rootElement.style.height = height; + this._rootElement.style.width = width; + } + }, + + /** + * Get the distance between the bottom of the element and the bottom of the page + * + * @method _getBottomOffset + * @private + */ + _getBottomOffset: function () { + var bottom = this._options.offsetBottom; + if (this._options.bottomElement) { + bottom += Element.pageHeight() - + Element.offsetTop(this._options.bottomElement); + } + return bottom; + } + }; + + return Sticky; + +}); +/** + * @module Ink.UI.Swipe_1 + * Swipe gestures + * @version 1 + */ +Ink.createModule('Ink.UI.Swipe', '1', ['Ink.Dom.Event_1', 'Ink.Dom.Element_1', 'Ink.UI.Common_1'], function(InkEvent, InkElement, Common) { + 'use strict'; + + /** + * Subscribe swipe gestures. + * + * Supports filtering swipes be any combination of the criteria supported in the options. + * + * @class Ink.UI.Swipe_1 + * @constructor + * @param {String|DOMElement} el Element or Selector + * @param {Object} options Options Object + * @param {Function} [options.onEnd] Callback function for the `touchend` event. Gets all the gesture information, and is filtered by min/max Dist and Duration options (see below) + * @param {Function} [options.onStart] Callback function for `touchstart` event. + * @param {Function} [options.onMove] Callback function for every `touchmove` event. Gets current gesture information. + * @param {Number} [options.minDist] Minimum allowed distance, in pixels. + * @param {Number} [options.maxDist] Maximum allowed distance, in pixels. + * @param {Number} [options.minDuration] Minimum allowed duration, in seconds. + * @param {Number} [options.maxDuration] Maximum allowed duration, in seconds. + * @param {String} [options.axis] If either 'x' or 'y' is passed, only swipes where the dominant axis is the given one trigger the callback + * @param {String} [options.storeGesture] If to store gesture information and provide it to the callback. Defaults to true. + * @param {String} [options.stopEvents] Flag to stop (default and propagation) of the received events. Defaults to true. + * + * ----- + * + * Arguments received by the callbacks + * ----------------------------------- + * + * `onStart`, `onMove`, and `onEnd` receive as argument an object containing: + * + * - `event`: the DOMEvent object + * - `element`: the target element + * - `Instance`: the `Ink.UI.Swipe_1` instance + * - `position`: `Array` with `[x, y]` coordinates of current position + * - `dt`: Time passed between now and the first event (onMove only) + * - `gesture`: an Array containing [x,y] coordinates of every touchmove event received (storeGesture only) (onEnd only) + * - `time`: an Array containing all the `dt` values for every touchmove event (onEnd only) + * - `overallMovement`: X and Y distance traveled by the touch movement (`[x, y]`) (onEnd only) + * - `overallTime`: total time passed (onEnd only) + * + * @sample Ink_UI_Swipe_1.html + */ + function Swipe(el, options) { + el = Common.elOrSelector(el, 'Swipe target'); + + this._options = Ink.extendObj({ + onEnd: undefined, + onStart: undefined, + onMove: undefined, + minDist: undefined, // in pixels + maxDist: undefined, + minDuration: undefined, // in seconds + maxDuration: undefined, + axis: undefined, // x | y + storeGesture: false, + stopEvents: true + }, InkElement.data(el), options || {}); + + if (typeof options === 'function') { + this._options.onEnd = options; + } + + this._handlers = { + down: Ink.bindEvent(this._onDown, this), + move: Ink.bindEvent(this._onMove, this), + up: Ink.bindEvent(this._onUp, this) + }; + + this._element = el; + + this._init(); + } + + Swipe.prototype = { + + version: '0.1', + + _supported: ('ontouchstart' in document.documentElement), + + _init: function() { + var db = document.body; + InkEvent.observe(db, 'touchstart', this._handlers.down); + if (this._options.storeGesture || this._options.onMove) { + InkEvent.observe(db, 'touchmove', this._handlers.move); + } + InkEvent.observe(db, 'touchend', this._handlers.up); + this._isOn = false; + }, + + _isMeOrParent: function(el, parentEl) { + if (!el) {return;} + do { + if (el === parentEl) { return true; } + el = el.parentNode; + } while (el); + return false; + }, + + _pushGesture: function (coords, dt) { + if (this._options.storeGesture) { + this._gesture.push(coords); + this._time.push(dt); + } + }, + + _onDown: function(event) { + if (event.changedTouches.length !== 1) { return; } + if (!this._isMeOrParent(event.target, this._element)) { return; } + + if( this._options.stopEvents === true ){ + InkEvent.stop(event); + } + event = event.changedTouches[0]; + this._isOn = true; + this._target = event.target; + + this._t0 = +new Date(); + this._p0 = [event.pageX, event.pageY]; + + if (this._options.storeGesture) { + this._gesture = []; + this._time = []; + } + + this._pushGesture(this._p0, 0); + + if (this._options.onStart) { + this._options.onStart({ + event: event, + element: this._element, + instance: this, + position: this._p0, + dt: 0 + }); + } + }, + + _onMove: function(event) { + if (!this._isOn || event.changedTouches.length !== 1) { return; } + if( this._options.stopEvents === true ) { + InkEvent.stop(event); + } + + event = event.changedTouches[0]; + var t1 = +new Date(); + var dt = (t1 - this._t0); + + var gesture = [event.pageX, event.pageY]; + + this._pushGesture(gesture, dt); + + if (this._options.onMove) { + this._options.onMove({ + event: event, + element: this._element, + instance: this, + position: gesture, + dt: dt + }); + } + }, + + _onUp: function(event) { + if (!this._isOn || event.changedTouches.length !== 1) { return; } + + if( this._options.stopEvents === true ){ + InkEvent.stop(event); + } + event = event.changedTouches[0]; // TODO SHOULD CHECK IT IS THE SAME TOUCH + this._isOn = false; + + var t1 = +new Date(); + var p1 = [event.pageX, event.pageY]; + var dt = (t1 - this._t0); + var dr = [ + p1[0] - this._p0[0], + p1[1] - this._p0[1] + ]; + var dist = Math.sqrt(dr[0]*dr[0] + dr[1]*dr[1]); + var axis = Math.abs(dr[0]) > Math.abs(dr[1]) ? 'x' : 'y'; + + var o = this._options; + if (o.minDist && dist < o.minDist) { return; } + if (o.maxDist && dist > o.maxDist) { return; } + if (o.minDuration && dt < o.minDuration) { return; } + if (o.maxDuration && dt > o.maxDuration) { return; } + if (o.axis && axis !== o.axis) { return; } + + if (this._options.onEnd) { + this._options.onEnd({ + event: event, + element: this._element, + instance: this, + gesture: this._gesture, + time: this._time, + axis: axis, + overallMovement: dr, + overallTime: dt + }); + } + } + }; + + return Swipe; +}); +/** + * @module Ink.UI.Table_1 + * Sort and paginate tabular data + * @version 1 + */ +Ink.createModule('Ink.UI.Table', '1', ['Ink.Util.Url_1','Ink.UI.Pagination_1','Ink.Net.Ajax_1','Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1','Ink.Util.String_1', 'Ink.Util.Json_1'], function(InkUrl,Pagination, Ajax, Common, Event, Css, Element, Selector, InkArray, InkString, Json) { + 'use strict'; + + var rNumber = /\d/g; + // Turn into a number, if we can. For sorting data which could be numeric or not. + function maybeTurnIntoNumber(value) { + if( !isNaN(value) && rNumber.test(value) ){ + return parseInt(value, 10); + } else if( !isNaN(value) ){ + return parseFloat(value); + } + return value; + } + function cmp (a, b) { + if( a === b ){ + return 0; + } + return ( ( a > b ) ? 1 : -1 ); + } + // cmp function for comparing data which might be a number. + function numberishEnabledCmp (a, b) { + var aValue = maybeTurnIntoNumber(Element.textContent(a)); + var bValue = maybeTurnIntoNumber(Element.textContent(b)); + + return cmp(aValue, bValue); + } + // Object.keys polyfill + function keys(obj) { + if (typeof Object.keys !== 'undefined') { + return Object.keys(obj); + } + var ret = []; + for (var k in obj) if (obj.hasOwnProperty(k)) { + ret.push(k); + } + return ret; + } + + // Most processJSON* functions can just default to this. + function sameSame(obj) { return obj; } + /** + * The Table component transforms the native/DOM table element into a sortable, paginated component. + * + * You can use this component to display data from a JSON endpoint, or + * from table rows in the DOM. Displaying from the DOM is more practical, + * but sometimes you don't want to load everything at once (if you have + * a HUGE table). In those cases, you should configure Ink.UI.Table to + * get data from JSON endpoint. + * + * To enable sorting, just set the `data-sortable` attribute of your table headers (they must be in the `thead` of the table) to "true". + * + * To enable pagination, you should pass either an `Ink.UI.Pagination` instance or a selector to create the Ink.UI.Paginate element on. + * + * @class Ink.UI.Table + * @constructor + * @version 1 + * @param {String|DOMElement} selector + * @param {Object} [options] Options + * @param {Number} [options.pageSize] Number of rows per page. Omit to avoid paginating. + * @param {String} [options.endpoint] Endpoint to get the records via AJAX. Omit if you don't want to do AJAX + * @param {Function} [options.createEndpointUrl] Callback to customise what URL the AJAX endpoint is at. Receives three arguments: base (the "endpoint" option), sort (`{ order: 'asc' or 'desc', field: fieldname }`) and page ({ page: page number, size: items per page }) + * @param {Function} [options.getDataFromEndPoint] Callback to allow the user to retrieve the data himself given an URL. Must accept two arguments: `url` and `callback`. This `callback` will take as a single argument a JavaScript object. + * @param {Function} [options.processJSONRows] Retrieve an array of rows from the data which came from AJAX. + * @param {Function} [options.processJSONHeaders] Get an object with all the headers' names as keys, and a { label, sortable } object as value. Example: `{col1: {label: "Column 1"}, col2: {label: "Column 2", sortable: true}`. Takes a single argument, the JSON response. + * @param {Function} [options.processJSONRow] Process a row object before it gets on the table. + * @param {Function} [options.processJSONField] Process the field data before putting it on the table. You can return HTML, a DOM element, or a string here. Arguments you receive: `(column, fieldData, rowIndex)`. + * @param {Function} [options.processJSONField.FIELD_NAME] The same as processJSONField, but for a particular field. + * @param {Function} [options.processJSONTotalRows] A callback where you have a chance to say how many rows are in the dataset (not only on this page) you have on the collection. You get as an argument the JSON response. + * @param {Function} [options.getSortKey] A function taking a `{ columnIndex, columnName, data, element }` object and returning a value which serves as a sort key for the sorting operation. For example, if you want to sort by a `data-sort-key` atribute, set `getSortKey` to: function (cell) { return cell.element.getAttribute('data-sort-key'); } + * @param {Function} [options.getSortKey.FIELD_NAME] Same as `options.getSortKey`, but for a particular field. + * @param {Object} [options.tdClassNames] An object mapping each field to what classes it gets. Example: `{ name: "large-10", isBoss: "hide-small" }` + * @param {Mixed} [options.pagination] Pagination instance, element or selector. + * @param {Object} [options.paginationOptions] Override the options with which we instantiate the Ink.UI.Pagination. + * @param {Boolean} [options.allowResetSorting] Allow sort order to be set to "none" in addition to "ascending" and "descending" + * @param {String|Array} [options.visibleFields] Set of fields which get shown on the table + * + * @sample Ink_UI_Table_1.html + */ + var Table = function( selector, options ){ + + /** + * Get the root element + */ + this._rootElement = Common.elOrSelector(selector, 'Ink.UI.Table :'); + + if( this._rootElement.nodeName.toLowerCase() !== 'table' ){ + throw new Error('[Ink.UI.Table] :: The element is not a table'); + } + + this._options = Common.options({ + pageSize: ['Integer', null], + caretUpClass: ['String', 'fa fa-caret-up'], + caretDownClass: ['String', 'fa fa-caret-down'], + endpoint: ['String', null], + createEndpointUrl: ['Function', null /* default func uses above option */], + getDataFromEndPoint: ['Function', null /* by default use plain ajax for JSON */], + processJSONRows: ['Function', sameSame], + processJSONRow: ['Function', sameSame], + processJSONField: ['Function', sameSame], + processJSONHeaders: ['Function', function (dt) { return dt.fields; }], + processJSONTotalRows: ['Function', function (dt) { return dt.length || dt.totalRows; }], + getSortKey: ['Function', null], + pagination: ['Element', null], + allowResetSorting: ['Boolean', false], + visibleFields: ['String', null], + tdClassNames: ['Object', {}], + paginationOptions: ['Object', null] + }, options || {}, this._rootElement); + + /** + * Checking if it's in markup mode or endpoint mode + */ + this._markupMode = !this._options.endpoint; + + if( this._options.visibleFields ){ + this._options.visibleFields = this._options.visibleFields.toString().split(/[, ]+/g); + } + + this._thead = this._rootElement.tHead || this._rootElement.createTHead(); + this._headers = Selector.select('th', this._thead); + + /** + * Initializing variables + */ + this._handlers = { + thClick: null + }; + this._originalFields = [ + // field headers from the DOM + ]; + this._sortableFields = { + // Identifies which columns are sorted and how. + // columnIndex: 'none'|'asc'|'desc' + }; + this._originalData = this._data = []; + this._pagination = null; + this._totalRows = 0; + + this._handlers.thClick = Event.observeDelegated(this._rootElement, 'click', + 'thead th[data-sortable="true"]', + Ink.bindMethod(this, '_onThClick')); + + this._init(); + }; + + Table.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function(){ + /** + * If not is in markup mode, we have to do the initial request + * to get the first data and the headers + */ + if( !this._markupMode ) { + /* Endpoint mode */ + this._getData( ); + } else /* Markup mode */ { + this._resetSortOrder(); + this._addHeadersClasses(); + + /** + * Getting the table's data + */ + this._data = Selector.select('tbody tr', this._rootElement); + this._originalData = this._data.slice(0); + + this._totalRows = this._data.length; + + /** + * Set pagination if options tell us to + */ + this._setPagination(); + } + }, + + /** + * Add the classes in this._options.tdClassNames to our table headers. + * @method _addHeadersClasses + * @private + */ + _addHeadersClasses: function () { + var headerLabel; + var classNames; + for (var i = 0, len = this._headers.length; i < len; i++) { + headerLabel = Element.textContent(this._headers[i]); + classNames = this._options.tdClassNames[headerLabel]; + // TODO do not find header labels this way. But how? + if (classNames) { + Css.addClassName(this._headers[i], classNames); + } + } + }, + + /** + * Click handler. This will mainly handle the sorting (when you click in the headers) + * + * @method _onThClick + * @param {Event} event Event obj + * @private + */ + _onThClick: function( event ){ + var tgtEl = Event.element(event), + paginated = this._options.pageSize !== undefined; + + Event.stop(event); + + var index = InkArray.keyValue(tgtEl, this._headers, true); + var sortable = index !== false && this._sortableFields[index] !== undefined; + + if( !sortable ){ + return; + } + + if( !this._markupMode && paginated ){ + this._invertSortOrder(index, false); + } else { + if ( (this._sortableFields[index] === 'desc') && this._options.allowResetSorting ) { + this._setSortOrderOfColumn(index, null); + this._data = this._originalData.slice(0); + } else { + this._invertSortOrder(index, true); + } + + var tbody = Selector.select('tbody',this._rootElement)[0]; + Common.cleanChildren(tbody); + InkArray.each(this._data, Ink.bindMethod(tbody, 'appendChild')); + + if (this._pagination) { + this._pagination.setCurrent(0); + this._paginate(1); + } + } + }, + + _invertSortOrder: function (index, sortAndReverse) { + var isAscending = this._sortableFields[index] === 'asc'; + + for (var i = 0, len = this._headers.length; i < len; i++) { + this._setSortOrderOfColumn(i, null); + } + + if (sortAndReverse) { + this._sort(index); + if (isAscending) { + this._data.reverse(); + } + } + + this._setSortOrderOfColumn(index, !isAscending); + }, + + _setSortOrderOfColumn: function(index, up) { + var header = this._headers[index]; + var caretHtml = ['']; + var order = 'none'; + + if (up === true) { + caretHtml = ['']; + order = 'asc'; + } else if (up === false) { + caretHtml = ['']; + order = 'desc'; + } + + this._sortableFields[index] = order; + header.innerHTML = Element.textContent(header) + caretHtml.join(''); + }, + + /** + * Applies and/or changes the CSS classes in order to show the right columns + * + * @method _paginate + * @param {Number} page Current page + * @private + */ + _paginate: function( page ){ + if (!this._pagination) { return; } + + var pageSize = this._options.pageSize; + + // Hide everything except the items between these indices + var firstIndex = (page - 1) * pageSize; + var lastIndex = firstIndex + pageSize; + + InkArray.each(this._data, function(item, index){ + if (index >= firstIndex && index < lastIndex) { + Css.removeClassName(item,'hide-all'); + } else { + Css.addClassName(item,'hide-all'); + } + }); + + }, + + /* register fields into this._originalFields, whether they come from JSON or a table. + * @method _registerFieldNames + * @private + * @param [names] The field names in an array + **/ + _registerFieldNames: function (names) { + this._originalFields = []; + + InkArray.forEach(names, Ink.bind(function (field) { + if( !this._fieldIsVisible(field) ){ + return; // The user deems this not to be necessary to see. + } + this._originalFields.push(field); + }, this)); + }, + + _fieldIsVisible: function (field) { + return !this._options.visibleFields || + (this._options.visibleFields.indexOf(field) !== -1); + }, + + /** + * Sorts by a specific column. + * + * @method _sort + * @param {Number} index Column number (starting at 0) + * @private + */ + _sort: function( index ){ + // TODO this is THE worst way to declare field names. Incompatible with i18n and a lot of other things. + var fieldName = Element.textContent(this._headers[index]); + var keyFunction = this._options.getSortKey; + + if (keyFunction) { + keyFunction = + typeof keyFunction[fieldName] === 'function' ? + keyFunction[fieldName] : + typeof keyFunction === 'function' ? + keyFunction : + null; + } + + var self = this; + + this._data.sort(function (trA, trB) { + var elementA = Ink.ss('td', trA)[index]; + var elementB = Ink.ss('td', trB)[index]; + if (keyFunction) { + return cmp(userKey(elementA), userKey(elementB)); + } else { + return numberishEnabledCmp(elementA, elementB, index); + } + }); + + function userKey(element) { + return keyFunction.call(self, { + columnIndex: index, + columnName: fieldName, + data: Element.textContent(element), + element: element + }); + } + }, + + /** + * Assembles the headers markup + * + * @method _createHeadersFromJson + * @param {Object} headers Key-value object that contains the fields as keys, their configuration (label and sorting ability) as value + * @private + */ + _createHeadersFromJson: function( headers ){ + this._registerFieldNames(keys(headers)); + + if (this._thead.children.length) { return; } + + var tr = this._thead.insertRow(0); + var th; + + for (var i = 0, len = headers.length; i < len; i++) { + if (this._fieldIsVisible(headers[i])) { + th = Element.create('th'); + th = this._createSingleHeaderFromJson(headers[i], th); + tr.appendChild(th); + this._headers.push(th); + } + } + }, + + _createSingleHeaderFromJson: function (header, th) { + if (header.sortable) { + th.setAttribute('data-sortable','true'); + } + + if (header.label){ + Element.setTextContent(th, header.label); + } + + return th; + }, + + /** + * Reset the sort order as marked on the table headers to "none" + * + * @method _resetSortOrder + * @private + */ + _resetSortOrder: function(){ + /** + * Setting the sortable columns and its event listeners + */ + for (var i = 0, len = this._headers.length; i < len; i++) { + var dataset = Element.data( this._headers[i] ); + if (dataset.sortable && dataset.sortable.toString() === 'true') { + this._sortableFields[i] = 'none'; + } + } + }, + + /** + * This method gets the rows from AJAX and places them as and + * + * @method _createRowsFromJSON + * @param {Object} rows Array of objects with the data to be showed + * @private + */ + _createRowsFromJSON: function( rows ){ + var tbody = Selector.select('tbody',this._rootElement)[0]; + + if( !tbody ){ + tbody = document.createElement('tbody'); + this._rootElement.appendChild( tbody ); + } else { + Element.setHTML(tbody, ''); + } + + this._data = []; + var row; + + for (var trIndex in rows) { + if (rows.hasOwnProperty(trIndex)) { + row = this._options.processJSONRow(rows[trIndex]); + this._createSingleRowFromJson(tbody, row, trIndex); + } + } + + this._originalData = this._data.slice(0); + }, + + _createSingleRowFromJson: function (tbody, row, rowIndex) { + var tr = document.createElement('tr'); + tbody.appendChild( tr ); + for( var field in row ){ + if (row.hasOwnProperty(field)) { + this._createFieldFromJson(tr, row[field], field, rowIndex); + } + } + this._data.push(tr); + }, + + _createFieldFromJson: function (tr, fieldData, fieldName, rowIndex) { + if (!this._fieldIsVisible(fieldName)) { return; } + + var processor = + this._options.processJSONField[fieldName] || // per-field callback + this._options.processJSONField; // generic callback + + var result; + if (typeof processor === 'function') { + result = processor(fieldData, fieldName, rowIndex); + } else { + result = fieldData; + } + var elm = this._elOrFieldData(result); + + var className = this._options.tdClassNames[fieldName]; + if (className) { + Css.addClassName(elm, className); + } + + tr.appendChild(elm); + }, + + _elOrFieldData: function (processed) { + if (Common.isDOMElement(processed)) { + return processed; + } + + var isString = typeof processed === 'string'; + var isNumber = typeof processed === 'number'; + var elm = Element.create('td'); + + if (isString && /^\s*? + * + * By applying this UI class to the above input, you get a tag field with the tags "initial" and "value". The class preserves the original input element. It remains hidden and is updated with new tag information dynamically, so regular HTML form logic still applies. + * + * Below "input" refers to the current value of the input tag (updated as the user enters text, of course), and "output" refers to the value which this class writes back to said input tag. + * + * @class Ink.UI.TagField + * @version 1 + * @constructor + * @param {String|DOMElement} element Selector or DOM Input Element. + * @param {Object} [options] Options object + * @param {String|Array} [options.tags] Initial tags in the input + * @param {Boolean} [options.allowRepeated] Flag to allow user to input several tags. Defaults to true. + * @param {RegExp} [options.separator] Split the input by this RegExp. Defaults to /[,;(space)]+/g (spaces, commas and semicolons) + * @param {String} [options.outSeparator] Use this string to separate each tag from the next in the output. Defaults to ','. + * @param {Boolean} [options.autoSplit] Flag to activate tag creation when the user types a separator. Defaults to true. + * @param {Integer} [options.maxTags] Maximum number of tags allowed. Set to -1 for no limit. Defaults to -1. + * @example + */ + function TagField(element, options) { + this.init(element, options); + } + + TagField.prototype = { + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + init: function(element, options) { + element = this._element = Common.elOrSelector(element, 'Ink.UI.TagField'); + var o = this._options = Common.options('Ink.UI.TagField', { + tags: ['String', []], + tagQuery: ['Object', null], + tagQueryAsync: ['Object', null], + allowRepeated: ['Boolean', false], + maxTags: ['Integer', -1], + outSeparator: ['String', ','], + separator: ['String', /[,; ]+/g], + autoSplit: ['Boolean', true] + }, options || {}, this._element); + + if (typeof o.separator === 'string') { + o.separator = new RegExp(o.separator, 'g'); + } + + if (typeof o.tags === 'string') { + // coerce to array using the separator + o.tags = this._readInput(o.tags); + } + + Css.addClassName(this._element, 'hide-all'); + + this._viewElm = InkElement.create('div', { + className: 'ink-tagfield', + insertAfter: this._element + }); + + this._input = InkElement.create('input', { + type: 'text', + className: 'new-tag-input', + insertBottom: this._viewElm + }); + + var tags = [].concat(o.tags, this._tagsFromMarkup(this._element)); + + this._tags = []; + + InkArray.each(tags, Ink.bindMethod(this, '_addTag')); + + InkEvent.observe(this._input, 'keyup', Ink.bindEvent(this._onKeyUp, this)); + InkEvent.observe(this._input, 'change', Ink.bindEvent(this._onKeyUp, this)); + InkEvent.observe(this._input, 'keydown', Ink.bindEvent(this._onKeyDown, this)); + InkEvent.observe(this._input, 'blur', Ink.bindEvent(this._onBlur, this)); + InkEvent.observe(this._viewElm, 'click', Ink.bindEvent(this._refocus, this)); + }, + + destroy: function () { + InkElement.remove(this._viewElm); + Css.removeClassName(this._element, 'hide-all'); + }, + + _tagsFromMarkup: function (element) { + var tagname = element.tagName.toLowerCase(); + if (tagname === 'input') { + return this._readInput(element.value); + } else if (tagname === 'select') { + return InkArray.map(element.getElementsByTagName('option'), function (option) { + return InkElement.textContent(option); + }); + } else { + throw new Error('Cannot read tags from a ' + tagname + ' tag. Unknown tag'); + } + }, + + _tagsToMarkup: function (tags, element) { + var tagname = element.tagName.toLowerCase(); + if (tagname === 'input') { + if (this._options.separator) { + element.value = tags.join(this._options.outSeparator); + } + } else if (tagname === 'select') { + element.innerHTML = ''; + InkArray.each(tags, function (tag) { + var opt = InkElement.create('option', {selected: 'selected'}); + InkElement.setTextContent(opt, tag); + element.appendChild(opt); + }); + } else { + throw new Error('TagField: Cannot read tags from a ' + tagname + ' tag. Unknown tag'); + } + }, + + _addTag: function (tag) { + if (this._options.maxTags !== -1 && + this._tags.length >= this._options.maxTags) { + return; + } + if ((!this._options.allowRepeated && + InkArray.inArray(tag, this._tags, tag)) || !tag) { + return false; + } + var elm = InkElement.create('span', { + className: 'ink-tag', + setTextContent: tag + ' ' + }); + + var remove = InkElement.create('span', { + className: 'remove fa fa-times', + insertBottom: elm + }); + InkEvent.observe(remove, 'click', Ink.bindEvent(this._removeTag, this, null)); + + var spc = document.createTextNode(' '); + + this._tags.push(tag); + this._viewElm.insertBefore(elm, this._input); + this._viewElm.insertBefore(spc, this._input); + this._tagsToMarkup(this._tags, this._element); + }, + + _readInput: function (text) { + if (this._options.separator) { + return InkArray.filter(text.split(this._options.separator), isTruthy); + } else { + return [text]; + } + }, + + _onKeyUp: function () { // TODO control input box size + if (!this._options.autoSplit) { + return; + } + var split = this._input.value.split(this._options.separator); + if (split.length <= 1) { + return; + } + var last = split[split.length - 1]; + split = split.splice(0, split.length - 1); + split = InkArray.filter(split, isTruthy); + + InkArray.each(split, Ink.bind(this._addTag, this)); + this._input.value = last; + }, + + _onKeyDown: function (event) { + if (event.which === enterKey) { + return this._onEnterKeyDown(event); + } else if (event.which === backspaceKey) { + return this._onBackspaceKeyDown(); + } else if (this._removeConfirm) { + // user pressed another key, cancel removal from a backspace key + this._unsetRemovingVisual(this._tags.length - 1); + } + }, + + /** + * When the user presses backspace twice on the empty input, we delete the last tag on the field. + * @method onBackspaceKeyDown + * @private + */ + _onBackspaceKeyDown: function () { + if (this._input.value) { return; } + + if (this._removeConfirm) { + this._unsetRemovingVisual(this._tags.length - 1); + this._removeTag(this._tags.length - 1); + this._removeConfirm = null; + } else { + this._setRemovingVisual(this._tags.length - 1); + } + }, + + _onEnterKeyDown: function (event) { + var tag = this._input.value; + if (tag) { + this._addTag(tag); + this._input.value = ''; + } + InkEvent.stopDefault(event); + }, + + _onBlur: function () { + this._addTag(this._input.value); + this._input.value = ''; + }, + + /* For when the user presses backspace. + * Set the style of the tag so that it seems like it's going to be removed + * if they press backspace again. */ + _setRemovingVisual: function (tagIndex) { + var elm = this._viewElm.children[tagIndex]; + Css.addClassName(elm, 'tag-deleting'); + + this._removeRemovingVisualTimeout = setTimeout(Ink.bindMethod(this, '_unsetRemovingVisual', tagIndex), 4000); + InkEvent.observe(this._input, 'blur', Ink.bindMethod(this, '_unsetRemovingVisual', tagIndex)); + this._removeConfirm = true; + }, + _unsetRemovingVisual: function (tagIndex) { + var elm = this._viewElm.children[tagIndex]; + if (elm) { + Css.removeClassName(elm, 'tag-deleting'); + clearTimeout(this._removeRemovingVisualTimeout); + } + this._removeConfirm = null; + }, + + _removeTag: function (event) { + var index; + if (typeof event === 'object') { // click event on close button + var elm = InkEvent.element(event).parentNode; + index = InkElement.parentIndexOf(this._viewElm, elm); + } else if (typeof event === 'number') { // manual removal + index = event; + } + this._tags = InkArray.remove(this._tags, index, 1); + InkElement.remove(this._viewElm.children[index]); + this._tagsToMarkup(this._tags, this._element); + }, + + _refocus: function (event) { + this._input.focus(); + InkEvent.stop(event); + return false; + } + }; + return TagField; +}); +/** + * @module Ink.UI.Toggle_1 + * Toggle the visibility of elements. + * @version 1 + */ + + Ink.createModule('Ink.UI.Toggle', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1'], function(Common, InkEvent, Css, InkElement, Selector, InkArray ) { + 'use strict'; + + /** + * + * You need two elements to use Toggle: the `trigger` element, and the `target` element (or elements). The default behaviour is to toggle the `target`(s) when you click the `trigger`. + * + * The toggle has a state. It is either "on" or "off". It works by switching between the CSS classes in `classNameOn` and `classNameOff` according to the current state. + * + * When you initialize the Toggle, it will check if the targets are visible to figure out what the initial state is. You can force the toggle to consider itself turned "on" or "off" by setting the `initialState` option to `true` or `false`, respectively. + * + * You can get the current state of the Toggle by calling `getState`, or by checking if your `trigger` element has the "active" class. + * The state can be changed through JavaScript. Just call `setState(true)` + * to turn the Toggle on (or `setState(false)` to turn it off). + * + * @class Ink.UI.Toggle + * @constructor + * @version 1 + * @param {String|DOMElement} selector Trigger element. By clicking this, the target (or targets) are triggered. + * @param {Object} [options] Options object, containing: + * + * @param {String} options.target CSS Selector that specifies the elements that this component will toggle + * @param {String} [options.classNameOn] CSS class to toggle when on. Defaults to 'show-all'. + * @param {String} [options.classNameOff] CSS class to toggle when off. Defaults to 'hide-all'. + * @param {String} [options.triggerEvent] Event that will trigger the toggling. Defaults to 'click'. + * @param {Boolean} [options.closeOnClick] Flag to toggle the targe off when clicking outside the toggled content. Defaults to true. + * @param {String} [options.closeOnInsideClick] Toggle off when an element matching this selector is clicked. Set to null to deactivate the check. Defaults to 'a[href]'. + * @param {Boolean} [options.initialState] Flag to define initial state. false: off, true: on, null: markup. Defaults to null. + * @param {Function} [options.onChangeState] Callback when the toggle state changes. Return `false` to cancel the event. + * + * @sample Ink_UI_Toggle_1_constructor.html + */ + var Toggle = function( selector, options ){ + this._rootElement = Common.elOrSelector(selector, '[Ink.UI.Toggle root element]:'); + + this._options = Ink.extendObj({ + target : undefined, + triggerEvent: 'click', + closeOnClick: true, + isAccordion: false, + initialState: null, + classNameOn: 'show-all', + classNameOff: 'hide-all', + togglesDisplay: null, + closeOnInsideClick: 'a[href]', // closes the toggle when a target is clicked and it is a link + onChangeState: null + }, options || {}, InkElement.data(this._rootElement)); + + this._targets = Common.elsOrSelector(this._options.target, 'Ink.UI.Toggle target option'); + + // Boolean option handling + this._options.closeOnClick = this._options.closeOnClick.toString() === 'true'; + // Actually a throolean + if (this._options.initialState !== null){ + this._options.initialState = this._options.initialState.toString() === 'true'; + } else { + this._options.initialState = Css.getStyle(this._targets[0], 'display') !== 'none'; + } + + if (this._options.classNameOn !== 'show-all' || this._options.classNameOff !== 'hide-all') { + for (var i = 0, len = this._targets.length; i < len; i++) { + Css.removeClassName(this._targets[i], 'show-all'); + Css.removeClassName(this._targets[i], 'hide-all'); + } + } + + this._init(); + }; + + Toggle.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function(){ + this._accordion = ( Css.hasClassName(this._rootElement.parentNode,'accordion') || Css.hasClassName(this._targets[0].parentNode,'accordion') ); + + this._firstTime = true; + + this._bindEvents(); + + if (this._options.initialState !== null) { + this.setState(this._options.initialState, true); + } else { + // Add initial classes matching the current "display" of the object. + var state = Css.getStyle(this._targets[0], 'display') !== 'none'; + this.setState(state, true); + } + // Aditionally, remove any inline "display" style. + for (var i = 0, len = this._targets.length; i < len; i++) { + if (this._targets[i].style.display) { + this._targets[i].style.display = ''; // becomes default + } + } + + this._rootElement.setAttribute('data-is-toggle-trigger', 'true'); + }, + + /** + * @method _bindEvents + * @private + */ + _bindEvents: function () { + if ( this._options.triggerEvent ) { + InkEvent.observe( + this._rootElement, + this._options.triggerEvent, + Ink.bind(this._onTriggerEvent, this)); + } + if( this._options.closeOnClick ){ + InkEvent.observe( document, 'click', Ink.bind(this._onOutsideClick, this)); + } + if( this._options.closeOnInsideClick && this._options.closeOnInsideClick !== 'false') { + var sel = this._options.closeOnInsideClick; + if (sel.toString() === 'true') { + sel = '*'; + } + InkEvent.observeMulti(this._targets, 'click', Ink.bind(function (e) { + if ( InkElement.findUpwardsBySelector(InkEvent.element(e), sel) ) { + this.setState(false, true); + } + }, this)); + } + }, + + /** + * Event handler. It's responsible for handling the `triggerEvent` as defined in the options. + * + * This will trigger the toggle. + * + * @method _onTriggerEvent + * @param {Event} event + * @private + */ + _onTriggerEvent: function( event ){ + // When the togglee is a child of the toggler, we get the togglee's events here. We have to check that this event is for us. + var target = InkEvent.element(event); + + var isAncestorOfClickedElement = InkArray.some(this._targets, function (thisOne) { + return thisOne === target || InkElement.isAncestorOf(thisOne, target); + }); + + if (isAncestorOfClickedElement) { + return; + } + + if (this._accordion) { + this._updateAccordion(); + } + + var has = this.getState(); + this.setState(!has, true); + if (!has && this._firstTime) { + this._firstTime = false; + } + + InkEvent.stopDefault(event); + }, + + /** + * Be compatible with accordions + * + * @method _updateAccordion + **/ + _updateAccordion: function () { + var elms, accordionElement; + if( Css.hasClassName(this._targets[0].parentNode,'accordion') ){ + accordionElement = this._targets[0].parentNode; + } else { + accordionElement = this._targets[0].parentNode.parentNode; + } + elms = Selector.select('.toggle, .ink-toggle',accordionElement); + for(var i=0; i 0) && (targetElm[0] !== this._targets[0]) ){ + targetElm[0].style.display = 'none'; + } + } + }, + + /** + * Click handler. Will handle clicks outside the toggle component. + * + * @method _onOutsideClick + * @param {Event} event + * @private + */ + _onOutsideClick: function( event ){ + var tgtEl = InkEvent.element(event), + shades; + + if (InkElement.findUpwardsBySelector(tgtEl, '[data-is-toggle-trigger="true"]')) return; + + var ancestorOfTargets = InkArray.some(this._targets, function (target) { + return InkElement.isAncestorOf(target, tgtEl) || target === tgtEl; + }); + + if( (this._rootElement === tgtEl) || InkElement.isAncestorOf(this._rootElement, tgtEl) || ancestorOfTargets) { + return; + } else if( (shades = Ink.ss('.ink-shade')).length ) { + var shadesLength = shades.length; + + for( var i = 0; i < shadesLength; i++ ){ + if( InkElement.isAncestorOf(shades[i],tgtEl) && InkElement.isAncestorOf(shades[i],this._rootElement) ){ + return; + } + } + } + + this.setState(false, true); // dismiss + }, + + /** + * Sets the state of the toggle. (on/off) + * + * @method setState + * @param newState {Boolean} New state (on/off) + */ + setState: function (on, callHandler) { + if (on === this.getState()) { return; } + if (callHandler && typeof this._options.onChangeState === 'function') { + var ret = this._options.onChangeState(on); + if (ret === false) { return false; } // Canceled by the event handler + } + for (var i = 0, len = this._targets.length; i < len; i++) { + Css.addRemoveClassName(this._targets[i], this._options.classNameOn, on); + Css.addRemoveClassName(this._targets[i], this._options.classNameOff, !on); + } + Css.addRemoveClassName(this._rootElement, 'active', on); + }, + + /** + * Gets the state of the toggle. (on/off) + * + * @method getState + * + * @return {Boolean} whether the toggle is toggled on. + */ + getState: function () { + return Css.hasClassName(this._rootElement, 'active'); + } + }; + + return Toggle; +}); +/** + * @module Ink.UI.Tooltip_1 + * Content Tooltips + * @version 1 + */ +Ink.createModule('Ink.UI.Tooltip', '1', ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1', 'Ink.Dom.Selector_1', 'Ink.Util.Array_1', 'Ink.Dom.Css_1', 'Ink.Dom.Browser_1'], function (Common, InkEvent, InkElement, Selector, InkArray, Css) { + 'use strict'; + + /** + * Tooltips are useful as a means to display information about functionality while avoiding clutter. + * + * Tooltips show up when you hover elements which "have" tooltips. + * + * This class will "give" a tooltip to many elements, selected by its first argument (`target`). This is contrary to the other UI modules in Ink, which are created once per element. + * + * You can define options either through the second argument of the Tooltip constructor, or as data-attributes in each `target` element. Options set through data-attributes all start with "data-tip", and override options passed into the Tooltip constructor. + * + * @class Ink.UI.Tooltip + * @constructor + * + * @param {DOMElement|String} target Target element or selector of elements, to display the tooltips on. + * @param {Object} [options] Options object + * @param {String} [options.text] Text content for the tooltip. + * @param {String} [options.html] HTML for the tooltip. Same as above, but won't escape HTML. + * @param {String} [options.where] Positioning for the tooltip. Options are 'up', 'down', 'left', 'right', 'mousemove' (follows the cursor), and 'mousefix' (stays fixed). Defaults to 'up'. + * + * @param {String} [options.color] Color of the tooltip. Options are red, orange, blue, green and black. Default is white. + * @param {Number} [options.fade] Number of seconds to fade in/out. Defaults to 0.3. + * @param {Boolean} [options.forever] Flag to prevent the tooltip from being erased when the mouse hovers away from the target. + * @param {Number} [options.timeout] Number of seconds the tooltip will stay open. Useful together with options.forever. Defaults to 0. + * @param {Number} [options.delay] Time the tooltip waits until it is displayed. Useful to avoid getting the attention of the user unnecessarily + * @param {DOMElement|Selector} [options.template] Element or selector containing HTML to be cloned into the tooltips. Can be a hidden element, because CSS `display` is set to `block`. + * @param {String} [options.templatefield] Selector within the template element to choose where the text is inserted into the tooltip. Useful when a wrapper DIV is required. + * @param {Number} [options.left] Spacing from the target to the tooltip, when `where` is `mousemove` or `mousefix`. Defaults to 10. + * @param {Number} [options.top] Spacing from the target to the tooltip, when `where` is `mousemove` or `mousefix`. Defaults to 10. + * @param {Number} [options.spacing] Spacing between the tooltip and the target element, when `where` is not `mousemove` or `mousefix`. Defaults to 8. + * + * @sample Ink_UI_Tooltip_1.html + */ + function Tooltip(element, options) { + this._init(element, options || {}); + } + + function EachTooltip(root, elm) { + this._init(root, elm); + } + + var transitionDurationName, + transitionPropertyName, + transitionTimingFunctionName; + (function () { // Feature detection + var test = document.createElement('DIV'); + var names = ['transition', 'oTransition', 'msTransition', 'mozTransition', + 'webkitTransition']; + for (var i = 0; i < names.length; i++) { + if (typeof test.style[names[i] + 'Duration'] !== 'undefined') { + transitionDurationName = names[i] + 'Duration'; + transitionPropertyName = names[i] + 'Property'; + transitionTimingFunctionName = names[i] + 'TimingFunction'; + break; + } + } + }()); + + // Body or documentElement + var bodies = document.getElementsByTagName('body'); + var body = bodies.length ? bodies[0] : document.documentElement; + + Tooltip.prototype = { + _init: function(element, options) { + var elements; + + this.options = Ink.extendObj({ + where: 'up', + zIndex: 10000, + left: 10, + top: 10, + spacing: 8, + forever: 0, + color: '', + timeout: 0, + delay: 0, + template: null, + templatefield: null, + fade: 0.3, + text: '' + }, options || {}); + + if (typeof element === 'string') { + elements = Selector.select(element); + } else if (typeof element === 'object') { + elements = [element]; + } else { + throw 'Element expected'; + } + + this.tooltips = []; + + for (var i = 0, len = elements.length; i < len; i++) { + this.tooltips[i] = new EachTooltip(this, elements[i]); + } + }, + /** + * Destroys the tooltips created by this instance + * + * @method destroy + */ + destroy: function () { + InkArray.each(this.tooltips, function (tooltip) { + tooltip._destroy(); + }); + this.tooltips = null; + this.options = null; + } + }; + + EachTooltip.prototype = { + _oppositeDirections: { + left: 'right', + right: 'left', + up: 'down', + down: 'up' + }, + _init: function(root, elm) { + InkEvent.observe(elm, 'mouseover', Ink.bindEvent(this._onMouseOver, this)); + InkEvent.observe(elm, 'mouseout', Ink.bindEvent(this._onMouseOut, this)); + InkEvent.observe(elm, 'mousemove', Ink.bindEvent(this._onMouseMove, this)); + + this.root = root; + this.element = elm; + this._delayTimeout = null; + this.tooltip = null; + }, + _makeTooltip: function (mousePosition) { + if (!this._getOpt('text') && + !this._getOpt('html') && + !InkElement.hasAttribute(this.element, 'title')) { + return false; + } + + var tooltip = this._createTooltipElement(); + + if (this.tooltip) { + this._removeTooltip(); + } + + this.tooltip = tooltip; + + this._fadeInTooltipElement(tooltip); + this._placeTooltipElement(tooltip, mousePosition); + + InkEvent.observe(tooltip, 'mouseover', Ink.bindEvent(this._onTooltipMouseOver, this)); + + var timeout = this._getFloatOpt('timeout'); + if (timeout) { + setTimeout(Ink.bind(function () { + if (this.tooltip === tooltip) { + this._removeTooltip(); + } + }, this), timeout * 1000); + } + }, + _createTooltipElement: function () { + var template = this._getOpt('template'), // User template instead of our HTML + templatefield = this._getOpt('templatefield'), + + tooltip, // The element we float + field; // Element where we write our message. Child or same as the above + + if (template) { // The user told us of a template to use. We copy it. + var temp = document.createElement('DIV'); + temp.innerHTML = Common.elOrSelector(template, 'options.template').outerHTML; + tooltip = temp.firstChild; + + if (templatefield) { + field = Selector.select(templatefield, tooltip); + if (field) { + field = field[0]; + } else { + throw 'options.templatefield must be a valid selector within options.template'; + } + } else { + field = tooltip; // Assume same element if user did not specify a field + } + } else { // We create the default structure + tooltip = document.createElement('DIV'); + Css.addClassName(tooltip, 'ink-tooltip'); + Css.addClassName(tooltip, this._getOpt('color')); + + field = document.createElement('DIV'); + Css.addClassName(field, 'content'); + + tooltip.appendChild(field); + } + + if (this._getOpt('html')) { + field.innerHTML = this._getOpt('html'); + } else if (this._getOpt('text')) { + InkElement.setTextContent(field, this._getOpt('text')); + } else { + InkElement.setTextContent(field, this.element.getAttribute('title')); + } + tooltip.style.display = 'block'; + tooltip.style.position = 'absolute'; + tooltip.style.zIndex = this._getIntOpt('zIndex'); + + return tooltip; + }, + _fadeInTooltipElement: function (tooltip) { + var fadeTime = this._getFloatOpt('fade'); + if (transitionDurationName && fadeTime) { + tooltip.style.opacity = '0'; + tooltip.style[transitionDurationName] = fadeTime + 's'; + tooltip.style[transitionPropertyName] = 'opacity'; + tooltip.style[transitionTimingFunctionName] = 'ease-in-out'; + setTimeout(function () { + tooltip.style.opacity = '1'; + }, 0); // Wait a tick + } + }, + _placeTooltipElement: function (tooltip, mousePosition) { + var where = this._getOpt('where'); + + if (where === 'mousemove' || where === 'mousefix') { + var mPos = mousePosition; + this._setPos(mPos[0], mPos[1]); + body.appendChild(tooltip); + } else if (where.match(/(up|down|left|right)/)) { + body.appendChild(tooltip); + var targetElementPos = InkElement.offset(this.element); + var tleft = targetElementPos[0], + ttop = targetElementPos[1]; + + var centerh = (InkElement.elementWidth(this.element) / 2) - (InkElement.elementWidth(tooltip) / 2), + centerv = (InkElement.elementHeight(this.element) / 2) - (InkElement.elementHeight(tooltip) / 2); + var spacing = this._getIntOpt('spacing'); + + var tooltipDims = InkElement.elementDimensions(tooltip); + var elementDims = InkElement.elementDimensions(this.element); + + var maxX = InkElement.scrollWidth() + InkElement.viewportWidth(); + var maxY = InkElement.scrollHeight() + InkElement.viewportHeight(); + + where = this._getWhereValueInsideViewport(where, { + left: tleft - tooltipDims[0], + right: tleft + tooltipDims[0], + top: ttop + tooltipDims[1], + bottom: ttop + tooltipDims[1] + }, { + right: maxX, + bottom: maxY + }); + + if (where === 'up') { + ttop -= tooltipDims[1]; + ttop -= spacing; + tleft += centerh; + } else if (where === 'down') { + ttop += elementDims[1]; + ttop += spacing; + tleft += centerh; + } else if (where === 'left') { + tleft -= tooltipDims[0]; + tleft -= spacing; + ttop += centerv; + } else if (where === 'right') { + tleft += elementDims[0]; + tleft += spacing; + ttop += centerv; + } + + var arrow = null; + if (where.match(/(up|down|left|right)/)) { + arrow = document.createElement('SPAN'); + Css.addClassName(arrow, 'arrow'); + Css.addClassName(arrow, this._oppositeDirections[where]); + tooltip.appendChild(arrow); + } + + var tooltipLeft = tleft; + var tooltipTop = ttop; + + var toBottom = (tooltipTop + tooltipDims[1]) - maxY; + var toRight = (tooltipLeft + tooltipDims[0]) - maxX; + var toLeft = 0 - tooltipLeft; + var toTop = 0 - tooltipTop; + + if (toBottom > 0) { + if (arrow) { arrow.style.top = (tooltipDims[1] / 2) + toBottom + 'px'; } + tooltipTop -= toBottom; + } else if (toTop > 0) { + if (arrow) { arrow.style.top = (tooltipDims[1] / 2) - toTop + 'px'; } + tooltipTop += toTop; + } else if (toRight > 0) { + if (arrow) { arrow.style.left = (tooltipDims[0] / 2) + toRight + 'px'; } + tooltipLeft -= toRight; + } else if (toLeft > 0) { + if (arrow) { arrow.style.left = (tooltipDims[0] / 2) - toLeft + 'px'; } + tooltipLeft += toLeft; + } + + tooltip.style.left = tooltipLeft + 'px'; + tooltip.style.top = tooltipTop + 'px'; + } + }, + + /** + * Get a value for "where" (left/right/up/down) which doesn't put the + * tooltip off the screen + * + * @method _getWhereValueInsideViewport + * @param where {String} "where" value which was given by the user and we might change + * @param bbox {BoundingBox} A bounding box like what you get from getBoundingClientRect ({top, bottom, left, right}) with pixel positions from the top left corner of the viewport. + * @param viewport {BoundingBox} Bounding box for the viewport. "top" and "left" are omitted because these coordinates are relative to the top-left corner of the viewport so they are zero. + * + * @TODO: we can't use getBoundingClientRect in this case because it returns {0,0,0,0} on our uncreated tooltip. + */ + _getWhereValueInsideViewport: function (where, bbox, viewport) { + if (where === 'left' && bbox.left < 0) { + return 'right'; + } else if (where === 'right' && bbox.right > viewport.right) { + return 'left'; + } else if (where === 'up' && bbox.top < 0) { + return 'down'; + } else if (where === 'down' && bbox.bottom > viewport.bottom) { + return 'up'; + } + + return where; + }, + _removeTooltip: function() { + var tooltip = this.tooltip; + if (!tooltip) {return;} + + var remove = Ink.bind(InkElement.remove, {}, tooltip); + + if (this._getOpt('where') !== 'mousemove' && transitionDurationName) { + tooltip.style.opacity = 0; + // remove() will operate on correct tooltip, although this.tooltip === null then + setTimeout(remove, this._getFloatOpt('fade') * 1000); + } else { + remove(); + } + this.tooltip = null; + }, + _getOpt: function (option) { + var dataAttrVal = InkElement.data(this.element)[InkElement._camelCase('tip-' + option)]; + if (dataAttrVal /* either null or "" may signify the absense of this attribute*/) { + return dataAttrVal; + } + var instanceOption = this.root.options[option]; + if (typeof instanceOption !== 'undefined') { + return instanceOption; + } + }, + _getIntOpt: function (option) { + return parseInt(this._getOpt(option), 10); + }, + _getFloatOpt: function (option) { + return parseFloat(this._getOpt(option), 10); + }, + _destroy: function () { + if (this.tooltip) { + InkElement.remove(this.tooltip); + } + this.root = null; // Cyclic reference = memory leaks + this.element = null; + this.tooltip = null; + }, + _onMouseOver: function(e) { + // on IE < 10 you can't access the mouse event not even a tick after it fired + var mousePosition = this._getMousePosition(e); + var delay = this._getFloatOpt('delay'); + if (delay) { + this._delayTimeout = setTimeout(Ink.bind(function () { + if (!this.tooltip) { + this._makeTooltip(mousePosition); + } + this._delayTimeout = null; + }, this), delay * 1000); + } else { + this._makeTooltip(mousePosition); + } + }, + _onMouseMove: function(e) { + if (this._getOpt('where') === 'mousemove' && this.tooltip) { + var mPos = this._getMousePosition(e); + this._setPos(mPos[0], mPos[1]); + } + }, + _onMouseOut: function () { + if (!this._getIntOpt('forever')) { + this._removeTooltip(); + } + if (this._delayTimeout) { + clearTimeout(this._delayTimeout); + this._delayTimeout = null; + } + }, + _onTooltipMouseOver: function () { + if (this.tooltip) { // If tooltip is already being removed, this has no effect + this._removeTooltip(); + } + }, + _setPos: function(left, top) { + left += this._getIntOpt('left'); + top += this._getIntOpt('top'); + var pageDims = this._getPageXY(); + if (this.tooltip) { + var elmDims = [InkElement.elementWidth(this.tooltip), InkElement.elementHeight(this.tooltip)]; + var scrollDim = this._getScroll(); + + if((elmDims[0] + left - scrollDim[0]) >= (pageDims[0] - 20)) { + left = (left - elmDims[0] - this._getIntOpt('left') - 10); + } + if((elmDims[1] + top - scrollDim[1]) >= (pageDims[1] - 20)) { + top = (top - elmDims[1] - this._getIntOpt('top') - 10); + } + + this.tooltip.style.left = left + 'px'; + this.tooltip.style.top = top + 'px'; + } + }, + _getPageXY: function() { + var cWidth = 0; + var cHeight = 0; + if( typeof( window.innerWidth ) === 'number' ) { + cWidth = window.innerWidth; + cHeight = window.innerHeight; + } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { + cWidth = document.documentElement.clientWidth; + cHeight = document.documentElement.clientHeight; + } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { + cWidth = document.body.clientWidth; + cHeight = document.body.clientHeight; + } + return [parseInt(cWidth, 10), parseInt(cHeight, 10)]; + }, + _getScroll: function() { + var dd = document.documentElement, db = document.body; + if (dd && (dd.scrollLeft || dd.scrollTop)) { + return [dd.scrollLeft, dd.scrollTop]; + } else if (db) { + return [db.scrollLeft, db.scrollTop]; + } else { + return [0, 0]; + } + }, + _getMousePosition: function(e) { + return [parseInt(InkEvent.pointerX(e), 10), parseInt(InkEvent.pointerY(e), 10)]; + } + }; + + return Tooltip; +}); +/** + * @module Ink.UI.TreeView_1 + * Elements in a tree structure + * @version 1 + */ +Ink.createModule('Ink.UI.TreeView', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1'], function(Common, Event, Css, Element, Selector, InkArray ) { + 'use strict'; + + + /** + * Shows elements in a tree structure which can be expanded and contracted. + * A TreeView is built with "node"s and "children". "node"s are `li` tags, and "children" are `ul` tags. + * You can build your TreeView out of a regular UL and LI element structure which you already use to display lists with several levels. + * If you want a node to be open when the TreeView is built, just add the data-open="true" attribute to it. + * + * @class Ink.UI.TreeView + * @constructor + * @version 1 + * @param {String|DOMElement} selector Element or selector. + * @param {String} [options] Options object, containing: + * @param {String} [options.node] Selector for the nodes. Defaults to 'li'. + * @param {String} [options.children] Selector for the children. Defaults to 'ul'. + * @param {String} [options.parentClass] CSS classes to be added to parent nodes. Defaults to 'parent'. + * @param {String} [options.openClass] CSS classes to be added to the icon when a parent is open. Defaults to 'fa fa-minus-circle'. + * @param {String} [options.closedClass] CSS classes to be added to the icon when a parent is closed. Defaults to 'fa fa-plus-circle'. + * @param {String} [options.hideClass] CSS Class to toggle visibility of the children. Defaults to 'hide-all'. + * @param {String} [options.iconTag] The name of icon tag. The component tries to find a tag with that name as a direct child of the node. If it doesn't find it, it creates it. Defaults to 'i'. + * @param {Boolean} [options.stopDefault] Flag to stops the default behavior of the click handler. Defaults to true. + * @example + * + * + * + * @sample Ink_UI_TreeView_1.html + */ + var TreeView = function(selector, options){ + this._element = Common.elOrSelector(selector, '[Ink.UI.TreeView_1]'); + + this._options = Common.options('Treeview', { + 'node': ['String', 'li'], + // [3.0.1] Deprecate this terrible, terrible name + 'child': ['String',null], + 'children': ['String','ul'], + 'parentClass': ['String','parent'], + 'openNodeClass': ['String', 'open'], + 'openClass': ['String','fa fa-minus-circle'], + 'closedClass': ['String','fa fa-plus-circle'], + 'hideClass': ['String','hide-all'], + 'iconTag': ['String', 'i'], + 'stopDefault' : ['Boolean', true] + }, options || {}, this._element); + + if (this._options.child) { + Ink.warn('Ink.UI.TreeView: options.child is being renamed to options.children.'); + this._options.children = this._options.child; + } + + this._init(); + }; + + TreeView.prototype = { + + /** + * Init function called by the constructor. Sets the necessary event handlers. + * + * @method _init + * @private + */ + _init: function(){ + this._handlers = { + click: Ink.bindEvent(this._onClick,this) + }; + + Event.on(this._element, 'click', this._options.node, this._handlers.click); + + InkArray.each(Ink.ss(this._options.node, this._element), Ink.bind(function(item){ + if( this.isParent(item) ) { + Css.addClassName(item, this._options.parentClass); + + var isOpen = this.isOpen(item); + if( !this._getIcon(item) ){ + Element.create(this._options.iconTag, { insertTop: item }); + } + + this._setNodeOpen(item, isOpen); + } + },this)); + }, + + _getIcon: function (node) { + return Ink.s('> ' + this._options.iconTag, node); + }, + + /** + * Checks if a node is open. + * + * @method isOpen + * @param {DOMElement} node The tree node to check + **/ + isOpen: function (node) { + if (!this._getChild(node)) { + throw new Error('not a node!'); + } + + return Element.data(node).open === 'true' || + Css.hasClassName(node, this._options.openNodeClass); + }, + + /** + * Checks if a node is a parent. + * + * @method isParent + * @param {DOMElement} node Node to check + **/ + isParent: function (node) { + return Css.hasClassName(node, this._options.parentClass) || + this._getChild(node) != null; + }, + + _setNodeOpen: function (node, beOpen) { + var child = this._getChild(node); + if (child) { + Css.setClassName(child, this._options.hideClass, !beOpen); + var icon = this._getIcon(node); + + node.setAttribute('data-open', beOpen); + + /* + * Don't refactor this to + * + * setClassName(el, className, status); setClassName(el, className, !status); + * + * because it won't work with multiple classes. + * + * Doing: + * setClassName(el, 'fa fa-whatever', true);setClassName(el, 'fa fa-whatever-else', false); + * + * will remove 'fa' although it is a class we want. + */ + + var toAdd = beOpen ? this._options.openClass : this._options.closedClass; + var toRemove = beOpen ? this._options.closedClass : this._options.openClass; + Css.removeClassName(icon, toRemove); + Css.addClassName(icon, toAdd); + + Css.setClassName(node, this._options.openNodeClass, beOpen); + } else { + Ink.error('Ink.UI.TreeView: node', node, 'is not a node!'); + } + }, + + /** + * Opens one of the tree nodes + * + * Make sure you pass the node's DOMElement + * @method open + * @param {DOMElement} node The node you wish to open. + **/ + open: function (node) { + this._setNodeOpen(node, true); + }, + + /** + * Closes one of the tree nodes + * + * Make sure you pass the node's DOMElement + * @method close + * @param {DOMElement} node The node you wish to close. + **/ + close: function (node) { + this._setNodeOpen(node, false); + }, + + /** + * Toggles a node state + * + * @method toggle + * @param {DOMElement} node The node to toggle. + **/ + toggle: function (node) { + if (this.isOpen(node)) { + this.close(node); + } else { + this.open(node); + } + }, + + _getChild: function (node) { + return Selector.select(this._options.children, node)[0] || null; + }, + + /** + * Handles the click event (as specified in the _init function). + * + * @method _onClick + * @param {Event} event + * @private + */ + _onClick: function(ev){ + /** + * Summary: + * If the clicked element is a "node" as defined in the options, will check if it has any "child". + * If so, will toggle its state and stop the event's default behavior if the stopDefault option is true. + **/ + + if (!this.isParent(ev.currentTarget) || + Selector.matchesSelector(ev.target, this._options.node) || + Selector.matchesSelector(ev.target, this._options.children)) { + return; + } + + if (this._options.stopDefault){ + ev.preventDefault(); + } + + this.toggle(ev.currentTarget); + } + }; + + return TreeView; +}); +Ink.createModule('Ink.UI.Upload', '1', [ + 'Ink.Dom.Event_1', + 'Ink.Dom.Element_1', + 'Ink.Dom.Browser_1', + 'Ink.UI.Common_1' +], function(Event, Element, Browser, Common) { + 'use strict'; + + var DirectoryReader = function(options) { + this.init(options); + }; + + DirectoryReader.prototype = { + init: function(options) { + this.options = Ink.extendObj({ + entry: undefined, + maxDepth: 10 + }, options || {}); + + try { + this._read(); + } catch(e) { + Ink.error(e); + } + }, + + + _read: function() { + if(!this.options.entry) { + throw("The entry specify you must"); + } + + try { + this._readDirectories(); + } catch(e) { + Ink.error(e); + } + }, + + + _readDirectories: function() { + var entries = [], + running = false, + maxDepth = 0; + + /* TODO return as tree because much better well */ + var _readEntries = Ink.bind(function(currentEntry) { + var dir = currentEntry.createReader(); + running = true; + + dir.readEntries(Ink.bind(function(res) { + if(res.length > 0) { + for(var i = 0, len = res.length; i=0; i--) { + if(typeof(arr[i]) === 'undefined' || arr[i] === null || arr[i] === '') { + arr.splice(i, 1); + } + } + return arr; + } + }; + + var Queue = { + lists: [], + items: [], + + + /** + * Create new queue list + * @function create + * @public + * @param {String} list name + * @param {Function} function to iterate on items + * @return {Object} list id + */ + create: function(name) { + var id; + name = String(name); + this.lists.push({name: name}); + id = this.lists.length - 1; + return id; + }, + + + getItems: function(parentId) { + if(!parentId) { + return this.items; + } + var items = []; + for(var i = 0, len = this.items.length; i=0; i--) { + if(this.items[i] && id === this.items[i].parentId) { + this.remove(this.items[i].parentId, this.items[i].pid); + } + } + if(!keepList) { + this.lists.splice(id, 1); + } + return true; + } catch(e) { + Ink.error('Purge: invalid id'); + return false; + } + }, + + + /** + * add an item to a list + * @function add + * @public + * @param {String} name + * @param {Object} item + * @return {Number} pid + */ + add: function(parentId, item, priority) { + if(!this.lists[parentId]) { + return false; + } + if(typeof(item) !== 'object') { + item = String(item); + } + + var pid = parseInt(Math.round(Math.random() * 100000) + "" + Math.round(Math.random() * 100000), 10); + priority = priority || 0; + + this.items.push({parentId: parentId, item: item, priority: priority || 0, pid: pid}); + return pid; + }, + + + /** + * View list + * @function view + * @public + * @param {Number} list id + * @param {Number} process id + * @return {Object} item + */ + view: function(parentId, pid) { + var id = this._searchByPid(parentId, pid); + if(id === false) { + return false; + } + return this.items[id]; + }, + + + /** + * Remove an item + * @function remove + * @public + * @param {Object} item + * @return {Object|Boolean} removed item or false if not found + */ + remove: function(parentId, pid) { + try { + var id = this._searchByPid(parentId, pid); + if(id === false) { + return false; + } + this.items.splice(id, 1); + return true; + } catch(e) { + Ink.error('Remove: invalid id'); + return false; + } + }, + + _searchByPid: function(parentId, pid) { + if(!parentId && typeof(parentId) === 'boolean' || !pid) { + return false; + } + + parentId = parseInt(parentId, 10); + pid = parseInt(pid, 10); + + if(isNaN(parentId) || isNaN(pid)) { + return false; + } + + for(var i = 0, len = this.items.length; i this.options.minSizeToUseChunks; + }, + + + _dropEventHandler: function(ev) { + if(ev && ev.stopPropagation) { + ev.stopPropagation(); + } + if(ev && ev.preventDefault) { + ev.preventDefault(); + } + if(ev) { + ev.returnValue = false; + } + + this.publish('DropComplete', ev.dataTransfer); + + var data = ev.dataTransfer; + + if(!data || !data.files || !data.files.length) { + return false; + } + + this._files = data.files; + this._files = Array.prototype.slice.call(this._files || [], 0); + + // check if webkitGetAsEntry exists on first item + if(data.items && data.items[0] && data.items[0].webkitGetAsEntry) { + if(!this.options.foldersEnabled) { + return setTimeout(Ink.bind(this._addFilesToQueue, this, this._files), 0); + } + var entry, folders = []; + for(var i = ev.dataTransfer.items.length-1; i>=0; i--) { + entry = ev.dataTransfer.items[i].webkitGetAsEntry(); + if(entry && entry.isDirectory) { + folders.push(entry); + this._files[i].isDirectory = true; + this._files.splice(i, 1); + } + } + // starting callback hell + this._addFolderToQueue(folders, Ink.bind(function() { + setTimeout(Ink.bind(this._addFilesToQueue, this, this._files), 0); + }, this)); + } else { + setTimeout(Ink.bind(this._addFilesToQueue, this, this._files), 0); + } + + return true; + }, + + + _addFolderToQueue: function(folders, cb) { + var files = [], invalidFolders = {}; + + if(!folders || !folders.length) { + cb(); + return files; + } + + var getFiles = function(entries) { + var files = []; + for(var i = 0, len = entries.length; i this.options.maxFilesize) { + this.publish('MaxSizeFailure', file, this.options.maxFilesize); + continue; + } + + fileID = parseInt(Math.round(Math.random() * 100000) + "" + Math.round(Math.random() * 100000), 10); + o = { id: i, data: file, fileID: fileID, directory: file.isDirectory }; + Queue.add(this._queueId, o); + + this.publish('FileAddedToQueue', o); + } + this._processQueue(true); + this._files = []; + }, + + + _processQueue: function(internalUpload) { + if(this._queueRunning) { + return false; + } + + this.running = 0; + var max = 1, i = 0, items, + queueLen = Queue.items.length; + this._queueRunning = true; + + this.interval = setInterval(Ink.bind(function() { + if(Queue.items.length === i && this.running === 0) { + Queue.purge(this._queueId, true); + this._queueRunning = false; + clearInterval(this.interval); + this.publish('QueueEnd', this._queueId, queueLen); + } + + items = Queue.getItems(this._queueId); + + if(this.running < max && items[i]) { + if(!items[i].canceled) { + _doRequest.call(this, items[i].pid, items[i].item.data, items[i].item.fileID, items[i].item.directory, internalUpload); + this.running++; + i++; + } else { + var j = i; + while(items[j] && items[j].canceled) { + i++; + j++; + } + } + return true; + } + return false; + }, this), 100); + + + var _doRequest = function(pid, data, fileID, directory, internalUpload) { + var o = { + file: data, + fileID: fileID, + cb: Ink.bind(function() { + this.running--; + }, this) + }; + if(internalUpload) { + if(directory) { + // do magic + o.cb(); + } else { + this._upload(o); + } + } + }; + + return true; + }, + + + _upload: function(o) { + var file = o.file, + xhr = new XMLHttpRequest(), + fileID = o.fileID; + + this.publish('BeforeUpload', file, this.options.extraData, fileID, xhr, this._supportChunks(file.size)); + + var forceAbort = function(showError) { + if(o.cb && typeof(o.cb === 'function')) { + o.cb(); + } + + this.publish('OnProgress', { + length: file.size, + lengthComputable: true, + loaded: file.size, + total: file.size + }, file, fileID); + this.publish('EndUpload', file, fileID, (showError ? { error: true } : true)); + this.publish('InvalidFile', file, 'name'); + xhr.abort(); + }; + + if(this.options.INVALID_FILE_NAME && this.options.INVALID_FILE_NAME instanceof RegExp) { + if(this.options.INVALID_FILE_NAME.test(o.file.name)) { + forceAbort.call(this); + return; + } + } + + // If file was renamed, abort it + // FU OPERA: Opera always return lastModified date as null + if(!file.lastModifiedDate && !Ink.Dom.Browser.OPERA) { + forceAbort.call(this, true); + return; + } + + xhr.upload.onprogress = Ink.bind(this.publish, this, 'OnProgress', file, fileID); + + var endpoint, method; + if(this._supportChunks(file.size)) { + if(file.size <= file.chunk_offset) { + endpoint = this.options.endpointChunkCommit; + method = 'POST'; + } else { + endpoint = this.options.endpointChunk; + if(file.chunk_upload_id) { + endpoint += '?upload_id=' + file.chunk_upload_id; + } + if(file.chunk_offset) { + endpoint += '&offset=' + file.chunk_offset; + } + method = 'PUT'; + } + } else { + endpoint = this.options.endpoint; + method = 'POST'; + } + + xhr.open(method, endpoint, true); + xhr.withCredentials = true; + xhr.setRequestHeader("x-requested-with", "XMLHttpRequest"); + if(this._supportChunks(file.size)) { + xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + } + + var fd = new FormData(), + blob; + + if("Blob" in window && typeof Blob === 'function') { + blob = new Blob([file], { type: file.type }); + if(this._supportChunks(file.size)) { + file.chunk_offset = file.chunk_offset || 0; + blob = blob.slice(file.chunk_offset, file.chunk_offset + this.options.chunkSize); + } else { + fd.append(this.options.fileFormName, blob, file.name); + } + } else { + fd.append(this.options.fileFormName, file); + } + + if(!this._supportChunks(file.size)) { + for(var k in this.options.extraData) { + if(this.options.extraData.hasOwnProperty(k)) { + fd.append(k, this.options.extraData[k]); + } + } + } else { + fd.append('upload_id', file.chunk_upload_id); + fd.append('path', file.upload_path); + } + + if(!file.hasParent) { + if(!this._supportChunks(file.size)) { + xhr.send(fd); + } else { + if(file.size <= file.chunk_offset) { + xhr.send('upload_id=' + file.chunk_upload_id + '&path=' + file.upload_path + '/' + file.name); + } else { + xhr.send(blob); + } + } + } else { + this.publish('cbCreateFolder', file.parentID, file.fullPath, this.options.extraData, this._folders, file.rootPath, Ink.bind(function() { + if(!this._supportChunks(file.size)) { + xhr.send(fd); + } else { + if(file.size <= file.chunk_offset) { + xhr.send('upload_id=' + file.chunk_upload_id + '&path=' + file.upload_path + '/' + file.name); + } else { + xhr.send(blob); + } + } + }, this)); + } + + + xhr.onload = Ink.bindEvent(function() { + /* jshint boss:true */ + if(this._supportChunks(file.size) && file.size > file.chunk_offset) { + if(xhr.response) { + var response = JSON.parse(xhr.response); + + // check expected offset + var invalidOffset = file.chunk_offset && response.offset !== (file.chunk_offset + this.options.chunkSize) && file.size !== response.offset; + if(invalidOffset) { + if(o.cb) { + o.cb(); + } + this.publish('ErrorUpload', file, fileID); + } else { + file.chunk_upload_id = response.upload_id; + file.chunk_offset = response.offset; + file.chunk_expires = response.expires; + this._upload(o); + } + } else { + if(o.cb) { + o.cb(); + } + this.publish('ErrorUpload', file, fileID); + } + return (xhr = null); + } + + if(o.cb) { + o.cb(); + } + + if(xhr.responseText && xhr['status'] < 400) { + this.publish('EndUpload', file, fileID, xhr.responseText); + } else { + this.publish('ErrorUpload', file, fileID); + } + return (xhr = null); + }, this); + + + xhr.onerror = Ink.bindEvent(function() { + if(o.cb) { + o.cb(); + } + this.publish('ErrorUpload', file, fileID); + }, this); + + xhr.onabort = Ink.bindEvent(function() { + if(o.cb) { + o.cb(); + } + this.publish('AbortUpload', file, fileID, { + abortAll: Ink.bind(this.abortAll, this), + abortOne: Ink.bind(this.abortOne, this) + }); + }, this); + }, + + + abortAll: function() { + if(!this._queueRunning) { + return false; + } + clearInterval(this.interval); + this._queueRunning = false; + Queue.purge(this._queueId, true); + return true; + }, + + abortOne: function(id, cb) { + var items = Queue.getItems(0), + o; + for(var i = 0, len = items.length; i","dir"," ","+","~","preFilter","excess","unquoted","pattern","operator","result","what","last","simple","forward","ofType","outerCache","nodeIndex","start","useCache","pseudo","setFilters","matched","not","input","matcher","unmatched","lang","elemLang","focus","activeElement","hasFocus","tabIndex","enabled","disabled","selectedIndex","empty","header","eq","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","checkNonElements","doneName","dirkey","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","elems","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","matcherCachedRuns","bySet","byElement","superMatcher","expandContext","setMatched","matchedCount","outermost","contextBackup","dirrunsUnique","group","contexts","token","filters","Common","animationPrefix","animationEndEventName","animation","oAnimation","msAnimation","webkitAnimation","Animate","elOrSelector","_element","_options","trigger","duration","removeClass","onEnd","animate","_animationPrefix","animationSupported","onAnimationEnd","animationName","Pagination","limitRange","min","max","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","Carousel","_handlers","paginationChange","windowResize","autoAdvance","axis","initialPage","spaceAfterLastSlide","hideLast","center","keyboardSupport","pagination","onChange","swipe","_isY","ulEl","_ulEl","_currentPage","refit","_setUpPagination","_setUpAutoAdvance","_setUpHider","size","perpendicular","_liEls","numSlides","contRect","_ctnLength","_elLength","_slidesPerPage","floor","numPages","ceil","numPagesChanged","_numPages","_deltaLength","_center","_updateHider","_IE7","_pagination","setSize","setPage","getPage","isDOMElement","setCurrent","nextPage","hiderEl","_hiderEl","gap","pad","padding","slides","stl","_onTouchStart","_swipeData","lastUlPos","ulRect","inUlX","inUlY","setTransitionProperty","_touchMoveIsFirstTouchMove","_onTouchMove","deltaY","abs","deltaX","_scrolling","_onAnimationFrame","pointerPos","swipeData","elRect","newPos","_onTouchEnd","snapToNext","progress","curPage","estimatedPage","round","_onPaginationChange","pgn","_setPage","getCurrent","page","_lengthToGo","isLastPage","_itemsInLastPage","previousPage","newTransition","transitionProperty","oTransitionProperty","msTransitionProperty","mozTransitionProperty","webkitTransitionProperty","Close","Url","instances","lastIdNum","nothing","obj","Layouts","TINY","SMALL","MEDIUM","LARGE","XLARGE","isInteger","fieldName","elsOrSelector","required","fieldId","defaults","overrides","out","dataAttrs","fromDataAttrs","lType","defaultVal","invalidStr","quote","invalidThrow","invalid","optionValue","_coerce_funcs","_coerce_from_string","_options_validate","paramName","_options_validate_types","number","boolean","string","function","integer","isFinite","stringify","childIndex","ajaxJSON","endpoint","currentLayout","v","detectorEl","resultCount","hashSet","hashParams","getAnchorString","genQueryString","cleanChildren","storeIdAndClasses","fromEl","inObj","_id","classes","_classes","restoreIdAndClasses","toEl","_instanceId","registerInstance","inst","optionalPrefix","skipRegister","dataInst","unregisterInstance","getInstance","instanceIdOrElement","ids","getInstanceFromSelector","getInstanceIds","getInstances","destroyComponent","InkArray","InkDate","strRepeat","clamp","dateishFromYMDString","YMD","dateishFromYMD","year","month","day","_year","_month","_day","dateishFromDate","date","getFullYear","getMonth","getDate","DatePicker","autoOpen","cleanText","closeText","containerElement","cssClass","dateRange","displayInSelect","dayField","monthField","yearField","format","instance","nextLinkText","ofText","onFocus","onMonthSelected","onSetDate","onYearSelected","prevLinkText","showClean","showClose","shy","startDate","startWeekDay","validDayFn","validMonthFn","validYearFn","nextValidDateFn","prevValidDateFn","yearRange",1,2,3,4,5,6,7,8,9,10,11,12,"wDay","_dateParsers","_hoverPicker","_picker","pickerField","_setMinMax","setDate","today","_init","_lang","_render","_listenToContainerObjectEvents","_containerObject","_renderSuperTopBar","calendarTop","_monthDescContainer","_monthPrev","_monthNext","_monthContainer","_monthSelector","_renderMonthSelector","_yearSelector","_appendDatePickerToDom","_renderMonth","_monthChanger","_ofText","_yearChanger","inline","_addOpenCloseEvents","_addDateChangeHandlersToInputs","fields","_updateDate","_showDefaultView","_inline","_hide","opener","cannotBe","ulSelector","mon","_renderMonthButton","liMonth","aMonth","appendTarget","_wrapper","_wrapperIsControl","_superTopBar","_onClick","_onRelativeChangerClick","_onAbsoluteChangerClick","_showMonthSelector","_showYearSelector","_clean","_updateDescription","changeYear","change_year_next","change_year_prev","changeMonth","change_month_next","change_month_prev","_updateCal","elemData","calDay","calMonth","calYear","_changeYear","blur","noMinLimit","MAX_VALUE","noMaxLimit","noLimits","_min","_max","dates","rDate","each","noLim","lim","_daysInMonth","valid","_dateCmp","_fitDateToRange","_isValidDate","_dateWithinRange","_dateAboveMax","_dateBelowMin","oth","_dateCmpUntil","depth","_getPrevMonth","_getNextMonth","dataParsed","_parseDate","inc","_incrementViewingYear","firstYear","thisYear","_getYearButtonHtml","_acceptableYear","_addMonthClassNames","dateStr","set","yearRegExp","validOneOrTwo","_isDate","_acceptableDay","_acceptableDateComponent","_acceptableMonth","userCb","_callUserCallbackBool","_writeDateInFormat","dateString","auxDate","_setDate","objClicked","dt","_updateMonth","_y","_m","exceptions","incValue","_tryLeap","_getPrevYear","_getNextYear","atomName","directionName","advancer","maxOrMin","boundary","leapUserCb","_callUserCallbackDate","_getNextDecade","decade","_getCurrentDecade","_getPrevDecade","_callUserCallbackBase","yyyy-mm-dd","yyyy/mm/dd","yy-mm-dd","yy/mm/dd","dd-mm-yyyy","dd/mm/yyyy","dd-mm-yy","dd/mm/yy","mm/dd/yyyy","mm-dd-yyyy","_getMonthCalendarHeaderHtml","counter","emptyHtml","firstDayIndex","_getFirstDayIndex","_getDayButtonsHtml","wDayFirst","getDay","daysInMonth","_getDayButtonHtml","forEach","_addMonthButtonClassNames","btn","toDisable","showMonth","isMonthRendered","between","Draggable","constraint","constraintElm","handle","revert","zindex","dragClass","onStart","onDrag","droppableProxy","mouseAnchor","skipChildren","fps","elmStartPosition","active","dragged","prevCoords","placeholder","firstDrag","deltaMs","lastRunAt","_onStart","dragFacade","_onDragFacade","drag","_onDrag","end","_onEnd","selectStart","_getCoords","ps","_cloneStyle","dst","borderWidth","width","height","tgtEl","originalPosition","marginTop","marginBottom","marginLeft","marginRight","visibility","delta2","ad","applyDelta","dragHandlerName","proxy","fs","zIndex","backgroundColor","firstEl","mouseCoords","mPosX","mPosY","newX","newY","draggableSize","constTop","constBottom","constLeft","constRight","Droppable","updateAll","mouseCoords2","action","pt","Element","elNotFound","Drawer","parentSelector","leftDrawer","leftTrigger","rightDrawer","rightTrigger","contentDrawer","closeOnContentClick","closeOnLinkClick","mode","sides","_contentDrawers","_leftDrawer","_leftTriggers","_rightDrawer","_rightTriggers","_triggers","_isOpen","_direction","click","afterTransition","_afterTransition","_delay","_addEvents","triggerClicked","side","close","direction","Toggle","Dropdown","hoverOpen","dismissOnInsideClick","dismissOnOutsideClick","dismissAfter","onInsideClick","onOutsideClick","onOpen","onDismiss","_toggle","closeOnInsideClick","closeOnClick","onChangeState","newState","_openOrDismiss","_onMouseOver","getState","_openTimeout","_dismissTimeout","_onMouseOut","_onInsideClick","_handlerCall","dismiss","_onOutsideClick","foundElem","needle","foundTarget","callHandler","doNotInformToggle","_doNotInformToggle","setState","hAddClassName","hRemoveClassName","_droppables","_draggables","opt","hoverClass","hoverclass","accept","onHover","onDrop","onDropOut","cleanStyle","draggable","namedEventHandlers","move","droppable","copy","cloneNode","_findDraggable","originalParent","elementData","_update","_findData","elms","update","coords","InkValidator","elementsWithSameName","FormValidator","_flagMap","ink-fv-required","ink-fv-email","ink-fv-url","ink-fv-number","ink-fv-phone_pt","ink-fv-phone_cv","ink-fv-phone_mz","ink-fv-phone_ao","ink-fv-date","ink-fv-confirm","ink-fv-custom","confirmElms","hasConfirm","_errorClassName","_errorValidationClassName","_errorTypeWarningClassName","_errorTypeErrorClassName","validate","_free","onError","customFlag","confirmGroup","fail","_validateElements","_showError","_clearError","_clearCache","_getElements","formElms","curElm","totalElm","flag","flag2","oGroups","_makeConfirmGroups","errors","customErrors","inArray","_isValid","_isCustomValid","_validateConfirmGroups","curGroup","totalG","curFlag","tCustom","fieldType","inputType","_trim","aFormRadios","isChecked","totalRadio","mail","isPTPhone","isCVPhone","isAOPhone","isMZPhone","validFormat","validValues","isDate","formElm","aFail","tFail","_showAnErrorOnElement","controlGroupElm","controlElm","errorClasses","_errorTypeClassName","errorMsg","aErrorLabel","control","aErrorLabel2","I18n","validationFunctions","min_length","minSize","max_length","maxSize","exact_length","exactSize","email","fullCheck","ip","ipType","isIP","phone","phoneType","countryCode","credit_card","cardType","isCreditCard","alpha","supportSpaces","ascii","singleLineWhitespace","punctuation","unicode","unicodePunctuation","latin","latin1","latin1Punctuation","alpha_numeric","numbers","alpha_dash","dash","underscore","digit","positive","negative","decimalPlaces","decimal","decimalSeparator","leftDigits","decimalSep","maxDigits","numeric","minValue","maxValue","multipleOf","color","isColor","fieldToCompare","getFormElements","getValue","validationMessages","en_US","formvalidator.required","formvalidator.min_length","formvalidator.max_length","formvalidator.exact_length","formvalidator.email","formvalidator.url","formvalidator.ip","formvalidator.phone","formvalidator.credit_card","formvalidator.date","formvalidator.alpha","formvalidator.text","formvalidator.latin","formvalidator.alpha_numeric","formvalidator.alpha_dashes","formvalidator.digit","formvalidator.integer","formvalidator.decimal","formvalidator.numeric","formvalidator.range","formvalidator.color","formvalidator.matches","formvalidator.validation_function_not_found","pt_PT","FormElement","_errors","_rules","_value","label","_getLabel","controlGroup","_parseRules","rulesLength","paramStartPos","_addError","paramObj","field","i18nKey","getErrors","getElement","_formElements","_rootElement","_errorMessages","_markedErrorElements","eventTrigger","neverSubmit","searchFor","beforeValidation","setRule","errorMessage","getKey","langObj","dictObj","append","getI18n","setI18n","i18n","appendI18n","setLanguage","getRules","getElements","formElements","errorElement","errorElements","cancelEventOnSuccess","formElement","controlGroupElement","controlElement","paragraph","errorArr","ImageQuery","queries","onLoad","lastIndexOf","_filename","sortMulti","reverse","_onLoad","_onResize","_findCurrentQuery","devicePixelRatio","retina","query","UICommon","LazyLoad","_rootElm","item","scrollElement","touchEvents","onInsideViewport","onAfterAttributeChange","autoInit","_aData","_hasEvents","_activate","_getData","_onScrollThrottled","aElms","_onScroll","_removeEvents","_elInViewport","_userCallback","reload","opacitySupported","upName","dimension","firstCharacter","maxName","openModals","Modal","shadeClass","modalClass","triggerEvent","autoDisplay","markup","onShow","closeOnEscape","responsive","disableScroll","_onShadeClick","keyDown","_onKeyDown","resize","_wasDismissed","_markupMode","_modalDiv","_modalDivStyle","_modalShadow","_modalShadowStyle","_contentContainer","setContentMarkup","triggerElement","_reposition","runNow","_timeoutResizeFunction","_resizeTimeout","isPercentage","currentViewport","originalStatus","_resizeContainer","_shadeElement","alertsInTheModal","alertsLength","_contentElement","overflowX","overflowY","containerHeight","_modalHeader","_modalFooter","_disableScroll","htmlEl","_oldHtmlOverflows","compatMode","_waitForFade","keyValue","transitionEndEventNames","classicName","evName","fadeChecker","getContentElement","contentMarkup","tempHeader","tempFooter","toAdd","genAEl","inner","aEl","wrapText","spanEl","totalItemCount","itemsPerPage","sideButtons","firstLabel","lastLabel","previousLabel","nextLabel","previousPageLabel","nextPageLabel","hashParameter","parentTag","childTag","wrapperClass","paginationClass","activeClass","disabledClass","hideClass","previousClass","previousPageClass","nextClass","nextPageClass","numberFormatter","_size","_calculateSize","setOnChange","_current","_itemLiEls","_generateMarkup","_updateItems","_observe","count","liEls","isSimpleToggle","liEl","_nextEl","pi","pf","_pageStart","_pageEnd","_page","_prevPageEl","hasPreviousPage","_nextPageEl","hasNextPage","_firstEl","isFirst","_lastEl","isLast","_prevEl","hasPrevious","hasNext","hasUlAlready","isChevron","isDotted","createLiEl","isPrev","isNext","isPrevPage","isNextPage","firstClass","lastClass","aElem","nr","_onChange","sz","setSizeInItems","totalItems","pageNumber","isRelative","getSize","ProgressBar","startValue","_elementBar","setValue","newValue","cancelAnimationFrame","SmoothScroller","speed","getTop","endPos","interval","onDone","render","_elm","pathname","onClick","hashIndex","activeLiSelector","activeLi","Events","hasTouch","maxTouchPoints","msMaxTouchPoints","SortableList","placeholderClass","draggedClass","draggingClass","dragSelector","dragObject","handleSelector","moveSelector","swap","cancelMouseOut","down","_onDown","_onMove","up","_onUp","_isMoving","_down","_move","_up","stopMoving","_placeholder","_movePlaceholder","_addMovingClasses","validateMove","_removeMovingClasses","target_position","placeholder_position","from_top","from_left","spyTargets","targetIndex","addSpied","spied","observingOnScroll","observeOnScroll","onScroll","onScrollForTarget","activeEl","findActiveElement","toDeactivate","menuLinkSelector","toActivate","closest","Infinity","closestIndex","bBox","Spy","InkUICommon","Stacker","column","customBreakPoints","largeMax","largeMin","mediumMax","mediumMin","smallMax","smallMin","largeCols","mediumCols","smallCols","isOrdered","onRunCallback","onResizeCallback","onAPIReloadCallback","_aList","_curLayout","_runFirstTime","_getPageItemsToList","_canApplyLayoutChange","_applyLayoutChange","addItem","reloadItems","_removeDomItems","_setCurLayout","customBreakpoints","_getColumnsToShow","cols","curLayout","_aColumn","totalCols","aItems","aNewList","ii","countCol","Sticky","offsetBottom","topElement","stickyClass","inlineDimensions","inlinePosition","bottomElement","activateInLayouts","_dims","scrollTarget","_isDisabledInLayout","_getDims","unstick","_unstick","bottomOfSticky","maxBottomOfSticky","_stickTo","_inlineDimensions","_getBottomOffset","bottomOfViewport","toBottomOfDocument","oldPosition","oldWidth","dimensionsInStatic","Swipe","onMove","minDist","maxDist","minDuration","maxDuration","storeGesture","stopEvents","_supported","db","_isOn","_isMeOrParent","_pushGesture","_gesture","_time","changedTouches","_target","_t0","_p0","t1","gesture","p1","dr","dist","sqrt","time","overallMovement","overallTime","InkUrl","InkString","Json","rNumber","maybeTurnIntoNumber","cmp","numberishEnabledCmp","aValue","bValue","sameSame","Table","pageSize","caretUpClass","caretDownClass","createEndpointUrl","getDataFromEndPoint","processJSONRows","processJSONRow","processJSONField","processJSONHeaders","processJSONTotalRows","totalRows","getSortKey","allowResetSorting","visibleFields","tdClassNames","paginationOptions","_thead","tHead","createTHead","_headers","thClick","_originalFields","_sortableFields","_originalData","_data","_totalRows","_resetSortOrder","_addHeadersClasses","_setPagination","headerLabel","classNames","_onThClick","paginated","sortable","_invertSortOrder","_setSortOrderOfColumn","_paginate","sortAndReverse","isAscending","_sort","caretHtml","order","firstIndex","lastIndex","_registerFieldNames","_fieldIsVisible","keyFunction","trA","trB","elementA","elementB","userKey","columnIndex","columnName","_createHeadersFromJson","tr","insertRow","th","_createSingleHeaderFromJson","_createRowsFromJSON","rows","row","trIndex","_createSingleRowFromJson","rowIndex","_createFieldFromJson","fieldData","processor","_elOrFieldData","processed","isNumber","setEndpoint","currentPage","paginationEl","pageNo","_getSortOrder","_getDataViaAjax","_getUrl","urlCreator","parseUrl","sortField","endpointUri","success","JSONData","_onAjaxSuccess","getDataFromEndpoint","jsonResponse","_rowLength","Tabs","preventUrlChange","onBeforeChange","triggerEventsOnLoad","tabClicked","_onTabClicked","disabledTabClicked","_onDisabledTabClicked","_menu","_menuTabs","_contentTabs","_initializeDom","_setFirstActive","link","disable","enable","activeMenuLink","_findLinkByHref","_changeTab","runCallbacks","_activeMenuTab","_activeContentTab","_activeMenuLink","changeTab","_lastLayout","smallLayout","_hashify","activeTab","activeMenuTab","activeContentTab","enterKey","backspaceKey","isTruthy","TagField","tags","tagQuery","tagQueryAsync","allowRepeated","maxTags","outSeparator","separator","autoSplit","_readInput","_viewElm","_input","_tagsFromMarkup","_tags","_onKeyUp","_onBlur","_refocus","tagname","option","_tagsToMarkup","_addTag","_removeTag","spc","_onEnterKeyDown","_onBackspaceKeyDown","_removeConfirm","_unsetRemovingVisual","_setRemovingVisual","tagIndex","_removeRemovingVisualTimeout","isAccordion","initialState","classNameOn","classNameOff","togglesDisplay","_targets","_accordion","_firstTime","_bindEvents","state","_onTriggerEvent","isAncestorOfClickedElement","some","thisOne","_updateAccordion","accordionElement","shades","ancestorOfTargets","shadesLength","Tooltip","EachTooltip","transitionDurationName","transitionPropertyName","transitionTimingFunctionName","bodies","spacing","forever","template","templatefield","fade","tooltips","tooltip","_destroy","_oppositeDirections","_onMouseMove","_delayTimeout","_makeTooltip","mousePosition","_getOpt","_createTooltipElement","_removeTooltip","_fadeInTooltipElement","_placeTooltipElement","_onTooltipMouseOver","_getFloatOpt","outerHTML","_getIntOpt","fadeTime","mPos","_setPos","targetElementPos","tleft","ttop","centerh","centerv","tooltipDims","elementDims","maxX","maxY","_getWhereValueInsideViewport","arrow","tooltipLeft","tooltipTop","toBottom","toRight","toLeft","toTop","viewport","dataAttrVal","instanceOption","_getMousePosition","pageDims","_getPageXY","elmDims","scrollDim","_getScroll","cWidth","cHeight","dd","TreeView","parentClass","openNodeClass","openClass","closedClass","iconTag","isParent","isOpen","_getIcon","_setNodeOpen","_getChild","beOpen","icon","DirectoryReader","maxDepth","_read","_readDirectories","running","_readEntries","currentEntry","createReader","readEntries","isDirectory","clearArray","fullPath","_stopActivityTimeout","readError","activity","checkActivity","clearInterval","readComplete","setInterval","Queue","lists","items","getItems","parentId","purge","keepList","pid","priority","view","_searchByPid","UI","Upload","_fileButton","fileButton","_dropzone","dropzone","_setDropEvent","_setFileButton","dropzones","ondrop","_dropEventHandler","ondragleave","_onDragLeave","ondragend","_onDragEndEventHandler","ondragenter","_onDragEnterHandler","ondragover","_onDragOverHandler","publish","btns","_fileChangeHandler","files","FormData","_addFilesToQueue","_events","extraData","fileFormName","endpointChunk","endpointChunkCommit","maxFilesize","chunkSize","minSizeToUseChunks","INVALID_FILE_NAME","foldersEnabled","useChunks","directoryMaxDepth","_queueId","_queueRunning","_folders","_supportChunks","Blob","dataTransfer","_files","webkitGetAsEntry","folders","_addFolderToQueue","invalidFolders","getFiles","isFile","convertToFile","constructor","hasParent","getSubDirs","created","fileID","directory","_processQueue","internalUpload","queueLen","canceled","_doRequest","_upload","xhr","forceAbort","showError","lengthComputable","loaded","lastModifiedDate","upload","onprogress","chunk_offset","chunk_upload_id","fd","blob","upload_path","parentID","rootPath","invalidOffset","upload_id","chunk_expires","expires","onabort","abortAll","abortOne","subscribe","arrayProto","aKeys","shuffle","tmp1","rnd","filtered","intersect","arr1","arr2","shared","J","convert","insert","rLen","output","iLen","Packer","fit","blocks","block","findNode","splitNode","used","GrowingPacker","growNode","canGrowDown","canGrowRight","shouldGrowRight","shouldGrowDown","growRight","growDown","sorts","area","msort","maxside","criteria","BinPack","binPack","bl","packer","sorter","dims2","fitted","unfitted","filled","Cookie","cookie","_Cookie","aCookie","aItem","decodeURIComponent","domain","secure","sName","sExpires","sPath","sDomain","sSecure","oDate","sDate","valueOf","nDate","expiresString","toGMTString","portClean","cookieName","expiresDate","_months","_iMonth","janeiro","jan","fevereiro","fev","março","mar","abril","abr","maio","mai","junho","jun","julho","jul","agosto","ago","setembro","outubro","novembro","nov","dezembro","dez","_wDays","_d","_iWeek","week","segunda","seg","terça","ter","quarta","qua","quinta","qui","sexta","sex","sábado","sáb","domingo","dom","nDays","_date","iFormat","escapeChar","jsDate","jsFirstDay","jsThisDay","jsHour","jsDay","suffixes","suffix","UTC","jsYearStart","days","jsMonth","getYear","jsYear","getHours","jsMinute","getMinutes","jsSecond","getSeconds","getTimezoneOffset","jsMinZone","jsMinutes","jsDayName","jsMonthName","str_date","mList","objIndex","dayY","dayW","hour","hourD","sec","msec","ampm","diffM","diffH","pattr","_haveDatetime","_haveYear","_haveYDay","_haveDay","_haveMonth","_haveMonthDay","_haveOnlyDay","_haveWDay","_haveWeek","_haveWeekWDay","_haveOnlyWDay","_validDate","_noDate","_haveHour12","_haveHour24","_haveHour","_haveMin","_haveSec","_haveMSec","_haveMoreM","_haveMoreS","_haveDiffM","_haveDiffH","dList","gmt","aux","Dumper","_tab","_formatParam","param","formated","_outputFormat","_getTabs","numberOfTabs","tabs","_i","dim","_typeof","printDump","write","returnDump","alertDump","windowDump","dumperwindow","pattrText","funcOrVal","dict","testMode","_dicts","_dict","_testMode","_gLang","bool","gLang","_gDict","pars","isObj","$2","$3","ntext","strSin","strPlur","ordinal","num","lastDig","ordDict","byLastDigit","alias","_gDicts","function_call","cx","twoDigits","dateToISOString","toISOString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toFixed","InkJson","_nativeJSON","_convertToUnicode","_escape","theString","\b","\t","\n","\f","\r","\"","\\","charCodeAt","_toUnicode","unicodeString","inInt","theUnicode","_stringifyValue","toJSON","arrayString","objectString","convertToUnicode","reviver","walk","holder","SyntaxError","InkUtilString","_chars","_entities","_accentedChars","_accentedRemovedChars","_htmlUnsafeChars","<","&","'","ucFirst","firstWordOnly","replacer","stripTags","allowed","aAllowed","aNewAllowed","cleanedTag","strAllowed","reAllowed","aFoundTags","htmlEntitiesEncode","htmlEntitiesDecode","$0","utf8Encode","utfstring","shortString","words","resultstr","truncateString","utf8Decode","c2","c3","removeAccentedChars","newString","substrCount","haystack","htmlEscapeUnsafe","chars","normalizeWhitespace","toUnicode","unescape","es","hexNum","escapeText","txt","whiteList","txt2","C","escapedCharRegex","unescapeText","strcmp","str1","str2","packetize","maxLen","_keyStr","getUrl","getQueryString","aParams","queryStr","aQueryStr","pairVar","getAnchor","anchor","anchorStr","aAnchorStr","aURL","scheme","re1","re2","re3","regPort","tmpHost1","port","tmpHost2","tmpUserPass","user","urlObj","frag","hostname","currentScriptElement","aScripts","curScript","_debug","Validator","_countryCodes","_internacionalPT","_indicativosPT",21,22,231,232,233,234,235,236,238,239,241,242,243,244,245,249,251,252,253,254,255,256,258,259,261,262,263,265,266,268,269,271,272,273,274,275,276,277,278,279,281,282,283,284,285,286,289,291,292,295,296,91,93,96,92,707,760,800,808,30,"_internacionalCV","_indicativosCV",95,97,98,99,"_internacionalAO","_indicativosAO","_internacionalMZ","_indicativosMZ",82,84,"_internacionalTL","_indicativosTL","_characterGroups","asciiAlpha","latin1Alpha","unicodeAlpha","space","nicknamePunctuation","newline","asciiPunctuation","createRegExp","checkCharacterGroups","numb","inOptions","thousandSep","returnNumber","maxExcl","minExcl","_isLeapYear","parser","emailValido","full","reHTTP","reUrl","aInd","strInd","re351","reSpecialChars","reInt","reValid","isPortuguesePhone","re238","re244","re258","isTLPhone","re670","isPhone","codPostal","cp1","cp2","returnBothResults","cPostalSep","cPostal4","cPostal3","parserCPostal","cPostal","yearIndex","monthIndex","dayIndex","dateParser","keyword","hexa","rgba","hsl","hsla","_creditCardSpecs","default","luhn","american express","diners club","discover","jcb","maestro","mastercard","visa","_luhn","checksum","dbl","creditCardType","ccLength"],"mappings":"CAME,SAASA,EAAQC,GAEf,YAGA,MAAI,OAASD,IAAb,CASA,GAAIE,MACAC,KACAC,KACAC,KACAC,KACAC,KAEAC,EAAQC,SAASC,UAAUF,MAG3BG,EAAgB,SAASC,GAEzB,GAAiB,gBAANA,GAAkB,OAAO,CACpC,KAAK,GAAIC,KAAKD,GACV,GAAIA,EAAEE,eAAeD,GACjB,OAAO,CAGf,QAAO,EAOXb,GAAOe,KACHC,4BAA6B,WACzB,GAAIC,GAAGC,EAAGN,EAAGO,EAAKC,EAAKC,EAAIC,IAC3B,KAAKL,EAAI,EAAGC,EAAIZ,EAAWiB,OAAYL,EAAJD,IAASA,EAGxC,GAFAL,EAAIN,EAAWW,GAEf,CAEA,IAAKE,IAAOP,GAAEY,KACNZ,EAAEY,KAAKV,eAAeK,KACtBC,EAAMjB,EAAQgB,GACVC,IACAR,EAAEa,KAAKb,EAAEY,KAAKL,IAASC,QAChBR,GAAEY,KAAKL,KACZP,EAAEc,WAKhB,IAAId,EAAEc,UAAY,EACdJ,EAAKK,KAAKf,OAET,CAED,GADAS,EAAKT,EAAES,IACFA,EAAM,eACJT,GAAES,GACTA,EAAGb,OAAM,EAAOI,EAAEa,OAI1BnB,EAAagB,EAEThB,EAAWiB,OAAS,GACpBK,WAAY,WAAab,IAAIC,+BAAkC,IAYvEa,QAAS,SAASC,EAAKC,GACnB,GAAIC,GAAQF,EAAIE,MAAM,SAClBC,EACAC,EACAC,EACAC,CAEJ,KAAK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A,IAErB,GAAIa,KAAKosD,aAAaw/B,EAAKiR,EAAe19F,IACtC,OAAO,CAIf,QAAO,EAMX,GAFA09F,EAAiBA,EAAe1rF,cAEsB,mBAA1CnR,MAAKg8F,iBAAiBa,GAC9B,OAAO,CAIX,IAAIr+F,GAASotF,EAAIptF,OAAO,EAGxB,OAAoF,KAA/EwB,KAAKg8F,iBAAiBa,GAAwB,OAAE59F,MAAM,KAAKc,QAAQvB,IAC7D,EAILwB,KAAKg8F,iBAAiBa,GAAwB,OAAEr9F,KAAKosF,GAKvD5rF,KAAKg8F,iBAAiBa,GAAsB,QAAM,GAC3C,EAGJ78F,KAAK08F,MAAM9Q,IARP,GAYnB,OAAOiI","sourceRoot":"../../src/js"} \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink-all.min.js b/ajax/libs/ink/3.0.0/js/ink-all.min.js new file mode 100644 index 000000000..d5010e359 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink-all.min.js @@ -0,0 +1,10 @@ +!function(a,b){"use strict";if(!("Ink"in a)){var c={},d={},e=[],f={},g=[],h={},i=Function.prototype.apply,j=function(a){if("object"!=typeof a)return!1;for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};a.Ink={_checkPendingRequireModules:function(){var a,b,c,e,f,h,i=[];for(a=0,b=g.length;b>a;++a)if(c=g[a]){for(e in c.left)c.left.hasOwnProperty(e)&&(f=d[e],f&&(c.args[c.left[e]]=f,delete c.left[e],--c.remaining));if(c.remaining>0)i.push(c);else{if(h=c.cb,!h)continue;delete c.cb,h.apply(!1,c.args)}}g=i,g.length>0&&setTimeout(function(){Ink._checkPendingRequireModules()},0)},getPath:function(a,b){var d=a.split(/[._]/g),e,f,g,h;for(f=d.length;f>=0;f-=1)if(e=d.slice(0,f+1).join("."),c[e]){g=e;break}return h=c[g||"Ink"],/\/$/.test(h)||(h+="/"),f0&&f[0].appendChild(e)},_loadLater:function(a){setTimeout(function(){d[a]||f[a]||h[a]||(f[a]=!0,Ink.loadScript(a))},0)},namespace:function(b,c){if(!b||!b.length)return null;for(var d=b.split("."),e=a,f,g=0,h=d.length;h>g;++g)e[d[g]]=e[d[g]]||{},f=e,e=e[d[g]];return c?[f,d[g-1]]:e},getModule:function(a,b){var c=b?[a,"_",b].join(""):a;return d[c]},createModule:function(b,c,g,i){if("string"!=typeof b)throw new Error("module name must be a string!");if(!("number"==typeof c||"string"==typeof c&&c.length>0))throw new Error("version number missing!");var k=[b,"_",c].join("");h[k]=!0;var l=function(){if(!d[k]){delete f[k],delete f[b];var g=Array.prototype.slice.call(arguments),l=i.apply(a,g);e.push(k),"object"==typeof l?l._version=c:"function"==typeof l&&(l.prototype._version=c,l._version=c);var m=0===b.indexOf("Ink."),n;m&&(n=Ink.namespace(b,!0)),d[k]=l,delete h[k],m&&(n[0][n[1]+"_"+c]=l),d[b]=l,m&&j(n[0][n[1]])&&(n[0][n[1]]=l),this&&Ink._checkPendingRequireModules()}};this.requireModules(g,l)},requireModules:function(a,b){var c,e,h,i,j;if(e=a.length,h={args:new Array(e),left:{},remaining:e,cb:b},"object"!=typeof a||void 0===a.length)throw new Error("Dependency list should be an array!");if("function"!=typeof b)throw new Error("Callback should be a function!");for(c=0;e>c;++c)Ink._moduleRenames[a[c]]?(Ink.warn(a[c]+" was renamed to "+Ink._moduleRenames[a[c]]),i=Ink._moduleRenames[a[c]]):i=a[c],j=d[i],j?(h.args[c]=j,--h.remaining):(f[i]||Ink._loadLater(i),h.left[i]=c);h.remaining>0?g.push(h):b.apply(!0,h.args)},_moduleRenames:{"Ink.UI.Aux_1":"Ink.UI.Common_1"},getModulesLoadOrder:function(){return e.slice()},getModuleScripts:function(){var a=this.getModulesLoadOrder();return a.unshift("Ink_1"),a=a.map(function(a){return[""].join("")}),a.join("\n")},createExt:function(a,b,c,d){return Ink.createModule("Ink.Ext."+a,b,c,d)},bind:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments),e=c.concat(d);return a.apply(b===!1?this:b,e)}},bindMethod:function(a,b){return Ink.bind.apply(Ink,[a[b],a].concat([].slice.call(arguments,2)))},bindEvent:function(b,c){var d=Array.prototype.slice.call(arguments,2);return function(e){var f=d.slice();return f.unshift(e||a.event),b.apply(c===!1?this:c,f)}},i:function(a){if(!a)throw new Error("Ink.i => id or element must be passed");return"string"==typeof a?b.getElementById(a):a},ss:function(a,c){if("undefined"==typeof Ink.Dom||"undefined"==typeof Ink.Dom.Selector)throw new Error("This method requires Ink.Dom.Selector");return Ink.Dom.Selector.select(a,c||b)},s:function(a,c){if("undefined"==typeof Ink.Dom||"undefined"==typeof Ink.Dom.Selector)throw new Error("This method requires Ink.Dom.Selector");return Ink.Dom.Selector.select(a,c||b)[0]||null},extendObj:function(a,b){if(arguments.length>2&&(b=Ink.extendObj.apply(this,[].slice.call(arguments,1))),b)for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c]);return a},log:function(){var b=a.console;b&&b.log&&i.call(b.log,b,arguments)},warn:function(){var b=a.console;b&&b.warn&&i.call(b.warn,b,arguments)},error:function(){var b=a.console;b&&b.error&&i.call(b.error,b,arguments)}},Ink.setPath("Ink","INK_PATH"in a?a.INK_PATH:a.location.protocol+"//js.ink.sapo.pt/Ink/")}}(window,document),Ink.createModule("Ink.Net.Ajax","1",[],function(){"use strict";var Ajax=function(a,b){this.init(a,b)};Ajax.globalOptions={parameters:{},requestHeaders:{}};var xMLHttpRequestWithCredentials="XMLHttpRequest"in window&&"withCredentials"in new XMLHttpRequest;return Ajax.prototype={init:function(a,b){if(!a)throw new Error("WRONG_ARGUMENTS_ERR");var c=Ink.extendObj({asynchronous:!0,method:"POST",parameters:null,timeout:0,delay:0,postBody:"",contentType:"application/x-www-form-urlencoded",requestHeaders:null,onComplete:null,onSuccess:null,onFailure:null,onException:null,onHeaders:null,onCreate:null,onInit:null,onTimeout:null,sanitizeJSON:!1,evalJS:!0,xhrProxy:"",cors:!1,debug:!1,useCredentials:!1,signRequest:!1},Ajax.globalOptions);if(b&&"object"==typeof b){if(c=Ink.extendObj(c,b),"object"==typeof b.parameters)c.parameters=Ink.extendObj(Ink.extendObj({},Ajax.globalOptions.parameters),b.parameters);else if(null!==b.parameters){var d=this.paramsObjToStr(Ajax.globalOptions.parameters);d&&(c.parameters=b.parameters+"&"+d)}c.requestHeaders=Ink.extendObj({},Ajax.globalOptions.requestHeaders),c.requestHeaders=Ink.extendObj(c.requestHeaders,b.requestHeaders)}this.options=c,this.safeCall("onInit"),this.url=a;var e=this._locationFromURL(a);this.isHTTP=this._locationIsHTTP(e),this.isCrossDomain=this._locationIsCrossDomain(e,location),this.requestHasBody=c.method.search(/^get|head$/i)<0,this.options.cors&&(this.isCrossDomain=!1),this.transport=this.getTransport(),this.request()},_locationFromURL:function(a){var b=document.createElementNS?document.createElementNS("http://www.w3.org/1999/xhtml","a"):document.createElement("a");return b.href=a,b},_locationIsHTTP:function(a){return a.protocol.match(/^https?:/i)?!0:!1},_locationIsCrossDomain:function(a,b){return b=b||window.location,Ajax.prototype._locationIsHTTP(a)&&"widget:"!==b.protocol&&"object"!=typeof window.widget?b.protocol!==a.protocol||b.host.split(":")[0]!==a.host.split(":")[0]:!1},getTransport:function(){if(!xMLHttpRequestWithCredentials&&this.options.cors&&"XDomainRequest"in window)return this.usingXDomainReq=!0,new XDomainRequest;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"==typeof ActiveXObject)return null;try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){return new ActiveXObject("Microsoft.XMLHTTP")}},setHeaders:function(){if(this.transport)try{var a={Accept:"text/javascript,text/xml,application/xml,application/xhtml+xml,text/html,application/json;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1","Accept-Language":navigator.language,"X-Requested-With":"XMLHttpRequest","X-Ink-Version":"2"};if(this.options.cors&&(this.options.signRequest||delete a["X-Requested-With"],delete a["X-Ink-Version"]),this.options.requestHeaders&&"object"==typeof this.options.requestHeaders)for(var b in this.options.requestHeaders)this.options.requestHeaders.hasOwnProperty(b)&&(a[b]=this.options.requestHeaders[b]);this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005&&(a.Connection="close");for(var c in a)a.hasOwnProperty(c)&&this.transport.setRequestHeader(c,a[c])}catch(d){}},paramsObjToStr:function(a){var b,c,d,e,f=[];if("object"!=typeof a)return a;for(d in a)if(a.hasOwnProperty(d))if(e=a[d],"[object Array]"!==Object.prototype.toString.call(e)||isNaN(e.length))f=f.concat([encodeURIComponent(d),"=",encodeURIComponent(e),"&"]);else for(b=0,c=e.length;c>b;b++)f=f.concat([encodeURIComponent(d),"[]","=",encodeURIComponent(e[b]),"&"]);return f.length>0&&f.pop(),f.join("")},setParams:function(){var a=null,b=this.options.parameters;a="object"==typeof b?this.paramsObjToStr(b):""+b,a&&(this.url=this.url.indexOf("?")>-1?this.url.split("#")[0]+"&"+a:this.url.split("#")[0]+"?"+a)},getHeader:function(a){if(this.usingXDomainReq&&"Content-Type"===a)return this.transport.contentType;try{return this.transport.getResponseHeader(a)}catch(b){return null}},getAllHeaders:function(){try{return this.transport.getAllResponseHeaders()}catch(a){return null}},getResponse:function(){var a=this.transport,b={headerJSON:null,responseJSON:null,getHeader:this.getHeader,getAllHeaders:this.getAllHeaders,request:this,transport:a,timeTaken:new Date-this.startTime,requestedUrl:this.url};b.readyState=a.readyState;try{b.responseText=a.responseText}catch(c){}try{b.responseXML=a.responseXML}catch(c){}try{b.status=a.status}catch(c){b.status=0}try{b.statusText=a.statusText}catch(c){b.statusText=""}return b},abort:function(){if(this.transport){clearTimeout(this.delayTimeout),clearTimeout(this.stoTimeout);try{this.transport.abort()}catch(a){}this.finish()}},runStateChange:function(){var a=this.transport.readyState;if(3===a)this.isHTTP&&this.safeCall("onHeaders");else if(4===a||this.usingXDomainReq){if(this.options.asynchronous&&this.options.delay&&this.startTime+this.options.delay>(new Date).getTime())return void(this.delayTimeout=setTimeout(Ink.bind(this.runStateChange,this),this.options.delay+this.startTime-(new Date).getTime()));var b,c=this.transport.responseText,d=this.getResponse(),e=this.transport.status;this.isHTTP&&!this.options.asynchronous&&this.safeCall("onHeaders"),clearTimeout(this.stoTimeout),0===e?this.isHTTP?this.safeCall("onException",this.makeError(18,"NETWORK_ERR")):e=c?200:404:304===e&&(e=200);var f=this.usingXDomainReq||e>=200&&300>e,g=this.getHeader("Content-Type")||"";if(this.options.evalJS&&(g.indexOf("application/json")>=0||"force"===this.options.evalJS))try{b=this.evalJSON(c,this.sanitizeJSON),b&&(c=d.responseJSON=b)}catch(h){f&&this.safeCall("onException",h)}if(this.usingXDomainReq&&-1!==g.indexOf("xml")&&"DOMParser"in window){var i;switch(g){case"application/xml":case"application/xhtml+xml":case"image/svg+xml":i=g;break;default:i="text/xml"}var j=(new DOMParser).parseFromString(this.transport.responseText,i);this.transport.responseXML=j,d.responseXML=j}null!==this.transport.responseXML&&null===d.responseJSON&&""!==this.transport.responseXML.xml&&(c=this.transport.responseXML),(e||this.usingXDomainReq)&&(f?this.safeCall("onSuccess",d,c):this.safeCall("onFailure",d,c),this.safeCall("on"+e,d,c)),this.finish(d,c)}},finish:function(a,b){if(a&&this.safeCall("onComplete",a,b),clearTimeout(this.stoTimeout),this.transport){try{this.transport.onreadystatechange=null}catch(c){}"function"==typeof this.transport.destroy&&this.transport.destroy(),this.transport=null}},safeCall:function(a,b){function c(a){setTimeout(function(){throw a.message&&(a.message+="\n"+(a.stacktrace||a.stack||"")),a},1)}if("function"==typeof this.options[a])try{this.options[a].apply(this,[].slice.call(arguments,1))}catch(d){c(d)}else b&&window.Error&&b instanceof Error&&c(b)},setRequestHeader:function(a,b){this.options.requestHeaders||(this.options.requestHeaders={}),this.options.requestHeaders[a]=b},request:function(){if(this.transport){var a=null;this.requestHasBody?(null!==this.options.postBody&&""!==this.options.postBody?(a=this.options.postBody,this.setParams()):null!==this.options.parameters&&""!==this.options.parameters&&(a=this.options.parameters),"object"!=typeof a||a.nodeType?"object"!=typeof a&&null!==a&&(a=""+a):a=this.paramsObjToStr(a),this.options.contentType&&this.setRequestHeader("Content-Type",this.options.contentType)):this.setParams();var b=this.url,c=this.options.method,d=this.isCrossDomain;d&&this.options.xhrProxy&&(this.setRequestHeader("X-Url",b),b=this.options.xhrProxy+encodeURIComponent(b),d=!1);try{this.transport.open(c,b,this.options.asynchronous)}catch(e){return this.safeCall("onException",e),this.finish(this.getResponse(),null)}this.setHeaders(),this.safeCall("onCreate"),this.options.timeout&&!isNaN(this.options.timeout)&&(this.stoTimeout=setTimeout(Ink.bind(function(){this.options.onTimeout&&(this.safeCall("onTimeout"),this.abort())},this),1e3*this.options.timeout)),this.options.useCredentials&&!this.usingXDomainReq&&(this.transport.withCredentials=!0),this.options.asynchronous&&!this.usingXDomainReq?this.transport.onreadystatechange=Ink.bind(this.runStateChange,this):this.usingXDomainReq&&(this.transport.onload=Ink.bind(this.runStateChange,this));try{if(d)throw this.makeError(18,"NETWORK_ERR");this.startTime=(new Date).getTime(),this.transport.send(a)}catch(e){return this.safeCall("onException",e),this.finish(this.getResponse(),null)}this.options.asynchronous||this.runStateChange()}},makeError:function(a,b){if("function"!=typeof Error)return{code:a,message:b};var c=new Error(b);return c.code=a,c},isJSON:function(a){return"string"==typeof a&&a?(a=a.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""),/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(a)):!1},evalJSON:function(strJSON,sanitize){if(strJSON&&(!sanitize||this.isJSON(strJSON)))try{return"undefined"!=typeof JSON&&"undefined"!=typeof JSON.parse?JSON.parse(strJSON):eval("("+strJSON+")")}catch(e){throw new Error("ERROR: Bad JSON string...")}return null}},Ajax.load=function(a,b){return new Ajax(a,{method:"GET",onSuccess:function(a){b(a.responseJSON||a.responseText,a)}})},Ajax.ping=function(a,b){return new Ajax(a,{method:"HEAD",onSuccess:function(a){"function"==typeof b&&b(a)}})},Ajax}),Ink.createModule("Ink.Net.JsonP","1",[],function(){"use strict";var a=function(a,b){this.init(a,b)};return a.prototype={init:function(a,b){if(this.options=Ink.extendObj({onSuccess:void 0,onFailure:void 0,failureObj:{},timeout:10,params:{},callbackParam:"jsoncallback",internalCallback:"_cb",randVar:!1},b||{}),this.randVar=this.options.randVar!==!1?this.options.randVar:parseInt(1e5*Math.random(),10),this.options.internalCallback+=this.randVar,this.uri=a,"function"==typeof this.options.onComplete&&(this.options.onSuccess=this.options.onComplete),"string"!=typeof this.uri)throw"Please define an URI";if("function"!=typeof this.options.onSuccess)throw"please define a callback function on option onSuccess!";Ink.Net.JsonP[this.options.internalCallback]=Ink.bind(function(){window.clearTimeout(this.timeout),delete window.Ink.Net.JsonP[this.options.internalCallback],this._removeScriptTag(),this.options.onSuccess(arguments[0])},this),this._addScriptTag()},_addParamsToGet:function(a,b){var c=-1!==a.indexOf("?"),d,e,f,g=[a];for(e in b)b.hasOwnProperty(e)&&(c?d="&":(d="?",c=!0),f=b[e],"number"==typeof f||f||(f=""),g=g.concat([d,e,"=",encodeURIComponent(f)]));return g.join("")},_getScriptContainer:function(){var a=document.getElementsByTagName("head");if(0===a.length){var b=document.getElementsByTagName("script");return b[0]}return a[0]},_addScriptTag:function(){this.options.params[this.options.callbackParam]="Ink.Net.JsonP."+this.options.internalCallback,this.options.params.rnd_seed=this.randVar,this.uri=this._addParamsToGet(this.uri,this.options.params);var a=document.createElement("script");a.type="text/javascript",a.src=this.uri;var b=this._getScriptContainer();b.appendChild(a),this.timeout=setTimeout(Ink.bind(this._requestFailed,this),1e3*this.options.timeout)},_requestFailed:function(){delete Ink.Net.JsonP[this.options.internalCallback],this._removeScriptTag(),"function"==typeof this.options.onFailure&&this.options.onFailure(this.options.failureObj)},_removeScriptTag:function(){for(var a,b=document.getElementsByTagName("script"),c,d=0,e=b.length;e>d;++d)if(a=b[d],c=a.getAttribute("src")||a.src,null!==c&&c===this.uri)return void a.parentNode.removeChild(a)}},a}),Ink.createModule("Ink.Dom.Browser","1",[],function(){"use strict";var a={IE:!1,GECKO:!1,OPERA:!1,SAFARI:!1,KONQUEROR:!1,CHROME:!1,model:!1,version:!1,userAgent:!1,init:function(){this.detectBrowser(),this.setDimensions(),this.setReferrer()},setDimensions:function(){var a=0,b=0;"number"==typeof window.innerWidth?(a=window.innerWidth,b=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(a=document.documentElement.clientWidth,b=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(a=document.body.clientWidth,b=document.body.clientHeight),this.windowWidth=a,this.windowHeight=b},setReferrer:function(){this.referrer=document.referrer&&document.referrer.length?window.escape(document.referrer):!1},detectBrowser:function(){this._sniffUserAgent(navigator.userAgent)},_sniffUserAgent:function(a){if(this.userAgent=a,a=a.toLowerCase(),/applewebkit\//.test(a))if(this.cssPrefix="-webkit-",this.domPrefix="Webkit",/(chrome|crios)\//.test(a))this.CHROME=!0,this.model="chrome",this.version=a.replace(/(.*)chrome\/([^\s]+)(.*)/,"$2");else{this.SAFARI=!0,this.model="safari";var b=/version\/([^) ]+)/;this.version=b.test(a)?a.match(b)[1]:a.replace(/(.*)applewebkit\/([^\s]+)(.*)/,"$2")}else if(/opera/.test(a))this.OPERA=!0,this.model="opera",this.version=a.replace(/(.*)opera.([^\s$]+)(.*)/,"$2"),this.cssPrefix="-o-",this.domPrefix="O";else if(/konqueror/.test(a))this.KONQUEROR=!0,this.model="konqueror",this.version=a.replace(/(.*)konqueror\/([^;]+);(.*)/,"$2"),this.cssPrefix="-khtml-",this.domPrefix="Khtml";else if(/(msie|trident)/i.test(a))this.IE=!0,this.model="ie",this.version=/rv:((?:\d|\.)+)/.test(a)?a.match(/rv:((?:\d|\.)+)/)[1]:a.replace(/(.*)\smsie\s([^;]+);(.*)/,"$2"),this.cssPrefix="-ms-",this.domPrefix="ms";else if(/gecko/.test(a)){this.cssPrefix="-moz-",this.domPrefix="Moz",this.GECKO=!0;var c=/(camino|chimera|epiphany|minefield|firefox|firebird|phoenix|galeon|iceweasel|k\-meleon|seamonkey|netscape|songbird|sylera)/;if(c.test(a))this.model=a.match(c)[1],this.version=a.replace(new RegExp("(.*)"+this.model+"/([^;\\s$]+)(.*)"),"$2");else{this.model="mozilla";var d=/(.*)rv:([^)]+)(.*)/;d.test(a)&&(this.version=a.replace(d,"$2"))}}},debug:function(){var a="known browsers: (ie, gecko, opera, safari, konqueror) \n";a+=[this.IE,this.GECKO,this.OPERA,this.SAFARI,this.KONQUEROR]+"\n",a+="model -> "+this.model+"\n",a+="version -> "+this.version+"\n",a+="\n",a+="original UA -> "+this.userAgent,alert(a)}};return a.init(),a}),Ink.createModule("Ink.Dom.Css",1,[],function(){"use strict";var a="defaultView"in document&&"getComputedStyle"in document.defaultView?document.defaultView.getComputedStyle:window.getComputedStyle,b={addRemoveClassName:function(a,b,c){return c?this.addClassName(a,b):void this.removeClassName(a,b)},addClassName:function(a,c){if(a=Ink.i(a),!a||!c)return null;c=(""+c).split(/[, ]+/);for(var d=0,e=c.length;e>d;d++)"undefined"!=typeof a.classList?a.classList.add(c[d]):b.hasClassName(a,c[d])||(a.className+=(a.className?" ":"")+c[d])},removeClassName:function(a,b){if(a=Ink.i(a),!a||!b)return null;b=(""+b).split(/[, ]+/);var c=0,d=b.length;if("undefined"!=typeof a.classList)for(;d>c;c++)a.classList.remove(b[c]);else{for(var e=a.className||"",f;d>c;c++)f=new RegExp("(^|\\s+)"+b[c]+"(\\s+|$)"),e=e.replace(f," ");a.className=e.replace(/^\s+/,"").replace(/\s+$/,"")}},setClassName:function(a,b,c){this.addRemoveClassName(a,b,c||!1)},hasClassName:function(a,b,c){if(a=Ink.i(a),!a||!b)return!1;b=(""+b).split(/[, ]+/);for(var d=0,e=b.length,f,g;e>d;d++){if("undefined"!=typeof a.classList)f=a.classList.contains(b[d]);else{var h=a.className;h===b[d]?f=!0:(g=new RegExp("(^|\\s)"+b[d]+"(\\s|$)"),f=g.test(h))}if(f&&!c)return!0;if(!f&&c)return!1}return c?!0:!1},blinkClass:function(a,c,d,e){a=Ink.i(a),b.addRemoveClassName(a,c,!e),setTimeout(function(){b.addRemoveClassName(a,c,e)},Number(d)||100)},toggleClassName:function(a,c,d){return a&&c&&"undefined"!=typeof a.classList&&!/[, ]/.test(c)?(a=Ink.i(a),null!==a&&a.classList.toggle(c),!0):void("undefined"!=typeof d?d===!0?b.addClassName(a,c):d===!1&&b.removeClassName(a,c):b.hasClassName(a,c)?b.removeClassName(a,c):b.addClassName(a,c))},setOpacity:function(a,b){if(a=Ink.i(a),null!==a){var c=1;isNaN(Number(b))||(c=0>=b?0:1>=b?b:100>=b?b/100:1),"undefined"!=typeof a.style.opacity?a.style.opacity=c:a.style.filter="alpha(opacity:"+(100*c|0)+")"}},_camelCase:function(a){return a?a.replace(/-(\w)/g,function(a,b){return b.toUpperCase()}):a},getStyle:function(b,c){if(b=Ink.i(b),null!==b){c="float"===c?"cssFloat":this._camelCase(c);var d=b.style[c];if(!a||d&&"auto"!==d)!d&&b.currentStyle&&(d=b.currentStyle[c],"auto"!==d||"width"!==c&&"height"!==c||(d=b["offset"+c.charAt(0).toUpperCase()+c.slice(1)]+"px"));else{var e=a(b,null);d=e?e[c]:null}if("opacity"===c)return d?parseFloat(d,10):1;if("borderTopWidth"===c||"borderBottomWidth"===c||"borderRightWidth"===c||"borderLeftWidth"===c){if("thin"===d)return"1px";if("medium"===d)return"3px";if("thick"===d)return"5px"}return"auto"===d?null:d}},setStyle:function(a,b){if(a=Ink.i(a),null!==a)if("string"==typeof b)a.style.cssText+="; "+b,-1!==b.indexOf("opacity")&&this.setOpacity(a,b.match(/opacity:\s*(\d?\.?\d*)/)[1]);else for(var c in b)b.hasOwnProperty(c)&&("opacity"===c?this.setOpacity(a,b[c]):"float"===c||"cssFloat"===c?"undefined"==typeof a.style.styleFloat?a.style.cssFloat=b[c]:a.style.styleFloat=b[c]:a.style[c]=b[c])},show:function(a,b){a=Ink.i(a),null!==a&&(a.style.display=b?b:"")},hide:function(a){a=Ink.i(a),null!==a&&(a.style.display="none")},showHide:function(a,b){a=Ink.i(a),a&&(a.style.display=b?"":"none")},toggle:function(a,b){a=Ink.i(a),null!==a&&("undefined"!=typeof b?b===!0?this.show(a):this.hide(a):"none"===this.getStyle(a,"display").toLowerCase()?this.show(a):this.hide(a))},_getRefTag:function(a){if(a.firstElementChild)return a.firstElementChild;for(var b=a.firstChild;b;b=b.nextSibling)if(1===b.nodeType)return b;return null},appendStyleTag:function(a,b,c){c=Ink.extendObj({type:"text/css",force:!1},c||{});var d=document.getElementsByTagName("style"),e=!1,f=!0,g,h;for(g=0,h=d.length;h>g;g++)e=d[g].innerHTML,e.indexOf(a)>=0&&(f=!1);if(f){var i=document.createElement("style"),j=document.getElementsByTagName("head")[0],k=!1,l="";i.type=c.type,l+=a+" {",l+=b,l+="} ","undefined"!=typeof i.styleSheet?i.styleSheet.cssText=l:i.appendChild(document.createTextNode(l)),c.force?j.appendChild(i):(k=this._getRefTag(j),k&&j.insertBefore(i,k))}},appendStylesheet:function(a,b){b=Ink.extendObj({media:"screen",type:"text/css",force:!1},b||{});var c,d=document.createElement("link"),e=document.getElementsByTagName("head")[0];d.media=b.media,d.type=b.type,d.href=a,d.rel="Stylesheet",b.force?e.appendChild(d):(c=this._getRefTag(e),c&&e.insertBefore(d,c))},_loadingCSSFiles:{},_loadedCSSFiles:{},appendStylesheetCb:function(a,b){if(!a)return b(a);if(this._loadedCSSFiles[a])return b(a);var c=this._loadingCSSFiles[a];if(c)return c.push(b);this._loadingCSSFiles[a]=[b];var d=document.createElement("link");d.type="text/css",d.rel="stylesheet",d.href=a;var e=document.getElementsByTagName("head")[0];e.appendChild(d);var f=document.createElement("img");f.onerror=Ink.bindEvent(function(a,b){var c=b;this._loadedCSSFiles[c]=!0;for(var d=this._loadingCSSFiles[c],e=0,f=d.length;f>e;++e)d[e](c);delete this._loadingCSSFiles[c]},this,a),f.src=a},decToHex:function(a){var b=function(a){return 1===a.length&&(a="0"+a),a=a.toUpperCase()};if("object"==typeof a){var c=b(parseInt(a.r,10).toString(16)),d=b(parseInt(a.g,10).toString(16)),e=b(parseInt(a.b,10).toString(16));return c+d+e}a+="";var f=a.match(/\((\d+),\s?(\d+),\s?(\d+)\)/);return null!==f?b(parseInt(f[1],10).toString(16))+b(parseInt(f[2],10).toString(16))+b(parseInt(f[3],10).toString(16)):b(parseInt(a,10).toString(16))},hexToDec:function(a){return 0===a.indexOf("#")&&(a=a.substr(1)),6===a.length?{r:parseInt(a.substr(0,2),16),g:parseInt(a.substr(2,2),16),b:parseInt(a.substr(4,2),16)}:3===a.length?{r:parseInt(a.charAt(0)+a.charAt(0),16),g:parseInt(a.charAt(1)+a.charAt(1),16),b:parseInt(a.charAt(2)+a.charAt(2),16)}:a.length<=2?parseInt(a,16):void 0},getPropertyFromStylesheet:function(a,b){var c=this.getRuleFromStylesheet(a);return c?c.style[b]:null},getPropertyFromStylesheet2:function(a,b){for(var c=this.getRulesFromStylesheet(a),d,e=0,f=c.length;f>e;e++)if(d=c[e].style[b],null!==d&&void 0!==d)return d;return null},getRuleFromStylesheet:function(a){var b,c,d,e,f,g=document.styleSheets;if(!g)return null;for(var h=0,i=document.styleSheets.length;i>h;++h){if(b=document.styleSheets[h],c=b.rules?b.rules:b.cssRules,!c)return null;for(d=0,e=c.length;e>d;++d)if(f=c[d],f.selectorText&&f.selectorText===a)return f}return null},getRulesFromStylesheet:function(a){var b=[],c,d,e,f,g,h=document.styleSheets;if(!h)return b;for(var i=0,j=document.styleSheets.length;j>i;++i){if(c=document.styleSheets[i],d=c.rules?c.rules:c.cssRules,!d)return null;for(e=0,f=d.length;f>e;++e)g=d[e],g.selectorText&&g.selectorText===a&&b.push(g)}return b},getPropertiesFromRule:function(a){var b=this.getRuleFromStylesheet(a),c={},d,e,f;b=b.style.cssText;var g=b.split(";"),h,i,j,k;for(e=0,f=g.length;f>e;++e)" "===g[e].charAt(0)&&(g[e]=g[e].substring(1)),h=g[e].split(":"),d=this._camelCase(h[0].toLowerCase()),i=h[1],i&&(i=i.substring(1),"padding"===d||"margin"===d||"borderWidth"===d?("borderWidth"===d?(j="border",k="Width"):(j=d,k=""),-1!==i.indexOf(" ")?(i=i.split(" "),c[j+"Top"+k]=i[0],c[j+"Bottom"+k]=i[0],c[j+"Left"+k]=i[1],c[j+"Right"+k]=i[1]):(c[j+"Top"+k]=i,c[j+"Bottom"+k]=i,c[j+"Left"+k]=i,c[j+"Right"+k]=i)):"borderRadius"===d?-1!==i.indexOf(" ")?(i=i.split(" "),c.borderTopLeftRadius=i[0],c.borderBottomRightRadius=i[0],c.borderTopRightRadius=i[1],c.borderBottomLeftRadius=i[1]):(c.borderTopLeftRadius=i,c.borderTopRightRadius=i,c.borderBottomLeftRadius=i,c.borderBottomRightRadius=i):c[d]=i);return c},changeFontSize:function(a,b,c,d,e){var f=this;Ink.requireModules(["Ink.Dom.Selector_1"],function(g){var h;if("string"!=typeof a?h="1st argument must be a CSS selector rule.":"number"!=typeof b?h="2nd argument must be a number.":void 0!==c&&"+"!==c&&"*"!==c?h='3rd argument must be one of "+", "*".':void 0!==d&&("number"!=typeof d||0>=d)?h="4th argument must be a positive number.":void 0!==e&&("number"!=typeof e||e>e)&&(h="5th argument must be a positive number greater than minValue."),h)throw new TypeError(h);var i,j,k=g.select(a);void 0===d&&(d=1),c="*"===c?function(a,b){return a*b}:function(a,b){return a+b};for(var l=0,m=k.length;m>l;++l)j=k[l],i=parseFloat(f.getStyle(j,"fontSize")),i=c(i,b),d>i||"number"==typeof e&&i>e||(j.style.fontSize=i+"px")})}};return b}),Ink.createModule("Ink.Dom.Element",1,[],function(){"use strict";var a="function"==typeof document.createRange&&"function"==typeof window.Range.prototype.createContextualFragment,b="Ink.Dom.Element tbody: "+Math.random(),c=function(){var a=document.createElement("div");return a.innerHTML="",0!==a.getElementsByTagName("tbody").length}();function d(a){var b={};try{b=a.getBoundingClientRect()}catch(c){b={top:a.offsetTop,left:a.offsetLeft}}return b}var e={get:function(a){return"undefined"!=typeof a?"string"==typeof a?document.getElementById(a):a:null},create:function(a,b){var c=document.createElement(a);for(var d in b)b.hasOwnProperty(d)&&(d in e?e[d](c,b[d]):"className"===d||"class"===d?c.className=b.className||b["class"]:c.setAttribute(d,b[d]));return c},remove:function(a){a=Ink.i(a);var b;a&&(b=a.parentNode)&&b.removeChild(a)},scrollTo:function(a){if(a=e.get(a)){if(a.scrollIntoView)return a.scrollIntoView();var b={},c=0,d=0;do c+=a.offsetTop||0,d+=a.offsetLeft||0,a=a.offsetParent;while(a);b={x:d,y:c},window.scrollTo(b.x,b.y)}},offsetTop:function(a){return e.offset(a)[1]},offsetLeft:function(a){return e.offset(a)[0]},positionedOffset:function(a){var b=0,c=0;a=e.get(a);do if(b+=a.offsetTop||0,c+=a.offsetLeft||0,a=a.offsetParent){if("body"===a.tagName.toLowerCase())break;var d=a.style.position;if(!d&&a.currentStyle&&(d=a.currentStyle.position),(!d||"auto"===d)&&"undefined"!=typeof getComputedStyle){var f=getComputedStyle(a,null);d=f?f.position:null}if("relative"===d||"absolute"===d)break}while(a);return[c,b]},offset:function(a){a=Ink.i(a);var b=[0,0],c=a.ownerDocument,e=c.documentElement,f=d(a),g=c.body,h=e.clientTop||g.clientTop||0,i=e.clientLeft||g.clientLeft||0,j=c.pageYOffset||e.scrollTop||g.scrollTop,k=c.pageXOffset||e.scrollLeft||g.scrollLeft,l=f.top+j-h,m=f.left+k-i;return b=[m,l]},scroll:function(a){return a=a?Ink.i(a):document.body,[window.pageXOffset?window.pageXOffset:a.scrollLeft,window.pageYOffset?window.pageYOffset:a.scrollTop]},_getPropPx:function(a,b){var c,d,e=a.getPropertyValue?a.getPropertyValue(b):a[b];return e?(d=e.indexOf("px"),c=-1===d?0:parseFloat(e,10)):c=0,c},offset2:function(a){return e.offset(a)},hasAttribute:function(a,b){return a=Ink.i(a),a.hasAttribute?a.hasAttribute(b):!!a.getAttribute(b)},insertAfter:function(a,b){(b=e.get(b))&&(null!==b.nextSibling?b.parentNode.insertBefore(a,b.nextSibling):b.parentNode.appendChild(a))},insertBefore:function(a,b){(b=e.get(b))&&b.parentNode.insertBefore(a,b)},insertTop:function(a,b){(b=e.get(b))&&(b.firstChild?b.insertBefore(a,b.firstChild):b.appendChild(a))},insertBottom:function(a,b){b=Ink.i(b),b.appendChild(a)},textContent:function(a){a=Ink.i(a);var b,c,d,f;switch(a&&a.nodeType){case 9:return e.textContent(a.documentElement||a.body&&a.body.parentNode||a.body);case 1:if(b=a.innerText,"undefined"!=typeof b)return b;case 11:if(b=a.textContent,"undefined"!=typeof b)return b;if(a.firstChild===a.lastChild)return e.textContent(a.firstChild);for(b=[],d=a.childNodes,c=0,f=d.length;f>c;++c)b.push(e.textContent(d[c]));return b.join("");case 3:case 4:return a.nodeValue}return""},setTextContent:function(a,b){switch(a=Ink.i(a),a&&a.nodeType){case 1:if("innerText"in a){a.innerText=b;break}case 11:if("textContent"in a){a.textContent=b;break}case 9:for(;a.firstChild;)a.removeChild(a.firstChild);if(""!==b){var c=a.ownerDocument||a;a.appendChild(c.createTextNode(b))}break;case 3:case 4:a.nodeValue=b}},isLink:function(a){var b=a&&1===a.nodeType&&(/^a|area$/i.test(a.tagName)||a.hasAttributeNS&&a.hasAttributeNS("http://www.w3.org/1999/xlink","href"));return!!b},isAncestorOf:function(a,b){if(!b||!a)return!1;if(b.compareDocumentPosition)return 0!==(16&a.compareDocumentPosition(b));for(;b=b.parentNode;)if(b===a)return!0;return!1},descendantOf:function(a,b){return a!==b&&e.isAncestorOf(a,b)},firstElementChild:function(a){if(!a)return null;if("firstElementChild"in a)return a.firstElementChild;for(var b=a.firstChild;b&&1!==b.nodeType;)b=b.nextSibling;return b},lastElementChild:function(a){if(!a)return null;if("lastElementChild"in a)return a.lastElementChild;for(var b=a.lastChild;b&&1!==b.nodeType;)b=b.previousSibling;return b},nextElementSibling:function(a){var b=null;if(!a)return b;if("nextElementSibling"in a)return a.nextElementSibling;for(b=a.nextSibling;b&&1!==b.nodeType;)b=b.nextSibling;return b},previousElementSibling:function(a){var b=null;if(!a)return b;if("previousElementSibling"in a)return a.previousElementSibling;for(b=a.previousSibling;b&&1!==b.nodeType;)b=b.previousSibling;return b},elementWidth:function(a){return"string"==typeof a&&(a=document.getElementById(a)),a.offsetWidth},elementHeight:function(a){return"string"==typeof a&&(a=document.getElementById(a)),a.offsetHeight},elementLeft:function(a){return e.offsetLeft(a)},elementTop:function(a){return e.offsetTop(a)},elementDimensions:function(a){return a=Ink.i(a),[a.offsetWidth,a.offsetHeight]},outerDimensions:function(a){var b=d(a),c=Ink.getModule("Ink.Dom.Css_1"),e=Ink.bindMethod(c,"getStyle",a);return[b.right-b.left+parseFloat(e("marginLeft")||0)+parseFloat(e("marginRight")||0),b.bottom-b.top+parseFloat(e("marginTop")||0)+parseFloat(e("marginBottom")||0)]},inViewport:function(a,b){var c=d(Ink.i(a));return"boolean"==typeof b&&(b={partial:b,margin:0}),b=Ink.extendObj({partial:!1,margin:0},b||{}),b.partial?c.bottom+b.margin>0&&c.left-b.margin0:c.top+b.margin>0&&c.right-b.margin0 +},isHidden:function(a){var b=a.offsetWidth,c=a.offsetHeight,d="tr"===a.tagName.toLowerCase(),e=Ink.getModule("Ink.Dom.Css_1");return 0!==b||0!==c||d?0===b||0===c||d?"none"===e.getStyle(a,"display").toLowerCase():!1:!0},isVisible:function(a){return!this.isHidden(a)},clonePosition:function(a,b){var c=e.offset(b);return a.style.left=c[0]+"px",a.style.top=c[1]+"px",a},ellipsizeText:function(a){(a=Ink.i(a))&&(a.style.overflow="hidden",a.style.whiteSpace="nowrap",a.style.textOverflow="ellipsis")},findUpwardsHaving:function(a,b){for(;a&&1===a.nodeType;){if(b(a))return a;a=a.parentNode}return!1},findUpwardsByClass:function(a,b){var c=new RegExp("(^|\\s)"+b+"(\\s|$)"),d=function(a){var b=a.className;return b&&c.test(b)};return e.findUpwardsHaving(a,d)},findUpwardsByTag:function(a,b){b=b.toUpperCase();var c=function(a){return a.nodeName&&a.nodeName.toUpperCase()===b};return e.findUpwardsHaving(a,c)},findUpwardsById:function(a,b){var c=function(a){return a.id===b};return e.findUpwardsHaving(a,c)},findUpwardsBySelector:function(a,b){var c=Ink.getModule("Ink.Dom.Selector","1");if(!c)throw new Error("This method requires Ink.Dom.Selector");var d=function(a){return c.matchesSelector(a,b)};return e.findUpwardsHaving(a,d)},getChildrenText:function(a,b){var c,d,f,g=a.childNodes,h=g.length,i="";if(!a)return i;for(d=0;h>d;++d)c=g[d],c&&3===c.nodeType&&(f=e._trimString(String(c.data)),f.length>0?(i+=f,b&&a.removeChild(c)):a.removeChild(c));return i},_trimString:function(a){return String.prototype.trim?a.trim():a.replace(/^\s*/,"").replace(/\s*$/,"")},getSelectValues:function(a){for(var b=Ink.i(a),c=[],d=0;dd;++d)b=a[d],b instanceof Array?1===b.length&&b.push(b[0]):b=[b,b],c.push(b);return c},fillSelect:function(a,b,c,d){var f=Ink.i(a);if(f){f.innerHTML="";var g,h;c||(h=document.createElement("option"),h.setAttribute("value",""),f.appendChild(h)),b=e._normalizeData(b);for(var i=0,j=b.length;j>i;++i)g=b[i],h=document.createElement("option"),h.setAttribute("value",g[0]),g.length>2&&h.setAttribute("extra",g[2]),h.appendChild(document.createTextNode(g[1])),g[0]===d&&h.setAttribute("selected","selected"),f.appendChild(h)}},fillRadios:function(a,b,c,d,f,g){a=Ink.i(a);var h=document.createElement("span");e.insertAfter(h,a),c=e._normalizeData(c);var i,j;d||(j=document.createElement("input"),j.setAttribute("type","radio"),j.setAttribute("name",b),j.setAttribute("value",""),h.appendChild(j),g&&h.appendChild(document.createElement(g)));for(var k=0;ke;++e)if(c=a.childNodes[e],1===c.nodeType){if(c===b)return d;++d}return-1},nextSiblings:function(a){if(a=Ink.i(a),"object"==typeof a&&null!==a&&a.nodeType&&1===a.nodeType){for(var b=[],c=a.parentNode.children,d=e.parentIndexOf(a.parentNode,a),f=++d,g=c.length;g>f;f++)b.push(c[f]);return b}return[]},previousSiblings:function(a){if(a=Ink.i(a),"object"==typeof a&&null!==a&&a.nodeType&&1===a.nodeType){for(var b=[],c=a.parentNode.children,d=e.parentIndexOf(a.parentNode,a),f=0,g=d;g>f;f++)b.push(c[f]);return b}return[]},siblings:function(a){if(a=Ink.i(a),"object"==typeof a&&null!==a&&a.nodeType&&1===a.nodeType){for(var b=[],c=a.parentNode.children,d=0,e=c.length;e>d;d++)a!==c[d]&&b.push(c[d]);return b}return[]},childElementCount:function(a){return a=Ink.i(a),"childElementCount"in a?a.childElementCount:a?e.siblings(a).length+1:0},_wrapElements:{TABLE:function(a,d){return a.innerHTML=c?"
    "+d+"
    "+b+"
    ":""+d+"
    ",a.firstChild},TBODY:function(a,b){return a.innerHTML=""+b+"
    ",a.firstChild.getElementsByTagName("tbody")[0]},THEAD:function(a,b){return a.innerHTML=""+b+"
    ",a.firstChild.getElementsByTagName("thead")[0]},TFOOT:function(a,b){return a.innerHTML=""+b+"
    ",a.firstChild.getElementsByTagName("tfoot")[0]},TR:function(a,b){return a.innerHTML=""+b+"
    ",a.firstChild.firstChild.firstChild}},_getWrapper:function(a,d){var f=a.nodeName&&a.nodeName.toUpperCase(),g=document.createElement("div"),h=e._wrapElements[f];if(!h)return g.innerHTML=d,g;if(g=h(g,d),c&&"TABLE"===f)for(var i=g.getElementsByTagName("td"),j=0,k=i.length;k>j;j++)if(i[j].innerHTML===b){var l=i[j].parentNode.parentNode;l.parentNode.removeChild(l)}return g},appendHTML:function(a,b){if(a=Ink.i(a),null!==a)for(var c=e._getWrapper(a,b);c.firstChild;)a.appendChild(c.firstChild)},prependHTML:function(a,b){if(a=Ink.i(a),null!==a)for(var c=e._getWrapper(a,b);c.lastChild;)a.insertBefore(c.lastChild,a.firstChild)},setHTML:function(a,b){if(a=Ink.i(a),null!==a)try{a.innerHTML=b}catch(c){for(;a.firstChild;)a.removeChild(a.firstChild);e.appendHTML(a,b)}},wrap:function(a,b){a=Ink.i(a),b=Ink.i(b);var c=a.nextSibling,d=a.parentNode;return b.appendChild(a),null!==c?d.insertBefore(b,c):d.appendChild(b),b},unwrap:function(a,b){a=Ink.i(a);var c;c="string"==typeof b?e.findUpwardsBySelector(a,b):"object"==typeof b&&b.tagName?e.findUpwardsHaving(a,function(a){return a===b}):a.parentNode,c&&c.parentNode&&e.insertBefore(a,c)},replace:function(a,b){a=Ink.i(a),null!==a&&a.parentNode.replaceChild(b,a)},removeTextNodeChildren:function(a){if(a=Ink.i(a),null!==a){var b,c,d=a;for(a=a.firstChild;a;)c=3===a.nodeType,b=a,a=a.nextSibling,c&&d.removeChild(b)}},htmlToFragment:a?function(a){var b;return"string"!=typeof a?document.createDocumentFragment():(b=document.createRange(),b.selectNode(document.body),b.createContextualFragment(a))}:function(a){var b=document.createDocumentFragment(),c,d;if("string"!=typeof a)return b;for(c=document.createElement("div"),c.innerHTML=a;d=c.firstChild;)b.appendChild(d);return b},_camelCase:function(a){return a?a.replace(/-(\w)/g,function(a,b){return b.toUpperCase()}):a},data:function(a){var b;if("object"!=typeof a&&"string"!=typeof a)throw"[Ink.Dom.Element.data] :: Invalid selector defined";if("object"==typeof a)b=a;else{var c=Ink.getModule("Ink.Dom.Selector",1);if(!c)throw"[Ink.Dom.Element.data] :: this method requires Ink.Dom.Selector - v1";if(b=c.select(a),b.length<=0)throw"[Ink.Dom.Element.data] :: Can't find any element with the specified selector";b=b[0]}var d={},f=b.attributes||[],g,h,i;if(f)for(var j=0,k=f.length;k>j;++j)g=f[j],h=g.name,i=g.value,h&&0===h.indexOf("data-")&&(d[e._camelCase(h.replace("data-",""))]=i);return d},moveCursorTo:function(a,b){if(a=Ink.i(a),null!==a)if(a.setSelectionRange)a.setSelectionRange(b,b);else{var c=a.createTextRange();c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",b),c.select()}},pageWidth:function(){var a;a=window.innerWidth&&window.scrollMaxX?window.innerWidth+window.scrollMaxX:document.body.scrollWidth>document.body.offsetWidth?document.body.scrollWidth:document.body.offsetWidth;var b;return window.self.innerWidth?b=document.documentElement.clientWidth?document.documentElement.clientWidth:window.self.innerWidth:document.documentElement&&document.documentElement.clientWidth?b=document.documentElement.clientWidth:document.body&&(b=document.body.clientWidth),b>a?a:b},pageHeight:function(){var a;a=window.innerHeight&&window.scrollMaxY?window.innerHeight+window.scrollMaxY:document.body.scrollHeight>document.body.offsetHeight?document.body.scrollHeight:document.body.offsetHeight;var b;return window.self.innerHeight?b=window.self.innerHeight:document.documentElement&&document.documentElement.clientHeight?b=document.documentElement.clientHeight:document.body&&(b=document.body.clientHeight),b>a?b:a},viewportWidth:function(){return"undefined"!=typeof window.innerWidth?window.innerWidth:document.documentElement&&"undefined"!=typeof document.documentElement.offsetWidth?document.documentElement.offsetWidth:void 0},viewportHeight:function(){return"undefined"!=typeof window.innerHeight?window.innerHeight:document.documentElement&&"undefined"!=typeof document.documentElement.offsetHeight?document.documentElement.offsetHeight:void 0},scrollWidth:function(){return"undefined"!=typeof window.self.pageXOffset?window.self.pageXOffset:"undefined"!=typeof document.documentElement&&"undefined"!=typeof document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft},scrollHeight:function(){return"undefined"!=typeof window.self.pageYOffset?window.self.pageYOffset:"undefined"!=typeof document.documentElement&&"undefined"!=typeof document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop}};return e}),Ink.createModule("Ink.Dom.Event",1,[],function(){var a=function(a,b,c){return c()}("bean",this,function(a,b){a=a||"bean",b=b||this;var c=window,d=b[a],e=/[^\.]*(?=\..*)\.|.*/,f=/\..*/,g="addEventListener",h="removeEventListener",i=document||{},j=i.documentElement||{},k=j[g],l=k?g:"attachEvent",m={},n=Array.prototype.slice,o=function(a,b){return a.split(b||" ")},p=function(a){return"string"==typeof a},q=function(a){return"function"==typeof a},r="click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll ",s="show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinputreadystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ",t=function(a,b,c){for(c=0;cg;g++)if(m[g].reg.test(e)){n[e]=k=m[g].fix;break}for(j=k(a,this,e),g=j.length;g--;)!((i=j[g])in this)&&i in a&&(this[i]=a[i])}}};return p.prototype.preventDefault=function(){this.originalEvent.preventDefault?this.originalEvent.preventDefault():this.originalEvent.returnValue=!1},p.prototype.stopPropagation=function(){this.originalEvent.stopPropagation?this.originalEvent.stopPropagation():this.originalEvent.cancelBubble=!0},p.prototype.stop=function(){this.preventDefault(),this.stopPropagation(),this.stopped=!0},p.prototype.stopImmediatePropagation=function(){this.originalEvent.stopImmediatePropagation&&this.originalEvent.stopImmediatePropagation(),this.isImmediatePropagationStopped=function(){return!0}},p.prototype.isImmediatePropagationStopped=function(){return this.originalEvent.isImmediatePropagationStopped&&this.originalEvent.isImmediatePropagationStopped()},p.prototype.clone=function(a){var b=new p(this,this.element,this.isNative);return b.currentTarget=a,b},p}(),w=function(a,b){return k||b||a!==i&&a!==c?a:j},x=function(){var a=function(a,b,c,d){var e=function(c,e){return b.apply(a,d?n.call(e,c?0:1).concat(d):e)},f=function(c,d){return b.__beanDel?b.__beanDel.ft(c.target,a):d},g=c?function(a){var b=f(a,this);return c.apply(b,arguments)?(a&&(a.currentTarget=b),e(a,arguments)):void 0}:function(a){return b.__beanDel&&(a=a.clone(f(a))),e(a,arguments)};return g.__beanDel=b.__beanDel,g},b=function(b,c,d,e,f,g,h){var i=u[c],j;"unload"==c&&(d=D(E,b,c,d,e)),i&&(i.condition&&(d=a(b,d,i.condition,g)),c=i.base||c),this.isNative=j=t[c]&&!!b[l],this.customType=!k&&!j&&c,this.element=b,this.type=c,this.original=e,this.namespaces=f,this.eventType=k||j?c:"propertychange",this.target=w(b,j),this[l]=!!this.target[l],this.root=h,this.handler=a(b,d,null,g)};return b.prototype.inNamespaces=function(a){var b,c,d=0;if(!a)return!0;if(!this.namespaces)return!1;for(b=a.length;b--;)for(c=this.namespaces.length;c--;)a[b]==this.namespaces[c]&&d++;return a.length===d},b.prototype.matches=function(a,b,c){return!(this.element!==a||b&&this.original!==b||c&&this.handler!==c)},b}(),y=function(){var a={},b=function(c,d,e,f,g,h){var i=g?"r":"$";if(d&&"*"!=d){var j=0,k,l=a[i+d],m="*"==c;if(!l)return;for(k=l.length;k>j;j++)if((m||l[j].matches(c,e,f))&&!h(l[j],l,j,d))return}else for(var n in a)n.charAt(0)==i&&b(c,n.substr(1),e,f,g,h)},c=function(b,c,d,e){var f,g=a[(e?"r":"$")+c];if(g)for(f=g.length;f--;)if(!g[f].root&&g[f].matches(b,d,null))return!0;return!1},d=function(a,c,d,e){var f=[];return b(a,c,d,null,e,function(a){return f.push(a)}),f},e=function(b){var c=!b.root&&!this.has(b.element,b.type,null,!1),d=(b.root?"r":"$")+b.type;return(a[d]||(a[d]=[])).push(b),c},f=function(c){b(c.element,c.type,null,c.handler,c.root,function(b,c,d){return c.splice(d,1),b.removed=!0,0===c.length&&delete a[(b.root?"r":"$")+b.type],!1})},g=function(){var b,c=[];for(b in a)"$"==b.charAt(0)&&(c=c.concat(a[b]));return c};return{has:c,get:d,put:e,del:f,entries:g}}(),z,A=function(a){z=arguments.length?a:i.querySelectorAll?function(a,b){return b.querySelectorAll(a)}:function(){throw new Error("Bean: No selector engine installed")}},B=function(a,b){if(k||!b||!a||a.propertyName=="_on"+b){var c=y.get(this,b||a.type,null,!1),d=c.length,e=0;for(a=new v(a,this,!0),b&&(a.type=b);d>e&&!a.isImmediatePropagationStopped();e++)c[e].removed||c[e].handler.call(this,a)}},C=k?function(a,b,c){a[c?g:h](b,B,!1)}:function(a,b,c,d){var e;c?(y.put(e=new x(a,d||b,function(b){B.call(a,b,d)},B,null,null,!0)),d&&null==a["_on"+d]&&(a["_on"+d]=0),e.target.attachEvent("on"+e.eventType,e.handler)):(e=y.get(a,d||b,B,!0)[0],e&&(e.target.detachEvent("on"+e.eventType,e.handler),y.del(e)))},D=function(a,b,c,d,e){return function(){d.apply(this,arguments),a(b,c,e)}},E=function(a,b,c,d){var e=b&&b.replace(f,""),g=y.get(a,e,null,!1),h={},i,j;for(i=0,j=g.length;j>i;i++)c&&g[i].original!==c||!g[i].inNamespaces(d)||(y.del(g[i]),!h[g[i].eventType]&&g[i][l]&&(h[g[i].eventType]={t:g[i].eventType,c:g[i].type}));for(i in h)y.has(a,h[i].t,null,!1)||C(a,h[i].t,!1,h[i].c)},F=function(a,b){var c=function(b,c){for(var d,e=p(a)?z(a,c):a;b&&b!==c;b=b.parentNode)for(d=e.length;d--;)if(e[d]===b)return b},d=function(a){var d=c(a.target,this);d&&b.apply(d,arguments)};return d.__beanDel={ft:c,selector:a},d},G=k?function(a,b,d){var e=i.createEvent(a?"HTMLEvents":"UIEvents");e[a?"initEvent":"initUIEvent"](b,!0,!0,c,1),d.dispatchEvent(e)}:function(a,b,c){c=w(c,a),a?c.fireEvent("on"+b,i.createEventObject()):c["_on"+b]++},H=function(a,b,c){var d=p(b),g,h,i,j;if(d&&b.indexOf(" ")>0){for(b=o(b),j=b.length;j--;)H(a,b[j],c);return a}if(h=d&&b.replace(f,""),h&&u[h]&&(h=u[h].base),!b||d)(i=d&&b.replace(e,""))&&(i=o(i,".")),E(a,h,c,i);else if(q(b))E(a,null,b);else for(g in b)b.hasOwnProperty(g)&&H(a,g,b[g]);return a},I=function(a,b,c,d){var g,h,i,j,k,p,r;{if(void 0!==c||"object"!=typeof b){for(q(c)?(k=n.call(arguments,3),d=g=c):(g=d,k=n.call(arguments,4),d=F(c,g,z)),i=o(b),this===m&&(d=D(H,a,b,d,g)),j=i.length;j--;)r=y.put(p=new x(a,i[j].replace(f,""),d,g,o(i[j].replace(e,""),"."),k,!1)),p[l]&&r&&C(a,p.eventType,!0,p.customType);return a}for(h in b)b.hasOwnProperty(h)&&I.call(this,a,h,b[h])}},J=function(a,b,c,d){return I.apply(null,p(c)?[a,c,b,d].concat(arguments.length>3?n.call(arguments,5):[]):n.call(arguments))},K=function(){return I.apply(m,arguments)},L=function(a,b,c){var d=o(b),g,h,i,j,k;for(g=d.length;g--;)if(b=d[g].replace(f,""),(j=d[g].replace(e,""))&&(j=o(j,".")),j||c||!a[l])for(k=y.get(a,b,null,!1),c=[!1].concat(c),h=0,i=k.length;i>h;h++)k[h].inNamespaces(j)&&k[h].handler.apply(a,c);else G(t[b],b,a);return a},M=function(a,b,c){for(var d=y.get(b,c,null,!1),e=d.length,f=0,g,h;e>f;f++)d[f].original&&(g=[a,d[f].type],(h=d[f].handler.__beanDel)&&g.push(h.selector),g.push(d[f].original),I.apply(null,g));return a},N={on:I,add:J,one:K,off:H,remove:H,clone:M,fire:L,Event:v,setSelectorEngine:A,noConflict:function(){return b[a]=d,this}};if(c.attachEvent){var O=function(){var a,b=y.entries();for(a in b)b[a].type&&"unload"!==b[a].type&&H(b[a].element,b[a].type);c.detachEvent("onunload",O),c.CollectGarbage&&c.CollectGarbage()};c.attachEvent("onunload",O)}return A(Ink.ss),N}),b={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,throttle:function(a,b){b=b||0;var c=0,d,e=function(){var f=+new Date,g=f-c;if(g>=b)return c=f,a.apply(this,[].slice.call(arguments));var h=this,i=[].slice.call(arguments);d||(d=setTimeout(function(){return d=null,e.apply(h,i)},b-g))};return e},element:function(a){var b=a.delegationTarget||a.target||"mouseout"===a.type&&a.fromElement||"mouseleave"===a.type&&a.fromElement||"mouseover"===a.type&&a.toElement||"mouseenter"===a.type&&a.toElement||a.srcElement||null;return!b||3!==b.nodeType&&4!==b.nodeType?b:b.parentNode},relatedTarget:function(a){var b=a.relatedTarget||"mouseout"===a.type&&a.toElement||"mouseleave"===a.type&&a.toElement||"mouseover"===a.type&&a.fromElement||"mouseenter"===a.type&&a.fromElement||null;return!b||3!==b.nodeType&&4!==b.nodeType?b:b.parentNode},findElement:function(a,b,c){for(var d=this.element(a);;){if(d.nodeName.toLowerCase()===b.toLowerCase())return d;if(d=d.parentNode,!d)return c?!1:document;if(!d.parentNode)return c?!1:document}},observe:function(a,b,c,d){return a=Ink.i(a),a?(a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent("on"+b,c=Ink.bind(c,a)),c):void 0},observeOnce:function(a,c,d,e){var f=function(){return b.stopObserving(a,c,f),d()};return b.observe(a,c,f,e)},observeMulti:function(a,b,c,d){if("string"==typeof a?a=Ink.ss(a):a&&1===a.nodeType&&(a=[a]),!a[0])return!1;for(var e=0,f=a.length;f>e;e++)this.observe(a[e],b,c,d);return c},observeDelegated:function(a,c,d,e){return b.observe(a,c,function(c){var f=b.element(c);if(f&&f!==a)for(var g=f;g!==a&&g!==document&&g;){if(Ink.Dom.Selector_1.matchesSelector(g,d))return c.delegationTarget=g,e(c);g=g.parentNode}})},stopObserving:function(a,b,c,d){a=Ink.i(a),a&&(a.removeEventListener?a.removeEventListener(b,c,!!d):a.detachEvent("on"+b,c))},stop:function(a){null!==a.cancelBubble&&(a.cancelBubble=!0),a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),window.attachEvent&&(a.returnValue=!1),null!==a.cancel&&(a.cancel=!0)},stopPropagation:function(a){null!==a.cancelBubble&&(a.cancelBubble=!0),a.stopPropagation&&a.stopPropagation()},stopDefault:function(a){a.preventDefault&&a.preventDefault(),window.attachEvent&&(a.returnValue=!1),null!==a.cancel&&(a.cancel=!0)},pointer:function(a){return{x:this.pointerX(a),y:this.pointerY(a)}},pointerX:function(a){return a.touches&&a.touches[0]&&a.touches[0].pageX||a.pageX||a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)},pointerY:function(a){return a.touches&&a.touches[0]&&a.touches[0].pageY||a.pageY||a.clientY+(document.documentElement.scrollTop||document.body.scrollTop)},isLeftClick:function(a){if(window.addEventListener){if(0===a.button)return!0;if("touchend"===a.type&&null===a.button)return!0}else if(1===a.button)return!0;return!1},isRightClick:function(a){return 2===a.button},isMiddleClick:function(a){return window.addEventListener?1===a.button:4===a.button;return!1},getCharFromKeyboardEvent:function(a,b){var c=a.keyCode,d=String.fromCharCode(c),e=a.shiftKey;if(c>=65&&90>=c)return"boolean"==typeof b&&(e=b),e?d:d.toLowerCase();if(c>=96&&105>=c)return String.fromCharCode(48+(c-96));switch(c){case 109:case 189:return"-";case 107:case 187:return"+"}return d},debug:function(){}};return Ink.extendObj(b,a)}),Ink.createModule("Ink.Dom.FormSerialize",1,[],function(){"use strict";var a={serialize:function(a){a=Ink.i(a);var b=this._getFieldNameInputsMap(a),c={};for(var d in b)if(b.hasOwnProperty(d))if(null!==d){var e=d.replace(/\[\]$/,"");c[e]=this._getValuesOfField(b[d])}else c[d]=this._getValuesOfField(b[d]);return delete c["null"],c},fillIn:function(a,b){a=Ink.i(a);var c=this._getFieldNameInputsMap(a);delete c["null"];for(var d in b)b.hasOwnProperty(d)&&this._setValuesOfField(c[d],b[d])},_getFieldNameInputsMap:function(a){for(var b,c,d,e={},f=0,g=a.elements.length;g>f;++f)d=a.elements[f],b=d.getAttribute("name"),c=d.nodeName.toLowerCase(),"fieldset"!==c&&(void 0===e[b]?e[b]=[d]:e[b].push(d));return e},_getValuesOfField:function(a){var b=a[0].nodeName.toLowerCase(),c=a[0].getAttribute("type"),d=a[0].value,e,f,g,h,i,j,k=[];switch(b){case"select":for(e=0,f=a.length;f>e;++e)for(k[e]=[],j=a[e].getAttribute("multiple"),g=0,h=a[e].options.length;h>g;++g)if(i=a[e].options[g],i.selected){if(!j){k[e]=i.value;break}k[e].push(i.value)}return a.length>0&&/\[[^\]]*\]$/.test(a[0].getAttribute("name"))?k:k[0];case"textarea":case"input":if("checkbox"===c||"radio"===c){for(e=0,f=a.length;f>e;++e)i=a[e],i.checked&&k.push(i.value);return"checkbox"===c?a.length>1?k:!!k.length:a.length>1?k[0]:!!k.length}if(a.length>0&&/\[[^\]]*\]$/.test(a[0].getAttribute("name"))){var l=[];for(e=0,f=a.length;f>e;++e)l.push(a[e].value);return l}return d;break;default:return void 0}},_valInArray:function(a,b){for(var c=0,d=b.length;d>c;++c)if(b[c]===a)return!0;return!1},_setValuesOfField:function(a,b){if(a){var c=a[0].nodeName.toLowerCase(),d=a[0].getAttribute("type"),e,f,g;switch(c){case"select":if(a.length>1)throw"Got multiple select elements with same name!";for(e=0,f=a[0].options.length;f>e;++e)g=a[0].options[e],g.selected=b instanceof Array?this._valInArray(g.value,b):g.value===b;break;case"textarea":case"input":if("checkbox"===d||"radio"===d)for(e=0,f=a.length;f>e;++e)g=a[e],g.checked=b instanceof Array?this._valInArray(g.value,b):a.length>1?g.value===b:!!b;else{if(a.length>1)throw"Got multiple input elements with same name!";"file"!==d&&(a[0].value=b)}break;default:throw'Unsupported element: "'+c+'"!'}}}};return a}),Ink.createModule("Ink.Dom.Loaded",1,[],function(){"use strict";var a={_contexts:[],run:function(a,b){b||(b=a,a=window);for(var c,d=0,e=this._contexts.length;e>d;d++)if(this._contexts[d][0]===a){c=this._contexts[d][1];break}c||(c={cbQueue:[],win:a,doc:a.document,root:a.document.documentElement,done:!1,top:!0},c.handlers={checkState:Ink.bindEvent(this._checkState,this,c),poll:Ink.bind(this._poll,this,c)},this._contexts.push([a,c]));var f=c.doc.addEventListener;c.add=f?"addEventListener":"attachEvent",c.rem=f?"removeEventListener":"detachEvent",c.pre=f?"":"on",c.det=f?"DOMContentLoaded":"onreadystatechange",c.wet=c.pre+"load";var g=c.handlers.checkState,h="complete"===c.doc.readyState&&"about:blank"!==c.win.location.toString();if(h)setTimeout(Ink.bind(function(){b.call(c.win,"lazy")},this),0);else{c.cbQueue.push(b),c.doc[c.add](c.det,g),c.win[c.add](c.wet,g);var i=1;try{i=c.win.frameElement}catch(j){}if(!f&&c.root&&c.root.doScroll){try{c.top=!i}catch(j){}c.top&&this._poll(c)}}},_checkState:function(a,b){if(a&&("readystatechange"!==a.type||"complete"===b.doc.readyState)){var c="load"===a.type?b.win:b.doc;c[b.rem](b.pre+a.type,b.handlers.checkState,!1),this._ready(b)}},_poll:function(a){try{a.root.doScroll("left")}catch(b){return setTimeout(a.handlers.poll,50)}this._ready(a)},_ready:function(a){if(!a.done){a.done=!0;for(var b=0;bb;b++)if(this[b]===a)return b;return-1},J="[\\x20\\t\\r\\n\\f]",K="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",L=K.replace("w","w#"),M="([*^$|!~]?=)",N="\\["+J+"*("+K+")"+J+"*(?:"+M+J+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+L+")|)|)"+J+"*\\]",O=":("+K+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+J+"+|((?:^|[^\\\\])(?:\\\\.)*)"+J+"+$","g"),Q=new RegExp("^"+J+"*,"+J+"*"),R=new RegExp("^"+J+"*([\\x20\\t\\r\\n\\f>+~])"+J+"*"),S=new RegExp(O),T=new RegExp("^"+L+"$"),U={ID:new RegExp("^#("+K+")"),CLASS:new RegExp("^\\.("+K+")"),NAME:new RegExp("^\\[name=['\"]?("+K+")['\"]?\\]"),TAG:new RegExp("^("+K.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+J+"*(even|odd|(([+-]|)(\\d*)n|)"+J+"*(?:([+-]|)"+J+"*(\\d+)|))"+J+"*\\)|)","i"),needsContext:new RegExp("^"+J+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+J+"*((?:-\\d)?\\d*)"+J+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,W=/^[^{]+\{\s*\[native code/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/'|\\/g,_=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,ab=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,bb=function(a,b){var c="0x"+b-65536;return c!==c?b:0>c?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320)};try{G.apply(D=H.call(s.childNodes),s.childNodes),D[s.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}function db(a){return W.test(a+"")}function eb(){var a,b=[];return a=function(d,e){return b.push(d+=" ")>c.cacheLength&&delete a[b.shift()],a[d]=e}}function fb(a){return a[r]=!0,a}function gb(a){var b=k.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b=null}}function hb(a,b,c,d){var e,f,g,h,i,l,o,p,u,v;if((b?b.ownerDocument||b:s)!==k&&j(b),b=b||k,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(m&&!d){if(e=X.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&q(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return G.apply(c,b.getElementsByTagName(a)),c;if((g=e[3])&&t.getElementsByClassName&&b.getElementsByClassName)return G.apply(c,b.getElementsByClassName(g)),c}if(t.qsa&&!n.test(a)){if(o=!0,p=r,u=b,v=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(l=mb(a),(o=b.getAttribute("id"))?p=o.replace($,"\\$&"):b.setAttribute("id",p),p="[id='"+p+"'] ",i=l.length;i--;)l[i]=p+nb(l[i]);u=V.test(a)&&b.parentNode||b,v=l.join(",")}if(v)try{return G.apply(c,u.querySelectorAll(v)),c}catch(w){}finally{o||b.removeAttribute("id")}}}return vb(a.replace(P,"$1"),b,c,d)}e=hb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},j=hb.setDocument=function(a){var b=a?a.ownerDocument||a:s;return b!==k&&9===b.nodeType&&b.documentElement?(k=b,l=b.documentElement,m=!e(b),t.getElementsByTagName=gb(function(a){return a.appendChild(b.createComment("")),!a.getElementsByTagName("*").length}),t.attributes=gb(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),t.getElementsByClassName=gb(function(a){return a.innerHTML="",a.getElementsByClassName&&a.getElementsByClassName("e").length?(a.lastChild.className="e",2===a.getElementsByClassName("e").length):!1}),t.getByName=gb(function(a){a.id=r+0,a.appendChild(k.createElement("a")).setAttribute("name",r),a.appendChild(k.createElement("i")).setAttribute("name",r),l.appendChild(a);var c=b.getElementsByName&&b.getElementsByName(r).length===2+b.getElementsByName(r+0).length;return l.removeChild(a),c}),t.sortDetached=gb(function(a){return a.compareDocumentPosition&&1&a.compareDocumentPosition(k.createElement("div"))}),c.attrHandle=gb(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==B&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},t.getByName?(c.find.ID=function(a,b){if(typeof b.getElementById!==B&&m){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},c.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(c.find.ID=function(a,b){if(typeof b.getElementById!==B&&m){var c=b.getElementById(a);return c?c.id===a||typeof c.getAttributeNode!==B&&c.getAttributeNode("id").value===a?[c]:void 0:[]}},c.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==B&&a.getAttributeNode("id");return c&&c.value===b}}),c.find.TAG=t.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==B?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},c.find.NAME=t.getByName&&function(a,b){return typeof b.getElementsByName!==B?b.getElementsByName(name):void 0},c.find.CLASS=t.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==B&&m?b.getElementsByClassName(a):void 0},o=[],n=[":focus"],(t.qsa=db(b.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[selected]").length||n.push("\\["+J+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||n.push(":checked") +}),gb(function(a){a.innerHTML="",a.querySelectorAll("[i^='']").length&&n.push("[*^$]="+J+"*(?:\"\"|'')"),a.querySelectorAll(":enabled").length||n.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),n.push(",.*:")})),(t.matchesSelector=db(p=l.matchesSelector||l.mozMatchesSelector||l.webkitMatchesSelector||l.oMatchesSelector||l.msMatchesSelector))&&gb(function(a){t.disconnectedMatch=p.call(a,"div"),p.call(a,"[s!='']:x"),o.push("!=",O)}),n=new RegExp(n.join("|")),o=o.length&&new RegExp(o.join("|")),q=db(l.contains)||l.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},A=l.compareDocumentPosition?function(a,c){if(a===c)return z=!0,0;var d=c.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(c);return d?1&d||h&&c.compareDocumentPosition(a)===d?a===b||q(s,a)?-1:c===b||q(s,c)?1:i?I.call(i,a)-I.call(i,c):0:4&d?-1:1:a.compareDocumentPosition?-1:1}:function(a,c){var d,e=0,f=a.parentNode,g=c.parentNode,h=[a],i=[c];if(a===c)return z=!0,0;if(!f||!g)return a===b?-1:c===b?1:f?-1:g?1:0;if(f===g)return ib(a,c);for(d=a;d=d.parentNode;)h.unshift(d);for(d=c;d=d.parentNode;)i.unshift(d);for(;h[e]===i[e];)e++;return e?ib(h[e],i[e]):h[e]===s?-1:i[e]===s?1:0},k):k},hb.matches=function(a,b){return hb(a,null,null,b)},hb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==k&&j(a),b=b.replace(_,"='$1']"),t.matchesSelector&&m&&(!o||!o.test(b))&&!n.test(b))try{var c=p.call(a,b);if(c||t.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(d){}return hb(b,k,null,[a]).length>0},hb.contains=function(a,b){return(a.ownerDocument||a)!==k&&j(a),q(a,b)},hb.attr=function(a,b){var d;return(a.ownerDocument||a)!==k&&j(a),m&&(b=b.toLowerCase()),(d=c.attrHandle[b])?d(a):!m||t.attributes?a.getAttribute(b):((d=a.getAttributeNode(b))||a.getAttribute(b))&&a[b]===!0?b:d&&d.specified?d.value:null},hb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},hb.uniqueSort=function(a){var b,c=[],d=0,e=0;if(z=!t.detectDuplicates,h=!t.sortDetached,i=!t.sortStable&&a.slice(0),a.sort(A),z){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return a};function ib(a,b){var c=b&&a,d=c&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}d=hb.getText=function(a){var b,c="",e=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=d(a)}else if(3===f||4===f)return a.nodeValue}else for(;b=a[e];e++)c+=d(b);return c},c=hb.selectors={cacheLength:50,createPseudo:fb,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||hb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&hb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return U.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:c&&S.test(c)&&(b=mb(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(ab,bb).toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+J+")"+a+"("+J+"|$)"))&&w(a,function(a){return b.test(a.className||typeof a.getAttribute!==B&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=hb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,s=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===s:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){for(k=q[r]||(q[r]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[r]||(b[r]={}))[a])&&j[0]===u)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==s:1!==l.nodeType)||!++m||(t&&((l[r]||(l[r]={}))[a]=[u,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var d,e=c.pseudos[a]||c.setFilters[a.toLowerCase()]||hb.error("unsupported pseudo: "+a);return e[r]?e(b):e.length>1?(d=[a,a,"",b],c.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){for(var d,f=e(a,b),g=f.length;g--;)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,d)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=f(a.replace(P,"$1"));return d[r]?fb(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return hb(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||d(b)).indexOf(a)>-1}}),lang:fb(function(a){return T.test(a||"")||hb.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=m?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(a){var b=window.location&&window.location.hash;return b&&b.slice(1)===a.id},root:function(a){return a===l},focus:function(a){return a===k.activeElement&&(!k.hasFocus||k.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!c.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ob(a,c,d){var e=c.dir,f=d&&"parentNode"===e,g=v++;return c.first?function(b,c,d){for(;b=b[e];)if(1===b.nodeType||f)return a(b,c,d)}:function(c,d,h){var i,j,k,l=u+" "+g;if(h){for(;c=c[e];)if((1===c.nodeType||f)&&a(c,d,h))return!0}else for(;c=c[e];)if(1===c.nodeType||f)if(k=c[r]||(c[r]={}),(j=k[e])&&j[0]===l){if((i=j[1])===!0||i===b)return i===!0}else if(j=k[e]=[l],j[1]=a(c,d,h)||b,j[1]===!0)return!0}}function pb(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function qb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function rb(a,b,c,d,e,f){return d&&!d[r]&&(d=rb(d)),e&&!e[r]&&(e=rb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:qb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d)for(j=qb(r,n),d(j,[],h,i),k=j.length;k--;)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l));if(f){if(e||a){if(e){for(j=[],k=r.length;k--;)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}for(k=r.length;k--;)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=qb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function sb(a){for(var b,d,e,f=a.length,h=c.relative[a[0].type],i=h||c.relative[" "],j=h?1:0,k=ob(function(a){return a===b},i,!0),l=ob(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!h&&(d||c!==g)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(d=c.relative[a[j].type])m=[ob(pb(m),d)];else{if(d=c.filter[a[j].type].apply(null,a[j].matches),d[r]){for(e=++j;f>e&&!c.relative[a[e].type];e++);return rb(j>1&&pb(m),j>1&&nb(a.slice(0,j-1)).replace(P,"$1"),d,e>j&&sb(a.slice(j,e)),f>e&&sb(a=a.slice(e)),f>e&&nb(a))}m.push(d)}return pb(m)}function tb(a,d){var e=0,f=d.length>0,h=a.length>0,i=function(i,j,l,m,n){var o,p,q,r=[],s=0,t="0",v=i&&[],w=null!=n,x=g,y=i||h&&c.find.TAG("*",n&&j.parentNode||j),z=u+=null==x?1:Math.random()||.1;for(w&&(g=j!==k&&j,b=e);null!=(o=y[t]);t++){if(h&&o){for(p=0;q=a[p++];)if(q(o,j,l)){m.push(o);break}w&&(u=z,b=++e)}f&&((o=!q&&o)&&s--,i&&v.push(o))}if(s+=t,f&&t!==s){for(p=0;q=d[p++];)q(v,r,j,l);if(i){if(s>0)for(;t--;)v[t]||r[t]||(r[t]=E.call(m));r=qb(r)}G.apply(m,r),w&&!i&&r.length>0&&s+d.length>1&&hb.uniqueSort(m)}return w&&(u=z,g=x),v};return f?fb(i):i}f=hb.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){for(b||(b=mb(a)),c=b.length;c--;)f=sb(b[c]),f[r]?d.push(f):e.push(f);f=y(a,tb(e,d))}return f};function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)hb(a,b[d],c);return c}function vb(a,b,d,e){var g,h,i,j,k,l=mb(a);if(!e&&1===l.length){if(h=l[0]=l[0].slice(0),h.length>2&&"ID"===(i=h[0]).type&&9===b.nodeType&&m&&c.relative[h[1].type]){if(b=(c.find.ID(i.matches[0].replace(ab,bb),b)||[])[0],!b)return d;a=a.slice(h.shift().value.length)}for(g=U.needsContext.test(a)?0:h.length;g--&&(i=h[g],!c.relative[j=i.type]);)if((k=c.find[j])&&(e=k(i.matches[0].replace(ab,bb),V.test(h[0].type)&&b.parentNode||b))){if(h.splice(g,1),a=e.length&&nb(h),!a)return G.apply(d,e),d;break}}return f(a,l)(e,b,!m,d,V.test(a)),d}c.pseudos.nth=c.pseudos.eq;function wb(){}return wb.prototype=c.filters=c.pseudos,c.setFilters=new wb,t.sortStable=r.split("").sort(A).join("")===r,j(),[0,0].sort(A),t.detectDuplicates=z,{select:hb,matches:hb.matches,matchesSelector:hb.matchesSelector}}),Ink.createModule("Ink.UI.Animate",1,["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1"],function(a,b,c){"use strict";var d=function(a){return"animationName"in a.style?"animation":"oAnimationName"in a.style?"oAnimation":"msAnimationName"in a.style?"msAnimation":"webkitAnimationName"in a.style?"webkitAnimation":null}(document.createElement("div")),e={animation:"animationend",oAnimation:"oanimationend",msAnimation:"MSAnimationEnd",webkitAnimation:"webkitAnimationEnd"}[d];function f(c,d){this._element=a.elOrSelector(c),this._options=a.options({trigger:["Element",null],duration:["String","slow"],animation:["String"],removeClass:["Boolean",!0],onEnd:["Function",function(){}]},d||{},this._element),isNaN(parseInt(this._options.duration,10))||(this._options.duration=parseInt(this._options.duration,10)),this._options.trigger?b.observe(this._options.trigger,"click",Ink.bind(function(){this.animate()},this)):this.animate()}return f.prototype.animate=function(){f.animate(this._element,this._options.animation,this._options)},Ink.extendObj(f,{_animationPrefix:d,animationSupported:!!d,animationEndEventName:e,animate:function(b,g,h){if(b=a.elOrSelector(b),("number"==typeof h||"string"==typeof h)&&(h={duration:h}),"function"==typeof arguments[3]&&(h.onEnd=arguments[3]),"number"!=typeof h.duration&&"string"!=typeof h.duration&&(h.duration=400),!f.animationSupported)return void(h.onEnd&&setTimeout(function(){h.onEnd(null)},0));"number"==typeof h.duration?b.style[d+"Duration"]=h.duration+"ms":"string"==typeof h.duration&&c.addClassName(b,h.duration),c.addClassName(b,["animated",g]);function i(a){a.target===b&&a.animationName===g&&(h.onEnd&&h.onEnd(a),h.removeClass&&c.removeClassName(b,g),"string"==typeof h.duration&&c.removeClassName(b,h.duration),b.removeEventListener(e,i,!1))}b.addEventListener(e,i,!1)}}),f}),Ink.createModule("Ink.UI.Carousel","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.UI.Pagination_1","Ink.Dom.Browser_1","Ink.Dom.Selector_1"],function(a,b,c,d,e,f){"use strict";function g(a,b,c){return Math.min(c,Math.max(b,a))}var h=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,1e3/30)},i=function(c,e){this._handlers={paginationChange:Ink.bindMethod(this,"_onPaginationChange"),windowResize:b.throttle(Ink.bindMethod(this,"refit"),200)},b.observe(window,"resize",this._handlers.windowResize);var f=this._element=a.elOrSelector(c,"1st argument"),g=this._options=a.options({autoAdvance:["Integer",0],axis:["String","x"],initialPage:["Integer",0],spaceAfterLastSlide:["Boolean",!0],hideLast:["Boolean",!1],center:["Boolean",!1],keyboardSupport:["Boolean",!1],pagination:["String",null],onChange:["Function",null],swipe:["Boolean",!0]},e||{},f,this);this._isY="y"===g.axis;var h=Ink.s("ul.stage",f);this._ulEl=h,d.removeTextNodeChildren(h),null==this._options.pagination&&(this._currentPage=this._options.initialPage),this.refit(),this._isY&&(this._ulEl.style.whiteSpace="normal"),g.swipe&&(b.observe(f,"touchstart",Ink.bindMethod(this,"_onTouchStart")),b.observe(f,"touchmove",Ink.bindMethod(this,"_onTouchMove")),b.observe(f,"touchend",Ink.bindMethod(this,"_onTouchEnd"))),this._setUpPagination(),this._setUpAutoAdvance(),this._setUpHider()};i.prototype={refit:function(){var a=this._isY,b=function(b,c){return c?d.outerDimensions(b)[a?0:1]:d.outerDimensions(b)[a?1:0]};this._liEls=Ink.ss("li.slide",this._ulEl);var c=this._liEls.length,e=this._ulEl.getBoundingClientRect();this._ctnLength=a?e.bottom-e.top:e.right-e.left,this._elLength=b(this._liEls[0]),this._slidesPerPage=Math.floor(this._ctnLength/this._elLength)||1;var f=Math.ceil(c/this._slidesPerPage),h=this._numPages!==f;this._numPages=f,this._deltaLength=this._slidesPerPage*this._elLength,this._center(),this._updateHider(),this._IE7(),this._pagination&&h&&this._pagination.setSize(this._numPages),this.setPage(g(this.getPage(),0,this._numPages))},_setUpPagination:function(){this._options.pagination?(a.isDOMElement(this._options.pagination)||"string"==typeof this._options.pagination?this._pagination=new e(this._options.pagination,{size:this._numPages,onChange:this._handlers.paginationChange}):(this._pagination=this._options.pagination,this._pagination._options.onChange=this._handlers.paginationChange,this._pagination.setSize(this._numPages)),this._pagination.setCurrent(this._options.initialPage||0)):this._currentPage=this._options.initialPage||0},_setUpAutoAdvance:function(){if(this._options.autoAdvance){var a=this;setTimeout(function b(){a.nextPage(!0),setTimeout(b,a._options.autoAdvance)},this._options.autoAdvance)}},_setUpHider:function(){if(this._options.hideLast){var a=d.create("div",{className:"hider",insertBottom:this._element});a.style.position="absolute",a.style[this._isY?"left":"top"]="0",a.style[this._isY?"right":"bottom"]="0",a.style[this._isY?"bottom":"right"]="0",this._hiderEl=a}},_center:function(){if(this._options.center){var a=Math.floor((this._ctnLength-this._elLength*this._slidesPerPage)/2),b;b=this._isY?[a,"px 0"]:["0 ",a,"px"],this._ulEl.style.padding=b.join("")}},_updateHider:function(){if(this._hiderEl)if(0===this.getPage()){var a=Math.floor(this._ctnLength-this._elLength*this._slidesPerPage);this._options.center&&(a/=2),this._hiderEl.style[this._isY?"height":"width"]=a+"px"}else this._hiderEl.style[this._isY?"height":"width"]="0px"},_IE7:function(){if(f.IE&&""+f.version.split(".")[0]=="7")for(var a=Ink.ss("li.slide",this._ulEl),b=function(b,d){a[c].style[b]=d},c=0,d=a.length;d>c;c++)b("position","absolute"),b(this._isY?"top":"left",c*this._elLength+"px")},_onTouchStart:function(a){if(!(a.touches.length>1)){this._swipeData={x:b.pointerX(a),y:b.pointerY(a),lastUlPos:null};var c=this._ulEl.getBoundingClientRect();this._swipeData.inUlX=this._swipeData.x-c.left,this._swipeData.inUlY=this._swipeData.y-c.top,j(this._ulEl,"none"),this._touchMoveIsFirstTouchMove=!0,b.stopPropagation(a)}},_onTouchMove:function(a){if(!(a.touches.length>1)){var c=b.pointerX(a),d=b.pointerY(a),e=Math.abs(d-this._swipeData.y),f=Math.abs(c-this._swipeData.x);this._touchMoveIsFirstTouchMove&&(this._touchMoveIsFirstTouchMove=void 0,this._scrolling=this._isY?f>e:e>f,this._scrolling||this._onAnimationFrame()),!this._scrolling&&this._swipeData&&(b.stopDefault(a),this._swipeData.pointerPos=this._isY?d:c),b.stopPropagation(a)}},_onAnimationFrame:function(){var a=this._swipeData;if(a&&!this._scrolling&&!this._touchMoveIsFirstTouchMove){var b=this._element.getBoundingClientRect(),c;c=this._isY?a.pointerPos-a.inUlY-b.top:a.pointerPos-a.inUlX-b.left,this._ulEl.style[this._isY?"top":"left"]=c+"px",a.lastUlPos=c,h(Ink.bindMethod(this,"_onAnimationFrame"))}},_onTouchEnd:function(a){if(this._swipeData&&this._swipeData.pointerPos&&!this._scrolling&&!this._touchMoveIsFirstTouchMove){var c=.1,d=-this._swipeData.lastUlPos,e=this.getPage(),f=d/this._elLength/this._slidesPerPage;if(Math.round(f)===e){var g=f-e;Math.abs(g)>c&&(g=g>0?1:-1,e+=g)}else e=Math.round(f);this.setPage(e),b.stopPropagation(a),b.stopDefault(a)}j(this._ulEl,null),this._swipeData=null,this._touchMoveIsFirstTouchMove=void 0,this._scrolling=void 0},_onPaginationChange:function(a){this._setPage(a.getCurrent())},getPage:function(){return this._pagination?this._pagination.getCurrent():this._currentPage||0},setPage:function(a,b){b&&(a%=this._numPages,0>a&&(a=this._numPages-a)),a=g(a,0,this._numPages-1),this._pagination?this._pagination.setCurrent(a):this._setPage(a)},_setPage:function(a){var b=a*this._deltaLength,c=a===this._numPages-1;if(!this._options.spaceAfterLastSlide&&c&&a>0){var d=this._liEls.length-a*this._slidesPerPage;d2)&&q('the "defaults" argument must be an object mapping option names to [typestring, optional] arrays.'),k=a in g?j._coerce_from_string(m,g[a],a,b):h,k!==h?j._options_validate(k,m)?k:(r("("+a+" option) Invalid "+m+" "+p(k)),n):a in d?d[a]:n!==h?n:void q("Option "+a+" is required!")}for(var t in c)c.hasOwnProperty(t)&&(f[t]=s(t));return f},_coerce_from_string:function(a,b,c,d){return a in j._coerce_funcs?j._coerce_funcs[a](b,c,d):b},_options_validate:function(a,b){return b in j._options_validate_types?j._options_validate_types[b].call(j,a):!1},_coerce_funcs:function(){var a={element:function(a){return j.elOrSelector(a,"")},elements:function(a){return j.elsOrSelector(a,"",!1)},object:function(a){return a},number:function(a){return parseFloat(a)},"boolean":function(a){return!("false"===a||""===a||null===a)},string:function(a){return a},"function":function(a,b,c){return Ink.error(c+': You cannot specify the option "'+b+"\" through data-attributes because it's a function"),h}};return a["float"]=a.integer=a.number,a}(),_options_validate_types:function(){var a={string:function(a){return"string"==typeof a},number:function(a){return"number"==typeof a&&!isNaN(a)&&isFinite(a)},integer:function(a){return a===Math.round(a)},element:function(a){return j.isDOMElement(a)},elements:function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&a.length},"boolean":function(a){return"boolean"==typeof a}};return a["float"]=a.number,a}(),clone:function(a){try{return JSON.parse(JSON.stringify(a))}catch(b){throw new Error("Given object cannot have loops!")}},childIndex:function(a){if(j.isDOMElement(a))for(var b=d.select("> *",a.parentNode),c=0,e=b.length;e>c;++c)if(b[c]===a)return c;throw"not found!"},ajaxJSON:function(a,c,d){new b(a,{evalJS:"force",method:"POST",parameters:c,onSuccess:function(a){try{if(a=a.responseJSON,"ok"!==a.status)throw"server error: "+a.message;d(null,a)}catch(b){d(b)}},onFailure:function(){d("communication failure")}})},currentLayout:function(){var a,b,e,f,g,h=d.select("#ink-layout-detector")[0];if(!h){h=document.createElement("div"),h.id="ink-layout-detector";for(e in this.Layouts)this.Layouts.hasOwnProperty(e)&&(f=this.Layouts[e],g=document.createElement("div"),g.className="show-"+f+" hide-all",g.setAttribute("data-ink-layout",f),h.appendChild(g));document.body.appendChild(h)}var i="",j=0;for(a=0,b=h.childNodes.length;b>a;++a)g=h.childNodes[a],"block"===c.getStyle(g,"display")&&(i=g.getAttribute("data-ink-layout"),j+=1);return 1===j?i:"large"},hashSet:function(a){if("object"!=typeof a)throw new TypeError("o should be an object!");var b=e.getAnchorString();b=Ink.extendObj(b,a),window.location.hash=e.genQueryString("",b).substring(1)},cleanChildren:function(a){if(!j.isDOMElement(a))throw"Please provide a valid DOMElement";for(var b,c=a.lastChild;c;)b=c.previousSibling,a.removeChild(c),c=b},storeIdAndClasses:function(a,b){if(!j.isDOMElement(a))throw"Please provide a valid DOMElement as first parameter";var c=a.id;c&&(b._id=c);var d=a.className;d&&(b._classes=d)},restoreIdAndClasses:function(a,b){if(!j.isDOMElement(a))throw"Please provide a valid DOMElement as first parameter";b._id&&a.id!==b._id&&(a.id=b._id),b._classes&&-1===a.className.indexOf(b._classes)&&(a.className?a.className+=" "+b._classes:a.className=b._classes),b._instanceId&&!a.getAttribute("data-instance")&&a.setAttribute("data-instance",b._instanceId)},registerInstance:function(a,b,c){if(!a._instanceId){if("object"!=typeof a)throw new TypeError("1st argument must be a JavaScript object!");if(!a._options||!a._options.skipRegister){if(!this.isDOMElement(b))throw new TypeError("2nd argument must be a DOM element!");if(void 0!==c&&"string"!=typeof c)throw new TypeError("3rd argument must be a string!");var d=(c||"instance")+ ++g;f[d]=a,a._instanceId=d;var e=b.getAttribute("data-instance");e=null!==e?[e,d].join(" "):d,b.setAttribute("data-instance",e)}}},unregisterInstance:function(a){delete f[a]},getInstance:function(a){var b;if(this.isDOMElement(a)){if(b=a.getAttribute("data-instance"),null===b)throw new Error("argument is not a DOM instance element!")}else b=a;b=b.split(" ");var c,d,e,g=b.length,h=[];for(e=0;g>e;++e){if(d=b[e],!d)throw new Error("Element is not a JS instance!");if(c=f[d],!c)throw new Error('Instance "'+d+'" not found!');h.push(c)}return 1===g?h[0]:h},getInstanceFromSelector:function(a){var b=d.select(a)[0];if(!b)throw new Error("Element not found!");return this.getInstance(b)},getInstanceIds:function(){var a=[];for(var b in f)f.hasOwnProperty(b)&&a.push(b);return a},getInstances:function(){var a=[];for(var b in f)f.hasOwnProperty(b)&&a.push(f[b]);return a},destroyComponent:function(){j.unregisterInstance(this._instanceId),this._element.parentNode.removeChild(this._element)}};return j}),Ink.createModule("Ink.UI.DatePicker","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1","Ink.Util.Date_1","Ink.Dom.Browser_1"],function(a,b,c,d,e,f,g){"use strict";function h(a,b){for(var c="",d=0;a>d;d++)c+=b;return c}function i(a,b,c){return a>c&&(a=c),b>a&&(a=b),a}function j(a){var b=a.split("-");return k(+b[0],+b[1]-1,+b[2])}function k(a,b,c){return{_year:a,_month:b,_day:c}}function l(a){return{_year:a.getFullYear(),_month:a.getMonth(),_day:a.getDate()}}var m=function(b,c){if(this._element=b&&a.elOrSelector(b,"[Ink.UI.DatePicker_1]: selector argument"),this._options=a.options("Ink.UI.DatePicker_1",{autoOpen:["Boolean",!1],cleanText:["String","Clear"],closeText:["String","Close"],containerElement:["Element",null],cssClass:["String","ink-calendar bottom"],dateRange:["String",null],displayInSelect:["Boolean",!1],dayField:["Element",null],monthField:["Element",null],yearField:["Element",null],format:["String","yyyy-mm-dd"],instance:["String","scdp_"+Math.round(99999*Math.random())],nextLinkText:["String","»"],ofText:["String"," de "],onFocus:["Boolean",!0],onMonthSelected:["Function",null],onSetDate:["Function",null],onYearSelected:["Function",null],position:["String","right"],prevLinkText:["String","«"],showClean:["Boolean",!0],showClose:["Boolean",!0],shy:["Boolean",!0],startDate:["String",null],startWeekDay:["Number",1],validDayFn:["Function",null],validMonthFn:["Function",null],validYearFn:["Function",null],nextValidDateFn:["Function",null],prevValidDateFn:["Function",null],yearRange:["String",null],month:["Object",{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}],wDay:["Object",{0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"}]},c||{},this._element),this._options.format=this._dateParsers[this._options.format]||this._options.format,this._hoverPicker=!1,this._picker=this._options.pickerField&&a.elOrSelector(this._options.pickerField,"pickerField"),this._setMinMax(this._options.dateRange||this._options.yearRange),this._options.startDate)this.setDate(this._options.startDate);else if(this._element&&this._element.value)this.setDate(this._element.value);else{var d=new Date;this._day=d.getDate(),this._month=d.getMonth(),this._year=d.getFullYear()}if((this._options.startWeekDay<0||this._options.startWeekDay>6)&&(Ink.warn('Ink.UI.DatePicker_1: option "startWeekDay" must be between 0 (sunday) and 6 (saturday)'),this._options.startWeekDay=i(this._options.startWeekDay,0,6)),this._options.displayInSelect&&!(this._options.dayField&&this._options.monthField&&this._options.yearField))throw new Error("Ink.UI.DatePicker: displayInSelect option enabled.Please specify dayField, monthField and yearField selectors.");this._init()};return m.prototype={version:"0.1",_init:function(){Ink.extendObj(this._options,this._lang||{}),this._render(),this._listenToContainerObjectEvents(),a.registerInstance(this,this._containerObject,"datePicker")},_render:function(){this._containerObject=document.createElement("div"),this._containerObject.id=this._options.instance,this._containerObject.className=this._options.cssClass+" ink-datepicker-calendar hide-all",this._renderSuperTopBar();var b=document.createElement("div");b.className="ink-calendar-top",this._monthDescContainer=document.createElement("div"),this._monthDescContainer.className="ink-calendar-month_desc",this._monthPrev=document.createElement("div"),this._monthPrev.className="ink-calendar-prev",this._monthPrev.innerHTML=''+this._options.prevLinkText+"",this._monthNext=document.createElement("div"),this._monthNext.className="ink-calendar-next",this._monthNext.innerHTML=''+this._options.nextLinkText+"",b.appendChild(this._monthPrev),b.appendChild(this._monthDescContainer),b.appendChild(this._monthNext),this._monthContainer=document.createElement("div"),this._monthContainer.className="ink-calendar-month",this._containerObject.appendChild(b),this._containerObject.appendChild(this._monthContainer),this._monthSelector=this._renderMonthSelector(),this._containerObject.appendChild(this._monthSelector),this._yearSelector=document.createElement("ul"),this._yearSelector.className="ink-calendar-year-selector",this._containerObject.appendChild(this._yearSelector),(!this._options.onFocus||this._options.displayInSelect)&&(this._options.pickerField?this._picker=a.elOrSelector(this._options.pickerField,"pickerField"):(this._picker=document.createElement("a"),this._picker.href="#open_cal",this._picker.innerHTML="open",this._element.parentNode.appendChild(this._picker),this._picker.className="ink-datepicker-picker-field")),this._appendDatePickerToDom(),this._renderMonth(),this._monthChanger=document.createElement("a"),this._monthChanger.href="#monthchanger",this._monthChanger.className="ink-calendar-link-month",this._monthChanger.innerHTML=this._options.month[this._month+1],this._ofText=document.createElement("span"),this._ofText.innerHTML=this._options.ofText,this._yearChanger=document.createElement("a"),this._yearChanger.href="#yearchanger",this._yearChanger.className="ink-calendar-link-year",this._yearChanger.innerHTML=this._year,this._monthDescContainer.innerHTML="",this._monthDescContainer.appendChild(this._monthChanger),this._monthDescContainer.appendChild(this._ofText),this._monthDescContainer.appendChild(this._yearChanger),this._options.inline?this.show():this._addOpenCloseEvents(),this._addDateChangeHandlersToInputs() +},_addDateChangeHandlersToInputs:function(){var a=this._element;this._options.displayInSelect&&(a=[this._options.dayField,this._options.monthField,this._options.yearField]),b.observeMulti(a,"change",Ink.bindEvent(function(){this._updateDate(),this._showDefaultView(),this.setDate(),this._inline||this._hoverPicker||this._hide(!0)},this))},show:function(){this._updateDate(),this._renderMonth(),c.removeClassName(this._containerObject,"hide-all")},_addOpenCloseEvents:function(){var a=this._picker||this._element;b.observe(a,"click",Ink.bindEvent(function(a){b.stop(a),this.show()},this)),this._options.autoOpen&&this.show(),this._options.displayInSelect||b.observe(a,"blur",Ink.bindEvent(function(){this._hoverPicker||this._hide(!0)},this)),this._options.shy&&b.observe(document,"click",Ink.bindEvent(function(a){for(var c=b.element(a),e=[this._options.dayField,this._options.monthField,this._options.yearField,this._picker,this._element],f=0,g=e.length;g>f;f++)if(e[f]&&d.descendantOf(e[f],c))return;this._hide(!0)},this))},_renderMonthSelector:function(){var a=document.createElement("ul");a.className="ink-calendar-month-selector";for(var b=document.createElement("ul"),c=1;12>=c;c++)b.appendChild(this._renderMonthButton(c)),c%4===0&&(a.appendChild(b),b=document.createElement("ul"));return a},_renderMonthButton:function(a){var b=document.createElement("li"),c=document.createElement("a");return c.setAttribute("data-cal-month",a),c.innerHTML=this._options.month[a].substring(0,3),b.appendChild(c),b},_appendDatePickerToDom:function(){if(this._options.containerElement){var b=Ink.i(this._options.containerElement)||a.elOrSelector(this._options.containerElement);b.appendChild(this._containerObject)}d.findUpwardsBySelector(this._element,".ink-form .control-group .control")===this._element.parentNode?(this._wrapper=this._element.parentNode,this._wrapperIsControl=!0):(this._wrapper=d.create("div",{className:"ink-datepicker-wrapper"}),d.wrap(this._element,this._wrapper)),d.insertAfter(this._containerObject,this._element)},_renderSuperTopBar:function(){this._options.showClose&&this._options.showClean&&(this._superTopBar=document.createElement("div"),this._superTopBar.className="ink-calendar-top-options",this._options.showClean&&this._superTopBar.appendChild(d.create("a",{className:"clean",setHTML:this._options.cleanText})),this._options.showClose&&this._superTopBar.appendChild(d.create("a",{className:"close",setHTML:this._options.closeText})),this._containerObject.appendChild(this._superTopBar))},_listenToContainerObjectEvents:function(){b.observe(this._containerObject,"mouseover",Ink.bindEvent(function(a){b.stop(a),this._hoverPicker=!0},this)),b.observe(this._containerObject,"mouseout",Ink.bindEvent(function(a){b.stop(a),this._hoverPicker=!1},this)),b.observe(this._containerObject,"click",Ink.bindEvent(this._onClick,this))},_onClick:function(a){var d=b.element(a);return c.hasClassName(d,"ink-calendar-off")?(b.stopDefault(a),null):(b.stop(a),this._onRelativeChangerClick(d),this._onAbsoluteChangerClick(d),c.hasClassName(d,"ink-calendar-link-month")?this._showMonthSelector():c.hasClassName(d,"ink-calendar-link-year")?this._showYearSelector():c.hasClassName(d,"clean")?this._clean():c.hasClassName(d,"close")&&this._hide(!1),void this._updateDescription())},_onRelativeChangerClick:function(a){var b={change_year_next:1,change_year_prev:-1},c={change_month_next:1,change_month_prev:-1};a.className in c?this._updateCal(c[a.className]):a.className in b&&this._showYearSelector(b[a.className])},_onAbsoluteChangerClick:function(a){var b=d.data(a);Number(b.calDay)?(this.setDate([this._year,this._month+1,b.calDay].join("-")),this._hide()):Number(b.calMonth)?(this._month=Number(b.calMonth)-1,this._showDefaultView(),this._updateCal()):Number(b.calYear)&&this._changeYear(Number(b.calYear))},_changeYear:function(a){a=+a,a&&(this._year=a,"function"==typeof this._options.onYearSelected&&this._options.onYearSelected(this,{year:this._year}),this._showMonthSelector())},_clean:function(){this._options.displayInSelect?(this._options.yearField.selectedIndex=0,this._options.monthField.selectedIndex=0,this._options.dayField.selectedIndex=0):this._element.value=""},_hide:function(a){a=void 0===a?!0:a,(a===!1||a&&this._options.shy)&&c.addClassName(this._containerObject,"hide-all")},_setMinMax:function(a){var b=this,c={_year:-Number.MAX_VALUE,_month:0,_day:1},d={_year:Number.MAX_VALUE,_month:11,_day:31};function e(){b._min=c,b._max=d}if(!a)return e();var g=a.split(":"),h=/^(\d{4})((\-)(\d{1,2})((\-)(\d{1,2}))?)?$/;f.each([{name:"_min",date:g[0],noLim:c},{name:"_max",date:g[1],noLim:d}],Ink.bind(function(a){var b=a.noLim;if("NOW"===a.date.toUpperCase()){var c=new Date;b=l(c)}else"EVER"===a.date.toUpperCase()?b=a.noLim:h.test(a.date)&&(b=j(a.date),b._month=i(b._month,0,11),b._day=i(b._day,1,this._daysInMonth(b._year,b._month+1)));this[a.name]=b},this));var k=-1!==this._dateCmp(this._max,this._min);k||e()},_fitDateToRange:function(a){return this._isValidDate(a)||(a=l(new Date)),-1===this._dateCmp(a,this._min)?Ink.extendObj({},this._min):1===this._dateCmp(a,this._max)?Ink.extendObj({},this._max):Ink.extendObj({},a)},_dateWithinRange:function(a){return arguments.length||(a=this),!this._dateAboveMax(a)&&!this._dateBelowMin(a)},_dateAboveMax:function(a){return 1===this._dateCmp(a,this._max)},_dateBelowMin:function(a){return-1===this._dateCmp(a,this._min)},_dateCmp:function(a,b){return this._dateCmpUntil(a,b,"_day")},_dateCmpUntil:function(a,b,c){var d=["_year","_month","_day"],e=-1;do{if(e++,a[d[e]]>b[d[e]])return 1;if(a[d[e]]
  • ",this._yearSelector.innerHTML=d,this._monthPrev.childNodes[0].className="action_inactive",this._monthNext.childNodes[0].className="action_inactive",this._monthSelector.style.display="none",this._monthContainer.style.display="none",this._yearSelector.style.display="block"},_incrementViewingYear:function(a){if(a){var b=+this._year+10*a;b-=b%10,b>this._max._year||b+9"+a+""}return'
  • '+a+"
  • "},_showMonthSelector:function(){this._yearSelector.style.display="none",this._monthContainer.style.display="none",this._monthPrev.childNodes[0].className="action_inactive",this._monthNext.childNodes[0].className="action_inactive",this._addMonthClassNames(),this._monthSelector.style.display="block"},_parseDate:function(a){var b=g.set(this._options.format,a);return b?l(b):null},_isValidDate:function(a){var b=/^\d{4}$/,c=/^\d{1,2}$/;return b.test(a._year)&&c.test(a._month)&&c.test(a._day)&&+a._month+1>=1&&+a._month+1<=12&&+a._day>=1&&+a._day<=this._daysInMonth(a._year,a._month+1)},_isDate:function(a,b){try{if("undefined"==typeof a)return!1;var c=g.set(a,b);if(c&&this._isValidDate(l(c)))return!0}catch(d){}return!1},_acceptableDay:function(a){return this._acceptableDateComponent(a,"validDayFn")},_acceptableMonth:function(a){return this._acceptableDateComponent(a,"validMonthFn")},_acceptableYear:function(a){return this._acceptableDateComponent(a,"validYearFn")},_acceptableDateComponent:function(a,b){return this._options[b]?this._callUserCallbackBool(this._options[b],a):this._dateWithinRange(a)},_writeDateInFormat:function(){return g.get(this._options.format,this.getDate())},setDate:function(a){if(/\d{4}-\d{1,2}-\d{1,2}/.test(a)){var b=a.split("-");this._year=+b[0],this._month=+b[1]-1,this._day=+b[2]}this._setDate()},getDate:function(){if(!this._day)throw"Ink.UI.DatePicker: Still picking a date. Cannot getDate now!";return new Date(this._year,this._month,this._day)},_setDate:function(a){if(a){var b=d.data(a);this._day=+b.calDay||this._day}var c=this._fitDateToRange(this);this._year=c._year,this._month=c._month,this._day=c._day,this._options.displayInSelect?(this._options.dayField.value=this._day,this._options.monthField.value=this._month+1,this._options.yearField.value=this._year):this._element.value=this._writeDateInFormat(),this._options.onSetDate&&this._options.onSetDate(this,{date:this.getDate()})},_updateCal:function(a){"function"==typeof this._options.onMonthSelected&&this._options.onMonthSelected(this,{year:this._year,month:this._month}),a&&null===this._updateMonth(a)||this._renderMonth()},_daysInMonth:function(a,b){var c={2:a%400===0||a%4===0&&a%100!==0?29:28,4:30,6:30,9:30,11:30};return c[b]||31},_updateMonth:function(a){var b;return a>0?b=this._getNextMonth():0>a&&(b=this._getPrevMonth()),b?(this._year=b._year,this._month=b._month,void(this._day=b._day)):null},_getNextMonth:function(a){return this._tryLeap(a,"Month","next",function(a){return a._month+=1,a._month>11&&(a._month=0,a._year+=1),a})},_getPrevMonth:function(a){return this._tryLeap(a,"Month","prev",function(a){return a._month-=1,a._month<0&&(a._month=11,a._year-=1),a})},_getPrevYear:function(a){return this._tryLeap(a,"Year","prev",function(a){return a._year-=1,a})},_getNextYear:function(a){return this._tryLeap(a,"Year","next",function(a){return a._year+=1,a})},_tryLeap:function(a,b,c,d){a=a||{_year:this._year,_month:this._month,_day:this._day};var e="prev"===c?"_min":"_max",f=this[e];if(0===this._dateCmpUntil(a,f,b))return null;var g=this._options[c+"ValidDateFn"];return g?this._callUserCallbackDate(g,a):(a=d(a),a=this._fitDateToRange(a),this["_acceptable"+b](a)?a:null)},_getNextDecade:function(a){a=a||{_year:this._year,_month:this._month,_day:this._day};var b=this._getCurrentDecade(a);return b+10>this._max._year?null:b+10},_getPrevDecade:function(a){a=a||{_year:this._year,_month:this._month,_day:this._day};var b=this._getCurrentDecade(a);return b-10";var e='
  •  
  • ',f=this._getFirstDayIndex(b,a);f>0&&(d+=f,c+=h(f,e)),c+=this._getDayButtonsHtml(b,a),c+="",this._monthContainer.innerHTML=c},_getFirstDayIndex:function(a,b){var c=new Date(a,b,1).getDay(),d=this._options.startWeekDay||0,e=c-d;return e%=7,0>e&&(e+=6),e},_getDayButtonsHtml:function(a,b){for(var c=this._getFirstDayIndex(a,b),d=this._daysInMonth(a,b+1),e="",f=1;d>=f;f++)7===c&&(c=0,e+="
      "),e+=this._getDayButtonHtml(a,b,f),c++,7===c&&(e+="
    ");return e},_getDayButtonHtml:function(a,b,c){var d=" ",e=k(a,b,c);return d+=this._acceptableDay(e)?'data-cal-day="'+c+'"':'class="ink-calendar-off"',this._day&&0===this._dateCmp(e,this)&&(d+='class="ink-calendar-on" data-cal-day="'+c+'"'),'
  • "+c+"
  • "},_getMonthCalendarHeaderHtml:function(a){for(var b='
      ',c,d=0;7>d;d++)c=(a+d)%7,b+="
    • "+this._options.wDay[c].substring(0,1)+"
    • ";return b+"
    "},_addMonthClassNames:function(a){f.forEach((a||this._monthSelector).getElementsByTagName("a"),Ink.bindMethod(this,"_addMonthButtonClassNames"))},_addMonthButtonClassNames:function(a){var b=d.data(a);if(!b.calMonth)throw"not a calendar month button!";var e=+b.calMonth-1;if(e===this._month)c.addClassName(a,"ink-calendar-on"),c.removeClassName(a,"ink-calendar-off");else{c.removeClassName(a,"ink-calendar-on");var f=!this._acceptableMonth({_year:this._year,_month:e});c.addRemoveClassName(a,"ink-calendar-off",f)}},lang:function(a){this._lang=a},showMonth:function(){this._renderMonth()},isMonthRendered:function(){var a=e.select(".ink-calendar-header",this._containerObject)[0];return"none"!==c.getStyle(a.parentNode,"display")&&"none"!==c.getStyle(a.parentNode.parentNode,"display")},destroy:function(){d.unwrap(this._element),d.remove(this._wrapper),d.remove(this._containerObject),a.unregisterInstance.call(this)}},m}),Ink.createModule("Ink.UI.Draggable","1",["Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Browser_1","Ink.Dom.Selector_1","Ink.UI.Common_1"],function(a,b,c,d,e,f){"use strict";var g=0,h=1;function i(a,b,c){return a=Math.min(a,c),a=Math.max(a,b)}var j=function(a,b){this.init(a,b)};return j.prototype={init:function(c,e){var g=Ink.extendObj({constraint:!1,constraintElm:!1,top:!1,right:!1,bottom:!1,left:!1,handle:e.handler||!1,revert:!1,cursor:"move",zindex:e.zindex||9999,dragClass:"drag",onStart:!1,onEnd:!1,onDrag:!1,onChange:!1,droppableProxy:!1,mouseAnchor:void 0,skipChildren:!0,fps:100,debug:!1},e||{},a.data(c));this.options=g,this.element=f.elOrSelector(c),this.constraintElm=g.constraintElm&&f.elOrSelector(g.constraintElm),this.handle=!1,this.elmStartPosition=!1,this.active=!1,this.dragged=!1,this.prevCoords=!1,this.placeholder=!1,this.position=!1,this.zindex=!1,this.firstDrag=!0,g.fps&&(this.deltaMs=1e3/g.fps,this.lastRunAt=0),this.handlers={},this.handlers.start=Ink.bindEvent(this._onStart,this),this.handlers.dragFacade=Ink.bindEvent(this._onDragFacade,this),this.handlers.drag=Ink.bindEvent(this._onDrag,this),this.handlers.end=Ink.bindEvent(this._onEnd,this),this.handlers.selectStart=function(a){return b.stop(a),!1},this.handle=this.options.handle?f.elOrSelector(this.options.handle):this.element,this.handle.style.cursor=g.cursor,b.observe(this.handle,"touchstart",this.handlers.start),b.observe(this.handle,"mousedown",this.handlers.start),d.IE&&b.observe(this.element,"selectstart",this.handlers.selectStart)},destroy:function(){b.stopObserving(this.handle,"touchstart",this.handlers.start),b.stopObserving(this.handle,"mousedown",this.handlers.start),d.IE&&b.stopObserving(this.element,"selectstart",this.handlers.selectStart)},_getCoords:function(b){var c=[a.scrollWidth(),a.scrollHeight()];return{x:(b.touches?b.touches[0].clientX:b.clientX)+c[g],y:(b.touches?b.touches[0].clientY:b.clientY)+c[h]}},_cloneStyle:function(b,d){d.className=b.className,d.style.borderWidth="0",d.style.padding="0",d.style.position="absolute",d.style.width=a.elementWidth(b)+"px",d.style.height=a.elementHeight(b)+"px",d.style.left=a.elementLeft(b)+"px",d.style.top=a.elementTop(b)+"px",d.style.cssFloat=c.getStyle(b,"float"),d.style.display=c.getStyle(b,"display")},_onStart:function(d){if(!this.active&&b.isLeftClick(d)||"undefined"==typeof d.button){var e=b.element(d);if(this.options.skipChildren&&e!==this.handle)return;b.stop(d),c.addClassName(this.element,this.options.dragClass),this.elmStartPosition=[a.elementLeft(this.element),a.elementTop(this.element)];var f=[parseInt(c.getStyle(this.element,"left"),10),parseInt(c.getStyle(this.element,"top"),10)],i=a.elementDimensions(this.element);this.originalPosition=[f[g]?f[g]:null,f[h]?f[h]:null],this.delta=this._getCoords(d),this.active=!0,this.position=c.getStyle(this.element,"position"),this.zindex=c.getStyle(this.element,"zIndex");var j=document.createElement("div");if(j.style.position=this.position,j.style.width=i[g]+"px",j.style.height=i[h]+"px",j.style.marginTop=c.getStyle(this.element,"margin-top"),j.style.marginBottom=c.getStyle(this.element,"margin-bottom"),j.style.marginLeft=c.getStyle(this.element,"margin-left"),j.style.marginRight=c.getStyle(this.element,"margin-right"),j.style.borderWidth="0",j.style.padding="0",j.style.cssFloat=c.getStyle(this.element,"float"),j.style.display=c.getStyle(this.element,"display"),j.style.visibility="hidden",this.delta2=[this.delta.x-this.elmStartPosition[g],this.delta.y-this.elmStartPosition[h]],this.options.mouseAnchor){var k=this.options.mouseAnchor.split(" "),l=[i[g],i[h]];"left"===k[0]?l[g]=0:"center"===k[0]&&(l[g]=parseInt(l[g]/2,10)),"top"===k[1]?l[h]=0:"center"===k[1]&&(l[h]=parseInt(l[h]/2,10)),this.applyDelta=[this.delta2[g]-l[g],this.delta2[h]-l[h]]}var m=this.options.fps?"dragFacade":"drag";if(this.placeholder=j,this.options.onStart&&this.options.onStart(this.element,d),this.options.droppableProxy){this.proxy=document.createElement("div"),i=[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight];var n=this.proxy.style;n.width=i[g]+"px",n.height=i[h]+"px",n.position="fixed",n.left="0",n.top="0",n.zIndex=this.options.zindex+1,n.backgroundColor="#FF0000",c.setOpacity(this.proxy,0);for(var o=document.body.firstChild;o&&1!==o.nodeType;)o=o.nextSibling;document.body.insertBefore(this.proxy,o),b.observe(this.proxy,"mousemove",this.handlers[m]),b.observe(this.proxy,"touchmove",this.handlers[m])}else b.observe(document,"mousemove",this.handlers[m]);return this.element.style.position="absolute",this.element.style.zIndex=this.options.zindex,this.element.parentNode.insertBefore(this.placeholder,this.element),this._onDrag(d),b.observe(document,"mouseup",this.handlers.end),b.observe(document,"touchend",this.handlers.end),!1}},_onDragFacade:function(a){var b=+new Date;(!this.lastRunAt||b>this.lastRunAt+this.deltaMs)&&(this.lastRunAt=b,this._onDrag(a))},_onDrag:function(c){if(this.active){b.stop(c),this.dragged=!0;var d=this._getCoords(c),e=d.x,f=d.y,j=this.options,k=!1,l=!1;if(this.prevCoords&&e!==this.prevCoords.x||f!==this.prevCoords.y){j.onDrag&&j.onDrag(this.element,c),this.prevCoords=d,k=this.elmStartPosition[g]+e-this.delta.x,l=this.elmStartPosition[h]+f-this.delta.y;var m=a.elementDimensions(this.element);if(this.constraintElm){var n=a.offset(this.constraintElm),o=a.elementDimensions(this.constraintElm),p=n[h]+(j.top||0),q=n[h]+o[h]-(j.bottom||0),r=n[g]+(j.left||0),s=n[g]+o[g]-(j.right||0);l=i(l,p,q-m[h]),k=i(k,r,s-m[g])}else if(j.constraint){var t=j.right===!1?a.pageWidth()-m[g]:j.right,u=j.left===!1?0:j.left,v=j.top===!1?0:j.top,w=j.bottom===!1?a.pageHeight()-m[h]:j.bottom;("horizontal"===j.constraint||"both"===j.constraint)&&(k=i(k,u,t)),("vertical"===j.constraint||"both"===j.constraint)&&(l=i(l,v,w))}var x=Ink.getModule("Ink.UI.Droppable_1");if(this.firstDrag&&(x&&x.updateAll(),this.firstDrag=!1),k&&(this.element.style.left=k+"px"),l&&(this.element.style.top=l+"px"),x){var y=this.options.mouseAnchor?{x:e-this.applyDelta[g],y:f-this.applyDelta[h]}:d;x.action(y,"drag",c,this.element)}j.onChange&&j.onChange(this)}}},_onEnd:function(d){if(b.stopObserving(document,"mousemove",this.handlers.drag),b.stopObserving(document,"touchmove",this.handlers.drag),this.options.fps&&this._onDrag(d),c.removeClassName(this.element,this.options.dragClass),this.active&&this.dragged){this.options.droppableProxy&&document.body.removeChild(this.proxy),this.pt&&(a.remove(this.pt),this.pt=void 0),this.placeholder&&a.remove(this.placeholder),this.options.revert&&(this.element.style.position=this.position,this.element.style.zIndex=null!==this.zindex?this.zindex:"auto",this.element.style.left=this.originalPosition[g]?this.originalPosition[g]+"px":"",this.element.style.top=this.originalPosition[h]?this.originalPosition[h]+"px":""),this.options.onEnd&&this.options.onEnd(this.element,d);var e=Ink.getModule("Ink.UI.Droppable_1");e&&e.action(this._getCoords(d),"drop",d,this.element),this.position=!1,this.zindex=!1,this.firstDrag=!0}this.active=!1,this.dragged=!1}},j}),Ink.createModule("Ink.UI.Drawer","1",["Ink.UI.Common_1","Ink.Dom.Loaded_1","Ink.Dom.Selector_1","Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Css_1"],function(a,b,c,d,e,f){"use strict";function g(a){Ink.warn('Ink.UI.Drawer_1: Could not find the "'+a+'" element on this page. Please make sure it exists.')}function h(a){this._init(a)}return h.prototype={_init:function(b){switch(this._options=a.options({parentSelector:["String",".ink-drawer"],leftDrawer:["String",".left-drawer"],leftTrigger:["String",".left-drawer-trigger"],rightDrawer:["String",".right-drawer"],rightTrigger:["String",".right-drawer-trigger"],contentDrawer:["String",".content-drawer"],closeOnContentClick:["Boolean",!0],closeOnLinkClick:["Boolean",!0],mode:["String","push"],sides:["String","both"]},b||{}),this._contentDrawers=Ink.ss(this._options.contentDrawer),this._leftDrawer=Ink.s(this._options.leftDrawer),this._leftTriggers=Ink.ss(this._options.leftTrigger),this._rightDrawer=Ink.s(this._options.rightDrawer),this._rightTriggers=Ink.ss(this._options.rightTrigger),f.addClassName(document.body,"ink-drawer"),0===this._contentDrawers.length&&Ink.warn('Ink.UI.Drawer_1: Could not find any "'+this._options.contentDrawer+'" elements on this page. Please make sure you have at least one.'),this._options.sides){case"both":this._leftDrawer||g(this._options.leftDrawer),0===this._leftTriggers.length&&g(this._options.leftTrigger),this._rightDrawer||g(this._options.rightDrawer),0===this._rightTriggers.length&&g(this._options.rightTrigger),this._triggers=this._options.leftTrigger+", "+this._options.rightTrigger+", "+this._options.contentDrawer;break;case"left":this._leftDrawer||g(this._options.leftDrawer),0===this._leftTriggers.length&&g(this._options.leftTrigger),this._triggers=this._options.leftTrigger+", "+this._options.contentDrawer;break;case"right":this._rightDrawer||g(this._options.rightDrawer),0===this._rightTriggers.length&&g(this._options.rightTrigger),this._triggers=this._options.rightTrigger+", "+this._options.contentDrawer}this._isOpen=!1,this._direction=void 0,this._handlers={click:Ink.bindEvent(this._onClick,this),afterTransition:Ink.bindEvent(this._afterTransition,this)},this._delay=10,this._addEvents()},_onClick:function(a){var b=Ink.bind(function(a){this._isOpen?this.close():this.open(a)},this);c.matchesSelector(a.currentTarget,this._options.leftTrigger)?b("left"):c.matchesSelector(a.currentTarget,this._options.rightTrigger)?b("right"):c.matchesSelector(a.currentTarget,this._options.contentDrawer)&&this._options.closeOnContentClick&&this.close(),this._options.closeOnLinkClick&&d.isLink(a.target)&&this.close()},_afterTransition:function(){this._isOpen||("left"===this._direction?f.removeClassName(this._leftDrawer,"show"):f.removeClassName(this._rightDrawer,"show"))},_addEvents:function(){e.on(document.body,"click",this._triggers+', a[href*="#"]',this._handlers.click)},open:function(a){this._isOpen=!0,this._direction=a;var b="left"===a?this._leftDrawer:this._rightDrawer;f.addClassName(b,"show"),setTimeout(Ink.bind(function(){f.addClassName(document.body,[this._options.mode,a])},this),this._delay)},close:function(){this._isOpen!==!1&&(this._isOpen=!1,e.one(document.body,"transitionend oTransitionEnd transitionend webkitTransitionEnd",this._handlers.afterTransition),f.removeClassName(document.body,[this._options.mode,this._direction]))}},h}),Ink.createModule("Ink.UI.Dropdown","1",["Ink.UI.Common_1","Ink.UI.Toggle_1","Ink.Dom.Event_1","Ink.Dom.Element_1"],function(a,b,c,d){"use strict";function e(a,b){this._init(a,b)}return e.prototype={_init:function(d,e){this._element=a.elOrSelector(d),this._options=a.options("Ink.UI.Dropdown_1",{target:["Element"],hoverOpen:["Number",null],dismissOnInsideClick:["Boolean",!1],dismissOnOutsideClick:["Boolean",!0],dismissAfter:["Number",null],onInsideClick:["Function",null],onOutsideClick:["Function",null],onOpen:["Function",null],onDismiss:["Function",null]},e||{},this._element),this._toggle=new b(this._element,{target:this._options.target,closeOnInsideClick:null,closeOnClick:!1,onChangeState:Ink.bind(function(a){return this._openOrDismiss(a,!0,!0)},this)}),c.observeMulti([this._options.target,this._element],"mouseout",Ink.bindMethod(this,"_onMouseOut")),c.observeMulti([this._options.target,this._element],"mouseover",Ink.bindMethod(this,"_onMouseOver")),c.observe(this._options.target,"click",Ink.bindMethod(this,"_onInsideClick")),c.observe(document,"click",Ink.bindMethod(this,"_onOutsideClick"))},_onMouseOver:function(){"number"==typeof this._options.hoverOpen&&this._toggle.getState()===!1&&(clearTimeout(this._openTimeout),this._openTimeout=setTimeout(Ink.bindMethod(this,"open",!0),1e3*this._options.hoverOpen)),"number"==typeof this._options.dismissAfter&&clearTimeout(this._dismissTimeout)},_onMouseOut:function(){"number"==typeof this._options.dismissAfter&&this._toggle.getState()===!0&&(clearTimeout(this._dismissTimeout),this._dismissTimeout=setTimeout(Ink.bindMethod(this,"dismiss",!0),1e3*this._options.dismissAfter)),"number"==typeof this._options.hoverOpen&&clearTimeout(this._openTimeout)},_onInsideClick:function(a){var b=this._handlerCall("onInsideClick",c.element(a));return b===!1?!1:(this._options.dismissOnInsideClick&&this.dismiss(!0),void c.stop(a))},_onOutsideClick:function(a){var b=c.element(a),e=d.findUpwardsHaving(b,Ink.bind(function(a){return a===this._element},this)),f=d.findUpwardsHaving(b,Ink.bind(function(a){return a===this._options.target},this));if(!e&&!f){var g=this._handlerCall("onOutsideClick",b);if(g===!1)return!1;this._options.dismissOnOutsideClick&&this.dismiss(!0),c.stop(a)}},dismiss:function(a,b){this._openOrDismiss(!1,a,b)},open:function(a,b){this._openOrDismiss(!0,a,b)},_openOrDismiss:function(a,b,c){if(!this._toggle||this._toggle.getState()!==a){if(b&&this._handlerCall(a?"onOpen":"onDismiss")===!1)return!1;c||this._toggle.setState(a),clearTimeout(this._dismissTimeout),clearTimeout(this._openTimeout)}},_handlerCall:function(a){return this._options[a]?this._options[a].call(this,[].slice.call(arguments,1)):void 0}},e}),Ink.createModule("Ink.UI.Droppable","1",["Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.UI.Common_1","Ink.Util.Array_1","Ink.Dom.Selector_1"],function(a,b,c,d,e,f){"use strict";var g=function(a){return function(b){return c.addClassName(a,b)}},h=function(a){return function(b){return c.removeClassName(a,b)}},i={debug:!1,_droppables:[],_draggables:[],add:function(b,c){b=d.elOrSelector(b,"Droppable.add target element");var e=Ink.extendObj({hoverClass:c.hoverclass||!1,accept:!1,onHover:!1,onDrop:!1,onDropOut:!1},c||{},a.data(b));"string"==typeof e.hoverClass&&(e.hoverClass=e.hoverClass.split(/\s+/));function f(a){a.style.position="inherit"}var g=this,h={move:function(a,b){f(a),b.appendChild(a)},copy:function(a,b){f(a),b.appendChild(a.cloneNode)},revert:function(a){g._findDraggable(a).originalParent.appendChild(a),f(a)}},i;if("string"==typeof e.onHover&&(i=e.onHover,e.onHover=h[i],void 0===e.onHover))throw new Error("Unknown hover event handler: "+i);if("string"==typeof e.onDrop&&(i=e.onDrop,e.onDrop=h[i],void 0===e.onDrop))throw new Error("Unknown drop event handler: "+i);if("string"==typeof e.onDropOut&&(i=e.onDropOut,e.onDropOut=h[i],void 0===e.onDropOut))throw new Error("Unknown dropOut event handler: "+i);var j={element:b,data:{},options:e};this._droppables.push(j),this._update(j)},_findData:function(a){for(var b=this._droppables,c=0,d=b.length;d>c;c++)if(b[c].element===a)return b[c]},_findDraggable:function(a){for(var b=this._draggables,c=0,d=b.length;d>c;c++)if(b[c].element===a)return b[c]},updateAll:function(){e.each(this._droppables,i._update)},update:function(a){this._update(this._findData(a))},_update:function(b){var c=b.data,d=b.element;c.left=a.offsetLeft(d),c.top=a.offsetTop(d),c.right=c.left+a.elementWidth(d),c.bottom=c.top+a.elementHeight(d)},remove:function(a){a=d.elOrSelector(a);for(var b=this._droppables.length,c=0;b>c;c++)if(this._droppables[c].element===a){this._droppables.splice(c,1);break}return b!==this._droppables.length},action:function(a,b,c,d){e.each(this._droppables,Ink.bind(function(i){var j=i.data,k=i.options,l=i.element;(!k.accept||f.matches(k.accept,[d]).length)&&("drag"!==b||this._findDraggable(d)||this._draggables.push({element:d,originalParent:d.parentNode}),a.x>=j.left&&a.x<=j.right&&a.y>=j.top&&a.y<=j.bottom?"drag"===b?(k.hoverClass&&e.each(k.hoverClass,g(l)),k.onHover&&k.onHover(d,l)):"drop"===b&&(k.hoverClass&&e.each(k.hoverClass,h(l)),k.onDrop&&k.onDrop(d,l,c)):"drag"===b&&k.hoverClass?e.each(k.hoverClass,h(l)):"drop"===b&&k.onDropOut&&k.onDropOut(d,l,c))},this))}};return i}),Ink.createModule("Ink.UI.FormValidator","1",["Ink.Dom.Element_1","Ink.Dom.Css_1","Ink.Util.Validator_1","Ink.Dom.Selector_1"],function(a,b,c,d){"use strict";function e(a){if(!a.name)return[];if(!a.form)return d.select('name="'+a.name+'"');var b=a.form[a.name];return"undefined"==typeof b.length&&(b=[b]),b}var f={version:"1",_flagMap:{"ink-fv-required":{msg:"Required field"},"ink-fv-email":{msg:"Invalid e-mail address"},"ink-fv-url":{msg:"Invalid URL"},"ink-fv-number":{msg:"Invalid number"},"ink-fv-phone_pt":{msg:"Invalid phone number"},"ink-fv-phone_cv":{msg:"Invalid phone number"},"ink-fv-phone_mz":{msg:"Invalid phone number"},"ink-fv-phone_ao":{msg:"Invalid phone number"},"ink-fv-date":{msg:"Invalid date"},"ink-fv-confirm":{msg:"Confirmation does not match"},"ink-fv-custom":{msg:""}},elements:{},confirmElms:{},hasConfirm:{},_errorClassName:"tip error",_errorValidationClassName:"validaton",_errorTypeWarningClassName:"warning",_errorTypeErrorClassName:"error",validate:function(a,b){if(this._free(),b=Ink.extendObj({onSuccess:!1,onError:!1,customFlag:!1,confirmGroup:[]},b||{}),"string"==typeof a&&(a=document.getElementById(a)),null===a)return!1;this.element=a,("undefined"==typeof this.element.id||null===this.element.id||""===this.element.id)&&(this.element.id="ink-fv_randomid_"+Math.round(99999*Math.random())),this.custom=b.customFlag,this.confirmGroup=b.confirmGroup;var c=this._validateElements();return c.length>0?(b.onError?b.onError(c):this._showError(a,c),!1):(b.onError||this._clearError(a),this._clearCache(),b.onSuccess&&b.onSuccess(),!0)},reset:function(){this._clearError(),this._clearCache()},_free:function(){this.element=null,this.custom=!1,this.confirmGroup=!1},_clearCache:function(){this.element=null,this.elements=[],this.custom=!1,this.confirmGroup=!1},_getElements:function(){var a=this.elements[this.element.id]=[];this.confirmElms[this.element.id]=[];for(var c=d.select(":input",this.element),e=!1,f=0,g=c.length;g>f;f++){e=c[f];var h=(e.getAttribute("type")+"").toLowerCase();if("radio"===h||"checkbox"===h){if(0===a.length||e.getAttribute("type")!==a[a.length-1].getAttribute("type")&&e.getAttribute("name")!==a[a.length-1].getAttribute("name"))for(var i in this._flagMap)if(b.hasClassName(e,i)){a.push(e); +break}}else{for(var j in this._flagMap)if(b.hasClassName(e,j)&&"ink-fv-confirm"!==j){a.push(e);break}b.hasClassName(e,"ink-fv-confirm")&&(this.confirmElms[this.element.id].push(e),this.hasConfirm[this.element.id]=!0)}}},_validateElements:function(){var a;this._getElements(),this.hasConfirm[this.element.id]===!0&&(a=this._makeConfirmGroups());for(var c=[],d=!1,e=!1,f,g=0,h=this.elements[this.element.id].length;h>g;g++)if(f=!1,d=this.elements[this.element.id][g],!d.disabled)for(var i in this._flagMap)if(b.hasClassName(d,i))if("ink-fv-custom"!==i&&"ink-fv-confirm"!==i)this._isValid(d,i)||(f?c[c.length-1].errors.push(i):(c.push({elm:d,errors:[i]}),f=!0));else if("ink-fv-confirm"!==i)e=this._isCustomValid(d),e.length>0&&c.push({elm:d,errors:[i],custom:e});else if("ink-fv-confirm"===i)continue;return c=this._validateConfirmGroups(a,c)},_validateConfirmGroups:function(a,b){var c=!1;for(var d in a)a.hasOwnProperty(d)&&(c=a[d],2===c.length&&c[0].value!==c[1].value&&b.push({elm:c[1],errors:["ink-fv-confirm"]}));return b},_makeConfirmGroups:function(){var a;if(this.confirmGroup&&this.confirmGroup.length>0){a={};for(var c=!1,d=!1,e=0,f=this.confirmElms[this.element.id].length;f>e;e++){c=this.confirmElms[this.element.id][e];for(var g=0,h=this.confirmGroup.length;h>g;g++)d=this.confirmGroup[g],b.hasClassName(c,d)&&("undefined"==typeof a[d]?a[d]=[c]:a[d].push(c))}return a}return 2===this.confirmElms[this.element.id].length&&(a={"ink-fv-confirm":[this.confirmElms[this.element.id][0],this.confirmElms[this.element.id][1]]}),a;return!1},_isCustomValid:function(a){for(var c=[],d=!1,e=0,f=this.custom.length;f>e;e++)d=this.custom[e],b.hasClassName(a,d.flag)&&(d.callback(a,d.msg)||c.push({flag:d.flag,msg:d.msg}));return c},_isValid:function(a,d){var f=a.nodeName.toLowerCase(),g=(a.getAttribute("type")||"").toLowerCase(),h=this._trim(a.value);if("ink-fv-required"!==d&&"checkbox"!==g&&"radio"!==g&&""===h)return!b.hasClassName(a,"ink-fv-required");switch(d){case"ink-fv-required":if("select"===f)return a.selectedIndex>0?!0:!1;if("checkbox"!==g&&"radio"!==g&&""!==h)return!0;if("checkbox"===g||"radio"===g){for(var i=e(a),j=!1,k=0,l=i.length;l>k;k++)if(i[k].checked===!0){j=!0;break}return j}return!1;case"ink-fv-email":return c.mail(a.value);case"ink-fv-url":return c.url(a.value);case"ink-fv-number":return!isNaN(Number(a.value))&&isFinite(Number(a.value));case"ink-fv-phone_pt":return c.isPTPhone(a.value);case"ink-fv-phone_cv":return c.isCVPhone(a.value);case"ink-fv-phone_ao":return c.isAOPhone(a.value);case"ink-fv-phone_mz":return c.isMZPhone(a.value);case"ink-fv-date":var m=Ink.getModule("Ink.Dom.Element",1),n=m.data(a),o="yyyy-mm-dd";if(b.hasClassName(a,"ink-datepicker")&&"format"in n?o=n.format:"validFormat"in n&&(o=n.validFormat),!(o in c._dateParsers)){var p=[];for(var q in c._dateParsers)c._dateParsers.hasOwnProperty(q)&&p.push(q);throw new Error("The attribute data-valid-format must be one of the following values: "+p.join(", "))}return c.isDate(o,a.value);case"ink-fv-custom":}return!1},_showError:function(a,b){this._clearError(a);for(var c=!1,d=0,e=b.length;e>d;d++)c=b[d].elm,c&&this._showAnErrorOnElement(c,b[d])},_showAnErrorOnElement:function(c,d){var e=a.findUpwardsByClass(c,"control-group"),f=a.findUpwardsByClass(c,"control"),g=[this._errorClassName,this._errorTypeClassName].join(" "),h=a.create("p",{className:g});h.innerHTML="ink-fv-custom"!==d.errors[0]?this._flagMap[d.errors[0]].msg:d.custom[0].msg;var i=f||e;i?i.appendChild(h):a.insertAfter(h,c),f&&("ink-fv-required"===d.errors[0]?b.addClassName(e,"validation error"):b.addClassName(e,"validation warning"))},_clearError:function(c){for(var d=c.getElementsByTagName("p"),e,f,g=d.length-1;g>=0;g--)e=d[g],b.hasClassName(e,this._errorClassName)&&(f=a.findUpwardsBySelector(e,".control-group"),f&&b.removeClassName(f,["validation","error","warning"]),b.hasClassName(e,this._errorClassName,!0)&&a.remove(e));var h=c.getElementsByTagName("ul");for(g=h.length-1;g>=0;g--)e=h[g],b.hasClassName(e,"control-group")&&b.removeClassName(e,"validation error")},_trim:function(a){return"string"==typeof a?a.replace(/^\s+|\s+$|\n+$/g,""):void 0}};return f}),Ink.createModule("Ink.UI.FormValidator","2",["Ink.UI.Common_1","Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Selector_1","Ink.Dom.Css_1","Ink.Util.Array_1","Ink.Util.I18n_1","Ink.Util.Validator_1"],function(a,b,c,d,e,f,g,h){"use strict";var i={required:function(a){return"undefined"!=typeof a&&!/^\s*$/.test(a)},min_length:function(a,b){return"string"==typeof a&&a.length>=parseInt(b,10)},max_length:function(a,b){return"string"==typeof a&&a.length<=parseInt(b,10)},exact_length:function(a,b){return"string"==typeof a&&a.length===parseInt(b,10)},email:function(a){return"string"==typeof a&&h.mail(a)},url:function(a,b){return b=b||!1,"string"==typeof a&&h.url(a,b)},ip:function(a,b){return"string"!=typeof a?!1:h.isIP(a,b)},phone:function(a,b){if("string"!=typeof a)return!1;var c=b?b.toUpperCase():"";return h["is"+c+"Phone"](a)},credit_card:function(a,b){return"string"!=typeof a?!1:h.isCreditCard(a,b||"default")},date:function(a,b){return"string"==typeof a&&h.isDate(b,a)},alpha:function(a,b){return h.ascii(a,{singleLineWhitespace:b})},text:function(a,b,c){return h.unicode(a,{singleLineWhitespace:b,unicodePunctuation:c})},latin:function(a,b,c){return"string"!=typeof a?!1:h.latin1(a,{latin1Punctuation:b,singleLineWhitespace:c})},alpha_numeric:function(a){return h.ascii(a,{numbers:!0})},alpha_dash:function(a){return h.ascii(a,{dash:!0,underscore:!0})},digit:function(a){return"string"==typeof a&&/^[0-9]{1}$/.test(a)},integer:function(a,b){return h.number(a,{negative:!b,decimalPlaces:0})},decimal:function(a,b,c,d){return h.number(a,{decimalSep:b||".",decimalPlaces:+c||null,maxDigits:+d})},numeric:function(a,b,c,d){return b=b||".",-1!==a.indexOf(b)?i.decimal(a,b,c,d):i.integer(a)},range:function(a,b,c,d){return a=+a,b=+b,c=+c,isNaN(a)||isNaN(b)||isNaN(c)?!1:b>a||a>c?!1:d?(a-b)%d===0:!0},color:function(a){return h.isColor(a)},matches:function(a,b){return a===this.getFormElements()[b][0].getValue()}},j=new g({en_US:{"formvalidator.required":"The {field} filling is mandatory","formvalidator.min_length":"The {field} must have a minimum size of {param1} characters","formvalidator.max_length":"The {field} must have a maximum size of {param1} characters","formvalidator.exact_length":"The {field} must have an exact size of {param1} characters","formvalidator.email":"The {field} must have a valid e-mail address","formvalidator.url":"The {field} must have a valid URL","formvalidator.ip":"The {field} does not contain a valid {param1} IP address","formvalidator.phone":"The {field} does not contain a valid {param1} phone number","formvalidator.credit_card":"The {field} does not contain a valid {param1} credit card","formvalidator.date":"The {field} should contain a date in the {param1} format","formvalidator.alpha":"The {field} should only contain letters","formvalidator.text":"The {field} should only contain alphabetic characters","formvalidator.latin":"The {field} should only contain alphabetic characters","formvalidator.alpha_numeric":"The {field} should only contain letters or numbers","formvalidator.alpha_dashes":"The {field} should only contain letters or dashes","formvalidator.digit":"The {field} should only contain a digit","formvalidator.integer":"The {field} should only contain an integer","formvalidator.decimal":"The {field} should contain a valid decimal number","formvalidator.numeric":"The {field} should contain a number","formvalidator.range":"The {field} should contain a number between {param1} and {param2}","formvalidator.color":"The {field} should contain a valid color","formvalidator.matches":"The {field} should match the field {param1}","formvalidator.validation_function_not_found":"The rule {rule} has not been defined"},pt_PT:{"formvalidator.required":"Preencher {field} é obrigatório","formvalidator.min_length":"{field} deve ter no mínimo {param1} caracteres","formvalidator.max_length":"{field} tem um tamanho máximo de {param1} caracteres","formvalidator.exact_length":"{field} devia ter exactamente {param1} caracteres","formvalidator.email":"{field} deve ser um e-mail válido","formvalidator.url":"O {field} deve ser um URL válido","formvalidator.ip":"{field} não tem um endereço IP {param1} válido","formvalidator.phone":"{field} deve ser preenchido com um número de telefone {param1} válido.","formvalidator.credit_card":"{field} não tem um cartão de crédito {param1} válido","formvalidator.date":"{field} deve conter uma data no formato {param1}","formvalidator.alpha":"O campo {field} deve conter apenas caracteres alfabéticos","formvalidator.text":"O campo {field} deve conter apenas caracteres alfabéticos","formvalidator.latin":"O campo {field} deve conter apenas caracteres alfabéticos","formvalidator.alpha_numeric":"{field} deve conter apenas letras e números","formvalidator.alpha_dashes":"{field} deve conter apenas letras e traços","formvalidator.digit":"{field} destina-se a ser preenchido com apenas um dígito","formvalidator.integer":"{field} deve conter um número inteiro","formvalidator.decimal":"{field} deve conter um número válido","formvalidator.numeric":"{field} deve conter um número válido","formvalidator.range":"{field} deve conter um número entre {param1} e {param2}","formvalidator.color":"{field} deve conter uma cor válida","formvalidator.matches":"{field} deve corresponder ao campo {param1}","formvalidator.validation_function_not_found":"[A regra {rule} não foi definida]"}},"en_US"),k=function(c,d){this._element=a.elOrSelector(c,"Invalid FormElement"),this._errors={},this._rules={},this._value=null,this._options=Ink.extendObj({label:this._getLabel()},b.data(this._element)),this._options=Ink.extendObj(this._options,d||{})};k.prototype={_getLabel:function(){var a=b.findUpwardsByClass(this._element,"control-group"),c=Ink.s("label",a);return c=c?b.textContent(c):this._element.name||this._element.id||""},_parseRules:function(a){this._rules={},a=a.split("|");var b,c=a.length,d,e,f;if(c>0)for(b=0;c>b;b++)if(d=a[b])if(-1!==(f=d.indexOf("["))){e=d.substr(f+1),e=e.split("]"),e=e[0],e=e.split(",");for(var g=0,h=e.length;h>g;g++)e[g]="true"===e[g]?!0:"false"===e[g]?!1:e[g];e.splice(0,0,this.getValue()),d=d.substr(0,f),this._rules[d]=e}else this._rules[d]=[this.getValue()]},_addError:function(a){for(var b=this._rules[a]||[],c={field:this._options.label,value:this.getValue()},d=1;d"),this._errorMessages.push(f)},this)),!1)}},l}),Ink.createModule("Ink.UI.ImageQuery","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Util.Array_1"],function(a,b,c,d){"use strict";var e=function(b,d){this._element=a.elsOrSelector(b,"Ink.UI.ImageQuery",!0);for(var f=1;f1&&"retina"in this._options&&(b=a.retina||this._options.retina),a.file=this._filename,"function"==typeof b&&(b=b.apply(this,[this._element,a]),"string"!=typeof b))throw'[ImageQuery] :: "src" callback does not return a string';b=b.replace(/{:(.*?)}/g,function(b,c){return a[c]}),this._element.src=b,delete a.file}},_findCurrentQuery:function(){for(var a=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,b=this._options.queries,c=b.length-1,d=0;c>d;d+=1)if(b[d].width<=a)return b[d];return b[c]},_onLoad:function(){this._options.onLoad.call(this)}},e}),Ink.createModule("Ink.UI.LazyLoad","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1"],function(a,b,c){"use strict";var d=function(a,b){this._init(a,b)};return d.prototype={_init:function(b){this._rootElm=a.elsOrSelector(b,"Ink.UI.LazyLoad root element")[0]||null,this._options=a.options({item:["String",".lazyload-item"],placeholder:["String",null],source:["String","data-src"],destination:["String","src"],delay:["Number",100],delta:["Number",0],image:["Boolean",!0],scrollElement:["Element",window],touchEvents:["Boolean",!0],onInsideViewport:["Function",!1],onAfterAttributeChange:["Function",!1],autoInit:["Boolean",!0]},arguments[1]||{},this._rootElm),this._aData=[],this._hasEvents=!1,this._options.autoInit&&this._activate()},_activate:function(){this._getData(),this._hasEvents||this._addEvents(),this._onScrollThrottled()},_getData:function(){for(var a=Ink.ss(this._options.item),b=null,d=0,e=a.length;e>d;d++)null==this._options.placeholder||c.hasAttribute(a[d],this._options.destination)||a[d].setAttribute(this._options.destination,this._options.placeholder),b=a[d].getAttribute(this._options.source),null===b&&this._options.image||this._aData.push({elm:a[d],original:b})},_addEvents:function(){this._onScrollThrottled=b.throttle(Ink.bindEvent(this._onScroll,this),this._options.delay),"ontouchmove"in document.documentElement&&this._options.touchEvents&&b.observe(document.documentElement,"touchmove",this._onScrollThrottled),b.observe(this._options.scrollElement,"scroll",this._onScrollThrottled),this._hasEvents=!0},_removeEvents:function(){"ontouchmove"in document.documentElement&&this._options.touchEvents&&b.stopObserving(document.documentElement,"touchmove",this._onScrollThrottled),b.stopObserving(this._options.scrollElement,"scroll",this._onScrollThrottled),this._hasEvents=!1},_onScroll:function(){for(var a,b=0;bthis.originalStatus[c]?this._modalDivStyle[i(c)]:Math.round(.9*b[c])+"px")},this)),this._resizeContainer(),this._reposition(),this._resizeTimeout=void 0},_onShadeClick:function(a){var f=b.element(a);if(c.hasClassName(f,"ink-close")||c.hasClassName(f,"ink-dismiss")||d.findUpwardsBySelector(f,".ink-close,.ink-dismiss")||this._options.closeOnClick&&(!d.descendantOf(this._shadeElement,f)||f===this._shadeElement)){for(var g=e.select(".ink-alert",this._shadeElement),h=g.length,i=0;h>i;i++)if(d.descendantOf(g[i],f))return;this.dismiss(),this._wasDismissed&&b.stop(a)}},_onKeyDown:function(a){27!==a.keyCode||this._wasDismissed||"true"===this._options.closeOnEscape.toString()&&j[j.length-1]===this&&(this.dismiss(),this._wasDismissed&&b.stop(a))},_resizeContainer:function(){this._contentElement.style.overflow=this._contentElement.style.overflowX=this._contentElement.style.overflowY="hidden";var a=d.elementHeight(this._modalDiv);this._modalHeader=e.select(".modal-header",this._modalDiv)[0],this._modalHeader&&(a-=d.elementHeight(this._modalHeader)),this._modalFooter=e.select(".modal-footer",this._modalDiv)[0],this._modalFooter&&(a-=d.elementHeight(this._modalFooter)),this._contentContainer.style.height=a+"px",a!==d.elementHeight(this._contentContainer)&&(this._contentContainer.style.height=~~(a-(d.elementHeight(this._contentContainer)-a))+"px"),this._markupMode||(this._contentContainer.style.overflow=this._contentContainer.style.overflowX="hidden",this._contentContainer.style.overflowY="auto",this._contentElement.style.overflow=this._contentElement.style.overflowX=this._contentElement.style.overflowY="visible")},_disableScroll:function(){var a=document.documentElement;this._oldHtmlOverflows=[a.style.overflowX,a.style.overflowY],a.style.overflowX=a.style.overflowY="hidden"},open:function(e){e&&b.stop(e);var g="CSS1Compat"===document.compatMode?document.documentElement:document.body;this._resizeTimeout=null,c.addClassName(this._modalShadow,"ink-shade"),this._modalShadowStyle.display=this._modalDivStyle.display="block",setTimeout(Ink.bind(function(){c.addClassName(this._modalShadow,"visible"),c.addClassName(this._modalDiv,"visible")},this),100),this._contentElement=this._modalDiv,this._shadeElement=this._modalShadow,this._markupMode||this.setContentMarkup(this._options.markup);var k={width:-1!==(""+this._options.width).indexOf("%"),height:-1!==(""+this._options.height).indexOf("%")};f.forEach(["width","height"],Ink.bind(function(a){void 0!==this._options[a]?(this._modalDivStyle[a]=this._options[a],k[a]||(this._modalDivStyle[i(a)]=d["element"+h(a)](this._modalDiv)+"px")):this._modalDivStyle[i(a)]=d["element"+h(a)](this._modalDiv)+"px",k[a]&&parseInt(g["client"+i(a)],10)<=parseInt(this._modalDivStyle[a],10)&&(this._modalDivStyle[a]=Math.round(.9*parseInt(g["client"+i(a)],10))+"px")},this)),this.originalStatus={viewportHeight:d.elementHeight(g),viewportWidth:d.elementWidth(g),height:d.elementHeight(this._modalDiv),width:d.elementWidth(this._modalDiv)},"true"===this._options.responsive.toString()?(this._onResize(!0),b.observe(window,"resize",this._handlers.resize)):(this._resizeContainer(),this._reposition()),this._options.onShow&&this._options.onShow(this),"true"===this._options.disableScroll.toString()&&this._disableScroll(),b.observe(this._shadeElement,"click",this._handlers.click),"true"===this._options.closeOnEscape.toString()&&b.observe(document,"keydown",this._handlers.keyDown),a.registerInstance(this,this._shadeElement,"modal"),this._wasDismissed=!1,j.push(this),c.addClassName(document.documentElement,"ink-modal-is-open")},dismiss:function(){if(!this._wasDismissed){if(this._options.onDismiss){var a=this._options.onDismiss(this);if(a===!1)return}if(this._wasDismissed=!0,this._options.responsive&&b.stopObserving(window,"resize",this._handlers.resize),this._markupMode?(c.removeClassName(this._modalDiv,"visible"),c.removeClassName(this._modalShadow,"visible"),this._waitForFade(this._modalShadow,Ink.bind(function(){this._modalShadowStyle.display="none"},this))):(this._modalShadow.parentNode.removeChild(this._modalShadow),this.destroy()),j=f.remove(j,f.keyValue(this,j),1),0===j.length){var d=document.documentElement;this._options.disableScroll&&(d.style.overflowX=this._oldHtmlOverflows[0],d.style.overflowY=this._oldHtmlOverflows[1]),c.removeClassName(d,"ink-modal-is-open")}}},_waitForFade:function(a,d){if(!g)return d();for(var e=["transitionEnd","oTransitionEnd","webkitTransitionEnd"],f,h,i=0,j=e.length;j>i;i++)if(h=e[i],f="on"+h.toLowerCase(),f in a)return void b.observeOnce(a,h,d);var k=function(){+c.getStyle(a,"opacity")>0?setTimeout(k,250):d()};setTimeout(k,500)},destroy:function(){a.unregisterInstance(this._instanceId)},getContentElement:function(){return this._contentContainer},setContentMarkup:function(a){if(this._markupMode)this._contentContainer.innerHTML=a;else{if(this._modalDiv.innerHTML=[a].join(""),this._contentContainer=e.select(".modal-body",this._modalDiv),!this._contentContainer.length){var b=e.select(".modal-header",this._modalDiv),g=e.select(".modal-footer",this._modalDiv);f.each(b,d.remove),f.each(g,d.remove);var h=document.createElement("div");c.addClassName(h,"modal-body"),h.innerHTML=this._modalDiv.innerHTML,this._modalDiv.innerHTML="";var i=b.concat([h]).concat(g);f.each(i,Ink.bindMethod(this._modalDiv,"appendChild")),this._contentContainer=e.select(".modal-body",this._modalDiv)}this._contentContainer=this._contentContainer[0]}this._contentElement=this._modalDiv,this._resizeContainer()}},k}),Ink.createModule("Ink.UI.Pagination","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1"],function(a,b,c,d,e){"use strict";var f=function(a,b,c){var d=document.createElement("a");if(d.setAttribute("href","#"),"number"==typeof b&&d.setAttribute("data-index",b),c&&c.wrapText){var e=document.createElement("span");d.appendChild(e),e.innerHTML=a}else d.innerHTML=a;return d},g=function(b,c){this._element=a.elOrSelector(b,"Ink.UI.Pagination element"),this._options=a.options("Ink.UI.Pagination_1",{size:["Integer",null],totalItemCount:["Integer",null],itemsPerPage:["Integer",null],maxSize:["Integer",null],start:["Integer",1],sideButtons:["Boolean",1],firstLabel:["String","First"],lastLabel:["String","Last"],previousLabel:["String","Previous"],nextLabel:["String","Next"],previousPageLabel:["String",null],nextPageLabel:["String",null],onChange:["Function",void 0],hashParameter:["String","page"],parentTag:["String","ul"],childTag:["String","li"],wrapperClass:["String","ink-navigation"],paginationClass:["String","pagination"],activeClass:["String","active"],disabledClass:["String","disabled"],hideClass:["String","hide-all"],previousClass:["String","previous"],previousPageClass:["String","previousPage"],nextClass:["String","next"],nextPageClass:["String","nextPage"],numberFormatter:["Function",function(a){return a+1}]},c||{},this._element),this._options.previousPageLabel||(this._options.previousPageLabel=this._options.previousLabel+" "+this._options.maxSize),this._options.nextPageLabel||(this._options.nextPageLabel=this._options.nextLabel+" "+this._options.maxSize),this._handlers={click:Ink.bindEvent(this._onClick,this)},a.isInteger(this._options.totalItemCount)&&a.isInteger(this._options.itemsPerPage)?this._size=this._calculateSize(this._options.totalItemCount,this._options.itemsPerPage):a.isInteger(this._options.size)?this._size=this._options.size:(Ink.error("Ink.UI.Pagination: Please supply a size option or totalItemCount and itemsPerPage options."),this._size=0),this.setOnChange(this._options.onChange),this._current=this._options.start-1,this._itemLiEls=[],this._init()};return g.prototype={_init:function(){this._generateMarkup(this._element),this._updateItems(),this._observe(),a.registerInstance(this,this._element,"pagination")},_observe:function(){b.observeDelegated(this._element,"click","."+this._options.paginationClass+" > "+this._options.childTag,this._handlers.click)},_calculateSize:function(a,b){return Math.ceil(a/b)},_updateItems:function(){var a=this._itemLiEls,b=this._size===a.length,d,e,g;if(b)for(d=0,e=this._size;e>d;++d)c.setClassName(a[d],this._options.activeClass,d===this._current);else{for(d=a.length-1;d>=0;--d)this._ulEl.removeChild(a[d]);for(a=[],d=0,e=this._size;e>d;++d)g=document.createElement(this._options.childTag),g.appendChild(f(this._options.numberFormatter(d),d)),c.setClassName(g,this._options.activeClass,d===this._current),this._ulEl.insertBefore(g,this._nextEl),a.push(g);this._itemLiEls=a}if(this._options.maxSize){var h=Math.floor(this._current/this._options.maxSize),i=this._options.maxSize*h,j=i+this._options.maxSize-1;for(d=0,e=this._size;e>d;++d)g=a[d],c.setClassName(g,this._options.hideClass,i>d||d>j);this._pageStart=i,this._pageEnd=j,this._page=h,c.setClassName(this._prevPageEl,this._options.disabledClass,!this.hasPreviousPage()),c.setClassName(this._nextPageEl,this._options.disabledClass,!this.hasNextPage()),c.setClassName(this._firstEl,this._options.disabledClass,this.isFirst()),c.setClassName(this._lastEl,this._options.disabledClass,this.isLast())}this._prevEl&&c.setClassName(this._prevEl,this._options.disabledClass,!this.hasPrevious()),this._nextEl&&c.setClassName(this._nextEl,this._options.disabledClass,!this.hasNext())},_generateMarkup:function(a){c.addClassName(a,"ink-navigation");var b=Ink.s("."+this._options.paginationClass,a),d=!1;b?d=!0:(b=document.createElement(this._options.parentTag),c.addClassName(b,this._options.paginationClass));var e=c.hasClassName(b,"chevron"),g=c.hasClassName(b,"dotted"),h=Ink.bind(function(a,d){var e=document.createElement(this._options.childTag),g=f(this._options[a+"Label"],void 0,{wrapText:d&&d.wrapText});return c.addClassName(e,this._options[a+"Class"]),e.appendChild(g),b.appendChild(e),e},this);!g&&this._options.maxSize&&(this._firstEl=h("first"),this._prevPageEl=h("previousPage")),(g&&this._options.sideButtons===!0||!g&&this._options.sideButtons)&&(this._prevEl=h("previous",{wrapText:e}),this._nextEl=h("next",{wrapText:e})),!g&&this._options.maxSize&&(this._nextPageEl=h("nextPage"),this._lastEl=h("last")),d||a.appendChild(b),this._ulEl=b},_onClick:function(a){b.stop(a);var d=b.element(a);if(!c.hasClassName(d,this._options.activeClass)&&!c.hasClassName(d,this._options.disabledClass)){var f=c.hasClassName(d,this._options.previousClass),g=c.hasClassName(d,this._options.nextClass),h=c.hasClassName(d,this._options.previousPageClass),i=c.hasClassName(d,this._options.nextPageClass),j=c.hasClassName(d,this._options.firstClass),k=c.hasClassName(d,this._options.lastClass); +if(j)this.setCurrent(0);else if(k)this.setCurrent(this._size-1);else if(h||i)this.setCurrent((h?-1:1)*this._options.maxSize,!0);else if(f||g)this.setCurrent(f?-1:1,!0);else{var l=e.select("[data-index]",d)[0],m=l&&parseInt(l.getAttribute("data-index"),10);this.setCurrent(m)}}},setOnChange:function(a){if(void 0!==a&&"function"!=typeof a)throw new TypeError("onChange option must be a function!");this._onChange=a},setSize:function(b){if(!a.isInteger(b))throw new TypeError("1st argument must be an integer number!");this._size=b,this._updateItems(),this._current=0},setSizeInItems:function(a,b){var c=Math.ceil(a/b);this.setSize(c)},setCurrent:function(b,c){if(!a.isInteger(b))throw new TypeError("1st argument must be an integer number!");c&&(b+=this._current),b>this._size-1&&(b=this._size-1),0>b&&(b=0),this._current=b,this._updateItems(),this._onChange&&this._onChange(this,b)},getSize:function(){return this._size},getCurrent:function(){return this._current},isFirst:function(){return 0===this._current},isLast:function(){return this._current===this._size-1},hasPrevious:function(){return this._current>0},hasNext:function(){return this._currentthis._options.maxSize-1},hasNextPage:function(){return this._options.maxSize&&this._size-this._current>=this._options.maxSize+1},destroy:a.destroyComponent},g}),Ink.createModule("Ink.UI.ProgressBar","1",["Ink.UI.Common_1","Ink.Dom.Selector_1","Ink.Dom.Element_1"],function(a,b,c){"use strict";var d=function(b,d){this._element=a.elOrSelector(b),this._options=Ink.extendObj({startValue:0,onStart:function(){},onEnd:function(){}},c.data(this._element)),this._options=Ink.extendObj(this._options,d||{}),this._value=this._options.startValue,this._init()};return d.prototype={_init:function(){if(this._elementBar=b.select(".bar",this._element),this._elementBar.length<1)throw"[Ink.UI.ProgressBar] :: Bar element not found";this._elementBar=this._elementBar[0],this._options.onStart=Ink.bind(this._options.onStart,this),this._options.onEnd=Ink.bind(this._options.onEnd,this),this.setValue(this._options.startValue)},setValue:function(a){this._options.onStart(this._value),a=parseInt(a,10),isNaN(a)||0>a?a=0:a>100&&(a=100),this._value=a,this._elementBar.style.width=this._value+"%",this._options.onEnd(this._value)}},d}),Ink.createModule("Ink.UI.SmoothScroller","1",["Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Dom.Loaded_1"],function(a,b,c,d){"use strict";var e=window.requestAnimationFrame||function(a){return setTimeout(a,10)},f=window.cancelAnimationFrame||function(a){clearTimeout(a)},g={speed:10,getTop:function(a){return Math.round(g.scrollTop()+a.getBoundingClientRect().top)},scrollTop:function(){var a=document.body,b=document.documentElement;return a&&a.scrollTop?a.scrollTop:b&&b.scrollTop?b.scrollTop:window.pageYOffset?window.pageYOffset:0},add:function(b,c,d){a.observe(b,c,d)},end:function(b){a.stopDefault(b)},scroll:function(a,b){var c=g.scrollTop(),d=b.margin||0,h=a-d;c+=h>c?Math.ceil((h-c)/g.speed):(h-c)/g.speed,f(g.interval),c!==h&&g.offsetTop!==c?g.interval=e(Ink.bindMethod(g,"scroll",a,b),document.body):g.onDone(),window.scrollTo(0,c),g.offsetTop=c},init:function(a){d.run(Ink.bindMethod(g,"render",a))},render:function(b){for(var d=c.select(b||"a.scrollableLink,a.ink-smooth-scroll"),e=0;e li.active > "+j,j='a[name="'+h+'"],#'+h,k=c.select(j)[0],l=c.select(i)[0];if(l=l&&l.parentNode,"undefined"!=typeof k){-1===d.parentNode.className.indexOf("active")&&(l&&(l.className=l.className.replace(/(^|\s+)active($|\s+)/g,"")),d.parentNode.className+=" active"),g.hash=h;var m={};parseFloat(f.margin)&&(m.margin=parseFloat(f.margin)),g.scroll(g.getTop(k),m)}}},onDone:function(){window.location.hash=g.hash}};return g}),Ink.createModule("Ink.UI.SortableList","1",["Ink.UI.Common_1","Ink.Dom.Css_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Selector_1"],function(a,b,c,d,e){"use strict";var f="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,g=function(b,c){this._element=a.elOrSelector(b,"Ink.UI.SortableList"),this._options=a.options("Sortable",{placeholderClass:["String","placeholder"],draggedClass:["String","hide-all"],draggingClass:["String","dragging"],dragSelector:["String","li"],dragObject:["String",null],handleSelector:["String",null],moveSelector:["String",!1],swap:["Boolean",!1],cancelMouseOut:["Boolean",!1]},c||{},this._element),null!=this._options.dragObject&&(Ink.warn("Ink.UI.SortableList: options.dragObject is now deprecated. Please use options.handleSelector instead."),this._options.handleSelector=this._options.handleSelector||this._options.dragObject),this._handlers={down:Ink.bind(this._onDown,this),move:Ink.bind(this._onMove,this),up:Ink.bind(this._onUp,this)},this._isMoving=!1,this._init()};return g.prototype={_init:function(){this._down=f?"touchstart mousedown":"mousedown",this._move=f?"touchmove mousemove":"mousemove",this._up=f?"touchend mouseup":"mouseup",this._observe(),a.registerInstance(this,this._element,"sortableList")},_observe:function(){c.on(this._element,this._down,this._options.dragSelector,this._handlers.down),c.on(this._element,this._move,this._options.dragSelector,this._handlers.move),this._options.cancelMouseOut&&c.on(this._element,"mouseleave",Ink.bind(this.stopMoving,this)),c.on(document.documentElement,this._up,this._handlers.up)},_onDown:function(a){if(!(this._isMoving||this._placeholder||this._options.handleSelector&&!e.matchesSelector(a.target,this._options.handleSelector))){var b=a.currentTarget;return this._isMoving=b,this._placeholder=b.cloneNode(!0),this._movePlaceholder(b),this._addMovingClasses(),!1}},_onMove:function(a){return this.validateMove(a.currentTarget),!1},_onUp:function(a){return this._isMoving&&this._placeholder&&a.currentTarget!==this._isMoving&&a.currentTarget!==this._placeholder?(d.insertBefore(this._isMoving,this._placeholder),this.stopMoving(),!1):void 0},_addMovingClasses:function(){b.addClassName(this._placeholder,this._options.placeholderClass),b.addClassName(this._isMoving,this._options.draggedClass),b.addClassName(document.documentElement,this._options.draggingClass)},_removeMovingClasses:function(){this._isMoving&&b.removeClassName(this._isMoving,this._options.draggedClass),this._placeholder&&b.removeClassName(this._placeholder,this._options.placeholderClass),b.removeClassName(document.documentElement,this._options.draggingClass)},_movePlaceholder:function(a){var b=this._placeholder,c,e,f,g;b?this._options.swap?(d.insertAfter(b,a),d.insertBefore(a,this._isMoving),d.insertBefore(this._isMoving,b)):(c=d.offset(a),e=d.offset(this._placeholder),f=c[1]>e[1],g=c[0]>e[0],f&&g||!f&&!g?d.insertBefore(b,a):d.insertAfter(b,a),d.insertBefore(this._isMoving,b)):d.insertAfter(b,a)},destroy:a.destroyComponent,stopMoving:function(){this._removeMovingClasses(),d.remove(this._placeholder),this._placeholder=!1,this._isMoving=!1},validateMove:function(a){this._isMoving&&this._placeholder&&a!==this._placeholder&&a!==this._isMoving&&(!this._options.moveSelector||e.matchesSelector(a,this._options.moveSelector)?this._movePlaceholder(a):this.stopMoving())}},g}),Ink.createModule("Ink.UI.Spy","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1"],function(a,b,c,d,e){"use strict";var f=[];function g(a){for(var b=0,c=f.length;c>b;b++)if(f[b][0]===a)return b;return null}function h(a,b){var c=g(b);null===c?f.push([b,[a]]):f[c][1].push(a)}var i=!1;function j(){i||(i=!0,b.observe(document,"scroll",b.throttle(k,300)))}function k(){for(var a=0,b=f.length;b>a;a++)l(f[a][0],f[a][1])}function l(a,b){for(var f=m(b),g=e.select("li.active",a),h=0,i=g.length;i>h;h++)c.removeClassName(g[h],"active");if(null!==f){var j='a[href$="#'+(f.name||f.id)+'"]',k=e.select(j,a);for(h=0,i=k.length;i>h;h++)c.addClassName(d.findUpwardsByTag(k[h],"li"),"active")}}function m(a){for(var b=-1/0,c,d,e=0,f=a.length;f>e;e++)d=a[e].getBoundingClientRect(),d.top<=0&&d.top>b&&(b=d.top,c=e);return void 0===c?null:a[c]}var n=function(b,c){this._element=a.elOrSelector(b,"Ink.UI.Spy_1: Section element"),this._options=Ink.extendObj({target:void 0,activeClass:"active"},d.data(this._element)),this._options=Ink.extendObj(this._options,c||{}),this._options.target=a.elOrSelector(this._options.target,"Ink.UI.Spy_1: Target element"),this._init()};return n.prototype={_init:function(){h(this._element,this._options.target),j(),k()}},n}),Ink.createModule("Ink.UI.Stacker",1,["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1"],function(a,b,c){"use strict";function d(a,b){this._init(a,b)}return d.prototype={_init:function(b,c){this._rootElm=a.elsOrSelector(b,"Ink.UI.Stacker root element")[0]||null,null===this._rootElm&&"undefined"!=typeof console&&console.warn("Ink.UI.Stacker: No root element"),this._options=a.options({column:["String",".stacker-column"],item:["String",".stacker-item"],customBreakPoints:["Object",null],largeMax:["Number",Number.MAX_VALUE],largeMin:["Number",961],mediumMax:["Number",960],mediumMin:["Number",651],smallMax:["Number",650],smallMin:["Number",0],largeCols:["Integer",3],mediumCols:["Integer",2],smallCols:["Integer",1],isOrdered:["Boolean",!0],onRunCallback:["Function",null],onResizeCallback:["Function",null],onAPIReloadCallback:["Function",null]},c||{},this._rootElm),this._aList=[],this._curLayout="large",this._runFirstTime=!1,this._getPageItemsToList(),(this._canApplyLayoutChange()||!this._runFirstTime)&&(this._runFirstTime=!0,this._applyLayoutChange(),"function"==typeof this._options.onRunCallback&&this._options.onRunCallback(this._curLayout)),this._addEvents()},addItem:function(a){this._aList.push(a)},reloadItems:function(){this._applyLayoutChange(),"function"==typeof this._options.onAPIReloadCallback&&this._options.onAPIReloadCallback(this._curLayout)},_addEvents:function(){b.observe(window,"resize",Ink.bindEvent(this._onResize,this))},_onResize:function(){this._canApplyLayoutChange()&&(this._removeDomItems(),this._applyLayoutChange(),"function"==typeof this._options.onResizeCallback&&this._options.onResizeCallback(this._curLayout))},_setCurLayout:function(){var a=c.viewportWidth();if(this._options.customBreakpoints&&"object"==typeof this._options.customBreakPoints){for(var b in this._options.customBreakPoints)if(this._options.customBreakPoints.hasOwnProperty(b)&&a>=Number(this._options.customBreakPoints[b].min)&&a<=Number(this._options.customBreakPoints[b].max)&&this._curLayout!==b)return void(this._curLayout=b)}else a<=Number(this._options.largeMax)&&a>=Number(this._options.largeMin)&&"large"!==this._curLayout?this._curLayout="large":a>=Number(this._options.mediumMin)&&a<=Number(this._options.mediumMax)&&"medium"!==this._curLayout?this._curLayout="medium":a>=Number(this._options.smallMin)&&a<=Number(this._options.smallMax)&&"small"!==this._curLayout&&(this._curLayout="small")},_getColumnsToShow:function(){return Number(this._options.customBreakPoints&&"object"==typeof this._options.customBreakPoints?this._options.customBreakPoints[this._curLayout].cols:this._options[this._curLayout+"Cols"])},_canApplyLayoutChange:function(){var a=this._curLayout;return this._setCurLayout(),a!==this._curLayout?!0:!1},_getPageItemsToList:function(){this._aColumn=Ink.ss(this._options.column,this._rootElm);var a=this._aColumn.length,b=0;if(a>0){for(var c=0;c0&&this._options.isOrdered){for(var f=[],g=0;g0)for(var b=0;a>b;b++)for(var c=Ink.ss(this._options.item,this._aColumn[b]),d=c.length-1;d>=0;d--)c[d].parentNode.removeChild(c[d])},_applyLayoutChange:function(){var a=this._getColumnsToShow(),b=this._aList.length,c=0,d=0;if(a>0)for(;a>d;){if(this._aColumn[d].appendChild(this._aList[c]),c++,d++,c===b)return;d===a&&(d=0)}}},d}),Ink.createModule("Ink.UI.Sticky","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Css_1"],function(a,b,c,d){"use strict";var e=function(b,d){this._rootElement=a.elOrSelector(b,"Ink.UI.Sticky_1"),this._options=a.options({offsetBottom:["Integer",0],offsetTop:["Integer",0],topElement:["Element",null],wrapperClass:["String","ink-sticky-wrapper"],stickyClass:["String","ink-sticky-stuck"],inlineDimensions:["Boolean",!0],inlinePosition:["Boolean",!0],bottomElement:["Element",null],activateInLayouts:["String","medium,large"]},d||{},this._rootElement),this._options.activateInLayouts=this._options.activateInLayouts.toString(),this._dims=null,this._options.offsetTop=parseInt(this._options.offsetTop,10)||0,this._options.offsetBottom=parseInt(this._options.offsetBottom,10)||0,this._options.topElement&&(this._options.topElement=a.elOrSelector(this._options.topElement,"Top Element")),this._options.bottomElement&&(this._options.bottomElement=a.elOrSelector(this._options.bottomElement,"Sticky bottom Element")),this._wrapper=c.create("div",{className:this._options.wrapperClass}),c.wrap(this._rootElement,this._wrapper),this._init()};return e.prototype={_init:function(){var a=document.addEventListener?document:window;this._onScroll=Ink.bind(b.throttle(this._onScroll,33),this),b.observe(a,"scroll",this._onScroll),b.observe(window,"resize",Ink.bindEvent(b.throttle(this._onResize,100),this)),this._onScroll()},_isDisabledInLayout:function(){var b=a.currentLayout();return b?-1===this._options.activateInLayouts.indexOf(b):!1},_onScroll:function(){var a=this._getDims(),b=c.scrollHeight(),d=this._isDisabledInLayout()||b<=a.top-this._options.offsetTop||this._options.topElement&&this._options.topElement.getBoundingClientRect().bottom+this._options.offsetTop>0;if(d)return void this._unstick();var e=this._options.offsetTop+a.height+c.scrollHeight(),f=document.body.scrollHeight;this._options.bottomElement&&(f=this._options.bottomElement.getBoundingClientRect().top+c.scrollHeight()),f-=this._options.offsetBottom,this._stickTo(f>e?"screen":"bottom")},_stickTo:function(a){var b=this._rootElement.style,e=this._getDims();if(d.addClassName(this._rootElement,this._options.stickyClass),this._wrapper.style.height=e.height+"px",this._inlineDimensions(e.height+"px",e.width+"px"),this._options.inlinePosition!==!1)if(b.left=e.left+"px","screen"===a)b.bottom=null,b.top=this._options.offsetTop+"px";else if("bottom"===a){var f=this._getBottomOffset(),g=c.scrollHeight()+c.viewportHeight(),h=c.pageHeight()-g;b.bottom=f-h+"px",b.top="auto"}},_unstick:function(){d.removeClassName(this._rootElement,this._options.stickyClass),this._inlineDimensions(null,null),this._options.inlinePosition&&(this._rootElement.style.left=null,this._rootElement.style.top=null,this._rootElement.style.bottom=null),this._wrapper.style.height=null,this._wrapper.style.width=null,this._dims=null},_onResize:function(){this._dims=null,this._onScroll()},_getDims:function(){if(null!==this._dims)return this._dims;var a=this._rootElement.style,b=a.position,d=a.width;a.position="static",a.width=null;var e=c.outerDimensions(this._rootElement),f=this._wrapper.getBoundingClientRect();return this._dims={height:e[1],width:e[0],left:f.left+c.scrollWidth(),top:f.top+c.scrollHeight()},a.position=b,a.width=d,this._dims},_inlineDimensions:function(a,b){this._options.inlineDimensions&&(this._rootElement.style.height=a,this._rootElement.style.width=b)},_getBottomOffset:function(){var a=this._options.offsetBottom;return this._options.bottomElement&&(a+=c.pageHeight()-c.offsetTop(this._options.bottomElement)),a}},e}),Ink.createModule("Ink.UI.Swipe","1",["Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.UI.Common_1"],function(a,b,c){"use strict";function d(a,d){a=c.elOrSelector(a,"Swipe target"),this._options=Ink.extendObj({onEnd:void 0,onStart:void 0,onMove:void 0,minDist:void 0,maxDist:void 0,minDuration:void 0,maxDuration:void 0,axis:void 0,storeGesture:!1,stopEvents:!0},b.data(a),d||{}),"function"==typeof d&&(this._options.onEnd=d),this._handlers={down:Ink.bindEvent(this._onDown,this),move:Ink.bindEvent(this._onMove,this),up:Ink.bindEvent(this._onUp,this)},this._element=a,this._init()}return d.prototype={version:"0.1",_supported:"ontouchstart"in document.documentElement,_init:function(){var b=document.body;a.observe(b,"touchstart",this._handlers.down),(this._options.storeGesture||this._options.onMove)&&a.observe(b,"touchmove",this._handlers.move),a.observe(b,"touchend",this._handlers.up),this._isOn=!1},_isMeOrParent:function(a,b){if(a){do{if(a===b)return!0;a=a.parentNode}while(a);return!1}},_pushGesture:function(a,b){this._options.storeGesture&&(this._gesture.push(a),this._time.push(b))},_onDown:function(b){1===b.changedTouches.length&&this._isMeOrParent(b.target,this._element)&&(this._options.stopEvents===!0&&a.stop(b),b=b.changedTouches[0],this._isOn=!0,this._target=b.target,this._t0=+new Date,this._p0=[b.pageX,b.pageY],this._options.storeGesture&&(this._gesture=[],this._time=[]),this._pushGesture(this._p0,0),this._options.onStart&&this._options.onStart({event:b,element:this._element,instance:this,position:this._p0,dt:0}))},_onMove:function(b){if(this._isOn&&1===b.changedTouches.length){this._options.stopEvents===!0&&a.stop(b),b=b.changedTouches[0];var c=+new Date,d=c-this._t0,e=[b.pageX,b.pageY];this._pushGesture(e,d),this._options.onMove&&this._options.onMove({event:b,element:this._element,instance:this,position:e,dt:d})}},_onUp:function(b){if(this._isOn&&1===b.changedTouches.length){this._options.stopEvents===!0&&a.stop(b),b=b.changedTouches[0],this._isOn=!1;var c=+new Date,d=[b.pageX,b.pageY],e=c-this._t0,f=[d[0]-this._p0[0],d[1]-this._p0[1]],g=Math.sqrt(f[0]*f[0]+f[1]*f[1]),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",i=this._options;i.minDist&&gi.maxDist||i.minDuration&&ei.maxDuration||i.axis&&h!==i.axis||this._options.onEnd&&this._options.onEnd({event:b,element:this._element,instance:this,gesture:this._gesture,time:this._time,axis:h,overallMovement:f,overallTime:e})}}},d}),Ink.createModule("Ink.UI.Table","1",["Ink.Util.Url_1","Ink.UI.Pagination_1","Ink.Net.Ajax_1","Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1","Ink.Util.String_1","Ink.Util.Json_1"],function(a,b,c,d,e,f,g,h,i,j,k){"use strict";var l=/\d/g;function m(a){return!isNaN(a)&&l.test(a)?parseInt(a,10):isNaN(a)?a:parseFloat(a)}function n(a,b){return a===b?0:a>b?1:-1}function o(a,b){var c=m(g.textContent(a)),d=m(g.textContent(b));return n(c,d)}function p(a){if("undefined"!=typeof Object.keys)return Object.keys(a);var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}function q(a){return a}var r=function(a,b){if(this._rootElement=d.elOrSelector(a,"Ink.UI.Table :"),"table"!==this._rootElement.nodeName.toLowerCase())throw new Error("[Ink.UI.Table] :: The element is not a table");this._options=d.options({pageSize:["Integer",null],caretUpClass:["String","fa fa-caret-up"],caretDownClass:["String","fa fa-caret-down"],endpoint:["String",null],createEndpointUrl:["Function",null],getDataFromEndPoint:["Function",null],processJSONRows:["Function",q],processJSONRow:["Function",q],processJSONField:["Function",q],processJSONHeaders:["Function",function(a){return a.fields}],processJSONTotalRows:["Function",function(a){return a.length||a.totalRows}],getSortKey:["Function",null],pagination:["Element",null],allowResetSorting:["Boolean",!1],visibleFields:["String",null],tdClassNames:["Object",{}],paginationOptions:["Object",null]},b||{},this._rootElement),this._markupMode=!this._options.endpoint,this._options.visibleFields&&(this._options.visibleFields=this._options.visibleFields.toString().split(/[, ]+/g)),this._thead=this._rootElement.tHead||this._rootElement.createTHead(),this._headers=h.select("th",this._thead),this._handlers={thClick:null},this._originalFields=[],this._sortableFields={},this._originalData=this._data=[],this._pagination=null,this._totalRows=0,this._handlers.thClick=e.observeDelegated(this._rootElement,"click",'thead th[data-sortable="true"]',Ink.bindMethod(this,"_onThClick")),this._init()};return r.prototype={_init:function(){this._markupMode?(this._resetSortOrder(),this._addHeadersClasses(),this._data=h.select("tbody tr",this._rootElement),this._originalData=this._data.slice(0),this._totalRows=this._data.length,this._setPagination()):this._getData()},_addHeadersClasses:function(){for(var a,b,c=0,d=this._headers.length;d>c;c++)a=g.textContent(this._headers[c]),b=this._options.tdClassNames[a],b&&f.addClassName(this._headers[c],b)},_onThClick:function(a){var b=e.element(a),c=void 0!==this._options.pageSize;e.stop(a);var f=i.keyValue(b,this._headers,!0),g=f!==!1&&void 0!==this._sortableFields[f];if(g)if(!this._markupMode&&c)this._invertSortOrder(f,!1);else{"desc"===this._sortableFields[f]&&this._options.allowResetSorting?(this._setSortOrderOfColumn(f,null),this._data=this._originalData.slice(0)):this._invertSortOrder(f,!0);var j=h.select("tbody",this._rootElement)[0];d.cleanChildren(j),i.each(this._data,Ink.bindMethod(j,"appendChild")),this._pagination&&(this._pagination.setCurrent(0),this._paginate(1))}},_invertSortOrder:function(a,b){for(var c="asc"===this._sortableFields[a],d=0,e=this._headers.length;e>d;d++)this._setSortOrderOfColumn(d,null);b&&(this._sort(a),c&&this._data.reverse()),this._setSortOrderOfColumn(a,!c)},_setSortOrderOfColumn:function(a,b){var c=this._headers[a],d=[""],e="none";b===!0?(d=[''],e="asc"):b===!1&&(d=[''],e="desc"),this._sortableFields[a]=e,c.innerHTML=g.textContent(c)+d.join("")},_paginate:function(a){if(this._pagination){var b=this._options.pageSize,c=(a-1)*b,d=c+b;i.each(this._data,function(a,b){b>=c&&d>b?f.removeClassName(a,"hide-all"):f.addClassName(a,"hide-all")})}},_registerFieldNames:function(a){this._originalFields=[],i.forEach(a,Ink.bind(function(a){this._fieldIsVisible(a)&&this._originalFields.push(a)},this))},_fieldIsVisible:function(a){return!this._options.visibleFields||-1!==this._options.visibleFields.indexOf(a)},_sort:function(a){var b=g.textContent(this._headers[a]),c=this._options.getSortKey;c&&(c="function"==typeof c[b]?c[b]:"function"==typeof c?c:null);var d=this;this._data.sort(function(b,d){var f=Ink.ss("td",b)[a],g=Ink.ss("td",d)[a];return c?n(e(f),e(g)):o(f,g,a)});function e(e){return c.call(d,{columnIndex:a,columnName:b,data:g.textContent(e),element:e})}},_createHeadersFromJson:function(a){if(this._registerFieldNames(p(a)),!this._thead.children.length)for(var b=this._thead.insertRow(0),c,d=0,e=a.length;e>d;d++)this._fieldIsVisible(a[d])&&(c=g.create("th"),c=this._createSingleHeaderFromJson(a[d],c),b.appendChild(c),this._headers.push(c))},_createSingleHeaderFromJson:function(a,b){return a.sortable&&b.setAttribute("data-sortable","true"),a.label&&g.setTextContent(b,a.label),b},_resetSortOrder:function(){for(var a=0,b=this._headers.length;b>a;a++){var c=g.data(this._headers[a]);c.sortable&&"true"===c.sortable.toString()&&(this._sortableFields[a]="none")}},_createRowsFromJSON:function(a){var b=h.select("tbody",this._rootElement)[0];b?g.setHTML(b,""):(b=document.createElement("tbody"),this._rootElement.appendChild(b)),this._data=[];var c;for(var d in a)a.hasOwnProperty(d)&&(c=this._options.processJSONRow(a[d]),this._createSingleRowFromJson(b,c,d));this._originalData=this._data.slice(0)},_createSingleRowFromJson:function(a,b,c){var d=document.createElement("tr");a.appendChild(d);for(var e in b)b.hasOwnProperty(e)&&this._createFieldFromJson(d,b[e],e,c);this._data.push(d)},_createFieldFromJson:function(a,b,c,d){if(this._fieldIsVisible(c)){var e=this._options.processJSONField[c]||this._options.processJSONField,g;g="function"==typeof e?e(b,c,d):b;var h=this._elOrFieldData(g),i=this._options.tdClassNames[c];i&&f.addClassName(h,i),a.appendChild(h)}},_elOrFieldData:function(a){if(d.isDOMElement(a))return a;var b="string"==typeof a,c="number"==typeof a,e=g.create("td");if(b&&/^\s*?=this._options.maxTags)){if(!this._options.allowRepeated&&f.inArray(c,this._tags,c)||!c)return!1;var d=a.create("span",{className:"ink-tag",setTextContent:c+" "}),e=a.create("span",{className:"remove fa fa-times",insertBottom:d});b.observe(e,"click",Ink.bindEvent(this._removeTag,this,null));var g=document.createTextNode(" ");this._tags.push(c),this._viewElm.insertBefore(d,this._input),this._viewElm.insertBefore(g,this._input),this._tagsToMarkup(this._tags,this._element)}},_readInput:function(a){return this._options.separator?f.filter(a.split(this._options.separator),k):[a]},_onKeyUp:function(){if(this._options.autoSplit){var a=this._input.value.split(this._options.separator);if(!(a.length<=1)){var b=a[a.length-1];a=a.splice(0,a.length-1),a=f.filter(a,k),f.each(a,Ink.bind(this._addTag,this)),this._input.value=b}}},_onKeyDown:function(a){return a.which===i?this._onEnterKeyDown(a):a.which===j?this._onBackspaceKeyDown():void(this._removeConfirm&&this._unsetRemovingVisual(this._tags.length-1))},_onBackspaceKeyDown:function(){this._input.value||(this._removeConfirm?(this._unsetRemovingVisual(this._tags.length-1),this._removeTag(this._tags.length-1),this._removeConfirm=null):this._setRemovingVisual(this._tags.length-1))},_onEnterKeyDown:function(a){var c=this._input.value;c&&(this._addTag(c),this._input.value=""),b.stopDefault(a)},_onBlur:function(){this._addTag(this._input.value),this._input.value=""},_setRemovingVisual:function(a){var d=this._viewElm.children[a];c.addClassName(d,"tag-deleting"),this._removeRemovingVisualTimeout=setTimeout(Ink.bindMethod(this,"_unsetRemovingVisual",a),4e3),b.observe(this._input,"blur",Ink.bindMethod(this,"_unsetRemovingVisual",a)),this._removeConfirm=!0},_unsetRemovingVisual:function(a){var b=this._viewElm.children[a];b&&(c.removeClassName(b,"tag-deleting"),clearTimeout(this._removeRemovingVisualTimeout)),this._removeConfirm=null},_removeTag:function(c){var d;if("object"==typeof c){var e=b.element(c).parentNode;d=a.parentIndexOf(this._viewElm,e)}else"number"==typeof c&&(d=c);this._tags=f.remove(this._tags,d,1),a.remove(this._viewElm.children[d]),this._tagsToMarkup(this._tags,this._element)},_refocus:function(a){return this._input.focus(),b.stop(a),!1}},l}),Ink.createModule("Ink.UI.Toggle","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1"],function(a,b,c,d,e,f){"use strict";var g=function(b,e){if(this._rootElement=a.elOrSelector(b,"[Ink.UI.Toggle root element]:"),this._options=Ink.extendObj({target:void 0,triggerEvent:"click",closeOnClick:!0,isAccordion:!1,initialState:null,classNameOn:"show-all",classNameOff:"hide-all",togglesDisplay:null,closeOnInsideClick:"a[href]",onChangeState:null},e||{},d.data(this._rootElement)),this._targets=a.elsOrSelector(this._options.target,"Ink.UI.Toggle target option"),this._options.closeOnClick="true"===this._options.closeOnClick.toString(),this._options.initialState=null!==this._options.initialState?"true"===this._options.initialState.toString():"none"!==c.getStyle(this._targets[0],"display"),"show-all"!==this._options.classNameOn||"hide-all"!==this._options.classNameOff)for(var f=0,g=this._targets.length;g>f;f++)c.removeClassName(this._targets[f],"show-all"),c.removeClassName(this._targets[f],"hide-all");this._init()};return g.prototype={_init:function(){if(this._accordion=c.hasClassName(this._rootElement.parentNode,"accordion")||c.hasClassName(this._targets[0].parentNode,"accordion"),this._firstTime=!0,this._bindEvents(),null!==this._options.initialState)this.setState(this._options.initialState,!0);else{var a="none"!==c.getStyle(this._targets[0],"display");this.setState(a,!0)}for(var b=0,d=this._targets.length;d>b;b++)this._targets[b].style.display&&(this._targets[b].style.display="");this._rootElement.setAttribute("data-is-toggle-trigger","true")},_bindEvents:function(){if(this._options.triggerEvent&&b.observe(this._rootElement,this._options.triggerEvent,Ink.bind(this._onTriggerEvent,this)),this._options.closeOnClick&&b.observe(document,"click",Ink.bind(this._onOutsideClick,this)),this._options.closeOnInsideClick&&"false"!==this._options.closeOnInsideClick){var a=this._options.closeOnInsideClick;"true"===a.toString()&&(a="*"),b.observeMulti(this._targets,"click",Ink.bind(function(c){d.findUpwardsBySelector(b.element(c),a)&&this.setState(!1,!0)},this))}},_onTriggerEvent:function(a){var c=b.element(a),e=f.some(this._targets,function(a){return a===c||d.isAncestorOf(a,c)});if(!e){this._accordion&&this._updateAccordion();var g=this.getState();this.setState(!g,!0),!g&&this._firstTime&&(this._firstTime=!1),b.stopDefault(a)}},_updateAccordion:function(){var a,b;b=c.hasClassName(this._targets[0].parentNode,"accordion")?this._targets[0].parentNode:this._targets[0].parentNode.parentNode,a=e.select(".toggle, .ink-toggle",b);for(var f=0;f0&&h[0]!==this._targets[0]&&(h[0].style.display="none")}},_onOutsideClick:function(a){var c=b.element(a),e;if(!d.findUpwardsBySelector(c,'[data-is-toggle-trigger="true"]')){var g=f.some(this._targets,function(a){return d.isAncestorOf(a,c)||a===c});if(this._rootElement!==c&&!d.isAncestorOf(this._rootElement,c)&&!g){if((e=Ink.ss(".ink-shade")).length)for(var h=e.length,i=0;h>i;i++)if(d.isAncestorOf(e[i],c)&&d.isAncestorOf(e[i],this._rootElement))return;this.setState(!1,!0)}}},setState:function(a,b){if(a!==this.getState()){if(b&&"function"==typeof this._options.onChangeState){var d=this._options.onChangeState(a);if(d===!1)return!1}for(var e=0,f=this._targets.length;f>e;e++)c.addRemoveClassName(this._targets[e],this._options.classNameOn,a),c.addRemoveClassName(this._targets[e],this._options.classNameOff,!a);c.addRemoveClassName(this._rootElement,"active",a)}},getState:function(){return c.hasClassName(this._rootElement,"active")}},g}),Ink.createModule("Ink.UI.Tooltip","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1","Ink.Dom.Css_1","Ink.Dom.Browser_1"],function(a,b,c,d,e,f){"use strict";function g(a,b){this._init(a,b||{})}function h(a,b){this._init(a,b)}var i,j,k;!function(){for(var a=document.createElement("DIV"),b=["transition","oTransition","msTransition","mozTransition","webkitTransition"],c=0;ce;e++)this.tooltips[e]=new h(this,c[e])},destroy:function(){e.each(this.tooltips,function(a){a._destroy()}),this.tooltips=null,this.options=null}},h.prototype={_oppositeDirections:{left:"right",right:"left",up:"down",down:"up"},_init:function(a,c){b.observe(c,"mouseover",Ink.bindEvent(this._onMouseOver,this)),b.observe(c,"mouseout",Ink.bindEvent(this._onMouseOut,this)),b.observe(c,"mousemove",Ink.bindEvent(this._onMouseMove,this)),this.root=a,this.element=c,this._delayTimeout=null,this.tooltip=null},_makeTooltip:function(a){if(!this._getOpt("text")&&!this._getOpt("html")&&!c.hasAttribute(this.element,"title"))return!1;var d=this._createTooltipElement();this.tooltip&&this._removeTooltip(),this.tooltip=d,this._fadeInTooltipElement(d),this._placeTooltipElement(d,a),b.observe(d,"mouseover",Ink.bindEvent(this._onTooltipMouseOver,this));var e=this._getFloatOpt("timeout");e&&setTimeout(Ink.bind(function(){this.tooltip===d&&this._removeTooltip()},this),1e3*e)},_createTooltipElement:function(){var b=this._getOpt("template"),e=this._getOpt("templatefield"),g,h;if(b){var i=document.createElement("DIV");if(i.innerHTML=a.elOrSelector(b,"options.template").outerHTML,g=i.firstChild,e){if(h=d.select(e,g),!h)throw"options.templatefield must be a valid selector within options.template";h=h[0]}else h=g}else g=document.createElement("DIV"),f.addClassName(g,"ink-tooltip"),f.addClassName(g,this._getOpt("color")),h=document.createElement("DIV"),f.addClassName(h,"content"),g.appendChild(h);return this._getOpt("html")?h.innerHTML=this._getOpt("html"):this._getOpt("text")?c.setTextContent(h,this._getOpt("text")):c.setTextContent(h,this.element.getAttribute("title")),g.style.display="block",g.style.position="absolute",g.style.zIndex=this._getIntOpt("zIndex"),g},_fadeInTooltipElement:function(a){var b=this._getFloatOpt("fade");i&&b&&(a.style.opacity="0",a.style[i]=b+"s",a.style[j]="opacity",a.style[k]="ease-in-out",setTimeout(function(){a.style.opacity="1"},0))},_placeTooltipElement:function(a,b){var d=this._getOpt("where");if("mousemove"===d||"mousefix"===d){var e=b;this._setPos(e[0],e[1]),m.appendChild(a)}else if(d.match(/(up|down|left|right)/)){m.appendChild(a);var g=c.offset(this.element),h=g[0],i=g[1],j=c.elementWidth(this.element)/2-c.elementWidth(a)/2,k=c.elementHeight(this.element)/2-c.elementHeight(a)/2,l=this._getIntOpt("spacing"),n=c.elementDimensions(a),o=c.elementDimensions(this.element),p=c.scrollWidth()+c.viewportWidth(),q=c.scrollHeight()+c.viewportHeight();d=this._getWhereValueInsideViewport(d,{left:h-n[0],right:h+n[0],top:i+n[1],bottom:i+n[1]},{right:p,bottom:q}),"up"===d?(i-=n[1],i-=l,h+=j):"down"===d?(i+=o[1],i+=l,h+=j):"left"===d?(h-=n[0],h-=l,i+=k):"right"===d&&(h+=o[0],h+=l,i+=k);var r=null;d.match(/(up|down|left|right)/)&&(r=document.createElement("SPAN"),f.addClassName(r,"arrow"),f.addClassName(r,this._oppositeDirections[d]),a.appendChild(r));var s=h,t=i,u=t+n[1]-q,v=s+n[0]-p,w=0-s,x=0-t;u>0?(r&&(r.style.top=n[1]/2+u+"px"),t-=u):x>0?(r&&(r.style.top=n[1]/2-x+"px"),t+=x):v>0?(r&&(r.style.left=n[0]/2+v+"px"),s-=v):w>0&&(r&&(r.style.left=n[0]/2-w+"px"),s+=w),a.style.left=s+"px",a.style.top=t+"px"}},_getWhereValueInsideViewport:function(a,b,c){return"left"===a&&b.left<0?"right":"right"===a&&b.right>c.right?"left":"up"===a&&b.top<0?"down":"down"===a&&b.bottom>c.bottom?"up":a},_removeTooltip:function(){var a=this.tooltip;if(a){var b=Ink.bind(c.remove,{},a);"mousemove"!==this._getOpt("where")&&i?(a.style.opacity=0,setTimeout(b,1e3*this._getFloatOpt("fade"))):b(),this.tooltip=null}},_getOpt:function(a){var b=c.data(this.element)[c._camelCase("tip-"+a)];if(b)return b;var d=this.root.options[a];return"undefined"!=typeof d?d:void 0},_getIntOpt:function(a){return parseInt(this._getOpt(a),10)},_getFloatOpt:function(a){return parseFloat(this._getOpt(a),10)},_destroy:function(){this.tooltip&&c.remove(this.tooltip),this.root=null,this.element=null,this.tooltip=null},_onMouseOver:function(a){var b=this._getMousePosition(a),c=this._getFloatOpt("delay");c?this._delayTimeout=setTimeout(Ink.bind(function(){this.tooltip||this._makeTooltip(b),this._delayTimeout=null},this),1e3*c):this._makeTooltip(b)},_onMouseMove:function(a){if("mousemove"===this._getOpt("where")&&this.tooltip){var b=this._getMousePosition(a);this._setPos(b[0],b[1])}},_onMouseOut:function(){this._getIntOpt("forever")||this._removeTooltip(),this._delayTimeout&&(clearTimeout(this._delayTimeout),this._delayTimeout=null)},_onTooltipMouseOver:function(){this.tooltip&&this._removeTooltip()},_setPos:function(a,b){a+=this._getIntOpt("left"),b+=this._getIntOpt("top");var d=this._getPageXY();if(this.tooltip){var e=[c.elementWidth(this.tooltip),c.elementHeight(this.tooltip)],f=this._getScroll();e[0]+a-f[0]>=d[0]-20&&(a=a-e[0]-this._getIntOpt("left")-10),e[1]+b-f[1]>=d[1]-20&&(b=b-e[1]-this._getIntOpt("top")-10),this.tooltip.style.left=a+"px",this.tooltip.style.top=b+"px"}},_getPageXY:function(){var a=0,b=0;return"number"==typeof window.innerWidth?(a=window.innerWidth,b=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(a=document.documentElement.clientWidth,b=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(a=document.body.clientWidth,b=document.body.clientHeight),[parseInt(a,10),parseInt(b,10)]},_getScroll:function(){var a=document.documentElement,b=document.body;return a&&(a.scrollLeft||a.scrollTop)?[a.scrollLeft,a.scrollTop]:b?[b.scrollLeft,b.scrollTop]:[0,0]},_getMousePosition:function(a){return[parseInt(b.pointerX(a),10),parseInt(b.pointerY(a),10)]}},g}),Ink.createModule("Ink.UI.TreeView","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1"],function(a,b,c,d,e,f){"use strict";var g=function(b,c){this._element=a.elOrSelector(b,"[Ink.UI.TreeView_1]"),this._options=a.options("Treeview",{node:["String","li"],child:["String",null],children:["String","ul"],parentClass:["String","parent"],openNodeClass:["String","open"],openClass:["String","fa fa-minus-circle"],closedClass:["String","fa fa-plus-circle"],hideClass:["String","hide-all"],iconTag:["String","i"],stopDefault:["Boolean",!0]},c||{},this._element),this._options.child&&(Ink.warn("Ink.UI.TreeView: options.child is being renamed to options.children."),this._options.children=this._options.child),this._init()};return g.prototype={_init:function(){this._handlers={click:Ink.bindEvent(this._onClick,this)},b.on(this._element,"click",this._options.node,this._handlers.click),f.each(Ink.ss(this._options.node,this._element),Ink.bind(function(a){if(this.isParent(a)){c.addClassName(a,this._options.parentClass);var b=this.isOpen(a);this._getIcon(a)||d.create(this._options.iconTag,{insertTop:a}),this._setNodeOpen(a,b)}},this))},_getIcon:function(a){return Ink.s("> "+this._options.iconTag,a)},isOpen:function(a){if(!this._getChild(a))throw new Error("not a node!");return"true"===d.data(a).open||c.hasClassName(a,this._options.openNodeClass)},isParent:function(a){return c.hasClassName(a,this._options.parentClass)||null!=this._getChild(a)},_setNodeOpen:function(a,b){var d=this._getChild(a);if(d){c.setClassName(d,this._options.hideClass,!b);var e=this._getIcon(a);a.setAttribute("data-open",b);var f=b?this._options.openClass:this._options.closedClass,g=b?this._options.closedClass:this._options.openClass;c.removeClassName(e,g),c.addClassName(e,f),c.setClassName(a,this._options.openNodeClass,b)}else Ink.error("Ink.UI.TreeView: node",a,"is not a node!")},open:function(a){this._setNodeOpen(a,!0)},close:function(a){this._setNodeOpen(a,!1)},toggle:function(a){this.isOpen(a)?this.close(a):this.open(a)},_getChild:function(a){return e.select(this._options.children,a)[0]||null},_onClick:function(a){!this.isParent(a.currentTarget)||e.matchesSelector(a.target,this._options.node)||e.matchesSelector(a.target,this._options.children)||(this._options.stopDefault&&a.preventDefault(),this.toggle(a.currentTarget))}},g}),Ink.createModule("Ink.UI.Upload","1",["Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Browser_1","Ink.UI.Common_1"],function(a,b,c,d){"use strict";var e=function(a){this.init(a)};e.prototype={init:function(a){this.options=Ink.extendObj({entry:void 0,maxDepth:10},a||{});try{this._read()}catch(b){Ink.error(b)}},_read:function(){if(!this.options.entry)throw"The entry specify you must";try{this._readDirectories()}catch(a){Ink.error(a)}},_readDirectories:function(){var a=[],b=!1,c=0,d=Ink.bind(function(e){var f=e.createReader();b=!0,f.readEntries(Ink.bind(function(e){if(e.length>0){for(var f=0,g=e.length;g>f;f++)a.push(e[f]),e[f].isDirectory&&(c=this.clearArray(e[f].fullPath.split("/")),c.shift(),c=c.length,c<=this.options.maxDepth&&d(e[f]));this._stopActivityTimeout&&clearTimeout(this._stopActivityTimeout),this._stopActivityTimeout=setTimeout(function(){b=!1},250)}e.length||(b=!1)},this),Ink.bind(function(a){this.options.readError(a,e)},this))},this);d(this.options.entry);var e,f=function(){return b?!1:(clearInterval(e),this.options.readComplete&&"function"==typeof this.options.readComplete&&this.options.readComplete(a),!0)};e=setInterval(Ink.bind(f,this),250)},clearArray:function(a){for(var b=a.length-1;b>=0;b--)("undefined"==typeof a[b]||null===a[b]||""===a[b])&&a.splice(b,1);return a}};var f={lists:[],items:[],create:function(a){var b;return a=String(a),this.lists.push({name:a}),b=this.lists.length-1},getItems:function(a){if(!a)return this.items;for(var b=[],c=0,d=this.items.length;d>c;c++)this.items[c].parentId===a&&b.push(this.items[c]);return b},purge:function(a,b){if("number"!=typeof a||isNaN(Number(a)))return!1;try{for(var c=this.items.length;c>=0;c--)this.items[c]&&a===this.items[c].parentId&&this.remove(this.items[c].parentId,this.items[c].pid);return b||this.lists.splice(a,1),!0}catch(d){return Ink.error("Purge: invalid id"),!1}},add:function(a,b,c){if(!this.lists[a])return!1;"object"!=typeof b&&(b=String(b));var d=parseInt(Math.round(1e5*Math.random())+""+Math.round(1e5*Math.random()),10);return c=c||0,this.items.push({parentId:a,item:b,priority:c||0,pid:d}),d},view:function(a,b){var c=this._searchByPid(a,b);return c===!1?!1:this.items[c]},remove:function(a,b){try{var c=this._searchByPid(a,b);return c===!1?!1:(this.items.splice(c,1),!0)}catch(d){return Ink.error("Remove: invalid id"),!1}},_searchByPid:function(a,b){if(!a&&"boolean"==typeof a||!b)return!1;if(a=parseInt(a,10),b=parseInt(b,10),isNaN(a)||isNaN(b))return!1;for(var c=0,d=this.items.length;d>c;c++)if(this.items[c].parentId===a&&this.items[c].pid===b)return c;return!1}},g=function(a){this.Upload=a,this.init()};g.prototype={init:function(){this._fileButton=this.Upload.options.fileButton,this._dropzone=this.Upload.options.dropzone,this._setDropEvent(),this._setFileButton()},_setDropEvent:function(){for(var a=this._dropzone,b=0,c=a.length;c>b;b++)a[b].ondrop=Ink.bindEvent(this.Upload._dropEventHandler,this.Upload),a[b].ondragleave=Ink.bindEvent(this._onDragLeave,this),a[b].ondragend=Ink.bindEvent(this._onDragEndEventHandler,this),a[b].ondragenter=Ink.bindEvent(this._onDragEnterHandler,this),a[b].ondragover=Ink.bindEvent(this._onDragOverHandler,this)},_onDragEnterHandler:function(a){return a&&a.stopPropagation&&a.stopPropagation(),a&&a.preventDefault&&a.preventDefault(),a&&(a.returnValue=!1),this.Upload.publish("DragEnter",a),!1},_onDragOverHandler:function(a){return a?(a.preventDefault(),a.stopPropagation(),a.returnValue=!1,!0):!1},_onDragLeave:function(a){return this.Upload.publish("DragLeave",a)},_onDragEndEventHandler:function(a){return this.Upload.publish("DragEnd",a)},_setFileButton:function(){var b=this._fileButton;a.observeMulti(b,"change",Ink.bindEvent(this._fileChangeHandler,this))},_fileChangeHandler:function(c){var d=a.element(c),e=d.files,f=b.findUpwardsByTag(d,"form");return e&&window.FormData&&"withCredentials"in new XMLHttpRequest?(this.Upload._addFilesToQueue(e),void(d.value="")):(f.parentNode.submit(),!1)}};var h=function(a){this.Queue=f,this.init(a),this._events={}};return h.prototype={init:function(a){if("string"==typeof a&&(a=b.data(d.elOrSelector(a,"1st argument"))),this.options=Ink.extendObj({extraData:{},fileFormName:"Ink_Filelist",dropzone:void 0,fileButton:void 0,endpoint:"",endpointChunk:"",endpointChunkCommit:"",maxFilesize:300<<20,chunkSize:4194304,minSizeToUseChunks:20971520,INVALID_FILE_NAME:void 0,foldersEnabled:!0,useChunks:!0,directoryMaxDepth:10},a||{}),this._queueId=f.create("Ink_UPLOAD"),this._queueRunning=!1,this._folders={},this.options.dropzone&&d.elOrSelector(this.options.dropzone,"Upload - dropzone"),this.options.fileButton&&d.elOrSelector(this.options.fileButton,"Upload - fileButton"),!this.options.dropzone&&!this.options.fileButton)throw new TypeError("A file button or dropzone, specify you must, my young padawan");this.options.dropzone=Ink.ss(this.options.dropzone),this.options.fileButton=Ink.ss(this.options.fileButton),new g(this)},_supportChunks:function(a){return this.options.useChunks&&"Blob"in window&&(new Blob).slice&&a>this.options.minSizeToUseChunks},_dropEventHandler:function(a){a&&a.stopPropagation&&a.stopPropagation(),a&&a.preventDefault&&a.preventDefault(),a&&(a.returnValue=!1),this.publish("DropComplete",a.dataTransfer);var b=a.dataTransfer;if(!b||!b.files||!b.files.length)return!1;if(this._files=b.files,this._files=Array.prototype.slice.call(this._files||[],0),b.items&&b.items[0]&&b.items[0].webkitGetAsEntry){if(!this.options.foldersEnabled)return setTimeout(Ink.bind(this._addFilesToQueue,this,this._files),0);for(var c,d=[],e=a.dataTransfer.items.length-1;e>=0;e--)c=a.dataTransfer.items[e].webkitGetAsEntry(),c&&c.isDirectory&&(d.push(c),this._files[e].isDirectory=!0,this._files.splice(e,1));this._addFolderToQueue(d,Ink.bind(function(){setTimeout(Ink.bind(this._addFilesToQueue,this,this._files),0)},this))}else setTimeout(Ink.bind(this._addFilesToQueue,this,this._files),0);return!0},_addFolderToQueue:function(a,b){var c=[],d={};if(!a||!a.length)return b(),c;var f=function(a){for(var b=[],c=0,d=a.length;d>c;c++)a[c].isFile&&b.push(a[c]);return b},g=function(a,b){var d;return b=b||0,this._files[b]?"fileentry"!==this._files[b].constructor.name.toLowerCase()?g.apply(this,[a,++b]):void this._files[b].file(Ink.bind(function(c){d=this._files[b].fullPath,this._files[b]=c,this._files[b].hasParent=!0,this._files[b].fullPath||(this._files[b].fullPath=d),g.apply(this,[a,++b])},this),Ink.bind(function(){this._files.splice(b,1),g.apply(this,[a,b])},this)):(a(),c)},h=Ink.bind(function(i){return a[i]?void new e({entry:a[i],maxDepth:this.options.directoryMaxDepth,readComplete:Ink.bind(function(b){if(c=c.concat(f(b)),a[i]&&!(a[i].fullPath in this._folders)){this._folders[a[i].fullPath]={items:b,files:c,length:b.length,created:!1,root:!0};for(var e=0,g=b.length;g>e;e++)b[e].isFile||(b[e].fullPath in d?delete d[b[e].fullPath]:this._folders[b[e].fullPath]={created:!1,root:!1});h(++i)}},this),readError:Ink.bind(function(a,b){d[b.fullPath]={},d[b.fullPath].error=a},this)}):(this._files=this._files.concat(c),g.call(this,b),!1)},this);return h(0),c},_addFilesToQueue:function(a){for(var b,d,e,g=0,h=a.length;h>g;g++)b=a[g],b.isDirectory||null!==b&&(b.type||b.size%4096!==0||c.CHROME&&this.options.foldersEnabled)?b.size>this.options.maxFilesize?this.publish("MaxSizeFailure",b,this.options.maxFilesize):(d=parseInt(Math.round(1e5*Math.random())+""+Math.round(1e5*Math.random()),10),e={id:g,data:b,fileID:d,directory:b.isDirectory},f.add(this._queueId,e),this.publish("FileAddedToQueue",e)):this.publish("InvalidFile",b,"size");this._processQueue(!0),this._files=[]},_processQueue:function(a){if(this._queueRunning)return!1;this.running=0;var b=1,c=0,d,e=f.items.length;this._queueRunning=!0,this.interval=setInterval(Ink.bind(function(){if(f.items.length===c&&0===this.running&&(f.purge(this._queueId,!0),this._queueRunning=!1,clearInterval(this.interval),this.publish("QueueEnd",this._queueId,e)),d=f.getItems(this._queueId),this.runningb.chunk_offset){if(c.response){var e=JSON.parse(c.response),f=b.chunk_offset&&e.offset!==b.chunk_offset+this.options.chunkSize&&b.size!==e.offset;f?(a.cb&&a.cb(),this.publish("ErrorUpload",b,d)):(b.chunk_upload_id=e.upload_id,b.chunk_offset=e.offset,b.chunk_expires=e.expires,this._upload(a))}else a.cb&&a.cb(),this.publish("ErrorUpload",b,d);return c=null}return a.cb&&a.cb(),c.responseText&&c.status<400?this.publish("EndUpload",b,d,c.responseText):this.publish("ErrorUpload",b,d),c=null},this),c.onerror=Ink.bindEvent(function(){a.cb&&a.cb(),this.publish("ErrorUpload",b,d)},this),c.onabort=Ink.bindEvent(function(){a.cb&&a.cb(),this.publish("AbortUpload",b,d,{abortAll:Ink.bind(this.abortAll,this),abortOne:Ink.bind(this.abortOne,this)})},this)},abortAll:function(){return this._queueRunning?(clearInterval(this.interval),this._queueRunning=!1,f.purge(this._queueId,!0),!0):!1},abortOne:function(a,b){for(var c=f.getItems(0),d,e=0,g=c.length;g>e;e++)if(c[e].item.fileID===a)return d={id:c[e].item.fileID,name:c[e].item.data.name,size:c[e].item.data.size,hasParent:c[e].item.data.hasParent},f.remove(0,c[e].pid),b&&b(d),!0;return!1},subscribe:function(a,b){return this._events[a]||(this._events[a]=[]),this._events[a].push(b),this._events[a]},publish:function(a){var b=this._events[a],c=Array.prototype.slice.call(arguments||[],0);if(b)for(var d=0,e=b.length;e>d;d++)try{b[d].apply(this,c.splice(1,c.length))}catch(f){Ink.error(a+": "+f)}}},h}),Ink.createModule("Ink.Util.Array","1",[],function(){"use strict";var a=Array.prototype,b={inArray:function(a,b){if("object"==typeof b)for(var c=0,d=b.length;d>c;++c)if(b[c]===a)return!0;return!1},sortMulti:function(a,b){if("undefined"==typeof a||a.constructor!==Array)return!1;if("string"!=typeof b)return a.sort();if(a.length>0){if("undefined"==typeof a[0][b])return!1;a.sort(function(a,c){var d=a[b],e=c[b];return e>d?-1:d>e?1:0})}return a},keyValue:function(a,b,c){if("undefined"!=typeof a&&"object"==typeof b&&this.inArray(a,b)){for(var d=[],e=0,f=b.length;f>e;++e)if(b[e]===a){if("undefined"!=typeof c&&c===!0)return e;d.push(e)}return d}return!1},shuffle:function(a){if("undefined"!=typeof a&&a.constructor!==Array)return!1;for(var b=a.length,c=!1,d=!1;b--;)d=Math.floor(Math.random()*(b+1)),c=a[b],a[b]=a[d],a[d]=c;return a},forEach:function(b,c,d){if(a.forEach)return a.forEach.call(b,c,d);for(var e=0,f=b.length>>>0;f>e;e++)c.call(d,b[e],e,b)},each:function(){b.forEach.apply(b,[].slice.call(arguments))},map:function(b,c,d){if(a.map)return a.map.call(b,c,d);for(var e=new Array(g),f=0,g=b.length>>>0;g>f;f++)e[f]=c.call(d,b[f],f,b);return e},filter:function(b,c,d){if(a.filter)return a.filter.call(b,c,d);for(var e=[],f=null,g=0,h=b.length;h>g;g++)f=b[g],c.call(d,f,g,b)&&e.push(f);return e},some:function(a,b,c){if(null===a)throw new TypeError("First argument is invalid.");var d=Object(a),e=d.length>>>0;if("function"!=typeof b)throw new TypeError("Second argument must be a function.");for(var f=0;e>f;f++)if(f in d&&b.call(c,d[f],f,d))return!0;return!1},intersect:function(a,b){if(!a||!b||a instanceof Array==!1||b instanceof Array==!1)return[];for(var c=[],d=0,e=a.length;e>d;++d)for(var f=0,g=b.length;g>f;++f)a[d]===b[f]&&c.push(a[d]);return c},convert:function(b){return a.slice.call(b||[],0)},insert:function(a,b,c){a.splice(b,0,c)},remove:function(a,b,c){for(var d=[],e=0,f=a.length;f>e;e++)e>=b&&b+c>e||d.push(a[e]);return d}};return b}),Ink.createModule("Ink.Util.BinPack","1",[],function(){"use strict";var a=function(a,b){this.init(a,b)};a.prototype={init:function(a,b){this.root={x:0,y:0,w:a,h:b}},fit:function(a){var b,c,d;for(b=0;b0?a[0].w:0,g=e>0?a[0].h:0;for(this.root={x:0,y:0,w:f,h:g},b=0;e>b;b++)d=a[b],d.fit=(c=this.findNode(this.root,d.w,d.h))?this.splitNode(c,d.w,d.h):this.growNode(d.w,d.h)},findNode:function(a,b,c){return a.used?this.findNode(a.right,b,c)||this.findNode(a.down,b,c):b<=a.w&&c<=a.h?a:null},splitNode:function(a,b,c){return a.used=!0,a.down={x:a.x,y:a.y+c,w:a.w,h:a.h-c},a.right={x:a.x+b,y:a.y,w:a.w-b,h:c},a},growNode:function(a,b){var c=a<=this.root.w,d=b<=this.root.h,e=d&&this.root.h>=this.root.w+a,f=c&&this.root.w>=this.root.h+b;return e?this.growRight(a,b):f?this.growDown(a,b):d?this.growRight(a,b):c?this.growDown(a,b):null},growRight:function(a,b){this.root={used:!0,x:0,y:0,w:this.root.w+a,h:this.root.h,down:this.root,right:{x:this.root.w,y:0,w:a,h:this.root.h}};var c;return(c=this.findNode(this.root,a,b))?this.splitNode(c,a,b):null},growDown:function(a,b){this.root={used:!0,x:0,y:0,w:this.root.w,h:this.root.h+b,down:{x:0,y:this.root.h,w:this.root.w,h:b},right:this.root};var c;return(c=this.findNode(this.root,a,b))?this.splitNode(c,a,b):null}};var c={random:function(){return Math.random()-.5},w:function(a,b){return b.w-a.w},h:function(a,b){return b.h-a.h},a:function(a,b){return b.area-a.area},max:function(a,b){return Math.max(b.w,b.h)-Math.max(a.w,a.h)},min:function(a,b){return Math.min(b.w,b.h)-Math.min(a.w,a.h)},height:function(a,b){return c.msort(a,b,["h","w"])},width:function(a,b){return c.msort(a,b,["w","h"])},area:function(a,b){return c.msort(a,b,["a","h","w"]) +},maxside:function(a,b){return c.msort(a,b,["max","min","h","w"])},msort:function(a,b,d){var e,f;for(f=0;ff;++f)h=e.blocks[f],"area"in h||(h.area=h.w*h.h);var i=e.dimensions?new a(e.dimensions[0],e.dimensions[1]):new b;e.sorter||(e.sorter="maxside"),e.blocks.sort(c[e.sorter]),i.fit(e.blocks);var j=[i.root.w,i.root.h],k=[],l=[];for(f=0,g=e.blocks.length;g>f;++f)h=e.blocks[f],h.fit?k.push(h):(h.toString=d,l.push(h));var m=j[0]*j[1],n=0;for(f=0,g=k.length;g>f;++f)h=k[f],n+=h.area;return{dimensions:j,filled:n/m,blocks:e.blocks,fitted:k,unfitted:l}}};return e}),Ink.createModule("Ink.Util.Cookie","1",[],function(){"use strict";var a={get:function(a){var b=document.cookie||!1,c={};if(b){b=b.replace(new RegExp("; ","g"),";");var d=b.split(";"),e=[];if(d.length>0)for(var f=0;f1?k:"0"+k;break;case"D":d[j]=this._wDays(f.getDay()).substring(0,3);break;case"j":d[j]=f.getDate();break;case"l":d[j]=this._wDays(f.getDay());break;case"N":d[j]=f.getDay()||7;break;case"S":var l=f.getDate(),m=["st","nd","rd"],n="";d[j]=l>=11&&13>=l?"th":(n=m[String(l).substr(-1)-1])?n:"th";break;case"w":d[j]=f.getDay();break;case"z":g=Date.UTC(f.getFullYear(),0,0),h=Date.UTC(f.getFullYear(),f.getMonth(),f.getDate()),d[j]=Math.floor((h-g)/864e5);break;case"W":var o=new Date(f.getFullYear(),0,1);g=o.getDay()||7;var p=Math.floor((f-o)/864e5+1);d[j]=Math.ceil((p-(8-g))/7)+1;break;case"F":d[j]=this._months(f.getMonth());break;case"m":var q=String(f.getMonth()+1);d[j]=q.length>1?q:"0"+q;break;case"M":d[j]=this._months(f.getMonth()).substring(0,3);break;case"n":d[j]=f.getMonth()+1;break;case"t":d[j]=this._daysInMonth(f.getMonth()+1,f.getYear());break;case"L":var r=f.getFullYear();d[j]=r%4?!1:r%100?!0:r%400?!1:!0;break;case"o":throw'"o" not implemented!';case"Y":d[j]=f.getFullYear();break;case"y":d[j]=String(f.getFullYear()).substring(2);break;case"a":d[j]=f.getHours()<12?"am":"pm";break;case"A":d[j]=f.getHours<12?"AM":"PM";break;case"B":throw'"B" not implemented!';case"g":i=f.getHours(),d[j]=12>=i?i:i-12;break;case"G":d[j]=String(f.getHours());break;case"h":i=String(f.getHours()),i=12>=i?i:i-12,d[j]=i.length>1?i:"0"+i;break;case"H":i=String(f.getHours()),d[j]=i.length>1?i:"0"+i;break;case"i":var s=String(f.getMinutes());d[j]=s.length>1?s:"0"+s;break;case"s":var t=String(f.getSeconds());d[j]=t.length>1?t:"0"+t;break;case"u":throw'"u" not implemented!';case"e":throw'"e" not implemented!';case"I":g=new Date(f.getFullYear(),0,1),d[j]=f.getTimezoneOffset()!==g.getTimezoneOffset()?1:0;break;case"O":var u=f.getTimezoneOffset(),v=u%60;i=String((u-v)/60*-1),"-"!==i.charAt(0)&&(i="+"+i),i=3===i.length?i:i.replace(/([+\-])(\d)/,"$10$2"),d[j]=i+v+"0";break;case"P":throw'"P" not implemented!';case"T":throw'"T" not implemented!';case"Z":d[j]=60*f.getTimezoneOffset();break;case"c":throw'"c" not implemented!';case"r":var w=this._wDays(f.getDay()).substr(0,3),x=this._months(f.getMonth()).substr(0,3);d[j]=w+", "+f.getDate()+" "+x+this.get(" Y H:i:s O",f);break;case"U":d[j]=Math.floor(f.getTime()/1e3);break;default:d[j]=c[j]}return d.join("")},set:function(a,b){if("undefined"!=typeof b){("undefined"==typeof a||""===a)&&(a="Y-m-d");for(var c=a.split(""),d=new Array(c.length),e="\\",f,g={year:void 0,month:void 0,day:void 0,dayY:void 0,dayW:void 0,week:void 0,hour:void 0,hourD:void 0,min:void 0,sec:void 0,msec:void 0,ampm:void 0,diffM:void 0,diffH:void 0,date:void 0},h=0,i=0;i=S.slice(2)?0:1)+M)}else M=L.getFullYear();if(n)N=0,O=f[g.dayY.match+1];else if(o)N=p?this._iMonth(f[g.month.match+1]):L.getMonth(),O=f[g.day.match+1];else{N=0;var T;T=t?f[g.week.match+1]:this.get("W",L),O=7*(T-2)+(8-(new Date(M,0,1).getDay()||7))+this._iWeek(f[g.week.match+1])}if(0===N&&O>31){var U=new Date(M,N,O);N=U.getMonth(),O=U.getDate()}}else M=L.getFullYear(),N=L.getMonth(),O=L.getDate();return I=y?+f[g.hourD.match+1]+("pm"===f[g.ampm.match+1]?12:0):z?f[g.hour.match+1]:x?L.getHours():"00",J=B?f[g.min.match+1]:E?"00":L.getMinutes(),P=C?f[g.sec.match+1]:F?"00":L.getSeconds(),Q=D?f[g.msec.match+1]:"000",R=H?f[g.diffH.match+1]:G?String(-1*f[g.diffM.match+1]/60*100).replace(/^(\d)/,"+$1").replace(/(^[\-+])(\d{3}$)/,"$10$2"):"+0000",new Date(M,N,O,I,J,P)}}}};return a}),Ink.createModule("Ink.Util.Dumper","1",[],function(){"use strict";var a={_tab:"    ",_formatParam:function(a){var b="";switch(typeof a){case"string":b="(string) "+a;break;case"number":b="(number) "+a;break;case"boolean":b="(boolean) "+a;break;case"object":b=null!==a?a.constructor===Array?"Array \n{\n"+this._outputFormat(a,0)+"\n}":"Object \n{\n"+this._outputFormat(a,0)+"\n}":"null";break;default:b=!1}return b},_getTabs:function(a){for(var b="",c=0;a>c;c++)b+=this._tab;return b},_outputFormat:function(a,b){var c="",d=!1;for(var e in a)if(null!==a[e])if("object"!=typeof a[e]||a[e].constructor!==Array&&a[e].constructor!==Object){if(a[e].constructor===Function)continue;c=c+this._tab+this._getTabs(b)+"["+e+"] => "+a[e]+"\n"}else a[e].constructor===Array?d="Array":a[e].constructor===Object&&(d="Object"),c+=this._tab+this._getTabs(b)+"["+e+"] => "+d+"\n",c+=this._tab+this._getTabs(b)+"{\n",c+=this._outputFormat(a[e],b+1)+this._tab+this._getTabs(b)+"}\n";else c=c+this._tab+this._getTabs(b)+"["+e+"] => null \n";return c},printDump:function(a,b){if(b&&"undefined"!=typeof b)if("string"==typeof b)document.getElementById(b).innerHTML="
    "+this._formatParam(a)+"
    ";else{if("object"!=typeof b)throw"TARGET must be an element or an element ID";b.innerHTML="
    "+this._formatParam(a)+"
    "}else document.write("
    "+this._formatParam(a)+"
    ")},returnDump:function(a){return this._formatParam(a)},alertDump:function(a){window.alert(this._formatParam(a).replace(/()(Array|Object)(<\/b>)/g,"$2"))},windowDump:function(a){var b="dumperwindow_"+1e4*Math.random(),c=window.open("",b,"width=400,height=300,left=50,top=50,status,menubar,scrollbars,resizable");c.document.open(),c.document.write("
    "+this._formatParam(a)+"
    "),c.document.close(),c.focus()}};return a}),Ink.createModule("Ink.Util.I18n","1",[],function(){"use strict";var a=/\{(?:(\{.*?})|(?:%s:)?(\d+)|(?:%s)?|([\w-]+))}/g,b=function(a,b){return"function"==typeof a?a.apply(this,b):void 0!==typeof a?a:""},c=function(a,b,d){return this instanceof c?void this.reset().lang(b).testMode(d).append(a||{},b):new c(a,b,d)};return c.prototype={reset:function(){return this._dicts=[],this._dict={},this._testMode=!1,this._lang=this._gLang,this},append:function(a){return this._dicts.push(a),this._dict=Ink.extendObj(this._dict,a[this._lang]),this},lang:function(a){if(!arguments.length)return this._lang;if(a&&this._lang!==a){this._lang=a,this._dict={};for(var b=0,c=this._dicts.length;c>b;b++)this._dict=Ink.extendObj(this._dict,this._dicts[b][a]||{})}return this},testMode:function(a){return arguments.length?(void 0!==a&&(this._testMode=!!a),this):!!this._testMode},getKey:function(a){var b,d=this._gLang,e=this._lang;return a in this._dict?b=this._dict[a]:(c.lang(e),b=this._gDict[a],c.lang(d)),b},text:function(c){if("string"==typeof c){var d=Array.prototype.slice.call(arguments,1),e=0,f="object"==typeof d[0],g=this.getKey(c);return void 0===g&&(g=this._testMode?"["+c+"]":c),"number"==typeof g&&(g+=""),"string"==typeof g?g=g.replace(a,function(a,c,g,h){var i=c?c:g?d[g-(f?0:1)]:h?d[0][h]||"":d[e++ +(f?1:0)];return b(i,[e].concat(d))}):"function"==typeof g?g.apply(this,d):g instanceof Array?b(g[d[0]],d):"object"==typeof g?b(g[d[0]],d):""}},ntext:function(a,b,c){var d=Array.prototype.slice.apply(arguments),e;if(2===d.length&&"number"==typeof b){if(e=this.getKey(a),!(e instanceof Array))return"";d.splice(0,1),e=e[1===b?0:1]}else d.splice(0,2),e=1===c?a:b;return this.text.apply(this,[e].concat(d))},ordinal:function(a){if(void 0===a)return"";var c=+a.toString().slice(-1),d=this.getKey("_ordinals");if(void 0===d)return"";if("string"==typeof d)return d;var e;return"function"==typeof d&&(e=d(a,c),"string"==typeof e)?e:"exceptions"in d&&(e="function"==typeof d.exceptions?d.exceptions(a,c):a in d.exceptions?b(d.exceptions[a],[a,c]):void 0,"string"==typeof e)?e:"byLastDigit"in d&&(e="function"==typeof d.byLastDigit?d.byLastDigit(c,a):c in d.byLastDigit?b(d.byLastDigit[c],[c,a]):void 0,"string"==typeof e)?e:"default"in d&&(e=b(d["default"],[a,c]),"string"==typeof e)?e:""},alias:function(){var a=Ink.bind(c.prototype.text,this);return a.ntext=Ink.bind(c.prototype.ntext,this),a.append=Ink.bind(c.prototype.append,this),a.ordinal=Ink.bind(c.prototype.ordinal,this),a.testMode=Ink.bind(c.prototype.testMode,this),a}},c.reset=function(){c.prototype._gDicts=[],c.prototype._gDict={},c.prototype._gLang="pt_PT"},c.reset(),c.append=function(a,b){if(b){if(!(b in a)){var d={};d[b]=a,a=d}b!==c.prototype._gLang&&c.lang(b)}c.prototype._gDicts.push(a),Ink.extendObj(c.prototype._gDict,a[c.prototype._gLang])},c.lang=function(a){if(!arguments.length)return c.prototype._gLang;if(a&&c.prototype._gLang!==a){c.prototype._gLang=a,c.prototype._gDict={};for(var b=0,d=c.prototype._gDicts.length;d>b;b++)Ink.extendObj(c.prototype._gDict,c.prototype._gDicts[b][a]||{})}},c}),Ink.createModule("Ink.Util.Json","1",[],function(){"use strict";var function_call=Function.prototype.call,cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function twoDigits(a){var b=""+a;return 1===b.length?"0"+b:b}var dateToISOString=Date.prototype.toISOString?Ink.bind(function_call,Date.prototype.toISOString):function(a){return a.getUTCFullYear()+"-"+twoDigits(a.getUTCMonth()+1)+"-"+twoDigits(a.getUTCDate())+"T"+twoDigits(a.getUTCHours())+":"+twoDigits(a.getUTCMinutes())+":"+twoDigits(a.getUTCSeconds())+"."+String((a.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"},InkJson={_nativeJSON:window.JSON||null,_convertToUnicode:!1,_escape:function(a){var b={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(a)&&(a=a.replace(/([\x00-\x1f\\"])/g,function(a,c){var d=b[c];return d?d:(d=c.charCodeAt(),"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16))})),a},_toUnicode:function(a){if(this._convertToUnicode){for(var b="",c=!1,d=!1,e=0,f=a.length;f>e;){if(c=a.charCodeAt(e),c>=32&&126>=c||8===c||9===c||10===c||12===c||13===c||32===c||34===c||47===c||58===c||92===c)d=34===c||92===c||47===c?"\\"+a.charAt(e):8===c?"\\b":9===c?"\\t":10===c?"\\n":12===c?"\\f":13===c?"\\r":a.charAt(e);else if(this._convertToUnicode){for(d=a.charCodeAt(e).toString(16)+"".toUpperCase();d.length<4;)d="0"+d;d="\\u"+d}else d=a.charAt(e);b+=d,e++}return b}return this._escape(a)},_stringifyValue:function(a){if("string"==typeof a)return'"'+this._toUnicode(a)+'"';if("number"!=typeof a||!isNaN(a)&&isFinite(a)){if("undefined"==typeof a||null===a)return"null";if("function"==typeof a.toJSON){var b=a.toJSON();return"string"==typeof b?'"'+this._escape(b)+'"':this._escape(b.toString())}if("number"==typeof a||"boolean"==typeof a)return""+a;if("function"==typeof a)return"null";if(a.constructor===Date)return'"'+this._escape(dateToISOString(a))+'"';if(a.constructor===Array){for(var c="",d=0,e=a.length;e>d;d++)d>0&&(c+=","),c+=this._stringifyValue(a[d]);return"["+c+"]"}var f="";for(var g in a)({}).hasOwnProperty.call(a,g)&&(""!==f&&(f+=","),f+='"'+this._escape(g)+'": '+this._stringifyValue(a[g]));return"{"+f+"}"}return"null"},stringify:function(a,b){return this._convertToUnicode=!!b,!this._convertToUnicode&&this._nativeJSON?this._nativeJSON.stringify(a):this._stringifyValue(a)},parse:function(text,reviver){var j;function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")}};return InkJson}),Ink.createModule("Ink.Util.String","1",[],function(){"use strict";var InkUtilString={_chars:["&","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","ø","ù","ú","û","ü","ý","þ","ÿ","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","Ø","Ù","Ú","Û","Ü","Ý","Þ","€",'"',"ß","<",">","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","­","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾"],_entities:["amp","agrave","aacute","acirc","atilde","auml","aring","aelig","ccedil","egrave","eacute","ecirc","euml","igrave","iacute","icirc","iuml","eth","ntilde","ograve","oacute","ocirc","otilde","ouml","oslash","ugrave","uacute","ucirc","uuml","yacute","thorn","yuml","Agrave","Aacute","Acirc","Atilde","Auml","Aring","AElig","Ccedil","Egrave","Eacute","Ecirc","Euml","Igrave","Iacute","Icirc","Iuml","ETH","Ntilde","Ograve","Oacute","Ocirc","Otilde","Ouml","Oslash","Ugrave","Uacute","Ucirc","Uuml","Yacute","THORN","euro","quot","szlig","lt","gt","cent","pound","curren","yen","brvbar","sect","uml","copy","ordf","laquo","not","shy","reg","macr","deg","plusmn","sup2","sup3","acute","micro","para","middot","cedil","sup1","ordm","raquo","frac14","frac12","frac34"],_accentedChars:["à","á","â","ã","ä","å","è","é","ê","ë","ì","í","î","ï","ò","ó","ô","õ","ö","ù","ú","û","ü","ç","ñ","À","Á","Â","Ã","Ä","Å","È","É","Ê","Ë","Ì","Í","Î","Ï","Ò","Ó","Ô","Õ","Ö","Ù","Ú","Û","Ü","Ç","Ñ"],_accentedRemovedChars:["a","a","a","a","a","a","e","e","e","e","i","i","i","i","o","o","o","o","o","u","u","u","u","c","n","A","A","A","A","A","A","E","E","E","E","I","I","I","I","O","O","O","O","O","U","U","U","U","C","N"],_htmlUnsafeChars:{"<":"<",">":">","&":"&",'"':""","'":"'"},ucFirst:function(a,b){var c=b?/(^|\s)(\w)(\S{2,})/:/(^|\s)(\w)(\S{2,})/g;return a?String(a).replace(c,function(a,b,c,d){return b+c.toUpperCase()+d.toLowerCase()}):a},trim:function(a){return"string"==typeof a?a.replace(/^\s+|\s+$|\n+$/g,""):a},stripTags:function(a,b){if(b&&"string"==typeof b){for(var c=InkUtilString.trim(b).split(","),d=[],e=!1,f=0;f)/g,"").replace(/\s/,"")),d.push("(<"+e+"\\s[^>]+>|<(\\s|\\/)?(\\s|\\/)?"+e+">)"));for(var g=d.join("|"),h=new RegExp(g,"i"),i=a.match(new RegExp("<[^>]*>","g")),j=0;j]+\>/g,"")},htmlEntitiesEncode:function(a){if(a&&a.replace)for(var b=!1,c=0;cd?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},shortString:function(a,b){for(var c=a.split(" "),d="",e=0;e=b){d+="…";break}d+=c[e]+" "}return d},truncateString:function(a,b){return a.length-1>b?a.substr(0,b-1)+"…":a},utf8Decode:function(a){for(var b="",c=0,d=0,e=0,f=0;cd?(b+=String.fromCharCode(d),c++):d>191&&224>d?(e=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&e),c+=2):(e=a.charCodeAt(c+1),f=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&e)<<6|63&f),c+=3);return b},removeAccentedChars:function(a){for(var b=a,c=!1,d=0;d&'"]/g,function(a){return b[a]}):a},normalizeWhitespace:function(a){return null!==a?InkUtilString.trim(String(a).replace(/\s+/g," ")):a},toUnicode:function(a){if("string"==typeof a){for(var b="",c=!1,d=!1,e=a.length,f=0;e>f;){if(c=a.charCodeAt(f),c>=32&&126>=c||8===c||9===c||10===c||12===c||13===c||32===c||34===c||47===c||58===c||92===c)d=8===c?"\\b":9===c?"\\t":10===c?"\\n":12===c?"\\f":13===c?"\\r":a.charAt(f);else{for(d=a.charCodeAt(f).toString(16)+"".toUpperCase();d.length<4;)d="0"+d;d="\\u"+d}b+=d,f++}return b}},escape:function(a){var b=a.charCodeAt(0).toString(16).split("");if(b.length<3){for(;b.length<2;)b.unshift("0");b.unshift("x")}else{for(;b.length<4;)b.unshift("0");b.unshift("u")}return b.unshift("\\"),b.join("")},unescape:function(a){var b=a.lastIndexOf("0");b=-1===b?2:Math.min(b,2);var c=a.substring(b),d=parseInt(c,16);return String.fromCharCode(d)},escapeText:function(a,b){void 0===b&&(b=["[","]","'",","]);for(var c=[],d,e,f=0,g=a.length;g>f;++f)d=a[f],e=d.charCodeAt(0),(32>e||e>126&&-1===b.indexOf(d))&&(d=InkUtilString.escape(d)),c.push(d);return c.join("")},escapedCharRegex:/(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4})/g,unescapeText:function(a){for(var b;b=InkUtilString.escapedCharRegex.exec(a);)b=b[0],a=a.replace(b,InkUtilString.unescape(b)),InkUtilString.escapedCharRegex.lastIndex=0;return a},strcmp:function(a,b){return a===b?0:a>b?1:-1},packetize:function(a,b){for(var c=a.length,d=new Array(Math.ceil(c/b)),e=a.split(""),f,g=0;c;)f=Math.min(b,c),d[g++]=e.splice(0,f).join(""),c-=f;return d}};return InkUtilString}),Ink.createModule("Ink.Util.Url","1",[],function(){"use strict";var a={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",getUrl:function(){return window.location.href},genQueryString:function(a,b){var c=-1!==a.indexOf("?"),d,e,f,g=[a];for(e in b)b.hasOwnProperty(e)&&(c?d="&":(d="?",c=!0),f=b[e],"number"==typeof f||f||(f=""),g=g.concat([d,encodeURIComponent(e),"=",encodeURIComponent(f)]));return g.join("")},getQueryString:function(a){var b;b=a&&"undefined"!=typeof a?a:this.getUrl();var c={};if(b.match(/\?(.+)/i)){var d=b.replace(/^(.*)\?([^\#]+)(\#(.*))?/g,"$2");if(d.length>0)for(var e=d.split(/[;&]/),f=0;f0)for(var e=d.split(/[;&]/),f=0;f0?b[b.length-1]:!1;for(var c=!1,d=new RegExp(""+a,"i"),e=0,f=b.length;f>e;e++)if(c=b[e],d.test(c.src))return c;return!1},_debug:function(){}};return a}),Ink.createModule("Ink.Util.Validator","1",[],function(){"use strict";var a={_countryCodes:["AO","CV","MZ","PT"],_internacionalPT:351,_indicativosPT:{21:"lisboa",22:"porto",231:"mealhada",232:"viseu",233:"figueira da foz",234:"aveiro",235:"arganil",236:"pombal",238:"seia",239:"coimbra",241:"abrantes",242:"ponte de sôr",243:"santarém",244:"leiria",245:"portalegre",249:"torres novas",251:"valença",252:"vila nova de famalicão",253:"braga",254:"peso da régua",255:"penafiel",256:"são joão da madeira",258:"viana do castelo",259:"vila real",261:"torres vedras",262:"caldas da raínha",263:"vila franca de xira",265:"setúbal",266:"évora",268:"estremoz",269:"santiago do cacém",271:"guarda",272:"castelo branco",273:"bragança",274:"proença-a-nova",275:"covilhã",276:"chaves",277:"idanha-a-nova",278:"mirandela",279:"moncorvo",281:"tavira",282:"portimão",283:"odemira",284:"beja",285:"moura",286:"castro verde",289:"faro",291:"funchal, porto santo",292:"corvo, faial, flores, horta, pico",295:"angra do heroísmo, graciosa, são jorge, terceira",296:"ponta delgada, são miguel, santa maria",91:"rede móvel 91 (Vodafone / Yorn)",93:"rede móvel 93 (Optimus)",96:"rede móvel 96 (TMN)",92:"rede móvel 92 (TODOS)",707:"número único",760:"número único",800:"número grátis",808:"chamada local",30:"voip"},_internacionalCV:238,_indicativosCV:{2:"fixo",91:"móvel 91",95:"móvel 95",97:"móvel 97",98:"móvel 98",99:"móvel 99"},_internacionalAO:244,_indicativosAO:{2:"fixo",91:"móvel 91",92:"móvel 92"},_internacionalMZ:258,_indicativosMZ:{2:"fixo",82:"móvel 82",84:"móvel 84"},_internacionalTL:670,_indicativosTL:{3:"fixo",7:"móvel 7"},_characterGroups:{numbers:["0-9"],asciiAlpha:["a-zA-Z"],latin1Alpha:["a-zA-Z","À-ÿ"],unicodeAlpha:["a-zA-Z","À-ÿ","Ā-῿","Ⰰ-퟿"],space:[" "],dash:["-"],underscore:["_"],nicknamePunctuation:["_.-"],singleLineWhitespace:[" "],newline:["\n"],whitespace:[" \n \f\r  "],asciiPunctuation:["!-/",":-@","[-`","{-~"],latin1Punctuation:["!-/",":-@","[-`","{-~","¡-¿","×","÷"],unicodePunctuation:["!-/",":-@","[-`","{-~","¡-¿","×","÷"," -","⸀-⹿"," -〿"]},createRegExp:function(b){var c="^[";for(var d in b)if(b.hasOwnProperty(d)){if(!(d in a._characterGroups))throw new Error("group "+d+" is not a valid character group");b[d]&&(c+=a._characterGroups[d].join(""))}return new RegExp(c+"]*?$")},checkCharacterGroups:function(b,c){return a.createRegExp(c).test(b)},unicode:function(b,c){return a.checkCharacterGroups(b,Ink.extendObj({unicodeAlpha:!0},c))},latin1:function(b,c){return a.checkCharacterGroups(b,Ink.extendObj({latin1Alpha:!0},c))},ascii:function(b,c){return a.checkCharacterGroups(b,Ink.extendObj({asciiAlpha:!0},c))},number:function(b,c){b+="";var d=Ink.extendObj({decimalSep:".",thousandSep:"",negative:!0,decimalPlaces:null,maxDigits:null,max:null,min:null,returnNumber:!1},c||{});if(d.thousandSep)return b=b.replace(new RegExp("\\"+d.thousandSep,"g"),""),d.thousandSep="",a.number(b,d);if(d.negative===!1)return d.min=0,d.negative=!0,a.number(b,d);if("."!==d.decimalSep&&(b=b.replace(new RegExp("\\"+d.decimalSep,"g"),".")),!/^(-)?(\d+)?(\.\d+)?$/.test(b)||""===b)return!1;var e;if(d.decimalSep&&-1!==b.indexOf(d.decimalSep)){if(e=b.split(d.decimalSep),null!==d.decimalPlaces&&e[1].length>d.decimalPlaces)return!1}else e=[""+b,""];if(null!==d.maxDigits&&e[0].replace(/-/g,"").length>d.maxDigits)return e;var f=parseFloat(b);return null!==d.maxExcl&&f>=d.maxExcl||null!==d.minExcl&&f<=d.minExcl?!1:null!==d.max&&f>d.max||null!==d.min&&f=1&&12>=b&&c>=1&&this._daysInMonth(b,a)>=c?!0:!1},email:function(a){var b=new RegExp("^[_a-z0-9-]+((\\.|\\+)[_a-z0-9-]+)*@([\\w]*-?[\\w]*\\.)+[a-z]{2,4}$","i");return b.test(a)?!0:!1},mail:function(b){return a.email(b)},url:function(a,b){if("undefined"==typeof b||b===!1){var c=new RegExp("(^(http\\:\\/\\/|https\\:\\/\\/)(.+))","i");c.test(a)===!1&&(a="http://"+a)}var d=new RegExp("^(http:\\/\\/|https:\\/\\/)([\\w]*(-?[\\w]*)*\\.)+[a-z]{2,4}","i"); +return d.test(a)===!1?!1:!0},isPTPhone:function(a){a=a.toString();var b=[];for(var c in this._indicativosPT)"string"==typeof this._indicativosPT[c]&&b.push(c);var d=b.join("|"),e=/^(00351|\+351)/;e.test(a)&&(a=a.replace(e,""));var f=/(\s|\-|\.)+/g;a=a.replace(f,"");var g=/[\d]{9}/i;if(9===a.length&&g.test(a)){var h=new RegExp("^("+d+")");if(h.test(a))return!0}return!1},isPortuguesePhone:function(a){return this.isPTPhone(a)},isCVPhone:function(a){a=a.toString();var b=[];for(var c in this._indicativosCV)"string"==typeof this._indicativosCV[c]&&b.push(c);var d=b.join("|"),e=/^(00238|\+238)/;e.test(a)&&(a=a.replace(e,""));var f=/(\s|\-|\.)+/g;a=a.replace(f,"");var g=/[\d]{7}/i;if(7===a.length&&g.test(a)){var h=new RegExp("^("+d+")");if(h.test(a))return!0}return!1},isAOPhone:function(a){a=a.toString();var b=[];for(var c in this._indicativosAO)"string"==typeof this._indicativosAO[c]&&b.push(c);var d=b.join("|"),e=/^(00244|\+244)/;e.test(a)&&(a=a.replace(e,""));var f=/(\s|\-|\.)+/g;a=a.replace(f,"");var g=/[\d]{9}/i;if(9===a.length&&g.test(a)){var h=new RegExp("^("+d+")");if(h.test(a))return!0}return!1},isMZPhone:function(a){a=a.toString();var b=[];for(var c in this._indicativosMZ)"string"==typeof this._indicativosMZ[c]&&b.push(c);var d=b.join("|"),e=/^(00258|\+258)/;e.test(a)&&(a=a.replace(e,""));var f=/(\s|\-|\.)+/g;a=a.replace(f,"");var g=/[\d]{8,9}/i;if((9===a.length||8===a.length)&&g.test(a)){var h=new RegExp("^("+d+")");if(h.test(a)){if(0===a.indexOf("2")&&8===a.length)return!0;if(0===a.indexOf("8")&&9===a.length)return!0}}return!1},isTLPhone:function(a){a=a.toString();var b=[];for(var c in this._indicativosTL)"string"==typeof this._indicativosTL[c]&&b.push(c);var d=b.join("|"),e=/^(00670|\+670)/;e.test(a)&&(a=a.replace(e,""));var f=/(\s|\-|\.)+/g;a=a.replace(f,"");var g=/[\d]{7}/i;if(7===a.length&&g.test(a)){var h=new RegExp("^("+d+")");if(h.test(a))return!0}return!1},isPhone:function(){var a;if(0===arguments.length)return!1;var b=arguments[0];if(arguments.length>1){if(arguments[1].constructor!==Array){if("function"==typeof this["is"+arguments[1].toUpperCase()+"Phone"])return this["is"+arguments[1].toUpperCase()+"Phone"](b);throw"Invalid Country Code!"}var c;for(a=0;a=0&&b[j-1]<=100))return!1;c=!0}if(1===j||3===j||5===j&&("undefined"==typeof b[j+1]||""===b[j+1])){if(!("undefined"!=typeof b[j]&&b[j]>=0&&b[j]<=255))return!1;c=!0}}if(null!==(b=h.exec(a))||null!==(b=i.exec(a)))for(j=b.length;j--;){if(3===j||5===j){if(!("undefined"!=typeof b[j-1]&&"undefined"!=typeof b[j]&&""!==b[j]&&b[j-1]>=0&&b[j-1]<=100))return!1;c=!0}if(1===j){if(!("undefined"!=typeof b[j]&&b[j]>=0&&b[j]<=360))return!1;c=!0}}return c},isIP:function(a,b){if("string"!=typeof a)return!1;switch(b=(b||"ipv4").toLowerCase()){case"ipv4":return/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(a);case"ipv6":return/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/.test(a);default:return!1}},_creditCardSpecs:{"default":{length:"13,14,15,16,17,18,19",prefix:/^.+/,luhn:!0},"american express":{length:"15",prefix:/^3[47]/,luhn:!0},"diners club":{length:"14,16",prefix:/^36|55|30[0-5]/,luhn:!0},discover:{length:"16",prefix:/^6(?:5|011)/,luhn:!0},jcb:{length:"15,16",prefix:/^3|1800|2131/,luhn:!0},maestro:{length:"16,18",prefix:/^50(?:20|38)|6(?:304|759)/,luhn:!0},mastercard:{length:"16",prefix:/^5[1-5]/,luhn:!0},visa:{length:"13,16",prefix:/^4/,luhn:!0}},_luhn:function(a){if(a=parseInt(a,10),"number"!=typeof a&&a%1!==0)return!1;a+="";var b=a.length,c,d=0;for(c=b-1;c>=0;c-=2)d+=parseInt(a.substr(c,1),10);for(c=b-2;c>=0;c-=2){var e=parseInt(2*a.substr(c,1),10);d+=e>=10?e-9:e}return d%10===0},isCreditCard:function(a,b){if(/\d+/.test(a)===!1)return!1;if("undefined"==typeof b)b="default";else if(b instanceof Array){var c,d=b.length;for(c=0;d>c;c++)if(this.isCreditCard(a,b[c]))return!0;return!1}if(b=b.toLowerCase(),"undefined"==typeof this._creditCardSpecs[b])return!1;var e=a.length+"";return-1===this._creditCardSpecs[b].length.split(",").indexOf(e)?!1:this._creditCardSpecs[b].prefix.test(a)?this._creditCardSpecs[b].luhn===!1?!0:this._luhn(a):!1}};return a}); +//# sourceMappingURL=ink-all.js.map \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink-ui.js b/ajax/libs/ink/3.0.0/js/ink-ui.js new file mode 100644 index 000000000..4b0339566 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink-ui.js @@ -0,0 +1,11786 @@ +/** + * @module Ink.UI.Animate_1 + * Animate.css Utility + * @version 1 + */ + +Ink.createModule('Ink.UI.Animate', 1, ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Css_1'], function (Common, InkEvent, Css) { + 'use strict'; + + var animationPrefix = (function (el) { + return ('animationName' in el.style) ? 'animation' : + ('oAnimationName' in el.style) ? 'oAnimation' : + ('msAnimationName' in el.style) ? 'msAnimation' : + ('webkitAnimationName' in el.style) ? 'webkitAnimation' : null; + }(document.createElement('div'))); + + var animationEndEventName = { + animation: 'animationend', + oAnimation: 'oanimationend', + msAnimation: 'MSAnimationEnd', + webkitAnimation: 'webkitAnimationEnd' + }[animationPrefix]; + + /** + * @class Ink.UI.Animate_1 + * @constructor + * + * @param {DOMElement} element Animated element + * @param {Object} options Options object + * @param {String} options.animation Animation name + * @param {String|Number} [options.duration] Duration name (fast|medium|slow) or duration in milliseconds. Defaults to 'medium'. + * @param {Boolean} [options.removeClass] Flag to remove the CSS class when finished animating. Defaults to false. + * @param {Function} [options.onEnd] Callback for the animation end + * + * @sample Ink_Animate_1.html + * + **/ + function Animate(elOrSelector, options) { + this._element = Common.elOrSelector(elOrSelector); + this._options = Common.options({ + trigger: ['Element', null], + duration: ['String', 'slow'], // Actually a string with a duration name, or a number of ms + animation: ['String'], + removeClass: ['Boolean', true], + onEnd: ['Function', function () {}] + }, options || {}, this._element); + + if (!isNaN(parseInt(this._options.duration, 10))) { + this._options.duration = parseInt(this._options.duration, 10); + } + + if (this._options.trigger) { + InkEvent.observe(this._options.trigger, 'click', Ink.bind(function () { + this.animate(); + }, this)); // later + } else { + this.animate(); + } + } + + Animate.prototype.animate = function () { + Animate.animate(this._element, this._options.animation, this._options); + }; + + Ink.extendObj(Animate, { + /** + * Browser prefix for the CSS animations. + * + * @property _animationPrefix + * @private + **/ + _animationPrefix: animationPrefix, + + /** + * CSS3 animation browser support. + * + * @property {Boolean} animationSupported + **/ + animationSupported: !!animationPrefix, + + /** + * Prefixed animation end event name. + * + * @property {String} animationEndEventName + **/ + animationEndEventName: animationEndEventName, + + /** + * Animate an element using one of the animate.css classes + * + * **Note: This is a utility method inside the `Animate` class, which you can access through `Animate.animate()`. Do not mix these up.** + * + * @example + * + * Animate.animate(myDiv, 'shake', { + * onEnd: function () { + * alert('Finished shaking!'); + * } + * }); + * + * @static + * @method animate + * @param element {DOMElement} animated element + * @param animation {String} animation name + * @param [options] {Object} + * @param [options.onEnd=null] {Function} callback for animation end + * @param [options.removeClass=false] {Boolean} whether to remove the Css class when finished + * @param [options.duration=medium] {String|Number} duration name (fast|medium|slow) or duration in ms + **/ + animate: function (element, animation, options) { + element = Common.elOrSelector(element); + + if (typeof options === 'number' || typeof options === 'string') { + options = { duration: options }; + } + + if (typeof arguments[3] === 'function') { + options.onEnd = arguments[3]; + } + + if (typeof options.duration !== 'number' && typeof options.duration !== 'string') { + options.duration = 400; + } + + if (!Animate.animationSupported) { + if (options.onEnd) { + setTimeout(function () { + options.onEnd(null); + }, 0); + } + return; + } + + if (typeof options.duration === 'number') { + element.style[animationPrefix + 'Duration'] = options.duration + 'ms'; + } else if (typeof options.duration === 'string') { + Css.addClassName(element, options.duration); + } + + Css.addClassName(element, ['animated', animation]); + + function onAnimationEnd(event) { + if (event.target !== element) { return; } + if (event.animationName !== animation) { return; } + if (options.onEnd) { options.onEnd(event); } + if (options.removeClass) { + Css.removeClassName(element, animation); + } + if (typeof options.duration === 'string') { + Css.removeClassName(element, options.duration); + } + element.removeEventListener(animationEndEventName, onAnimationEnd, false); + } + + element.addEventListener(animationEndEventName, onAnimationEnd, false); + } + }); + + return Animate; +}); +/** + * @module Ink.UI.Carousel_1 + * Flexible Carousel + * @version 1 + */ + +Ink.createModule('Ink.UI.Carousel', '1', + ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Css_1', 'Ink.Dom.Element_1', 'Ink.UI.Pagination_1', 'Ink.Dom.Browser_1', 'Ink.Dom.Selector_1'], + function(Common, InkEvent, Css, InkElement, Pagination, Browser/*, Selector*/) { + 'use strict'; + + /* + * TODO: + * keyboardSupport + */ + + function limitRange(n, min, max) { + return Math.min(max, Math.max(min, n)); + } + + var requestAnimationFrame = window.requestAnimationFrame || + window.mozRequestAnimationFrame || + window.webkitRequestAnimationFrame || + function (cb) {return setTimeout(cb, 1000 / 30); }; + + /** + * @class Ink.UI.Carousel_1 + * @constructor + * + * @param {String|DOMElement} selector DOM element or element id + * @param {Object} [options] Carousel Options + * @param {Integer} [options.autoAdvance] Milliseconds to wait before auto-advancing pages. Set to 0 to disable auto-advance. Defaults to 0. + * @param {String} [options.axis] Axis of the carousel. Set to 'y' for a vertical carousel. Defaults to 'x'. + * @param {Boolean} [options.center] Flag to center the carousel horizontally. + * @param {Number} [options.initialPage] Initial index page of the carousel. Defaults to 0. + * @param {Boolean} [options.spaceAfterLastSlide=true] If there are not enough slides to fill the full width of the last page, leave white space. Defaults to `true`. + * @param {Boolean} [options.swipe] Enable swipe support if available. Defaults to true. + * @param {Mixed} [options.pagination] Either an `
      ` element to add pagination markup to or an `Ink.UI.Pagination` instance to use. + * @param {Function} [options.onChange] Callback to be called when the page changes. + * + * @sample Ink_UI_Carousel_1.html + */ + var Carousel = function(selector, options) { + this._handlers = { + paginationChange: Ink.bindMethod(this, '_onPaginationChange'), + windowResize: InkEvent.throttle(Ink.bindMethod(this, 'refit'), 200) + }; + + InkEvent.observe(window, 'resize', this._handlers.windowResize); + + var element = this._element = Common.elOrSelector(selector, '1st argument'); + + var opts = this._options = Common.options({ + autoAdvance: ['Integer', 0], + axis: ['String', 'x'], + initialPage: ['Integer', 0], + spaceAfterLastSlide: ['Boolean', true], + hideLast: ['Boolean', false], + center: ['Boolean', false], + keyboardSupport:['Boolean', false], + pagination: ['String', null], + onChange: ['Function', null], + swipe: ['Boolean', true] + // TODO exponential swipe + // TODO specify break point for next page when moving finger + }, options || {}, element, this); + + this._isY = (opts.axis === 'y'); + + var ulEl = Ink.s('ul.stage', element); + this._ulEl = ulEl; + + InkElement.removeTextNodeChildren(ulEl); + + if (this._options.pagination == null) { + this._currentPage = this._options.initialPage; + } + + this.refit(); // recalculate this._numPages + + if (this._isY) { + // Override white-space: no-wrap which is only necessary to make sure horizontal stuff stays horizontal, but breaks stuff intended to be vertical. + this._ulEl.style.whiteSpace = 'normal'; + } + + if (opts.swipe) { + InkEvent.observe(element, 'touchstart', Ink.bindMethod(this, '_onTouchStart')); + InkEvent.observe(element, 'touchmove', Ink.bindMethod(this, '_onTouchMove')); + InkEvent.observe(element, 'touchend', Ink.bindMethod(this, '_onTouchEnd')); + } + + this._setUpPagination(); + this._setUpAutoAdvance(); + this._setUpHider(); + }; + + Carousel.prototype = { + /** + * Repositions elements around. + * Measure the carousel once again, adjusting the involved elements' sizes. This is called automatically when the window resizes, in order to cater for changes from responsive media queries, for instance. + * + * @method refit + * @public + */ + refit: function() { + var _isY = this._isY; + + var size = function (elm, perpendicular) { + if (!perpendicular) { + return InkElement.outerDimensions(elm)[_isY ? 1 : 0]; + } else { + return InkElement.outerDimensions(elm)[_isY ? 0 : 1]; + } + }; + + this._liEls = Ink.ss('li.slide', this._ulEl); + var numSlides = this._liEls.length; + + var contRect = this._ulEl.getBoundingClientRect(); + this._ctnLength = _isY ? contRect.bottom - contRect.top : contRect.right - contRect.left; + this._elLength = size(this._liEls[0]); + this._slidesPerPage = Math.floor( this._ctnLength / this._elLength ) || 1; + + var numPages = Math.ceil( numSlides / this._slidesPerPage ); + var numPagesChanged = this._numPages !== numPages; + this._numPages = numPages; + this._deltaLength = this._slidesPerPage * this._elLength; + + this._center(); + this._updateHider(); + this._IE7(); + + if (this._pagination && numPagesChanged) { + this._pagination.setSize(this._numPages); + } + this.setPage(limitRange(this.getPage(), 0, this._numPages)); + }, + + _setUpPagination: function () { + if (this._options.pagination) { + if (Common.isDOMElement(this._options.pagination) || + typeof this._options.pagination === 'string') { + // if dom element or css selector string... + this._pagination = new Pagination(this._options.pagination, { + size: this._numPages, + onChange: this._handlers.paginationChange + }); + } else { + // assumes instantiated pagination + this._pagination = this._options.pagination; + this._pagination._options.onChange = this._handlers.paginationChange; + this._pagination.setSize(this._numPages); + } + this._pagination.setCurrent(this._options.initialPage || 0); + } else { + this._currentPage = this._options.initialPage || 0; + } + }, + + _setUpAutoAdvance: function () { + if (!this._options.autoAdvance) { return; } + var self = this; + + setTimeout(function autoAdvance() { + self.nextPage(true /* wrap */); + setTimeout(autoAdvance, self._options.autoAdvance); + }, this._options.autoAdvance); + }, + + _setUpHider: function () { + if (this._options.hideLast) { + var hiderEl = InkElement.create('div', { + className: 'hider', + insertBottom: this._element + }); + hiderEl.style.position = 'absolute'; + hiderEl.style[ this._isY ? 'left' : 'top' ] = '0'; // fix to top.. + hiderEl.style[ this._isY ? 'right' : 'bottom' ] = '0'; // and bottom... + hiderEl.style[ this._isY ? 'bottom' : 'right' ] = '0'; // and move to the end. + this._hiderEl = hiderEl; + } + }, + + _center: function() { + if (!this._options.center) { return; } + var gap = Math.floor( (this._ctnLength - (this._elLength * this._slidesPerPage) ) / 2 ); + + var pad; + if (this._isY) { + pad = [gap, 'px 0']; + } else { + pad = ['0 ', gap, 'px']; + } + + this._ulEl.style.padding = pad.join(''); + }, + + _updateHider: function() { + if (!this._hiderEl) { return; } + if (this.getPage() === 0) { + var gap = Math.floor( this._ctnLength - (this._elLength * this._slidesPerPage) ); + if (this._options.center) { + gap /= 2; + } + this._hiderEl.style[ this._isY ? 'height' : 'width' ] = gap + 'px'; + } else { + this._hiderEl.style[ this._isY ? 'height' : 'width' ] = '0px'; + } + }, + + /** + * Refits elements for IE7 because it doesn't support inline-block. + * + * @method _IE7 + * @private + */ + _IE7: function () { + if (Browser.IE && '' + Browser.version.split('.')[0] === '7') { + // var numPages = this._numPages; + var slides = Ink.ss('li.slide', this._ulEl); + var stl = function (prop, val) {slides[i].style[prop] = val; }; + for (var i = 0, len = slides.length; i < len; i++) { + stl('position', 'absolute'); + stl(this._isY ? 'top' : 'left', (i * this._elLength) + 'px'); + } + } + }, + + _onTouchStart: function (event) { + if (event.touches.length > 1) { return; } + + this._swipeData = { + x: InkEvent.pointerX(event), + y: InkEvent.pointerY(event), + lastUlPos: null + }; + + var ulRect = this._ulEl.getBoundingClientRect(); + + this._swipeData.inUlX = this._swipeData.x - ulRect.left; + this._swipeData.inUlY = this._swipeData.y - ulRect.top; + + setTransitionProperty(this._ulEl, 'none'); + + this._touchMoveIsFirstTouchMove = true; + + // InkEvent.stopDefault(event); + InkEvent.stopPropagation(event); + }, + + _onTouchMove: function (event) { + if (event.touches.length > 1) { return; /* multitouch event, not my problem. */ } + + var pointerX = InkEvent.pointerX(event); + var pointerY = InkEvent.pointerY(event); + + var deltaY = Math.abs(pointerY - this._swipeData.y); + var deltaX = Math.abs(pointerX - this._swipeData.x); + + if (this._touchMoveIsFirstTouchMove) { + this._touchMoveIsFirstTouchMove = undefined; + this._scrolling = this._isY ? + deltaX > deltaY : + deltaY > deltaX ; + + if (!this._scrolling) { + this._onAnimationFrame(); + } + } + + if (!this._scrolling && this._swipeData) { + InkEvent.stopDefault(event); + + this._swipeData.pointerPos = this._isY ? pointerY : pointerX; + } + + InkEvent.stopPropagation(event); + }, + + _onAnimationFrame: function () { + var swipeData = this._swipeData; + + if (!swipeData || this._scrolling || this._touchMoveIsFirstTouchMove) { return; } + + var elRect = this._element.getBoundingClientRect(); + + var newPos; + + if (!this._isY) { + newPos = swipeData.pointerPos - swipeData.inUlX - elRect.left; + } else { + newPos = swipeData.pointerPos - swipeData.inUlY - elRect.top; + } + + this._ulEl.style[this._isY ? 'top' : 'left'] = newPos + 'px'; + + swipeData.lastUlPos = newPos; + + requestAnimationFrame(Ink.bindMethod(this, '_onAnimationFrame')); + }, + + _onTouchEnd: function (event) { + if (this._swipeData && this._swipeData.pointerPos && !this._scrolling && !this._touchMoveIsFirstTouchMove) { + var snapToNext = 0.1; // swipe 10% of the way to change page + var progress = - this._swipeData.lastUlPos; + + var curPage = this.getPage(); + var estimatedPage = progress / this._elLength / this._slidesPerPage; + + if (Math.round(estimatedPage) === curPage) { + var diff = estimatedPage - curPage; + if (Math.abs(diff) > snapToNext) { + diff = diff > 0 ? 1 : -1; + curPage += diff; + } + } else { + curPage = Math.round(estimatedPage); + } + + this.setPage(curPage); + + InkEvent.stopPropagation(event); + InkEvent.stopDefault(event); + } + + setTransitionProperty(this._ulEl, null /* transition: left, top */); + this._swipeData = null; + this._touchMoveIsFirstTouchMove = undefined; + this._scrolling = undefined; + }, + + _onPaginationChange: function(pgn) { + this._setPage(pgn.getCurrent()); + }, + + /** + * Gets the current page index + * @method getPage + * @return The current page number + **/ + getPage: function () { + if (this._pagination) { + return this._pagination.getCurrent(); + } else { + return this._currentPage || 0; + } + }, + + /** + * Sets the current page index + * @method setPage + * @param {Number} page Index of the destination page. + * @param {Boolean} [wrap] Flag to activate circular counting. + **/ + setPage: function (page, wrap) { + if (wrap) { + // Pages outside the range [0..this._numPages] are wrapped. + page = page % this._numPages; + if (page < 0) { page = this._numPages - page; } + } + page = limitRange(page, 0, this._numPages - 1); + + if (this._pagination) { + this._pagination.setCurrent(page); + } else { + this._setPage(page); + } + }, + + _setPage: function (page) { + var _lengthToGo = page * this._deltaLength; + var isLastPage = page === (this._numPages - 1); + + if (!this._options.spaceAfterLastSlide && isLastPage && page > 0) { + var _itemsInLastPage = this._liEls.length - (page * this._slidesPerPage); + if(_itemsInLastPage < this._slidesPerPage) { + _lengthToGo = ((page - 1) * this._deltaLength) + (_itemsInLastPage * this._elLength); + } + } + + this._ulEl.style[ this._isY ? 'top' : 'left'] = + ['-', _lengthToGo, 'px'].join(''); + + if (this._options.onChange) { + this._options.onChange.call(this, page); + } + + this._currentPage = page; + + this._updateHider(); + }, + + /** + * Goes to the next page + * @method nextPage + * @param {Boolean} [wrap] Flag to loop from last page to first page. + **/ + nextPage: function (wrap) { + this.setPage(this.getPage() + 1, wrap); + }, + + /** + * Goes to the previous page + * @method previousPage + * @param {Boolean} [wrap] Flag to loop from first page to last page. + **/ + previousPage: function (wrap) { this.setPage(this.getPage() - 1, wrap); } + }; + + function setTransitionProperty(el, newTransition) { + el.style.transitionProperty = + el.style.oTransitionProperty = + el.style.msTransitionProperty = + el.style.mozTransitionProperty = + el.style.webkitTransitionProperty = newTransition; + } + + return Carousel; + +}); +/** + * @module Ink.UI.Close_1 + * @version 1 + * Closing utilities + */ +Ink.createModule('Ink.UI.Close', '1', ['Ink.Dom.Event_1','Ink.Dom.Element_1'], function(InkEvent, InkElement) { + 'use strict'; + + /** + * Subscribes clicks on the document.body. + * Whenever an ".ink-close,.ink-dismiss" element is clicked, this module finds an ancestor ".ink-alert,.ink-alert-block" element and removes it from the DOM. + * This module should be called only once per page. + * + * @class Ink.UI.Close + * @constructor + * @example + * + * + * @sample Ink_UI_Close_1.html + */ + var Close = function() { + InkEvent.observe(document.body, 'click', function(ev) { + var el = InkEvent.element(ev); + + el = InkElement.findUpwardsByClass(el, 'ink-close') || + InkElement.findUpwardsByClass(el, 'ink-dismiss'); + + if (!el) { + return; // ink-close or ink-dismiss class not found + } + + var toRemove = el; + toRemove = InkElement.findUpwardsByClass(el, 'ink-alert') || + InkElement.findUpwardsByClass(el, 'ink-alert-block'); + + if (toRemove) { + InkEvent.stop(ev); + InkElement.remove(toRemove); + } + }); + }; + + return Close; + +}); + +/** + * @module Ink.UI.Common_1 + * Auxiliar utilities for UI Modules + * @version 1 + */ + +Ink.createModule('Ink.UI.Common', '1', ['Ink.Dom.Element_1', 'Ink.Net.Ajax_1','Ink.Dom.Css_1','Ink.Dom.Selector_1','Ink.Util.Url_1'], function(InkElement, Ajax,Css,Selector,Url) { + + 'use strict'; + + var instances = {}; + var lastIdNum = 0; + var nothing = {} /* a marker, for reference comparison. */; + + var keys = Object.keys || function (obj) { + var ret = []; + for (var k in obj) if (obj.hasOwnProperty(k)) { + ret.push(k); + } + return ret; + }; + + var Common = { + + /** + * Supported Ink Layouts + * + * @property Layouts + * @type Object + * @readOnly + */ + Layouts: { + TINY: 'tiny', + SMALL: 'small', + MEDIUM: 'medium', + LARGE: 'large', + XLARGE: 'xlarge' + }, + + /** + * Checks if an item is a valid DOM Element. + * + * @method isDOMElement + * @static + * @param {Mixed} o The object to be checked. + * @return {Boolean} True if it's a valid DOM Element. + * @example + * var el = Ink.s('#element'); + * if( Ink.UI.Common.isDOMElement( el ) === true ){ + * // It is a DOM Element. + * } else { + * // It is NOT a DOM Element. + * } + */ + isDOMElement: function(o) { + return o && typeof o === 'object' && 'nodeType' in o && o.nodeType === 1; + }, + + /** + * Checks if an item is a valid integer. + * + * @method isInteger + * @static + * @param {Mixed} n The value to be checked. + * @return {Boolean} True if it's a valid integer. + * @example + * var value = 1; + * if( Ink.UI.Common.isInteger( value ) === true ){ + * // It is an integer. + * } else { + * // It is NOT an integer. + * } + */ + isInteger: function(n) { + return (typeof n === 'number' && n % 1 === 0); + }, + + /** + * Gets a DOM Element. + * + * @method elOrSelector + * @static + * @param {DOMElement|String} elOrSelector DOM Element or CSS Selector + * @param {String} fieldName The name of the field. Commonly used for debugging. + * @return {DOMElement} Returns the DOMElement passed or the first result of the CSS Selector. Otherwise it throws an exception. + * @example + * // In case there are several .myInput, it will retrieve the first found + * var el = Ink.UI.Common.elOrSelector('.myInput','My Input'); + */ + elOrSelector: function(elOrSelector, fieldName) { + if (!this.isDOMElement(elOrSelector)) { + var t = Selector.select(elOrSelector); + if (t.length === 0) { + Ink.warn(fieldName + ' must either be a DOM Element or a selector expression!\nThe script element must also be after the DOM Element itself.'); + return null; + } + return t[0]; + } + return elOrSelector; + }, + + /** + * Alias for `elOrSelector` but returns an array of elements. + * + * @method elsOrSelector + * + * @static + * @param {DOMElement|String} elOrSelector DOM Element or CSS Selector + * @param {String} fieldName The name of the field. Commonly used for debugging. + * @return {DOMElement} Returns the DOMElement passed or the first result of the CSS Selector. Otherwise it throws an exception. + * @param {Boolean} required Flag to accept an empty array as output. + * @return {Array} The selected DOM Elements. + * @example + * var elements = Ink.UI.Common.elsOrSelector('input.my-inputs', 'My Input'); + */ + elsOrSelector: function(elsOrSelector, fieldName, required) { + var ret; + if (typeof elsOrSelector === 'string') { + ret = Selector.select(elsOrSelector); + } else if (Common.isDOMElement(elsOrSelector)) { + ret = [elsOrSelector]; + } else if (elsOrSelector && typeof elsOrSelector === 'object' && typeof elsOrSelector.length === 'number') { + ret = elsOrSelector; + } + + if (ret && ret.length) { + return ret; + } else { + if (required || arguments.length === 2) { + throw new TypeError(fieldName + ' must either be a DOM Element, an Array of elements, or a selector expression!\nThe script element must also be after the DOM Element itself.'); + } else { + return []; + } + } + }, + + /** + * Gets options an object and element's metadata. + * + * The element's data attributes take precedence. Values from the element's data-atrributes are coerced into the required type. + * + * @method options + * + * @param {Object} [fieldId] Name to be used in debugging features. + * @param {Object} defaults Object with the options' types and defaults. + * @param {Object} overrides Options to override the defaults. Usually passed when instantiating an UI module. + * @param {DOMElement} [element] Element with data-attributes + * + * @example + * + * this._options = Ink.UI.Common.options('MyComponent', { + * 'anobject': ['Object', null], // Defaults to null + * 'target': ['Element', null], + * 'stuff': ['Number', 0.1], + * 'stuff2': ['Integer', 0], + * 'doKickFlip': ['Boolean', false], + * 'targets': ['Elements'], // Required option since no default was given + * 'onClick': ['Function', null] + * }, options || {}, elm) + * + * @example + * + * ### Note about booleans + * + * Here is how options are read from the markup + * data-attributes, for several values`data-a-boolean`. + * + * Options considered true: + * + * - `data-a-boolean="true"` + * - (Every other value which is not on the list below.) + * + * Options considered false: + * + * - `data-a-boolean="false"` + * - `data-a-boolean=""` + * - `data-a-boolean` + * + * Options which go to default: + * + * - (no attribute). When `data-a-boolean` is ommitted, the + * option is not considered true nor false, and as such + * defaults to what is in the `defaults` argument. + * + **/ + options: function (fieldId, defaults, overrides, element) { + if (typeof fieldId !== 'string') { + element = overrides; + overrides = defaults; + defaults = fieldId; + fieldId = ''; + } + overrides = overrides || {}; + var out = {}; + var dataAttrs = element ? InkElement.data(element) : {}; + var fromDataAttrs; + var type; + var lType; + var defaultVal; + + var invalidStr = function (str) { + if (fieldId) { str = fieldId + ': "' + ('' + str).replace(/"/, '\\"') + '"'; } + return str; + }; + + var quote = function (str) { + return '"' + ('' + str).replace(/"/, '\\"') + '"'; + }; + + var invalidThrow = function (str) { + throw new Error(invalidStr(str)); + }; + + var invalid = function (str) { + Ink.error(invalidStr(str) + '. Ignoring option.'); + }; + + function optionValue(key) { + type = defaults[key][0]; + lType = type.toLowerCase(); + defaultVal = defaults[key].length === 2 ? defaults[key][1] : nothing; + + if (!type) { + invalidThrow('Ink.UI.Common.options: Always specify a type!'); + } + if (!(lType in Common._coerce_funcs)) { + invalidThrow('Ink.UI.Common.options: ' + defaults[key][0] + ' is not a valid type. Use one of ' + keys(Common._coerce_funcs).join(', ')); + + } + if (!defaults[key].length || defaults[key].length > 2) { + invalidThrow('the "defaults" argument must be an object mapping option names to [typestring, optional] arrays.'); + } + + if (key in dataAttrs) { + fromDataAttrs = Common._coerce_from_string(lType, dataAttrs[key], key, fieldId); + // (above can return `nothing`) + } else { + fromDataAttrs = nothing; + } + + if (fromDataAttrs !== nothing) { + if (!Common._options_validate(fromDataAttrs, lType)) { + invalid('(' + key + ' option) Invalid ' + lType + ' ' + quote(fromDataAttrs)); + return defaultVal; + } else { + return fromDataAttrs; + } + } else if (key in overrides) { + return overrides[key]; + } else if (defaultVal !== nothing) { + return defaultVal; + } else { + invalidThrow('Option ' + key + ' is required!'); + } + } + + for (var key in defaults) { + if (defaults.hasOwnProperty(key)) { + out[key] = optionValue(key); + } + } + + return out; + }, + + _coerce_from_string: function (type, val, paramName, fieldId) { + if (type in Common._coerce_funcs) { + return Common._coerce_funcs[type](val, paramName, fieldId); + } else { + return val; + } + }, + + _options_validate: function (val, type) { + if (type in Common._options_validate_types) { + return Common._options_validate_types[type].call(Common, val); + } else { + // 'object' options cannot be passed through data-attributes. + // Json you say? Not any good to embed in HTML. + return false; + } + }, + + _coerce_funcs: (function () { + var ret = { + element: function (val) { + return Common.elOrSelector(val, ''); + }, + elements: function (val) { + return Common.elsOrSelector(val, '', false /*not required, so don't throw an exception now*/); + }, + object: function (val) { return val; }, + number: function (val) { return parseFloat(val); }, + 'boolean': function (val) { + return !(val === 'false' || val === '' || val === null); + }, + string: function (val) { return val; }, + 'function': function (val, paramName, fieldId) { + Ink.error(fieldId + ': You cannot specify the option "' + paramName + '" through data-attributes because it\'s a function'); + return nothing; + } + }; + ret['float'] = ret.integer = ret.number; + return ret; + }()), + + _options_validate_types: (function () { + var types = { + string: function (val) { + return typeof val === 'string'; + }, + number: function (val) { + return typeof val === 'number' && !isNaN(val) && isFinite(val); + }, + integer: function (val) { + return val === Math.round(val); + }, + element: function (val) { + return Common.isDOMElement(val); + }, + elements: function (val) { + return val && typeof val === 'object' && typeof val.length === 'number' && val.length; + }, + 'boolean': function (val) { + return typeof val === 'boolean'; + } + }; + types['float'] = types.number; + return types; + }()), + + /** + * Deep copy (clone) an object. + * Note: The object cannot have referece loops. + * + * @method clone + * @static + * @param {Object} o The object to be cloned/copied. + * @return {Object} Returns the result of the clone/copy. + * @example + * var originalObj = { + * key1: 'value1', + * key2: 'value2', + * key3: 'value3' + * }; + * var cloneObj = Ink.UI.Common.clone( originalObj ); + */ + clone: function(o) { + try { + return JSON.parse( JSON.stringify(o) ); + } catch (ex) { + throw new Error('Given object cannot have loops!'); + } + }, + + + /** + * Gets an element's one-base index relative to its parent. + * + * @method childIndex + * @static + * @param {DOMElement} childEl Valid DOM Element. + * @return {Number} Numerical position of an element relatively to its parent. + * @example + * + *
        + *
      • One
      • + *
      • Two
      • + *
      • Three
      • + *
      • Four
      • + *
      + * + * + */ + childIndex: function(childEl) { + if( Common.isDOMElement(childEl) ){ + var els = Selector.select('> *', childEl.parentNode); + for (var i = 0, f = els.length; i < f; ++i) { + if (els[i] === childEl) { + return i; + } + } + } + throw 'not found!'; + }, + + + /** + * AJAX JSON request shortcut method + * It provides a more convenient way to do an AJAX request and expect a JSON response. + * It offers a callback option, as third parameter, for better async handling. + * + * @method ajaxJSON + * @static + * @async + * @param {String} endpoint Valid URL to be used as target by the request. + * @param {Object} params This field is used in the thrown Exception to identify the parameter. + * @param {Function} cb Callback for the request. + * @example + * // In case there are several .myInput, it will retrieve the first found + * var el = Ink.UI.Common.elOrSelector('.myInput','My Input'); + */ + ajaxJSON: function(endpoint, params, cb) { + new Ajax( + endpoint, + { + evalJS: 'force', + method: 'POST', + parameters: params, + + onSuccess: function( r) { + try { + r = r.responseJSON; + if (r.status !== 'ok') { + throw 'server error: ' + r.message; + } + cb(null, r); + } catch (ex) { + cb(ex); + } + }, + + onFailure: function() { + cb('communication failure'); + } + } + ); + }, + + + /** + * Gets the current Ink layout. + * + * @method currentLayout + * @static + * @return {String} A string representation of the current layout name. + * @example + * var inkLayout = Ink.UI.Common.currentLayout(); + * if (inkLayout === 'small') { + * // ... + * } + */ + currentLayout: function() { + var i, f, k, v, el, detectorEl = Selector.select('#ink-layout-detector')[0]; + if (!detectorEl) { + detectorEl = document.createElement('div'); + detectorEl.id = 'ink-layout-detector'; + for (k in this.Layouts) { + if (this.Layouts.hasOwnProperty(k)) { + v = this.Layouts[k]; + el = document.createElement('div'); + el.className = 'show-' + v + ' hide-all'; + el.setAttribute('data-ink-layout', v); + detectorEl.appendChild(el); + } + } + document.body.appendChild(detectorEl); + } + + var result = ''; + var resultCount = 0; + for (i = 0, f = detectorEl.childNodes.length; i < f; ++i) { + el = detectorEl.childNodes[i]; + if (Css.getStyle(el, 'display') === 'block') { + result = el.getAttribute('data-ink-layout'); + resultCount += 1; + } + } + + if (resultCount === 1) { + return result; + } else { + return 'large'; + } + }, + + + /** + * Sets the location's hash (window.location.hash). + * + * @method hashSet + * @static + * @param {Object} o Object with the info to be placed in the location's hash. + * @example + * // It will set the location's hash like: #key1=value1&key2=value2&key3=value3 + * Ink.UI.Common.hashSet({ + * key1: 'value1', + * key2: 'value2', + * key3: 'value3' + * }); + */ + hashSet: function(o) { + if (typeof o !== 'object') { throw new TypeError('o should be an object!'); } + var hashParams = Url.getAnchorString(); + hashParams = Ink.extendObj(hashParams, o); + window.location.hash = Url.genQueryString('', hashParams).substring(1); + }, + + /** + * Removes children nodes from a given object. + * This method was initially created to help solve a problem in Internet Explorer(s) that occurred when trying to set the innerHTML of some specific elements like 'table'. + * + * @method cleanChildren + * @static + * @param {DOMElement} parentEl Valid DOM Element + * @example + * + *
        + *
      • One
      • + *
      • Two
      • + *
      • Three
      • + *
      • Four
      • + *
      + * + * + * + * + *
        + */ + cleanChildren: function(parentEl) { + if( !Common.isDOMElement(parentEl) ){ + throw 'Please provide a valid DOMElement'; + } + var prevEl, el = parentEl.lastChild; + while (el) { + prevEl = el.previousSibling; + parentEl.removeChild(el); + el = prevEl; + } + }, + + /** + * Stores the id and/or classes of an element in an object. + * + * @method storeIdAndClasses + * @static + * @param {DOMElement} fromEl Valid DOM Element to get the id and classes from. + * @param {Object} inObj Object where the id and classes will be saved. + * @example + *
        + * + * + */ + storeIdAndClasses: function(fromEl, inObj) { + if( !Common.isDOMElement(fromEl) ){ + throw 'Please provide a valid DOMElement as first parameter'; + } + + var id = fromEl.id; + if (id) { + inObj._id = id; + } + + var classes = fromEl.className; + if (classes) { + inObj._classes = classes; + } + }, + + /** + * Sets the id and className properties of an element based + * + * @method restoreIdAndClasses + * @static + * @param {DOMElement} toEl Valid DOM Element to set the id and classes on. + * @param {Object} inObj Object where the id and classes to be set are. This method uses the same format as the one given in `storeIdAndClasses` + * @example + *
        + * + * + * + * + *
        + */ + restoreIdAndClasses: function(toEl, inObj) { + + if( !Common.isDOMElement(toEl) ){ + throw 'Please provide a valid DOMElement as first parameter'; + } + + if (inObj._id && toEl.id !== inObj._id) { + toEl.id = inObj._id; + } + + if (inObj._classes && toEl.className.indexOf(inObj._classes) === -1) { + if (toEl.className) { toEl.className += ' ' + inObj._classes; } + else { toEl.className = inObj._classes; } + } + + if (inObj._instanceId && !toEl.getAttribute('data-instance')) { + toEl.setAttribute('data-instance', inObj._instanceId); + } + }, + + /** + * Saves a component's instance reference for later retrieval. + * + * @method registerInstance + * @static + * @param {Object} inst Object that holds the instance. + * @param {DOMElement} el DOM Element to associate with the object. + * @param {Object} [optionalPrefix] Defaults to 'instance' + */ + registerInstance: function(inst, el, optionalPrefix) { + if (inst._instanceId) { return; } + + if (typeof inst !== 'object') { throw new TypeError('1st argument must be a JavaScript object!'); } + + if (inst._options && inst._options.skipRegister) { return; } + + if (!this.isDOMElement(el)) { throw new TypeError('2nd argument must be a DOM element!'); } + if (optionalPrefix !== undefined && typeof optionalPrefix !== 'string') { throw new TypeError('3rd argument must be a string!'); } + var id = (optionalPrefix || 'instance') + (++lastIdNum); + instances[id] = inst; + inst._instanceId = id; + var dataInst = el.getAttribute('data-instance'); + dataInst = (dataInst !== null) ? [dataInst, id].join(' ') : id; + el.setAttribute('data-instance', dataInst); + }, + + /** + * Deletes an instance with a given id. + * + * @method unregisterInstance + * @static + * @param {String} id Id of the instance to be destroyed. + */ + unregisterInstance: function(id) { + delete instances[id]; + }, + + /** + * Gets an UI instance from an element or instance id. + * + * @method getInstance + * @static + * @param {String|DOMElement} instanceIdOrElement Instance's id or DOM Element from which we want the instances. + * @return {Object|Array} Returns an instance or a collection of instances. + */ + getInstance: function(instanceIdOrElement) { + var ids; + if (this.isDOMElement(instanceIdOrElement)) { + ids = instanceIdOrElement.getAttribute('data-instance'); + if (ids === null) { throw new Error('argument is not a DOM instance element!'); } + } + else { + ids = instanceIdOrElement; + } + + ids = ids.split(' '); + var inst, id, i, l = ids.length; + + var res = []; + for (i = 0; i < l; ++i) { + id = ids[i]; + if (!id) { throw new Error('Element is not a JS instance!'); } + inst = instances[id]; + if (!inst) { throw new Error('Instance "' + id + '" not found!'); } + res.push(inst); + } + + return (l === 1) ? res[0] : res; + }, + + /** + * Gets an instance based on a selector. + * + * @method getInstanceFromSelector + * @static + * @param {String} selector CSS selector to get the instances from. + * @return {Object|Array} Returns an instance or a collection of instances. + */ + getInstanceFromSelector: function(selector) { + var el = Selector.select(selector)[0]; + if (!el) { throw new Error('Element not found!'); } + return this.getInstance(el); + }, + + /** + * Gets all the instance ids + * + * @method getInstanceIds + * @static + * @return {Array} Collection of instance ids + */ + getInstanceIds: function() { + var res = []; + for (var id in instances) { + if (instances.hasOwnProperty(id)) { + res.push( id ); + } + } + return res; + }, + + /** + * Gets all the instances + * + * @method getInstances + * @static + * @return {Array} Collection of existing instances. + */ + getInstances: function() { + var res = []; + for (var id in instances) { + if (instances.hasOwnProperty(id)) { + res.push( instances[id] ); + } + } + return res; + }, + + /** + * Boilerplate method to destroy a component. + * Components should copy this method as its destroy method and modify it. + * + * @method destroyComponent + * @static + */ + destroyComponent: function() { + Common.unregisterInstance(this._instanceId); + this._element.parentNode.removeChild(this._element); + } + + }; + + return Common; + +}); +/** + * @module Ink.UI.DatePicker_1 + * @version 1 + * Date selector + */ + +Ink.createModule('Ink.UI.DatePicker', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1','Ink.Util.Date_1', 'Ink.Dom.Browser_1'], function(Common, Event, Css, InkElement, Selector, InkArray, InkDate ) { + 'use strict'; + + // Repeat a string. Long version of (new Array(n)).join(str); + function strRepeat(n, str) { + var ret = ''; + for (var i = 0; i < n; i++) { + ret += str; + } + return ret; + } + + // Clamp a number into a min/max limit + function clamp(n, min, max) { + if (n > max) { n = max; } + if (n < min) { n = min; } + + return n; + } + + function dateishFromYMDString(YMD) { + var split = YMD.split('-'); + return dateishFromYMD(+split[0], +split[1] - 1, +split[2]); + } + + function dateishFromYMD(year, month, day) { + return {_year: year, _month: month, _day: day}; + } + + function dateishFromDate(date) { + return {_year: date.getFullYear(), _month: date.getMonth(), _day: date.getDate()}; + } + + /** + * @class Ink.UI.DatePicker + * @constructor + * @version 1 + * + * @param {String|DOMElement} selector + * @param {Object} [options] Options + * @param {Boolean} [options.autoOpen] Flag to automatically open the datepicker. + * @param {String} [options.cleanText] Text for the clean button. Defaults to 'Limpar'. + * @param {String} [options.closeText] Text for the close button. Defaults to 'Fechar'. + * @param {String} [options.cssClass] CSS class to be applied on the datepicker + * @param {String} [options.dateRange] Enforce limits to year, month and day for the Date, ex: '1990-08-25:2020-11' + * @param {Boolean} [options.displayInSelect] Flag to display the component in a select element. + * @param {String|DOMElement} [options.dayField] (if using options.displayInSelect) `select` field with days. + * @param {String|DOMElement} [options.monthField] (if using options.displayInSelect) `select` field with months. + * @param {String|DOMElement} [options.yearField] (if using options.displayInSelect) `select` field with years. + * @param {String} [options.format] Date format string + * @param {String} [options.instance] Unique id for the datepicker + * @param {Object} [options.month] Hash of month names. Defaults to portuguese month names. January is 1. + * @param {String} [options.nextLinkText] Text for the previous button. Defaults to '«'. + * @param {String} [options.ofText] Text to show between month and year. Defaults to ' of '. + * @param {Boolean} [options.onFocus] If the datepicker should open when the target element is focused. Defaults to true. + * @param {Function} [options.onMonthSelected] Callback to execute when the month is selected. + * @param {Function} [options.onSetDate] Callback to execute when the date is set. + * @param {Function} [options.onYearSelected] Callback to execute when the year is selected. + * @param {String} [options.position] Position for the datepicker. Either 'right' or 'bottom'. Defaults to 'right'. + * @param {String} [options.prevLinkText] Text for the previous button. Defaults to '«'. + * @param {Boolean} [options.showClean] If the clean button should be visible. Defaults to true. + * @param {Boolean} [options.showClose] If the close button should be visible. Defaults to true. + * @param {Boolean} [options.shy] If the datepicker should start automatically. Defaults to true. + * @param {String} [options.startDate] Date to define initial month. Must be in yyyy-mm-dd format. + * @param {Number} [options.startWeekDay] First day of the week. Sunday is zero. Defaults to 1 (Monday). + * @param {Function} [options.validYearFn] Callback to execute when 'rendering' the month (in the month view) + * @param {Function} [options.validMonthFn] Callback to execute when 'rendering' the month (in the month view) + * @param {Function} [options.validDayFn] Callback to execute when 'rendering' the day (in the month view) + * @param {Function} [options.nextValidDateFn] Function to calculate the next valid date, given the current. Useful when there's invalid dates or time frames. + * @param {Function} [options.prevValidDateFn] Function to calculate the previous valid date, given the current. Useful when there's invalid dates or time frames. + * @param {Object} [options.wDay] Hash of weekdays. Defaults to portuguese names. Sunday is 0. + * @param {String} [options.yearRange] Enforce limits to year for the Date, ex: '1990:2020' (deprecated) + * + * @sample Ink_UI_DatePicker_1.html + */ + var DatePicker = function(selector, options) { + this._element = selector && + Common.elOrSelector(selector, '[Ink.UI.DatePicker_1]: selector argument'); + + this._options = Common.options('Ink.UI.DatePicker_1', { + autoOpen: ['Boolean', false], + cleanText: ['String', 'Clear'], + closeText: ['String', 'Close'], + containerElement:['Element', null], + cssClass: ['String', 'ink-calendar bottom'], + dateRange: ['String', null], + + // use this in a must be a direct child of .control, and if not, remove this block. + this._wrapper = this._element.parentNode; + this._wrapperIsControl = true; + } else { + this._wrapper = InkElement.create('div', { className: 'ink-datepicker-wrapper' }); + InkElement.wrap(this._element, this._wrapper); + } + InkElement.insertAfter(this._containerObject, this._element); + }, + + /** + * Render the topmost bar with the "close" and "clear" buttons. + */ + _renderSuperTopBar: function () { + if((!this._options.showClose) || (!this._options.showClean)){ return; } + + this._superTopBar = document.createElement("div"); + this._superTopBar.className = 'ink-calendar-top-options'; + if(this._options.showClean){ + this._superTopBar.appendChild(InkElement.create('a', { + className: 'clean', + setHTML: this._options.cleanText + })); + } + if(this._options.showClose){ + this._superTopBar.appendChild(InkElement.create('a', { + className: 'close', + setHTML: this._options.closeText + })); + } + this._containerObject.appendChild(this._superTopBar); + }, + + _listenToContainerObjectEvents: function () { + Event.observe(this._containerObject,'mouseover',Ink.bindEvent(function(e){ + Event.stop( e ); + this._hoverPicker = true; + },this)); + + Event.observe(this._containerObject,'mouseout',Ink.bindEvent(function(e){ + Event.stop( e ); + this._hoverPicker = false; + },this)); + + Event.observe(this._containerObject,'click',Ink.bindEvent(this._onClick, this)); + }, + + _onClick: function(e){ + var elem = Event.element(e); + + if (Css.hasClassName(elem, 'ink-calendar-off')) { + Event.stopDefault(e); + return null; + } + + Event.stop(e); + + // Relative changers + this._onRelativeChangerClick(elem); + + // Absolute changers + this._onAbsoluteChangerClick(elem); + + // Mode changers + if (Css.hasClassName(elem, 'ink-calendar-link-month')) { + this._showMonthSelector(); + } else if (Css.hasClassName(elem, 'ink-calendar-link-year')) { + this._showYearSelector(); + } else if(Css.hasClassName(elem, 'clean')){ + this._clean(); + } else if(Css.hasClassName(elem, 'close')){ + this._hide(false); + } + + this._updateDescription(); + }, + + /** + * Handles click events on a changer (« ») for next/prev year/month + * @method _onChangerClick + * @private + **/ + _onRelativeChangerClick: function (elem) { + var changeYear = { + change_year_next: 1, + change_year_prev: -1 + }; + var changeMonth = { + change_month_next: 1, + change_month_prev: -1 + }; + + if( elem.className in changeMonth ) { + this._updateCal(changeMonth[elem.className]); + } else if( elem.className in changeYear ) { + this._showYearSelector(changeYear[elem.className]); + } + }, + + /** + * Handles click events on an atom-changer (day button, month button, year button) + * + * @method _onAbsoluteChangerClick + * @private + */ + _onAbsoluteChangerClick: function (elem) { + var elemData = InkElement.data(elem); + + if( Number(elemData.calDay) ){ + this.setDate( [this._year, this._month + 1, elemData.calDay].join('-') ); + this._hide(); + } else if( Number(elemData.calMonth) ) { + this._month = Number(elemData.calMonth) - 1; + this._showDefaultView(); + this._updateCal(); + } else if( Number(elemData.calYear) ){ + this._changeYear(Number(elemData.calYear)); + } + }, + + _changeYear: function (year) { + year = +year; + if(year){ + this._year = year; + if( typeof this._options.onYearSelected === 'function' ){ + this._options.onYearSelected(this, { + 'year': this._year + }); + } + this._showMonthSelector(); + } + }, + + _clean: function () { + if(this._options.displayInSelect){ + this._options.yearField.selectedIndex = 0; + this._options.monthField.selectedIndex = 0; + this._options.dayField.selectedIndex = 0; + } else { + this._element.value = ''; + } + }, + + /** + * Hides the DatePicker. + * If the component is shy (options.shy), behaves differently. + * + * @method _hide + * @param {Boolean} [blur] If false, forces hiding even if the component is shy. + */ + _hide: function(blur) { + blur = blur === undefined ? true : blur; + if (blur === false || (blur && this._options.shy)) { + Css.addClassName(this._containerObject, 'hide-all'); + } + }, + + /** + * Sets the range of dates allowed to be selected in the Date Picker + * + * @method _setMinMax + * @param {String} dateRange Two dates separated by a ':'. Example: 2013-01-01:2013-12-12 + * @private + */ + _setMinMax: function( dateRange ) { + var self = this; + + var noMinLimit = { + _year: -Number.MAX_VALUE, + _month: 0, + _day: 1 + }; + + var noMaxLimit = { + _year: Number.MAX_VALUE, + _month: 11, + _day: 31 + }; + + function noLimits() { + self._min = noMinLimit; + self._max = noMaxLimit; + } + + if (!dateRange) { return noLimits(); } + + var dates = dateRange.split( ':' ); + var rDate = /^(\d{4})((\-)(\d{1,2})((\-)(\d{1,2}))?)?$/; + + InkArray.each([ + {name: '_min', date: dates[0], noLim: noMinLimit}, + {name: '_max', date: dates[1], noLim: noMaxLimit} + ], Ink.bind(function (data) { + + var lim = data.noLim; + + if ( data.date.toUpperCase() === 'NOW' ) { + var now = new Date(); + lim = dateishFromDate(now); + } else if (data.date.toUpperCase() === 'EVER') { + lim = data.noLim; + } else if ( rDate.test( data.date ) ) { + lim = dateishFromYMDString(data.date); + + lim._month = clamp(lim._month, 0, 11); + lim._day = clamp(lim._day, 1, this._daysInMonth( lim._year, lim._month + 1 )); + } + + this[data.name] = lim; + }, this)); + + // Should be equal, or min should be smaller + var valid = this._dateCmp(this._max, this._min) !== -1; + + if (!valid) { + noLimits(); + } + }, + + /** + * Checks if a date is between the valid range. + * Starts by checking if the date passed is valid. If not, will fallback to the 'today' date. + * Then checks if the all params are inside of the date range specified. If not, it will fallback to the nearest valid date (either Min or Max). + * + * @method _fitDateToRange + * @param {Number} year Year with 4 digits (yyyy) + * @param {Number} month Month + * @param {Number} day Day + * @return {Array} Array with the final processed date. + * @private + */ + _fitDateToRange: function( date ) { + if ( !this._isValidDate( date ) ) { + date = dateishFromDate(new Date()); + } + + if (this._dateCmp(date, this._min) === -1) { + return Ink.extendObj({}, this._min); + } else if (this._dateCmp(date, this._max) === 1) { + return Ink.extendObj({}, this._max); + } + + return Ink.extendObj({}, date); // date is okay already, just copy it. + }, + + /** + * Checks whether a date is within the valid date range + * @method _dateWithinRange + * @param year + * @param month + * @param day + * @return {Boolean} + * @private + */ + _dateWithinRange: function (date) { + if (!arguments.length) { + date = this; + } + + return (!this._dateAboveMax(date) && + (!this._dateBelowMin(date))); + }, + + _dateAboveMax: function (date) { + return this._dateCmp(date, this._max) === 1; + }, + + _dateBelowMin: function (date) { + return this._dateCmp(date, this._min) === -1; + }, + + _dateCmp: function (self, oth) { + return this._dateCmpUntil(self, oth, '_day'); + }, + + /** + * _dateCmp with varied precision. You can compare down to the day field, or, just to the month. + * // the following two dates are considered equal because we asked + * // _dateCmpUntil to just check up to the years. + * + * _dateCmpUntil({_year: 2000, _month: 10}, {_year: 2000, _month: 11}, '_year') === 0 + */ + _dateCmpUntil: function (self, oth, depth) { + var props = ['_year', '_month', '_day']; + var i = -1; + + do { + i++; + if (self[props[i]] > oth[props[i]]) { return 1; } + else if (self[props[i]] < oth[props[i]]) { return -1; } + } while (props[i] !== depth && + self[props[i + 1]] !== undefined && oth[props[i + 1]] !== undefined); + + return 0; + }, + + /** + * Sets the markup in the default view mode (showing the days). + * Also disables the previous and next buttons in case they don't meet the range requirements. + * + * @method _showDefaultView + * @private + */ + _showDefaultView: function(){ + this._yearSelector.style.display = 'none'; + this._monthSelector.style.display = 'none'; + this._monthPrev.childNodes[0].className = 'change_month_prev'; + this._monthNext.childNodes[0].className = 'change_month_next'; + + if ( !this._getPrevMonth() ) { + this._monthPrev.childNodes[0].className = 'action_inactive'; + } + + if ( !this._getNextMonth() ) { + this._monthNext.childNodes[0].className = 'action_inactive'; + } + + this._monthContainer.style.display = 'block'; + }, + + /** + * Updates the date shown on the datepicker + * + * @method _updateDate + * @private + */ + _updateDate: function(){ + var dataParsed; + if(!this._options.displayInSelect && this._element.value){ + dataParsed = this._parseDate(this._element.value); + } else if (this._options.displayInSelect) { + dataParsed = { + _year: this._options.yearField[this._options.yearField.selectedIndex].value, + _month: this._options.monthField[this._options.monthField.selectedIndex].value - 1, + _day: this._options.dayField[this._options.dayField.selectedIndex].value + }; + } + + if (dataParsed) { + dataParsed = this._fitDateToRange(dataParsed); + this._year = dataParsed._year; + this._month = dataParsed._month; + this._day = dataParsed._day; + } + this.setDate(); + this._updateDescription(); + this._renderMonth(); + }, + + /** + * Updates the date description shown at the top of the datepicker + * + * EG "12 de November" + * + * @method _updateDescription + * @private + */ + _updateDescription: function(){ + this._monthChanger.innerHTML = this._options.month[ this._month + 1 ]; + this._ofText.innerHTML = this._options.ofText; + this._yearChanger.innerHTML = this._year; + }, + + /** + * Renders the year selector view of the datepicker + * + * @method _showYearSelector + * @private + */ + _showYearSelector: function(inc){ + this._incrementViewingYear(inc); + + var firstYear = this._year - (this._year % 10); + var thisYear = firstYear - 1; + var str = "
        • "; + + if (thisYear > this._min._year) { + str += '
        • ' + this._options.prevLinkText + '
        • '; + } else { + str += '
        •  
        • '; + } + + for (var i=1; i < 11; i++){ + if (i % 4 === 0){ + str+='
          '; + } + + thisYear = firstYear + i - 1; + + str += this._getYearButtonHtml(thisYear); + } + + if( thisYear < this._max._year){ + str += '
        • ' + this._options.nextLinkText + '
        • '; + } else { + str += '
        •  
        • '; + } + + str += "
      • "; + + this._yearSelector.innerHTML = str; + this._monthPrev.childNodes[0].className = 'action_inactive'; + this._monthNext.childNodes[0].className = 'action_inactive'; + this._monthSelector.style.display = 'none'; + this._monthContainer.style.display = 'none'; + this._yearSelector.style.display = 'block'; + }, + + /** + * For the year selector. + * + * Update this._year, to find the next decade or use nextValidDateFn to find it. + */ + _incrementViewingYear: function (inc) { + if (!inc) { return; } + + var year = +this._year + inc*10; + year = year - year % 10; + if ( year > this._max._year || year + 9 < this._min._year){ + return; + } + this._year = +this._year + inc*10; + }, + + _getYearButtonHtml: function (thisYear) { + if ( this._acceptableYear({_year: thisYear}) ){ + var className = (thisYear === this._year) ? ' class="ink-calendar-on"' : ''; + return '
      • ' + thisYear +'
      • '; + } else { + return '
      • ' + thisYear +'
      • '; + + } + }, + + /** + * Show the month selector (happens when you click a year, or the "month" link. + * @method _showMonthSelector + * @private + */ + _showMonthSelector: function () { + this._yearSelector.style.display = 'none'; + this._monthContainer.style.display = 'none'; + this._monthPrev.childNodes[0].className = 'action_inactive'; + this._monthNext.childNodes[0].className = 'action_inactive'; + this._addMonthClassNames(); + this._monthSelector.style.display = 'block'; + }, + + /** + * This function returns the given date in the dateish format + * + * @method _parseDate + * @param {String} dateStr A date on a string. + * @private + */ + _parseDate: function(dateStr){ + var date = InkDate.set( this._options.format , dateStr ); + if (date) { + return dateishFromDate(date); + } + return null; + }, + + /** + * Checks if a date is valid + * + * @method _isValidDate + * @param {Dateish} date + * @private + * @return {Boolean} True if the date is valid, false otherwise + */ + _isValidDate: function(date){ + var yearRegExp = /^\d{4}$/; + var validOneOrTwo = /^\d{1,2}$/; + return ( + yearRegExp.test(date._year) && + validOneOrTwo.test(date._month) && + validOneOrTwo.test(date._day) && + +date._month + 1 >= 1 && + +date._month + 1 <= 12 && + +date._day >= 1 && + +date._day <= this._daysInMonth(date._year, date._month + 1) + ); + }, + + /** + * Checks if a given date is an valid format. + * + * @method _isDate + * @param {String} format A date format. + * @param {String} dateStr A date on a string. + * @private + * @return {Boolean} True if the given date is valid according to the given format + */ + _isDate: function(format, dateStr){ + try { + if (typeof format === 'undefined'){ + return false; + } + var date = InkDate.set( format , dateStr ); + if( date && this._isValidDate( dateishFromDate(date) )) { + return true; + } + } catch (ex) {} + + return false; + }, + + _acceptableDay: function (date) { + return this._acceptableDateComponent(date, 'validDayFn'); + }, + + _acceptableMonth: function (date) { + return this._acceptableDateComponent(date, 'validMonthFn'); + }, + + _acceptableYear: function (date) { + return this._acceptableDateComponent(date, 'validYearFn'); + }, + + /** DRY base for the above 2 functions */ + _acceptableDateComponent: function (date, userCb) { + if (this._options[userCb]) { + return this._callUserCallbackBool(this._options[userCb], date); + } else { + return this._dateWithinRange(date); + } + }, + + /** + * This method returns the date written with the format specified on the options + * + * @method _writeDateInFormat + * @private + * @return {String} Returns the current date of the object in the specified format + */ + _writeDateInFormat:function(){ + return InkDate.get( this._options.format , this.getDate()); + }, + + /** + * This method allows the user to set the DatePicker's date on run-time. + * + * @method setDate + * @param {String} dateString A date string in yyyy-mm-dd format. + * @public + */ + setDate: function( dateString ) { + if ( /\d{4}-\d{1,2}-\d{1,2}/.test( dateString ) ) { + var auxDate = dateString.split( '-' ); + this._year = +auxDate[ 0 ]; + this._month = +auxDate[ 1 ] - 1; + this._day = +auxDate[ 2 ]; + } + + this._setDate( ); + }, + + /** + * Gets the current date as a JavaScript date. + * + * @method getDate + */ + getDate: function () { + if (!this._day) { + throw 'Ink.UI.DatePicker: Still picking a date. Cannot getDate now!'; + } + return new Date(this._year, this._month, this._day); + }, + + /** + * Sets the chosen date on the target input field + * + * @method _setDate + * @param {DOMElement} objClicked Clicked object inside the DatePicker's calendar. + * @private + */ + _setDate : function( objClicked ) { + if (objClicked) { + var data = InkElement.data(objClicked); + this._day = (+data.calDay) || this._day; + } + + var dt = this._fitDateToRange(this); + + this._year = dt._year; + this._month = dt._month; + this._day = dt._day; + + if(!this._options.displayInSelect){ + this._element.value = this._writeDateInFormat(); + } else { + this._options.dayField.value = this._day; + this._options.monthField.value = this._month + 1; + this._options.yearField.value = this._year; + } + + if(this._options.onSetDate) { + this._options.onSetDate( this , { date : this.getDate() } ); + } + }, + + /** + * Makes the necessary work to update the calendar + * when choosing a different month + * + * @method _updateCal + * @param {Number} inc Indicates previous or next month + * @private + */ + _updateCal: function(inc){ + if( typeof this._options.onMonthSelected === 'function' ){ + this._options.onMonthSelected(this, { + 'year': this._year, + 'month' : this._month + }); + } + if (inc && this._updateMonth(inc) === null) { + return; + } + this._renderMonth(); + }, + + /** + * Function that returns the number of days on a given month on a given year + * + * @method _daysInMonth + * @param {Number} _y - year + * @param {Number} _m - month + * @private + * @return {Number} The number of days on a given month on a given year + */ + _daysInMonth: function(_y,_m){ + var exceptions = { + 2: ((_y % 400 === 0) || (_y % 4 === 0 && _y % 100 !== 0)) ? 29 : 28, + 4: 30, + 6: 30, + 9: 30, + 11: 30 + }; + + return exceptions[_m] || 31; + }, + + + /** + * Updates the calendar when a different month is chosen + * + * @method _updateMonth + * @param {Number} incValue - indicates previous or next month + * @private + */ + _updateMonth: function(incValue){ + var date; + if (incValue > 0) { + date = this._getNextMonth(); + } else if (incValue < 0) { + date = this._getPrevMonth(); + } + if (!date) { return null; } + this._year = date._year; + this._month = date._month; + this._day = date._day; + }, + + /** + * Get the next month we can show. + */ + _getNextMonth: function (date) { + return this._tryLeap( date, 'Month', 'next', function (d) { + d._month += 1; + if (d._month > 11) { + d._month = 0; + d._year += 1; + } + return d; + }); + }, + + /** + * Get the previous month we can show. + */ + _getPrevMonth: function (date) { + return this._tryLeap( date, 'Month', 'prev', function (d) { + d._month -= 1; + if (d._month < 0) { + d._month = 11; + d._year -= 1; + } + return d; + }); + }, + + /** + * Get the next year we can show. + */ + _getPrevYear: function (date) { + return this._tryLeap( date, 'Year', 'prev', function (d) { + d._year -= 1; + return d; + }); + }, + + /** + * Get the next year we can show. + */ + _getNextYear: function (date) { + return this._tryLeap( date, 'Year', 'next', function (d) { + d._year += 1; + return d; + }); + }, + + /** + * DRY base for a function which tries to get the next or previous valid year or month. + * + * It checks if we can go forward by using _dateCmp with atomic + * precision (this means, {_year} for leaping years, and + * {_year, month} for leaping months), then it tries to get the + * result from the user-supplied callback (nextDateFn or prevDateFn), + * and when this is not present, advance the date forward using the + * `advancer` callback. + */ + _tryLeap: function (date, atomName, directionName, advancer) { + date = date || { _year: this._year, _month: this._month, _day: this._day }; + + var maxOrMin = directionName === 'prev' ? '_min' : '_max'; + var boundary = this[maxOrMin]; + + // Check if we're by the boundary of min/max year/month + if (this._dateCmpUntil(date, boundary, atomName) === 0) { + return null; // We're already at the boundary. Bail. + } + + var leapUserCb = this._options[directionName + 'ValidDateFn']; + if (leapUserCb) { + return this._callUserCallbackDate(leapUserCb, date); + } else { + date = advancer(date); + } + + date = this._fitDateToRange(date); + + return this['_acceptable' + atomName](date) ? date : null; + }, + + _getNextDecade: function (date) { + date = date || { _year: this._year, _month: this._month, _day: this._day }; + var decade = this._getCurrentDecade(date); + if (decade + 10 > this._max._year) { return null; } + return decade + 10; + }, + + _getPrevDecade: function (date) { + date = date || { _year: this._year, _month: this._month, _day: this._day }; + var decade = this._getCurrentDecade(date); + if (decade - 10 < this._min._year) { return null; } + return decade - 10; + }, + + /** Returns the decade given a date or year*/ + _getCurrentDecade: function (year) { + year = year ? (year._year || year) : this._year; + return Math.floor(year / 10) * 10; // Round to first place + }, + + _callUserCallbackBase: function (cb, date) { + return cb.call(this, date._year, date._month + 1, date._day); + }, + + _callUserCallbackBool: function (cb, date) { + return !!this._callUserCallbackBase(cb, date); + }, + + _callUserCallbackDate: function (cb, date) { + var ret = this._callUserCallbackBase(cb, date); + return ret ? dateishFromDate(ret) : null; + }, + + /** + * Key-value object that (for a given key) points to the correct parsing format for the DatePicker + * @property _dateParsers + * @type {Object} + * @readOnly + */ + _dateParsers: { + 'yyyy-mm-dd' : 'Y-m-d' , + 'yyyy/mm/dd' : 'Y/m/d' , + 'yy-mm-dd' : 'y-m-d' , + 'yy/mm/dd' : 'y/m/d' , + 'dd-mm-yyyy' : 'd-m-Y' , + 'dd/mm/yyyy' : 'd/m/Y' , + 'dd-mm-yy' : 'd-m-y' , + 'dd/mm/yy' : 'd/m/y' , + 'mm/dd/yyyy' : 'm/d/Y' , + 'mm-dd-yyyy' : 'm-d-Y' + }, + + /** + * Renders the current month + * + * @method _renderMonth + * @private + */ + _renderMonth: function(){ + var month = this._month; + var year = this._year; + + this._showDefaultView(); + + var html = ''; + + html += this._getMonthCalendarHeaderHtml(this._options.startWeekDay); + + var counter = 0; + html+='
          '; + + var emptyHtml = '
        •  
        • '; + + var firstDayIndex = this._getFirstDayIndex(year, month); + + // Add padding if the first day of the month is not monday. + if(firstDayIndex > 0) { + counter += firstDayIndex; + html += strRepeat(firstDayIndex, emptyHtml); + } + + html += this._getDayButtonsHtml(year, month); + + html += '
        '; + + this._monthContainer.innerHTML = html; + }, + + /** + * Figure out where the first day of a month lies + * in the first row of the calendar. + * + * having options.startWeekDay === 0 + * + * Su Mo Tu We Th Fr Sa + * 1 <- The "1" is in the 7th day. return 6. + * 2 3 4 5 6 7 8 + * 9 10 11 12 13 14 15 + * 16 17 18 19 20 21 22 + * 23 24 25 26 27 28 29 + * 30 31 + * + * This obviously changes according to the user option "startWeekDay" + **/ + _getFirstDayIndex: function (year, month) { + var wDayFirst = (new Date( year , month , 1 )).getDay(); // Sunday=0 + var startWeekDay = this._options.startWeekDay || 0; // Sunday=0 + + var result = wDayFirst - startWeekDay; + + result %= 7; + + if (result < 0) { + result += 6; + } + + return result; + }, + + _getDayButtonsHtml: function (year, month) { + var counter = this._getFirstDayIndex(year, month); + var daysInMonth = this._daysInMonth(year, month + 1); + var ret = ''; + for (var day = 1; day <= daysInMonth; day++) { + if (counter === 7){ // new week + counter=0; + ret += '
          '; + } + + ret += this._getDayButtonHtml(year, month, day); + + counter++; + if(counter === 7){ + ret += '
        '; + } + } + return ret; + }, + + /** + * Get the HTML markup for a single day in month view, given year, month, day. + * + * @method _getDayButtonHtml + * @private + */ + _getDayButtonHtml: function (year, month, day) { + var attrs = ' '; + var date = dateishFromYMD(year, month, day); + if (!this._acceptableDay(date)) { + attrs += 'class="ink-calendar-off"'; + } else { + attrs += 'data-cal-day="' + day + '"'; + } + + if (this._day && this._dateCmp(date, this) === 0) { + attrs += 'class="ink-calendar-on" data-cal-day="' + day + '"'; + } + + return '
      • ' + day + '
      • '; + }, + + /** Write the top bar of the calendar (M T W T F S S) */ + _getMonthCalendarHeaderHtml: function (startWeekDay) { + var ret = '
          '; + var wDay; + for(var i=0; i<7; i++){ + wDay = (startWeekDay + i) % 7; + ret += '
        • ' + + this._options.wDay[wDay].substring(0,1) + + '
        • '; + } + return ret + '
        '; + }, + + /** + * This method adds class names to month buttons, to visually distinguish. + * + * @method _addMonthClassNames + * @param {DOMElement} parent DOMElement where all the months are. + * @private + */ + _addMonthClassNames: function(parent){ + InkArray.forEach( + (parent || this._monthSelector).getElementsByTagName('a'), + Ink.bindMethod(this, '_addMonthButtonClassNames')); + }, + + /** + * Add the ink-calendar-on className if the given button is the current month, + * otherwise add the ink-calendar-off className if the given button refers to + * an unacceptable month (given dateRange and validMonthFn) + */ + _addMonthButtonClassNames: function (btn) { + var data = InkElement.data(btn); + if (!data.calMonth) { throw 'not a calendar month button!'; } + + var month = +data.calMonth - 1; + + if ( month === this._month ) { + Css.addClassName( btn, 'ink-calendar-on' ); // This month + Css.removeClassName( btn, 'ink-calendar-off' ); + } else { + Css.removeClassName( btn, 'ink-calendar-on' ); // Not this month + + var toDisable = !this._acceptableMonth({_year: this._year, _month: month}); + Css.addRemoveClassName( btn, 'ink-calendar-off', toDisable); + } + }, + + /** + * Prototype's method to allow the 'i18n files' to change all objects' language at once. + * @param {Object} options Object with the texts' configuration. + * @param {String} options.closeText Text of the close anchor + * @param {String} options.cleanText Text of the clean text anchor + * @param {String} options.prevLinkText "Previous" link's text + * @param {String} options.nextLinkText "Next" link's text + * @param {String} options.ofText The text "of", present in 'May of 2013' + * @param {Object} options.month An object with keys from 1 to 12 for the full months' names + * @param {Object} options.wDay An object with keys from 0 to 6 for the full weekdays' names + * @public + */ + lang: function( options ){ + this._lang = options; + }, + + /** + * This calls the rendering of the selected month. (Deprecated: use show() instead) + * + */ + showMonth: function(){ + this._renderMonth(); + }, + + /** + * Checks if the calendar screen is in 'select day' mode + * + * @return {Boolean} True if the calendar screen is in 'select day' mode + * @public + */ + isMonthRendered: function(){ + var header = Selector.select('.ink-calendar-header', this._containerObject)[0]; + + return ((Css.getStyle(header.parentNode,'display') !== 'none') && + (Css.getStyle(header.parentNode.parentNode,'display') !== 'none') ); + }, + + /** + * Destroys this datepicker, removing it from the page. + * + * @public + **/ + destroy: function () { + InkElement.unwrap(this._element); + InkElement.remove(this._wrapper); + InkElement.remove(this._containerObject); + Common.unregisterInstance.call(this); + } + }; + + return DatePicker; +}); +/** + * @module Ink.UI.Draggable_1 + * Dragging elements around + * @version 1 + */ + +Ink.createModule("Ink.UI.Draggable","1",["Ink.Dom.Element_1", "Ink.Dom.Event_1", "Ink.Dom.Css_1", "Ink.Dom.Browser_1", "Ink.Dom.Selector_1", "Ink.UI.Common_1"],function( InkElement, InkEvent, Css, Browser, Selector, Common) { + 'use strict'; + + var x = 0, + y = 1; // For accessing coords in [x, y] arrays + + // Get a value between two boundaries + function between (val, min, max) { + val = Math.min(val, max); + val = Math.max(val, min); + return val; + } + + /** + * @class Ink.UI.Draggable + * @version 1 + * @constructor + * @param {String|DOMElement} target Target element. + * @param {Object} [options] Optional object to configure the component. + * @param {String} [options.constraint] Movement constraint. None by default. Can be `vertical`, `horizontal`, or `both`. + * @param {String|DOMElement} [options.constraintElm] Constrain dragging to be within this element. None by default. + * @param {Number} [options.top] Limits to constrain draggable movement. + * @param {Number} [options.right] Limits to constrain draggable movement. + * @param {Number} [options.bottom] Limits to constrain draggable movement. + * @param {Number} [options.left] Limits to constrain draggable movement. + * @param {String|DOMElement} [options.handle] If specified, this element or CSS ID will be used as a handle for dragging. + * @param {Boolean} [options.revert] Flag to revert the draggable to the original position when dragging stops. + * @param {String} [options.cursor] Cursor type (CSS `cursor` value) used when the mouse is over the draggable object. + * @param {Number} [options.zIndex] Z-index applied to the draggable element while dragged. + * @param {Number} [options.fps] If set, throttles the drag effect to this number of frames per second. + * @param {DOMElement} [options.droppableProxy] If set, a shallow copy of this element will be moved around with transparent background. + * @param {String} [options.mouseAnchor] Anchor for the drag. Can be one of: 'left','center','right','top','center','bottom'. + * @param {String} [options.dragClass] Class to add when the draggable is being dragged. Defaults to drag. + * @param {Function} [options.onStart] Callback called when dragging starts. + * @param {Function} [options.onEnd] Callback called when dragging stops. + * @param {Function} [options.onDrag] Callback called while dragging, prior to position updates. + * @param {Function} [options.onChange] Callback called while dragging, after position updates. + * + * @example + * Ink.requireModules( ['Ink.UI.Draggable_1'], function( Draggable ){ + * new Draggable( '#myElementId' ); + * }); + * + * @sample Ink_UI_Swipe_1.html + */ + var Draggable = function(element, options) { + this.init(element, options); + }; + + Draggable.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @param {String|DOMElement} element Element ID of the element or DOM Element. + * @param {Object} [options] Options object for configuration of the module. + * @private + */ + init: function(element, options) { + var o = Ink.extendObj( { + constraint: false, + constraintElm: false, + top: false, + right: false, + bottom: false, + left: false, + handle: options.handler /* old option name */ || false, + revert: false, + cursor: 'move', + zindex: options.zindex /* old option name */ || 9999, + dragClass: 'drag', + onStart: false, + onEnd: false, + onDrag: false, + onChange: false, + droppableProxy: false, + mouseAnchor: undefined, + skipChildren: true, + fps: 100, + debug: false + }, options || {}, InkElement.data(element)); + + this.options = o; + this.element = Common.elOrSelector(element); + this.constraintElm = o.constraintElm && Common.elOrSelector(o.constraintElm); + + this.handle = false; + this.elmStartPosition = false; + this.active = false; + this.dragged = false; + this.prevCoords = false; + this.placeholder = false; + + this.position = false; + this.zindex = false; + this.firstDrag = true; + + if (o.fps) { + this.deltaMs = 1000 / o.fps; + this.lastRunAt = 0; + } + + this.handlers = {}; + this.handlers.start = Ink.bindEvent(this._onStart,this); + this.handlers.dragFacade = Ink.bindEvent(this._onDragFacade,this); + this.handlers.drag = Ink.bindEvent(this._onDrag,this); + this.handlers.end = Ink.bindEvent(this._onEnd,this); + this.handlers.selectStart = function(event) { InkEvent.stop(event); return false; }; + + // set handle + this.handle = (this.options.handle) ? + Common.elOrSelector(this.options.handle) : this.element; + this.handle.style.cursor = o.cursor; + + InkEvent.observe(this.handle, 'touchstart', this.handlers.start); + InkEvent.observe(this.handle, 'mousedown', this.handlers.start); + + if (Browser.IE) { + InkEvent.observe(this.element, 'selectstart', this.handlers.selectStart); + } + }, + + /** + * Removes the ability of the element of being dragged + * + * @method destroy + * @public + */ + destroy: function() { + InkEvent.stopObserving(this.handle, 'touchstart', this.handlers.start); + InkEvent.stopObserving(this.handle, 'mousedown', this.handlers.start); + + if (Browser.IE) { + InkEvent.stopObserving(this.element, 'selectstart', this.handlers.selectStart); + } + }, + + /** + * Gets coordinates for a given event (with added page scroll) + * + * @method _getCoords + * @param {Object} e window.event object. + * @return {Array} Array where the first position is the x coordinate, the second is the y coordinate + * @private + */ + _getCoords: function(e) { + var ps = [InkElement.scrollWidth(), InkElement.scrollHeight()]; + return { + x: (e.touches ? e.touches[0].clientX : e.clientX) + ps[x], + y: (e.touches ? e.touches[0].clientY : e.clientY) + ps[y] + }; + }, + + /** + * Clones src element's relevant properties to dst + * + * @method _cloneStyle + * @param {DOMElement} src Element from where we're getting the styles + * @param {DOMElement} dst Element where we're placing the styles. + * @private + */ + _cloneStyle: function(src, dst) { + dst.className = src.className; + dst.style.borderWidth = '0'; + dst.style.padding = '0'; + dst.style.position = 'absolute'; + dst.style.width = InkElement.elementWidth(src) + 'px'; + dst.style.height = InkElement.elementHeight(src) + 'px'; + dst.style.left = InkElement.elementLeft(src) + 'px'; + dst.style.top = InkElement.elementTop(src) + 'px'; + dst.style.cssFloat = Css.getStyle(src, 'float'); + dst.style.display = Css.getStyle(src, 'display'); + }, + + /** + * onStart event handler + * + * @method _onStart + * @param {Object} e window.event object + * @return {Boolean|void} In some cases return false. Otherwise is void + * @private + */ + _onStart: function(e) { + if (!this.active && InkEvent.isLeftClick(e) || typeof e.button === 'undefined') { + + var tgtEl = InkEvent.element(e); + if (this.options.skipChildren && tgtEl !== this.handle) { return; } + + InkEvent.stop(e); + + Css.addClassName(this.element, this.options.dragClass); + + this.elmStartPosition = [ + InkElement.elementLeft(this.element), + InkElement.elementTop( this.element) + ]; + + var pos = [ + parseInt(Css.getStyle(this.element, 'left'), 10), + parseInt(Css.getStyle(this.element, 'top'), 10) + ]; + + var dims = InkElement.elementDimensions(this.element); + + this.originalPosition = [ pos[x] ? pos[x]: null, pos[y] ? pos[y] : null ]; + this.delta = this._getCoords(e); // mouse coords at beginning of drag + + this.active = true; + this.position = Css.getStyle(this.element, 'position'); + this.zindex = Css.getStyle(this.element, 'zIndex'); + + var div = document.createElement('div'); + div.style.position = this.position; + div.style.width = dims[x] + 'px'; + div.style.height = dims[y] + 'px'; + div.style.marginTop = Css.getStyle(this.element, 'margin-top'); + div.style.marginBottom = Css.getStyle(this.element, 'margin-bottom'); + div.style.marginLeft = Css.getStyle(this.element, 'margin-left'); + div.style.marginRight = Css.getStyle(this.element, 'margin-right'); + div.style.borderWidth = '0'; + div.style.padding = '0'; + div.style.cssFloat = Css.getStyle(this.element, 'float'); + div.style.display = Css.getStyle(this.element, 'display'); + div.style.visibility = 'hidden'; + + this.delta2 = [ this.delta.x - this.elmStartPosition[x], this.delta.y - this.elmStartPosition[y] ]; // diff between top-left corner of obj and mouse + if (this.options.mouseAnchor) { + var parts = this.options.mouseAnchor.split(' '); + var ad = [dims[x], dims[y]]; // starts with 'right bottom' + if (parts[0] === 'left') { ad[x] = 0; } else if(parts[0] === 'center') { ad[x] = parseInt(ad[x]/2, 10); } + if (parts[1] === 'top') { ad[y] = 0; } else if(parts[1] === 'center') { ad[y] = parseInt(ad[y]/2, 10); } + this.applyDelta = [this.delta2[x] - ad[x], this.delta2[y] - ad[y]]; + } + + var dragHandlerName = this.options.fps ? 'dragFacade' : 'drag'; + + this.placeholder = div; + + if (this.options.onStart) { this.options.onStart(this.element, e); } + + if (this.options.droppableProxy) { // create new transparent div to optimize DOM traversal during drag + this.proxy = document.createElement('div'); + dims = [ + window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, + window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight + ]; + var fs = this.proxy.style; + fs.width = dims[x] + 'px'; + fs.height = dims[y] + 'px'; + fs.position = 'fixed'; + fs.left = '0'; + fs.top = '0'; + fs.zIndex = this.options.zindex + 1; + fs.backgroundColor = '#FF0000'; + Css.setOpacity(this.proxy, 0); + + var firstEl = document.body.firstChild; + while (firstEl && firstEl.nodeType !== 1) { firstEl = firstEl.nextSibling; } + document.body.insertBefore(this.proxy, firstEl); + + + InkEvent.observe(this.proxy, 'mousemove', this.handlers[dragHandlerName]); + InkEvent.observe(this.proxy, 'touchmove', this.handlers[dragHandlerName]); + } + else { + InkEvent.observe(document, 'mousemove', this.handlers[dragHandlerName]); + } + + this.element.style.position = 'absolute'; + this.element.style.zIndex = this.options.zindex; + this.element.parentNode.insertBefore(this.placeholder, this.element); + + this._onDrag(e); + + InkEvent.observe(document, 'mouseup', this.handlers.end); + InkEvent.observe(document, 'touchend', this.handlers.end); + + return false; + } + }, + + /** + * Function that gets the timestamp of the current run from time to time. (FPS) + * + * @method _onDragFacade + * @param {Object} window.event object. + * @private + */ + _onDragFacade: function(e) { + var now = +new Date(); + if (!this.lastRunAt || now > this.lastRunAt + this.deltaMs) { + this.lastRunAt = now; + this._onDrag(e); + } + }, + + /** + * Function that handles the dragging movement + * + * @method _onDrag + * @param {Object} window.event object. + * @private + */ + _onDrag: function(e) { + if (this.active) { + InkEvent.stop(e); + this.dragged = true; + var mouseCoords = this._getCoords(e), + mPosX = mouseCoords.x, + mPosY = mouseCoords.y, + o = this.options, + newX = false, + newY = false; + + if (this.prevCoords && mPosX !== this.prevCoords.x || mPosY !== this.prevCoords.y) { + if (o.onDrag) { o.onDrag(this.element, e); } + this.prevCoords = mouseCoords; + + newX = this.elmStartPosition[x] + mPosX - this.delta.x; + newY = this.elmStartPosition[y] + mPosY - this.delta.y; + + var draggableSize = InkElement.elementDimensions(this.element); + + if (this.constraintElm) { + var offset = InkElement.offset(this.constraintElm); + var size = InkElement.elementDimensions(this.constraintElm); + var constTop = offset[y] + (o.top || 0), + constBottom = offset[y] + size[y] - (o.bottom || 0), + constLeft = offset[x] + (o.left || 0), + constRight = offset[x] + size[x] - (o.right || 0); + + newY = between(newY, constTop, constBottom - draggableSize[y]); + newX = between(newX, constLeft, constRight - draggableSize[x]); + } else if (o.constraint) { + var right = o.right === false ? InkElement.pageWidth() - draggableSize[x] : o.right, + left = o.left === false ? 0 : o.left, + top = o.top === false ? 0 : o.top, + bottom = o.bottom === false ? InkElement.pageHeight() - draggableSize[y] : o.bottom; + if (o.constraint === 'horizontal' || o.constraint === 'both') { + newX = between(newX, left, right); + } + if (o.constraint === 'vertical' || o.constraint === 'both') { + newY = between(newY, top, bottom); + } + } + + var Droppable = Ink.getModule('Ink.UI.Droppable_1'); + if (this.firstDrag) { + if (Droppable) { Droppable.updateAll(); } + /*this.element.style.position = 'absolute'; + this.element.style.zIndex = this.options.zindex; + this.element.parentNode.insertBefore(this.placeholder, this.element);*/ + this.firstDrag = false; + } + + if (newX) { this.element.style.left = newX + 'px'; } + if (newY) { this.element.style.top = newY + 'px'; } + + if (Droppable) { + // apply applyDelta defined on drag init + var mouseCoords2 = this.options.mouseAnchor ? + {x: mPosX - this.applyDelta[x], y: mPosY - this.applyDelta[y]} : + mouseCoords; + Droppable.action(mouseCoords2, 'drag', e, this.element); + } + if (o.onChange) { o.onChange(this); } + } + } + }, + + /** + * Function that handles the end of the dragging process + * + * @method _onEnd + * @param {Object} window.event object. + * @private + */ + _onEnd: function(e) { + InkEvent.stopObserving(document, 'mousemove', this.handlers.drag); + InkEvent.stopObserving(document, 'touchmove', this.handlers.drag); + + if (this.options.fps) { + this._onDrag(e); + } + + Css.removeClassName(this.element, this.options.dragClass); + + if (this.active && this.dragged) { + + if (this.options.droppableProxy) { // remove transparent div... + document.body.removeChild(this.proxy); + } + + if (this.pt) { // remove debugging element... + InkElement.remove(this.pt); + this.pt = undefined; + } + + /*if (this.options.revert) { + this.placeholder.parentNode.removeChild(this.placeholder); + }*/ + + if(this.placeholder) { + InkElement.remove(this.placeholder); + } + + if (this.options.revert) { + this.element.style.position = this.position; + if (this.zindex !== null) { + this.element.style.zIndex = this.zindex; + } + else { + this.element.style.zIndex = 'auto'; + } // restore default zindex of it had none + + this.element.style.left = (this.originalPosition[x]) ? this.originalPosition[x] + 'px' : ''; + this.element.style.top = (this.originalPosition[y]) ? this.originalPosition[y] + 'px' : ''; + } + + if (this.options.onEnd) { + this.options.onEnd(this.element, e); + } + + var Droppable = Ink.getModule('Ink.UI.Droppable_1'); + if (Droppable) { + Droppable.action(this._getCoords(e), 'drop', e, this.element); + } + + this.position = false; + this.zindex = false; + this.firstDrag = true; + } + + this.active = false; + this.dragged = false; + } + }; + + return Draggable; + +}); +/** + * @module Ink.UI.Drawer_1 + * Off-canvas menu + * @version 1 + */ + +Ink.createModule('Ink.UI.Drawer', '1', ['Ink.UI.Common_1', 'Ink.Dom.Loaded_1', 'Ink.Dom.Selector_1', 'Ink.Dom.Element_1', 'Ink.Dom.Event_1', 'Ink.Dom.Css_1'], function(Common, Loaded, Selector, Element, Event, Css) { + 'use strict'; + + function elNotFound(el) { + Ink.warn( 'Ink.UI.Drawer_1: Could not find the "' + + el + '" element on this page. Please make sure it exists.' ); + } + + function Drawer(options) { + this._init(options); + } + + Drawer.prototype = { + /** + * Displays off-canvas content which can be triggered by clicking elements with the 'left-drawer-trigger' and 'right-drawer-trigger', respectively. + * + * The left drawer has the 'left-drawer' class, and the right drawer has the 'right-drawer' class. + * + * The content drawer (EG your `
        `) must have the 'content-drawer' class. + * + * For more, see the example below, or try the sample. + * + * @class Ink.UI.Drawer_1 + * @constructor + * + * @xparam {Object} [options] Configuration options. + * @xparam {String} [options.parentSelector] The class you are using in your wrapper (in the example below, it's the `body` tag. + * @xparam {String} [options.leftDrawer] Selector for the left drawer element. This element is placed outside the screen and shown when you click the `leftTrigger` element. + * @xparam {String} [options.leftTrigger] Selector for the left drawer trigger(s). When you click this trigger, the `leftDrawer` is shown. + * @xparam {String} [options.rightDrawer] Right drawer selector. (see `options.leftDrawer`) + * @xparam {String} [options.rightTrigger] Right trigger selector (see `options.leftTrigger`) + * @xparam {String} [options.contentDrawer] Selector for the content drawer. + * @param {Boolean} [options.closeOnContentClick] Flag to close the drawer when someone clicks on the `.contentDrawer` + * @param {String} [options.mode] This can be 'push' or 'hide'. + * @param {String} [options.sides] Can be 'left', 'right', or 'both'. Controls from which sides the content + * + * @example + * + * + *
        + * Right drawer content... + *
        + *
        + * Left drawer content... + *
        + *
        + * Open left drawer + * Open right drawer + * Content... + *
        + * + * + * + */ + _init: function (options) { + this._options = Common.options({ + parentSelector: ['String', '.ink-drawer'], + leftDrawer: ['String', '.left-drawer'], + leftTrigger: ['String', '.left-drawer-trigger'], + rightDrawer: ['String', '.right-drawer'], + rightTrigger: ['String', '.right-drawer-trigger'], + contentDrawer: ['String', '.content-drawer'], + closeOnContentClick: ['Boolean', true], + closeOnLinkClick: ['Boolean', true], + mode: ['String', 'push'], + sides: ['String', 'both'] + }, options || {}); + + // make sure we have the required elements acording to the config options + + this._contentDrawers = Ink.ss(this._options.contentDrawer); + + this._leftDrawer = Ink.s(this._options.leftDrawer); + this._leftTriggers = Ink.ss(this._options.leftTrigger); + + this._rightDrawer = Ink.s(this._options.rightDrawer); + this._rightTriggers = Ink.ss(this._options.rightTrigger); + + // The body might not have it + Css.addClassName(document.body, 'ink-drawer'); + + if(this._contentDrawers.length === 0) { + Ink.warn( 'Ink.UI.Drawer_1: Could not find any "' + + this._options.contentDrawer + '" elements on this page. ' + + 'Please make sure you have at least one.' ); + } + + switch (this._options.sides) { + case 'both': + if( !this._leftDrawer ){ + elNotFound(this._options.leftDrawer); + } + + if(this._leftTriggers.length === 0){ + elNotFound(this._options.leftTrigger); + } + + if( !this._rightDrawer ){ + elNotFound(this._options.rightDrawer); + } + + if( this._rightTriggers.length === 0 ){ + elNotFound(this._options.rightTrigger); + } + this._triggers = this._options.leftTrigger + ', ' + this._options.rightTrigger + ', ' + this._options.contentDrawer; + break; + + case 'left': + if( !this._leftDrawer ){ + elNotFound(this._options.leftDrawer); + } + + if(this._leftTriggers.length === 0){ + elNotFound(this._options.leftTrigger); + } + this._triggers = this._options.leftTrigger + ', ' + this._options.contentDrawer; + break; + + case 'right': + if( !this._rightDrawer ){ + elNotFound(this._options.rightDrawer); + } + + if( this._rightTriggers.length === 0 ){ + elNotFound(this._options.rightTrigger); + } + this._triggers = this._options.rightTrigger + ', ' + this._options.contentDrawer; + break; + } + + + this._isOpen = false; + this._direction = undefined; + + this._handlers = { + click: Ink.bindEvent(this._onClick, this), + afterTransition: Ink.bindEvent(this._afterTransition, this) + }; + this._delay = 10; + this._addEvents(); + }, + + /** + * Click event handler. + * Listens to the body's click event + * + * @method _onClick + * @private + **/ + _onClick: function(ev){ + var triggerClicked = Ink.bind(function (side) { + // When clicking on the trigger, the corresponding side is toggled. + if (this._isOpen) { + this.close(); + } else { + this.open(side); + } + }, this); + + if(Selector.matchesSelector(ev.currentTarget,this._options.leftTrigger)){ + // Clicked on the left trigger + triggerClicked('left'); + } else if(Selector.matchesSelector(ev.currentTarget,this._options.rightTrigger)){ + triggerClicked('right'); + } else if(Selector.matchesSelector(ev.currentTarget,this._options.contentDrawer)){ + // Clicked on the rest of the body + if(this._options.closeOnContentClick) { + this.close(); + } + } + + // Clicked on a link + if (this._options.closeOnLinkClick && Element.isLink(ev.target)) { + this.close(); + } + }, + + _afterTransition: function(){ + if(!this._isOpen){ + if(this._direction === 'left') { + Css.removeClassName(this._leftDrawer, 'show'); + } else { + Css.removeClassName(this._rightDrawer, 'show'); + } + } + }, + + _addEvents: function(){ + Event.on(document.body, 'click', this._triggers + ', a[href*="#"]', this._handlers.click); + }, + + open: function(direction) { + this._isOpen = true; + this._direction = direction; + + var open = direction === 'left' ? + this._leftDrawer : + this._rightDrawer; + + Css.addClassName(open,'show'); + setTimeout(Ink.bind(function(){ + Css.addClassName(document.body, [this._options.mode, direction]); + },this), this._delay); + }, + + close: function() { + if (this._isOpen === false) { return; } + this._isOpen = false; + // TODO detect transitionEnd exists, otherwise don't rely on it + Event.one(document.body, 'transitionend oTransitionEnd transitionend webkitTransitionEnd', this._handlers.afterTransition); + Css.removeClassName(document.body, [this._options.mode, this._direction]); + } + + }; + + return Drawer; +}); +/** + * @module Ink.UI.Dropdown_1 + * Dropdown menus + * @version 1 + */ + +Ink.createModule('Ink.UI.Dropdown', '1', ['Ink.UI.Common_1', 'Ink.UI.Toggle_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1'], function(Common, Toggle, InkEvent, InkElement) { + 'use strict'; + + function Dropdown(trigger, options) { + this._init(trigger, options); + } + + Dropdown.prototype = { + /** + * Use this UI module to achieve a dropdown menu. + * + * @class Ink.UI.Dropdown + * + * @constructor + * @param {DOMElement|String} trigger Trigger Element + * @param {Object} options Options Object + * @param {DOMElement|String} options.target Target of the dropdown action. + * + * @sample Ink_UI_Dropdown_1.html + */ + _init: function(trigger, options) { + this._element = Common.elOrSelector(trigger); + this._options = Common.options('Ink.UI.Dropdown_1', { + 'target': ['Element'], + 'hoverOpen': ['Number', null], + 'dismissOnInsideClick': ['Boolean', false], + 'dismissOnOutsideClick': ['Boolean', true], + 'dismissAfter': ['Number', null], + 'onInsideClick': ['Function', null], + 'onOutsideClick': ['Function', null], + 'onOpen': ['Function', null], + 'onDismiss': ['Function', null] + }, options || {}, this._element); + + this._toggle = new Toggle(this._element, { + target: this._options.target, + closeOnInsideClick: null, + closeOnClick: false, + onChangeState: Ink.bind(function (newState) { + return this._openOrDismiss(newState, true, true); + }, this) + }); + + // Event where we set this._dismissTimeout and clear this._openTimeout + InkEvent.observeMulti([this._options.target, this._element], + 'mouseout', Ink.bindMethod(this, '_onMouseOut')); + + // Events to keep clearing this._dismissTimeout and set this._openTimeout + InkEvent.observeMulti([this._options.target, this._element], + 'mouseover', Ink.bindMethod(this, '_onMouseOver')); + + // to call dismissOnInsideClick and onInsideClick + InkEvent.observe(this._options.target, 'click', Ink.bindMethod(this, '_onInsideClick')); + // to call dismissOnOutsideClick and onOutsideClick + InkEvent.observe(document, 'click', Ink.bindMethod(this, '_onOutsideClick')); + }, + + /** + * Called when the mouse is over the toggler, or the dropdown. + * + * Deals with "hoverOpen" by setting the dropdown to open later. Also cancels "dismissAfter". + * @method _onMouseOver + * @private + **/ + _onMouseOver: function () { + if (typeof this._options.hoverOpen === 'number' && this._toggle.getState() === false) { + clearTimeout(this._openTimeout); + this._openTimeout = setTimeout( + Ink.bindMethod(this, 'open', true), + this._options.hoverOpen * 1000); + } + if (typeof this._options.dismissAfter === 'number') { + clearTimeout(this._dismissTimeout); + } + }, + + /** + * Called when the mouse leaves either the toggler, or the dropdown. + * + * Deals with "dismissAfter" by setting the dropdown to be dismissed later. Also cancels "hoverOpen". + * @method _onMouseOut + * @private + **/ + _onMouseOut: function () { + if (typeof this._options.dismissAfter === 'number' && this._toggle.getState() === true) { + clearTimeout(this._dismissTimeout); + this._dismissTimeout = setTimeout( + Ink.bindMethod(this, 'dismiss', true), + this._options.dismissAfter * 1000); + } + if (typeof this._options.hoverOpen === 'number') { + clearTimeout(this._openTimeout); + } + }, + + /** + * Handle clicks on the dropdown. + * @method _onInsideClick + * @private + */ + _onInsideClick: function (event) { + var ret = this._handlerCall('onInsideClick', InkEvent.element(event)); + if (ret === false) { return false; } + if (this._options.dismissOnInsideClick) { + this.dismiss(true); + } + InkEvent.stop(event); + }, + + /** + * Handle clicks outside the dropdown. + * @method _onInsideClick + * @private + */ + _onOutsideClick: function (event) { + var target = InkEvent.element(event); + var foundElem = InkElement.findUpwardsHaving(target, Ink.bind(function (needle) { + return needle === this._element; + }, this)); + var foundTarget = InkElement.findUpwardsHaving(target, Ink.bind(function (needle) { + return needle === this._options.target; + }, this)); + + if (!foundElem && !foundTarget) { + var ret = this._handlerCall('onOutsideClick', target); + if (ret === false) { return false; } + if (this._options.dismissOnOutsideClick) { + this.dismiss(true); + } + InkEvent.stop(event); + } + }, + + /** + * Closes the dropdown. + * + * @method dismiss + * @param [callHandler=false] call onDismiss handler + */ + dismiss: function (callHandler, doNotInformToggle) { + this._openOrDismiss(false, callHandler, doNotInformToggle); + }, + + /** + * Opens the dropdown + * + * @method open + * @param [callHandler=false] call onOpen handler + */ + open: function (callHandler, _doNotInformToggle) { + this._openOrDismiss(true, callHandler, _doNotInformToggle); + }, + + /** + * DRY'ing up open() and dismiss() + * + * @method _openOrDismiss + * @param [newState=false] + * @param [callHandler=false] + * @private + */ + _openOrDismiss: function (newState, callHandler, _doNotInformToggle) { + if (this._toggle && this._toggle.getState() === newState) { return; } + if (callHandler) { + if (this._handlerCall(newState ? 'onOpen' : 'onDismiss') === false) { + return false; // canceled by event handler + } + } + if (!_doNotInformToggle) { + this._toggle.setState(newState); + } + clearTimeout(this._dismissTimeout); + clearTimeout(this._openTimeout); + }, + + /** + * call a method given by the user through the options + * + * @method _handlerCall + * @param handler {String} The handler name in this._options + * @param [args*] Arguments to pass to function + */ + _handlerCall: function (handler/*, ... */) { + if (this._options[handler]) { + return this._options[handler].call(this, [].slice.call(arguments, 1)); + } + } + }; + + return Dropdown; +}); +/** + * @module Ink.UI.Droppable_1 + * Drop elements around + * @version 1 + */ + +Ink.createModule("Ink.UI.Droppable","1",["Ink.Dom.Element_1", "Ink.Dom.Event_1", "Ink.Dom.Css_1", "Ink.UI.Common_1", "Ink.Util.Array_1", "Ink.Dom.Selector_1"], function( InkElement, InkEvent, Css, Common, InkArray, Selector) { + 'use strict'; + + // Higher order functions + var hAddClassName = function (element) { + return function (className) {return Css.addClassName(element, className);}; + }; + var hRemoveClassName = function (element) { + return function (className) {return Css.removeClassName(element, className);}; + }; + + /** + * @namespace Ink.UI.Droppable + * @version 1 + * @static + */ + var Droppable = { + /** + * Flag to activate debug mode + * + * @property debug + * @type {Boolean} + * @private + */ + debug: false, + + /** + * Array with the data of each element (`{element: ..., data: ..., options: ...}`) + * + * @property _droppables + * @type {Array} + * @private + */ + _droppables: [], + + /** + * Array of data for each draggable. (`{element: ..., data: ...}`) + * + * @property _draggables + * @type {Array} + * @private + */ + _draggables: [], + + /** + * Makes an element droppable. + * This method adds it to the stack of droppable elements. + * Can consider it a constructor of droppable elements, but where no Droppable object is returned. + * + * In the following arguments, any events/callbacks you may pass, can be either functions or strings. If the 'move' or 'copy' strings are passed, the draggable gets moved into this droppable. If 'revert' is passed, an acceptable droppable is moved back to the element it came from. + + * + * @method add + * @param {String|DOMElement} element Target element + * @param {Object} [options] Options object + * @param {String} [options.hoverClass] Classname(s) applied when an acceptable draggable element is hovering the element + * @param {String} [options.accept] Selector for choosing draggables which can be dropped in this droppable. + * @param {Function} [options.onHover] Callback when an acceptable draggable element is hovering the droppable. Gets the draggable and the droppable element as parameters. + * @param {Function|String} [options.onDrop] Callback when an acceptable draggable element is dropped. Gets the draggable, the droppable and the event as parameters. + * @param {Function|String} [options.onDropOut] Callback when a droppable is dropped outside this droppable. Gets the draggable, the droppable and the event as parameters. (see above for string options). + * @public + * + * @sample Ink_UI_Droppable_1.html + * + */ + add: function(element, options) { + element = Common.elOrSelector(element, 'Droppable.add target element'); + + var opt = Ink.extendObj( { + hoverClass: options.hoverclass /* old name */ || false, + accept: false, + onHover: false, + onDrop: false, + onDropOut: false + }, options || {}, InkElement.data(element)); + + if (typeof opt.hoverClass === 'string') { + opt.hoverClass = opt.hoverClass.split(/\s+/); + } + + function cleanStyle(draggable) { + draggable.style.position = 'inherit'; + } + var that = this; + var namedEventHandlers = { + move: function (draggable, droppable/*, event*/) { + cleanStyle(draggable); + droppable.appendChild(draggable); + }, + copy: function (draggable, droppable/*, event*/) { + cleanStyle(draggable); + droppable.appendChild(draggable.cloneNode); + }, + revert: function (draggable/*, droppable, event*/) { + that._findDraggable(draggable).originalParent.appendChild(draggable); + cleanStyle(draggable); + } + }; + var name; + + if (typeof opt.onHover === 'string') { + name = opt.onHover; + opt.onHover = namedEventHandlers[name]; + if (opt.onHover === undefined) { + throw new Error('Unknown hover event handler: ' + name); + } + } + if (typeof opt.onDrop === 'string') { + name = opt.onDrop; + opt.onDrop = namedEventHandlers[name]; + if (opt.onDrop === undefined) { + throw new Error('Unknown drop event handler: ' + name); + } + } + if (typeof opt.onDropOut === 'string') { + name = opt.onDropOut; + opt.onDropOut = namedEventHandlers[name]; + if (opt.onDropOut === undefined) { + throw new Error('Unknown dropOut event handler: ' + name); + } + } + + var elementData = { + element: element, + data: {}, + options: opt + }; + this._droppables.push(elementData); + this._update(elementData); + }, + + /** + * Finds droppable data about `element`. this data is added in `.add` + * + * @method _findData + * @param {DOMElement} element Needle + * @return {object} Droppable data of the element + * @private + */ + _findData: function (element) { + var elms = this._droppables; + for (var i = 0, len = elms.length; i < len; i++) { + if (elms[i].element === element) { + return elms[i]; + } + } + }, + /** + * Finds draggable data about `element` + * + * @method _findDraggable + * @param {DOMElement} element Needle + * @return {Object} Draggable data queried + * @private + */ + _findDraggable: function (element) { + var elms = this._draggables; + for (var i = 0, len = elms.length; i < len; i++) { + if (elms[i].element === element) { + return elms[i]; + } + } + }, + + /** + * Invoke every time a drag starts + * + * @method updateAll + * @private + */ + updateAll: function() { + InkArray.each(this._droppables, Droppable._update); + }, + + /** + * Updates location and size of droppable element + * + * @method update + * @param {String|DOMElement} element Target element + * @public + */ + update: function(element) { + this._update(this._findData(element)); + }, + + _update: function(elementData) { + var data = elementData.data; + var element = elementData.element; + data.left = InkElement.offsetLeft(element); + data.top = InkElement.offsetTop( element); + data.right = data.left + InkElement.elementWidth( element); + data.bottom = data.top + InkElement.elementHeight(element); + }, + + /** + * Removes an element from the droppable stack and removes the droppable behavior + * + * @method remove + * @param {String|DOMElement} elOrSelector Droppable element to disable. + * @return {Boolean} Whether the object was found and deleted + * @public + */ + remove: function(el) { + el = Common.elOrSelector(el); + var len = this._droppables.length; + for (var i = 0; i < len; i++) { + if (this._droppables[i].element === el) { + this._droppables.splice(i, 1); + break; + } + } + return len !== this._droppables.length; + }, + + /** + * Executes an action on a droppable + * + * @method action + * @param {Object} coords Coordinates where the action happened + * @param {String} type Type of action. 'drag' or 'drop'. + * @param {Object} ev Event object + * @param {Object} draggable Draggable element + * @private + */ + action: function(coords, type, ev, draggable) { + // check all droppable elements + InkArray.each(this._droppables, Ink.bind(function(elementData) { + var data = elementData.data; + var opt = elementData.options; + var element = elementData.element; + + if (opt.accept && !Selector.matches(opt.accept, [draggable]).length) { + return; + } + + if (type === 'drag' && !this._findDraggable(draggable)) { + this._draggables.push({ + element: draggable, + originalParent: draggable.parentNode + }); + } + + // check if our draggable is over our droppable + if (coords.x >= data.left && coords.x <= data.right && + coords.y >= data.top && coords.y <= data.bottom) { + // INSIDE + if (type === 'drag') { + if (opt.hoverClass) { + InkArray.each(opt.hoverClass, + hAddClassName(element)); + } + if (opt.onHover) { + opt.onHover(draggable, element); + } + } else if (type === 'drop') { + if (opt.hoverClass) { + InkArray.each(opt.hoverClass, + hRemoveClassName(element)); + } + if (opt.onDrop) { + opt.onDrop(draggable, element, ev); + } + } + } else { + // OUTSIDE + + if (type === 'drag' && opt.hoverClass) { + InkArray.each(opt.hoverClass, hRemoveClassName(element)); + } else if (type === 'drop') { + if(opt.onDropOut){ + opt.onDropOut(draggable, element, ev); + } + } + } + }, this)); + } + }; + + return Droppable; +}); +/** + * @module Ink.UI.FormValidator_1 + * Form Validation + * @version 1 + **/ + +Ink.createModule('Ink.UI.FormValidator', '1', ['Ink.Dom.Element_1', 'Ink.Dom.Css_1','Ink.Util.Validator_1','Ink.Dom.Selector_1'], function( InkElement, Css, InkValidator , Selector) { + 'use strict'; + + function elementsWithSameName(elm) { + if (!elm.name) { return []; } + if (!elm.form) { + return Selector.select('name="' + elm.name + '"'); + } + var ret = elm.form[elm.name]; + if(typeof(ret.length) === 'undefined') { + ret = [ret]; + } + return ret; + } + /** + * @namespace Ink.UI.FormValidator + * @version 1 + */ + var FormValidator = { + + /** + * Specifies the version of the component + * + * @property version + * @type {String} + * @readOnly + * @public + */ + version: '1', + + /** + * Available flags to use in the validation process. + * The keys are the 'rules', and their values are objects with the key 'msg', determining + * what is the error message. + * + * @property _flagMap + * @type {Object} + * @readOnly + * @private + */ + _flagMap: { + //'ink-fv-required': {msg: 'Campo obrigatório'}, + 'ink-fv-required': {msg: 'Required field'}, + //'ink-fv-email': {msg: 'E-mail inválido'}, + 'ink-fv-email': {msg: 'Invalid e-mail address'}, + //'ink-fv-url': {msg: 'URL inválido'}, + 'ink-fv-url': {msg: 'Invalid URL'}, + //'ink-fv-number': {msg: 'Número inválido'}, + 'ink-fv-number': {msg: 'Invalid number'}, + //'ink-fv-phone_pt': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_pt': {msg: 'Invalid phone number'}, + //'ink-fv-phone_cv': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_cv': {msg: 'Invalid phone number'}, + //'ink-fv-phone_mz': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_mz': {msg: 'Invalid phone number'}, + //'ink-fv-phone_ao': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_ao': {msg: 'Invalid phone number'}, + //'ink-fv-date': {msg: 'Data inválida'}, + 'ink-fv-date': {msg: 'Invalid date'}, + //'ink-fv-confirm': {msg: 'Confirmação inválida'}, + 'ink-fv-confirm': {msg: 'Confirmation does not match'}, + 'ink-fv-custom': {msg: ''} + }, + + /** + * This property holds all form elements for later validation + * + * @property elements + * @type {Object} + * @public + */ + elements: {}, + + /** + * This property holds the objects needed to cross-check for the 'confirm' rule + * + * @property confirmElms + * @type {Object} + * @public + */ + confirmElms: {}, + + /** + * This property holds the previous elements in the confirmElms property, but with a + * true/false specifying if it has the class ink-fv-confirm. + * + * @property hasConfirm + * @type {Object} + */ + hasConfirm: {}, + + /** + * Defined class name to use in error messages label + * + * @property _errorClassName + * @type {String} + * @readOnly + * @private + */ + _errorClassName: 'tip error', + + /** + * @property _errorValidationClassName + * @type {String} + * @readOnly + * @private + */ + _errorValidationClassName: 'validaton', + + /** + * @property _errorTypeWarningClassName + * @type {String} + * @readOnly + * @private + */ + _errorTypeWarningClassName: 'warning', + + /** + * @property _errorTypeErrorClassName + * @type {String} + * @readOnly + * @private + */ + _errorTypeErrorClassName: 'error', + + /** + * Checks if a form is valid + * + * @method validate + * @param {DOMElement|String} elm DOM form element or form id + * @param {Object} options Configuration options + * @param {Function} [options.onSuccess] Callback to run when form is valid + * @param {Function} [options.onError] Callback to run when form is not valid + * @param {Array} [options.customFlag] Custom flags to use to validate form fields + * @public + * @return {Boolean} Whether the form is deemed valid or not. + * + * @sample Ink_UI_FormValidator_1.html + */ + validate: function(elm, options) { + this._free(); + + options = Ink.extendObj({ + onSuccess: false, + onError: false, + customFlag: false, + confirmGroup: [] + }, options || {}); + + if(typeof(elm) === 'string') { + elm = document.getElementById(elm); + } + if(elm === null){ + return false; + } + this.element = elm; + + if(typeof(this.element.id) === 'undefined' || this.element.id === null || this.element.id === '') { + // generate a random ID + // TODO ugly and potentially problematic, and you know Murphy's law. + this.element.id = 'ink-fv_randomid_'+(Math.round(Math.random() * 99999)); + } + + this.custom = options.customFlag; + + this.confirmGroup = options.confirmGroup; + + var fail = this._validateElements(); + + if(fail.length > 0) { + if(options.onError) { + options.onError(fail); + } else { + this._showError(elm, fail); + } + return false; + } else { + if(!options.onError) { + this._clearError(elm); + } + this._clearCache(); + if(options.onSuccess) { + options.onSuccess(); + } + return true; + } + + }, + + /** + * Resets previously generated validation errors + * + * @method reset + * @public + */ + reset: function() + { + this._clearError(); + this._clearCache(); + }, + + /** + * Cleans the object + * + * @method _free + * @private + */ + _free: function() + { + this.element = null; + //this.elements = []; + this.custom = false; + this.confirmGroup = false; + }, + + /** + * Cleans the properties responsible for caching + * + * @method _clearCache + * @private + */ + _clearCache: function() + { + this.element = null; + this.elements = []; + this.custom = false; + this.confirmGroup = false; + }, + + /** + * Gets the form elements and stores them in the caching properties + * + * @method _getElements + * @private + */ + _getElements: function() + { + //this.elements = []; + // if(typeof(this.elements[this.element.id]) !== 'undefined') { + // return; + // } + + var elements = this.elements[this.element.id] = []; + this.confirmElms[this.element.id] = []; + //console.log(this.element); + //console.log(this.element.elements); + var formElms = Selector.select(':input', this.element); + var curElm = false; + for(var i=0, totalElm = formElms.length; i < totalElm; i++) { + curElm = formElms[i]; + var type = (curElm.getAttribute('type') + '').toLowerCase(); + + if (type === 'radio' || type === 'checkbox') { + if(elements.length === 0 || + ( + curElm.getAttribute('type') !== elements[elements.length - 1].getAttribute('type') && + curElm.getAttribute('name') !== elements[elements.length - 1].getAttribute('name') + )) { + for(var flag in this._flagMap) { + if(Css.hasClassName(curElm, flag)) { + elements.push(curElm); + break; + } + } + } + } else { + for(var flag2 in this._flagMap) { + if(Css.hasClassName(curElm, flag2) && flag2 !== 'ink-fv-confirm') { + /*if(flag2 == 'ink-fv-confirm') { + this.confirmElms[this.element.id].push(curElm); + this.hasConfirm[this.element.id] = true; + }*/ + elements.push(curElm); + break; + } + } + + if(Css.hasClassName(curElm, 'ink-fv-confirm')) { + this.confirmElms[this.element.id].push(curElm); + this.hasConfirm[this.element.id] = true; + } + + } + } + }, + + /** + * Runs the validation for each element + * + * @method _validateElements + * @private + */ + _validateElements: function() { + var oGroups; + this._getElements(); + if(this.hasConfirm[this.element.id] === true) { + oGroups = this._makeConfirmGroups(); + } + + var errors = []; + + var curElm = false; + var customErrors = false; + var inArray; + for(var i=0, totalElm = this.elements[this.element.id].length; i < totalElm; i++) { + inArray = false; + curElm = this.elements[this.element.id][i]; + + if(!curElm.disabled) { + for(var flag in this._flagMap) { + if(Css.hasClassName(curElm, flag)) { + if(flag !== 'ink-fv-custom' && flag !== 'ink-fv-confirm') { + if(!this._isValid(curElm, flag)) { + if(!inArray) { + errors.push({elm: curElm, errors:[flag]}); + inArray = true; + } else { + errors[(errors.length - 1)].errors.push(flag); + } + } + } else if(flag !== 'ink-fv-confirm'){ + customErrors = this._isCustomValid(curElm); + if(customErrors.length > 0) { + errors.push({elm: curElm, errors:[flag], custom: customErrors}); + } + } else if(flag === 'ink-fv-confirm'){ + continue; + } + } + } + } + } + errors = this._validateConfirmGroups(oGroups, errors); + //console.log(InkDumper.returnDump(errors)); + return errors; + }, + + /** + * Runs the 'confirm' validation for each group of elements + * + * @method _validateConfirmGroups + * @param {Array} oGroups Array/Object that contains the group of confirm objects + * @param {Array} errors Array that will store the errors + * @private + * @return {Array} Array of errors that was passed as 2nd parameter (either changed, or not, depending if errors were found). + */ + _validateConfirmGroups: function(oGroups, errors) { + //console.log(oGroups); + var curGroup = false; + for(var i in oGroups) if (oGroups.hasOwnProperty(i)) { + curGroup = oGroups[i]; + if(curGroup.length === 2) { + if(curGroup[0].value !== curGroup[1].value) { + errors.push({elm:curGroup[1], errors:['ink-fv-confirm']}); + } + } + } + return errors; + }, + + /** + * Creates the groups of 'confirm' objects + * + * @method _makeConfirmGroups + * @private + * @return {Array|Boolean} Returns the array of confirm elements or false on error. + */ + _makeConfirmGroups: function() + { + var oGroups; + if(this.confirmGroup && this.confirmGroup.length > 0) { + oGroups = {}; + var curElm = false; + var curGroup = false; + //this.confirmElms[this.element.id]; + for(var i=0, total=this.confirmElms[this.element.id].length; i < total; i++) { + curElm = this.confirmElms[this.element.id][i]; + for(var j=0, totalG=this.confirmGroup.length; j < totalG; j++) { + curGroup = this.confirmGroup[j]; + if(Css.hasClassName(curElm, curGroup)) { + if(typeof(oGroups[curGroup]) === 'undefined') { + oGroups[curGroup] = [curElm]; + } else { + oGroups[curGroup].push(curElm); + } + } + } + } + return oGroups; + } else { + if(this.confirmElms[this.element.id].length === 2) { + oGroups = { + "ink-fv-confirm": [ + this.confirmElms[this.element.id][0], + this.confirmElms[this.element.id][1] + ] + }; + } + return oGroups; + } + return false; + }, + + /** + * Validates an element with a custom validation + * + * @method _isCustomValid + * @param {DOMElemenmt} elm Element to be validated + * @private + * @return {Array} Array of errors. If no errors are found, results in an empty array. + */ + _isCustomValid: function(elm) + { + var customErrors = []; + var curFlag = false; + for(var i=0, tCustom = this.custom.length; i < tCustom; i++) { + curFlag = this.custom[i]; + if(Css.hasClassName(elm, curFlag.flag)) { + if(!curFlag.callback(elm, curFlag.msg)) { + customErrors.push({flag: curFlag.flag, msg: curFlag.msg}); + } + } + } + return customErrors; + }, + + /** + * Runs the normal validation functions for a specific element + * + * @method _isValid + * @param {DOMElement} elm DOMElement that will be validated + * @param {String} fieldType Rule to be validated. This must be one of the keys present in the _flagMap property. + * @private + * @return {Boolean} The result of the validation. + */ + _isValid: function(elm, fieldType) { + var nodeName = elm.nodeName.toLowerCase(); + var inputType = (elm.getAttribute('type') || '').toLowerCase(); + var value = this._trim(elm.value); + + // When we're analyzing emails, telephones, etc, and the field is + // empty, we check if it is required. If not required, it's valid. + if (fieldType !== 'ink-fv-required' && + inputType !== 'checkbox' && inputType !== 'radio' && + value === '') { + return !Css.hasClassName(elm, 'ink-fv-required'); + } + + switch(fieldType) { + case 'ink-fv-required': + if(nodeName === 'select') { + if(elm.selectedIndex > 0) { + return true; + } else { + return false; + } + } + if(inputType !== 'checkbox' && inputType !== 'radio' && + value !== '') { + return true; // A input type=text,email,etc. + } else if(inputType === 'checkbox' || inputType === 'radio') { + var aFormRadios = elementsWithSameName(elm); + var isChecked = false; + // check if any input of the radio is checked + for(var i=0, totalRadio = aFormRadios.length; i < totalRadio; i++) { + if(aFormRadios[i].checked === true) { + isChecked = true; + break; + } + } + return isChecked; + } + return false; + + case 'ink-fv-email': + return InkValidator.mail(elm.value); + + case 'ink-fv-url': + return InkValidator.url(elm.value); + + case 'ink-fv-number': + return !isNaN(Number(elm.value)) && isFinite(Number(elm.value)); + + case 'ink-fv-phone_pt': + return InkValidator.isPTPhone(elm.value); + + case 'ink-fv-phone_cv': + return InkValidator.isCVPhone(elm.value); + + case 'ink-fv-phone_ao': + return InkValidator.isAOPhone(elm.value); + + case 'ink-fv-phone_mz': + return InkValidator.isMZPhone(elm.value); + + case 'ink-fv-date': + var Element = Ink.getModule('Ink.Dom.Element',1); + var dataset = Element.data( elm ); + var validFormat = 'yyyy-mm-dd'; + + if( Css.hasClassName(elm, 'ink-datepicker') && ('format' in dataset) ){ + validFormat = dataset.format; + } else if( ('validFormat' in dataset) ){ + validFormat = dataset.validFormat; + } + + if( !(validFormat in InkValidator._dateParsers ) ){ + var validValues = []; + for( var val in InkValidator._dateParsers ){ + if (InkValidator._dateParsers.hasOwnProperty(val)) { + validValues.push(val); + } + } + throw new Error( + 'The attribute data-valid-format must be one of ' + + 'the following values: ' + validValues.join(', ')); + } + + return InkValidator.isDate( validFormat, elm.value ); + case 'ink-fv-custom': + break; + } + + return false; + }, + + /** + * Makes the necessary changes to the markup to show the errors of a given element + * + * @method _showError + * @param {DOMElement} formElm The form element to be changed to show the errors + * @param {Array} aFail An array with the errors found. + * @private + */ + _showError: function(formElm, aFail) { + this._clearError(formElm); + + //ink-warning-field + + //console.log(aFail); + var curElm = false; + for(var i=0, tFail = aFail.length; i < tFail; i++) { + curElm = aFail[i].elm; + if (curElm) { + this._showAnErrorOnElement(curElm, aFail[i]); + } + } + }, + + _showAnErrorOnElement: function (curElm, error) { + /* jshint noempty:false */ + + var controlGroupElm = InkElement.findUpwardsByClass( + curElm, 'control-group'); + var controlElm = InkElement.findUpwardsByClass( + curElm, 'control'); + + var errorClasses = [ + this._errorClassName, + this._errorTypeClassName].join(' '); + + var errorMsg = InkElement.create('p', { + className: errorClasses + }); + + if(error.errors[0] !== 'ink-fv-custom') { + errorMsg.innerHTML = this._flagMap[error.errors[0]].msg; + } else { + errorMsg.innerHTML = error.custom[0].msg; + } + + var target = (controlElm || controlGroupElm); + if (target) { + target.appendChild(errorMsg); + } else { + InkElement.insertAfter(errorMsg, curElm); + } + + if (controlElm) { + if(error.errors[0] === 'ink-fv-required') { + Css.addClassName(controlGroupElm, 'validation error'); + } else { + Css.addClassName(controlGroupElm, 'validation warning'); + } + } + }, + + /** + * Clears the error of a given element. Normally executed before any validation, for all elements, as a reset. + * + * @method _clearErrors + * @param {DOMElement} formElm Form element to be cleared. + * @private + */ + _clearError: function(formElm) { + //return; + var aErrorLabel = formElm.getElementsByTagName('p'); + + var curElm; + var control; + + for(var i = (aErrorLabel.length - 1); i >= 0; i--) { + curElm = aErrorLabel[i]; + if(Css.hasClassName(curElm, this._errorClassName)) { + control = InkElement.findUpwardsBySelector(curElm, '.control-group'); + if (control) { + Css.removeClassName(control, ['validation', 'error', 'warning']); + } + + if(Css.hasClassName(curElm, this._errorClassName, true /*both*/)) { + InkElement.remove(curElm); + } + } + } + + var aErrorLabel2 = formElm.getElementsByTagName('ul'); + for(i = (aErrorLabel2.length - 1); i >= 0; i--) { + curElm = aErrorLabel2[i]; + if(Css.hasClassName(curElm, 'control-group')) { + Css.removeClassName(curElm, 'validation error'); + } + } + }, + + /** + * Removes unnecessary spaces to the left or right of a string + * + * @method _trim + * @param {String} stri String to be trimmed + * @private + * @return {String|undefined} String trimmed. + */ + _trim: function(str) + { + if(typeof(str) === 'string') + { + return str.replace(/^\s+|\s+$|\n+$/g, ''); + } + } + }; + + return FormValidator; + +}); +/** + * @module Ink.UI.FormValidator_2 + * Form Validation + * @version 2 + */ + +Ink.createModule('Ink.UI.FormValidator', '2', [ 'Ink.UI.Common_1','Ink.Dom.Element_1','Ink.Dom.Event_1','Ink.Dom.Selector_1','Ink.Dom.Css_1','Ink.Util.Array_1','Ink.Util.I18n_1','Ink.Util.Validator_1'], function( Common, Element, Event, Selector, Css, InkArray, I18n, InkValidator ) { + 'use strict'; + + /** + * Validation Functions to be used + * Some functions are a port from PHP, others are the 'best' solutions available + * + * @private + * @static + */ + var validationFunctions = { + + /** + * Checks if a value is defined and not empty + * @method required + * @param {String} value Value to be checked + * @return {Boolean} True case is defined, false if it's empty or not defined. + */ + 'required': function( value ){ + return ( (typeof value !== 'undefined') && ( !(/^\s*$/).test(value) ) ); + }, + + /** + * Checks if a value has a minimum length + * + * @method min_length + * @param {String} value Value to be checked. + * @param {String|Number} minSize Minimum number of characters. + * @return {Boolean} True if the length of value is equal or bigger than the minimum chars defined. False if not. + */ + 'min_length': function( value, minSize ){ + return ( (typeof value === 'string') && ( value.length >= parseInt(minSize,10) ) ); + }, + + /** + * Checks if a value has a maximum length + * + * @method max_length + * @param {String} value Value to be checked. + * @param {String|Number} maxSize Maximum number of characters. + * @return {Boolean} True if the length of value is equal or smaller than the maximum chars defined. False if not. + */ + 'max_length': function( value, maxSize ){ + return ( (typeof value === 'string') && ( value.length <= parseInt(maxSize,10) ) ); + }, + + /** + * Checks if a value has an exact length + * + * @method exact_length + * @param {String} value Value to be checked + * @param {String|Number} exactSize Exact number of characters. + * @return {Boolean} True if the length of value is equal to the size defined. False if not. + */ + 'exact_length': function( value, exactSize ){ + return ( (typeof value === 'string') && ( value.length === parseInt(exactSize,10) ) ); + }, + + /** + * Checks if a value is a valid email address + * + * @method email + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid email address. False if not. + */ + 'email': function( value ){ + return ( ( typeof value === 'string' ) && InkValidator.mail( value ) ); + }, + + /** + * Checks if a value has a valid URL + * + * @method url + * @param {String} value Value to be checked + * @param {Boolean} fullCheck Flag to validate a full url (with the protocol). + * @return {Boolean} True if the URL is considered valid. False if not. + */ + 'url': function( value, fullCheck ){ + fullCheck = fullCheck || false; + return ( (typeof value === 'string') && InkValidator.url( value, fullCheck ) ); + }, + + /** + * Checks if a value is a valid IP. Supports ipv4 and ipv6 + * + * @method ip + * @param {String} value Value to be checked + * @param {String} ipType Type of IP to be validated. The values are: ipv4, ipv6. By default is ipv4. + * @return {Boolean} True if the value is a valid IP address. False if not. + */ + 'ip': function( value, ipType ){ + if( typeof value !== 'string' ){ + return false; + } + + return InkValidator.isIP(value, ipType); + }, + + /** + * Checks if a value is a valid phone number. + * Supports several countries, based in the Ink.Util.Validator class. + * + * @method phone + * @param {String} value Value to be checked + * @param {String} phoneType Country's initials to specify the type of phone number to be validated. Ex: 'AO'. + * @return {Boolean} True if it's a valid phone number. False if not. + */ + 'phone': function( value, phoneType ){ + if( typeof value !== 'string' ){ + return false; + } + + var countryCode = phoneType ? phoneType.toUpperCase() : ''; + + return InkValidator['is' + countryCode + 'Phone'](value); + }, + + /** + * Checks if a value is a valid credit card. + * + * @method credit_card + * @param {String} value Value to be checked + * @param {String} cardType Type of credit card to be validated. The card types available are in the Ink.Util.Validator class. + * @return {Boolean} True if the value is a valid credit card number. False if not. + */ + 'credit_card': function( value, cardType ){ + if( typeof value !== 'string' ){ + return false; + } + + return InkValidator.isCreditCard( value, cardType || 'default' ); + }, + + /** + * Checks if a value is a valid date. + * + * @method date + * @param {String} value Value to be checked + * @param {String} format Specific format of the date. + * @return {Boolean} True if the value is a valid date. False if not. + */ + 'date': function( value, format ){ + return ( (typeof value === 'string' ) && InkValidator.isDate(format, value) ); + }, + + /** + * Checks if a value only contains alphabetical values. + * + * @method alpha + * @param {String} value Value to be checked + * @param {Boolean} supportSpaces Allow whitespace + * @return {Boolean} True if the value is alphabetical-only. False if not. + */ + 'alpha': function( value, supportSpaces ){ + return InkValidator.ascii(value, {singleLineWhitespace: supportSpaces}); + }, + + /* + * Checks if a value contains only printable BMP unicode characters + * Optionally allow punctuation and whitespace + * + * @method text + * @param {String} value Value to be checked + * @return {Boolean} Whether the value only contains printable text characters + **/ + 'text': function (value, whitespace, punctuation) { + return InkValidator.unicode(value, { + singleLineWhitespace: whitespace, + unicodePunctuation: punctuation}); + }, + + /* + * Checks if a value contains only printable latin-1 text characters. + * Optionally allow punctuation and whitespace. + * + * @method text + * @param {String} value Value to be checked + * @return {Boolean} Whether the value only contains printable text characters + **/ + 'latin': function (value, punctuation, whitespace) { + if ( typeof value !== 'string') { return false; } + return InkValidator.latin1(value, {latin1Punctuation: punctuation, singleLineWhitespace: whitespace}); + }, + + /** + * Checks if a value contains only alphabetical or numerical characters. + * + * @method alpha_numeric + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid alphanumerical. False if not. + */ + 'alpha_numeric': function( value ){ + return InkValidator.ascii(value, {numbers: true}); + }, + + /** + * Checks if a value contains only alphabetical, dash or underscore characteres. + * + * @method alpha_dashes + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid. False if not. + */ + 'alpha_dash': function( value ){ + return InkValidator.ascii(value, {dash: true, underscore: true}); + }, + + /** + * Checks if a value is a single digit. + * + * @method digit + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid digit. False if not. + */ + 'digit': function( value ){ + return ((typeof value === 'string') && /^[0-9]{1}$/.test(value)); + }, + + /** + * Checks if a value is a valid integer. + * + * @method integer + * @param {String} value Value to be checked + * @param {String} positive Flag that specifies if the integer is must be positive (unsigned). + * @return {Boolean} True if the value is a valid integer. False if not. + */ + 'integer': function( value, positive ){ + return InkValidator.number(value, { + negative: !positive, + decimalPlaces: 0 + }); + }, + + /** + * Checks if a value is a valid decimal number. + * + * @method decimal + * @param {String} value Value to be checked + * @param {String} decimalSeparator Character that splits the integer part from the decimal one. By default is '.'. + * @param {String} [decimalPlaces] Maximum number of digits that the decimal part must have. + * @param {String} [leftDigits] Maximum number of digits that the integer part must have, when provided. + * @return {Boolean} True if the value is a valid decimal number. False if not. + */ + 'decimal': function( value, decimalSeparator, decimalPlaces, leftDigits ){ + return InkValidator.number(value, { + decimalSep: decimalSeparator || '.', + decimalPlaces: +decimalPlaces || null, + maxDigits: +leftDigits + }); + }, + + /** + * Checks if a value is a numeric value. + * + * @method numeric + * @param {String} value Value to be checked + * @param {String} decimalSeparator Checks if it's a valid decimal. Otherwise checks if it's a valid integer. + * @param {String} [decimalPlaces] Maximum number of digits the decimal part must have. + * @param {String} [leftDigits] Maximum number of digits the integer part must have, when provided. + * @return {Boolean} True if the value is numeric. False if not. + */ + 'numeric': function( value, decimalSeparator, decimalPlaces, leftDigits ){ + decimalSeparator = decimalSeparator || '.'; + if( value.indexOf(decimalSeparator) !== -1 ){ + return validationFunctions.decimal( value, decimalSeparator, decimalPlaces, leftDigits ); + } else { + return validationFunctions.integer( value ); + } + }, + + /** + * Checks if a value is in a specific range of values. + * The parameters after the first one are used to specify the range, and are similar in function to python's range() function. + * + * @method range + * @param {String} value Value to be checked + * @param {String} minValue Left limit of the range. + * @param {String} maxValue Right limit of the range. + * @param {String} [multipleOf] In case you want numbers that are only multiples of another number. + * @return {Boolean} True if the value is within the range. False if not. + */ + 'range': function( value, minValue, maxValue, multipleOf ){ + value = +value; + minValue = +minValue; + maxValue = +maxValue; + + if (isNaN(value) || isNaN(minValue) || isNaN(maxValue)) { + return false; + } + + if( value < minValue || value > maxValue ){ + return false; + } + + if (multipleOf) { + return (value - minValue) % multipleOf === 0; + } else { + return true; + } + }, + + /** + * Checks if a value is a valid color. + * + * @method color + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid color. False if not. + */ + 'color': function( value ){ + return InkValidator.isColor(value); + }, + + /** + * Checks if a value matches the value of a different field. + * + * @method matches + * @param {String} value Value to be checked + * @param {String} fieldToCompare Name or ID of the field to compare. + * @return {Boolean} True if the values match. False if not. + */ + 'matches': function( value, fieldToCompare ){ + return ( value === this.getFormElements()[fieldToCompare][0].getValue() ); + } + + }; + + /** + * Error messages for the validation functions above + * @private + * @static + */ + var validationMessages = new I18n({ + en_US: { + 'formvalidator.required' : 'The {field} filling is mandatory', + 'formvalidator.min_length': 'The {field} must have a minimum size of {param1} characters', + 'formvalidator.max_length': 'The {field} must have a maximum size of {param1} characters', + 'formvalidator.exact_length': 'The {field} must have an exact size of {param1} characters', + 'formvalidator.email': 'The {field} must have a valid e-mail address', + 'formvalidator.url': 'The {field} must have a valid URL', + 'formvalidator.ip': 'The {field} does not contain a valid {param1} IP address', + 'formvalidator.phone': 'The {field} does not contain a valid {param1} phone number', + 'formvalidator.credit_card': 'The {field} does not contain a valid {param1} credit card', + 'formvalidator.date': 'The {field} should contain a date in the {param1} format', + 'formvalidator.alpha': 'The {field} should only contain letters', + 'formvalidator.text': 'The {field} should only contain alphabetic characters', + 'formvalidator.latin': 'The {field} should only contain alphabetic characters', + 'formvalidator.alpha_numeric': 'The {field} should only contain letters or numbers', + 'formvalidator.alpha_dashes': 'The {field} should only contain letters or dashes', + 'formvalidator.digit': 'The {field} should only contain a digit', + 'formvalidator.integer': 'The {field} should only contain an integer', + 'formvalidator.decimal': 'The {field} should contain a valid decimal number', + 'formvalidator.numeric': 'The {field} should contain a number', + 'formvalidator.range': 'The {field} should contain a number between {param1} and {param2}', + 'formvalidator.color': 'The {field} should contain a valid color', + 'formvalidator.matches': 'The {field} should match the field {param1}', + 'formvalidator.validation_function_not_found': 'The rule {rule} has not been defined' + }, + pt_PT: { + 'formvalidator.required' : 'Preencher {field} é obrigatório', + 'formvalidator.min_length': '{field} deve ter no mínimo {param1} caracteres', + 'formvalidator.max_length': '{field} tem um tamanho máximo de {param1} caracteres', + 'formvalidator.exact_length': '{field} devia ter exactamente {param1} caracteres', + 'formvalidator.email': '{field} deve ser um e-mail válido', + 'formvalidator.url': 'O {field} deve ser um URL válido', + 'formvalidator.ip': '{field} não tem um endereço IP {param1} válido', + 'formvalidator.phone': '{field} deve ser preenchido com um número de telefone {param1} válido.', + 'formvalidator.credit_card': '{field} não tem um cartão de crédito {param1} válido', + 'formvalidator.date': '{field} deve conter uma data no formato {param1}', + 'formvalidator.alpha': 'O campo {field} deve conter apenas caracteres alfabéticos', + 'formvalidator.text': 'O campo {field} deve conter apenas caracteres alfabéticos', + 'formvalidator.latin': 'O campo {field} deve conter apenas caracteres alfabéticos', + 'formvalidator.alpha_numeric': '{field} deve conter apenas letras e números', + 'formvalidator.alpha_dashes': '{field} deve conter apenas letras e traços', + 'formvalidator.digit': '{field} destina-se a ser preenchido com apenas um dígito', + 'formvalidator.integer': '{field} deve conter um número inteiro', + 'formvalidator.decimal': '{field} deve conter um número válido', + 'formvalidator.numeric': '{field} deve conter um número válido', + 'formvalidator.range': '{field} deve conter um número entre {param1} e {param2}', + 'formvalidator.color': '{field} deve conter uma cor válida', + 'formvalidator.matches': '{field} deve corresponder ao campo {param1}', + 'formvalidator.validation_function_not_found': '[A regra {rule} não foi definida]' + } + }, 'en_US'); + + /** + * Constructor of a FormElement. + * This type of object has particular methods to parse rules and validate them in a specific DOM Element. + * + * @param {DOMElement} element DOM Element + * @param {Object} options Object with configuration options + * @return {FormElement} FormElement object + */ + var FormElement = function( element, options ){ + this._element = Common.elOrSelector( element, 'Invalid FormElement' ); + this._errors = {}; + this._rules = {}; + this._value = null; + + this._options = Ink.extendObj( { + label: this._getLabel() + }, Element.data(this._element) ); + + this._options = Ink.extendObj( this._options, options || {} ); + + }; + + /** + * FormElement's prototype + */ + FormElement.prototype = { + + /** + * Function to get the label that identifies the field. + * If it can't find one, it will use the name or the id + * (depending on what is defined) + * + * @method _getLabel + * @return {String} Label to be used in the error messages + * @private + */ + _getLabel: function(){ + + var controlGroup = Element.findUpwardsByClass(this._element,'control-group'); + var label = Ink.s('label',controlGroup); + if( label ){ + label = Element.textContent(label); + } else { + label = this._element.name || this._element.id || ''; + } + + return label; + }, + + /** + * Function to parse a rules' string. + * Ex: required|number|max_length[30] + * + * @method _parseRules + * @param {String} rules String with the rules + * @private + */ + _parseRules: function( rules ){ + this._rules = {}; + rules = rules.split("|"); + var i, rulesLength = rules.length, rule, params, paramStartPos ; + if( rulesLength > 0 ){ + for( i = 0; i < rulesLength; i++ ){ + rule = rules[i]; + if( !rule ){ + continue; + } + + if( ( paramStartPos = rule.indexOf('[') ) !== -1 ){ + params = rule.substr( paramStartPos+1 ); + params = params.split(']'); + params = params[0]; + params = params.split(','); + for (var p = 0, len = params.length; p < len; p++) { + params[p] = + params[p] === 'true' ? true : + params[p] === 'false' ? false : + params[p]; + } + params.splice(0,0,this.getValue()); + + rule = rule.substr(0,paramStartPos); + + this._rules[rule] = params; + } else { + this._rules[rule] = [this.getValue()]; + } + } + } + }, + + /** + * Function to add an error to the FormElement's 'errors' object. + * It basically receives the rule where the error occurred, the parameters passed to it (if any) + * and the error message. + * Then it replaces some tokens in the message for a more 'custom' reading + * + * @method _addError + * @param {String|null} rule Rule that failed, or null if no rule was found. + * @private + * @static + */ + _addError: function(rule){ + var params = this._rules[rule] || []; + + var paramObj = { + field: this._options.label, + value: this.getValue() + }; + + for( var i = 1; i < params.length; i++ ){ + paramObj['param' + i] = params[i]; + } + + var i18nKey = 'formvalidator.' + rule; + + this._errors[rule] = validationMessages.text(i18nKey, paramObj); + + if (this._errors[rule] === i18nKey) { + this._errors[rule] = 'Validation message not found'; + } + }, + + /** + * Gets an element's value + * + * @method getValue + * @return {mixed} The DOM Element's value + * @public + */ + getValue: function(){ + + switch(this._element.nodeName.toLowerCase()){ + case 'select': + return Ink.s('option:selected',this._element).value; + case 'textarea': + return this._element.innerHTML; + case 'input': + if( "type" in this._element ){ + if( (this._element.type === 'radio') && (this._element.type === 'checkbox') ){ + if( this._element.checked ){ + return this._element.value; + } + } else if( this._element.type !== 'file' ){ + return this._element.value; + } + } else { + return this._element.value; + } + return; + default: + return this._element.innerHTML; + } + }, + + /** + * Gets the constructed errors' object. + * + * @method getErrors + * @return {Object} Errors' object + * @public + */ + getErrors: function(){ + return this._errors; + }, + + /** + * Gets the DOM element related to the instance. + * + * @method getElement + * @return {Object} DOM Element + * @public + */ + getElement: function(){ + return this._element; + }, + + /** + * Gets other elements in the same form. + * + * @method getFormElements + * @return {Object} A mapping of keys to other elements in this form. + * @public + */ + getFormElements: function () { + return this._options.form._formElements; + }, + + /** + * Validates the element based on the rules defined. + * It parses the rules defined in the _options.rules property. + * + * @method validate + * @return {Boolean} True if every rule was valid. False if one fails. + * @public + */ + validate: function(){ + this._errors = {}; + + if( "rules" in this._options || 1){ + this._parseRules( this._options.rules ); + } + + if( ("required" in this._rules) || (this.getValue() !== '') ){ + for(var rule in this._rules) { + if (this._rules.hasOwnProperty(rule)) { + if( (typeof validationFunctions[rule] === 'function') ){ + if( validationFunctions[rule].apply(this, this._rules[rule] ) === false ){ + + this._addError( rule ); + return false; + + } + + } else { + + this._addError( null ); + return false; + } + } + } + } + + return true; + + } + }; + + + + /** + * @class Ink.UI.FormValidator_2 + * @version 2 + * @constructor + * @param {String|DOMElement} selector Either a CSS Selector string, or the form's DOMElement + * @param {String} [options.eventTrigger] Event that will trigger the validation. Defaults to 'submit'. + * @param {Boolean} [options.neverSubmit] Flag to cancel the submit event. Use this to avoid submitting the form. + * @param {Selector} [options.searchFor] Selector containing the validation data-attributes. Defaults to 'input, select, textarea, .control-group'. + * @param {Function} [options.beforeValidation] Callback to be executed before validating the form + * @param {Function} [options.onError] Validation error callback + * @param {Function} [options.onSuccess] Validation success callback + * + * @example + * Ink.requireModules( ['Ink.UI.FormValidator_2'], function( FormValidator ){ + * var myValidator = new FormValidator( '#my-form' ); + * }); + */ + var FormValidator = function( selector, options ){ + + /** + * DOMElement of the form being validated + * + * @property _rootElement + * @type {DOMElement} + */ + this._rootElement = Common.elOrSelector( selector ); + + /** + * Object that will gather the form elements by name + * + * @property _formElements + * @type {Object} + */ + this._formElements = {}; + + /** + * Error message DOMElements + * + * @property _errorMessages + */ + this._errorMessages = []; + + /** + * Array of elements marked with validation errors + * + * @property _markedErrorElements + */ + this._markedErrorElements = []; + + /** + * Configuration options. Fetches the data attributes first, then the ones passed when executing the constructor. + * By doing that, the latter will be the one with highest priority. + * + * @property _options + * @type {Object} + */ + this._options = Ink.extendObj({ + eventTrigger: 'submit', + neverSubmit: 'false', + searchFor: 'input, select, textarea, .control-group', + beforeValidation: undefined, + onError: undefined, + onSuccess: undefined + },Element.data(this._rootElement)); + + this._options = Ink.extendObj( this._options, options || {} ); + + // Sets an event listener for a specific event in the form, if defined. + // By default is the 'submit' event. + if( typeof this._options.eventTrigger === 'string' ){ + Event.observe( this._rootElement,this._options.eventTrigger, Ink.bindEvent(this.validate,this) ); + } + + this._init(); + }; + + /** + * Sets or modifies validation functions + * + * @method setRule + * @param {String} name Name of the function. E.g. 'required' + * @param {String} errorMessage Error message to be displayed in case of returning false. E.g. 'Oops, you passed {param1} as parameter1, lorem ipsum dolor...' + * @param {Function} cb Function to be executed when calling this rule + * @public + * @static + */ + FormValidator.setRule = function( name, errorMessage, cb ){ + validationFunctions[ name ] = cb; + if (validationMessages.getKey('formvalidator.' + name) !== errorMessage) { + var langObj = {}; langObj['formvalidator.' + name] = errorMessage; + var dictObj = {}; dictObj[validationMessages.lang()] = langObj; + validationMessages.append(dictObj); + } + }; + + /** + * Gets the i18n object in charge of the error messages + * + * @method getI18n + * @return {Ink.Util.I18n} The i18n object the FormValidator is using. + */ + FormValidator.getI18n = function () { + return validationMessages; + }; + + /** + * Sets the I18n object for validation error messages + * + * @method setI18n + * @param {Ink.Util.I18n} i18n The I18n object. + */ + FormValidator.setI18n = function (i18n) { + validationMessages = i18n; + }; + + /** + * Add to the I18n dictionary. + * See `Ink.Util.I18n.append()` documentation. + * + * @method AppendI18n + */ + FormValidator.appendI18n = function () { + validationMessages.append.apply(validationMessages, [].slice.call(arguments)); + }; + + /** + * Sets the language of the error messages. + * pt_PT and en_US are available, but you can add new languages by using append() + * + * See the `Ink.Util.I18n.lang()` setter + * + * @method setLanguage + * @param language The language to set i18n to. + */ + FormValidator.setLanguage = function (language) { + validationMessages.lang(language); + }; + + /** + * Method used to get the existing defined validation functions + * + * @method getRules + * @return {Object} Object with the rules defined + * @public + * @static + */ + FormValidator.getRules = function(){ + return validationFunctions; + }; + + FormValidator.prototype = { + _init: function(){ + + }, + + /** + * Searches for the elements in the form. + * This method is based in the this._options.searchFor configuration. + * + * @method getElements + * @return {Object} An object with the elements in the form, indexed by name/id + * @public + */ + getElements: function(){ + this._formElements = {}; + var formElements = Selector.select( this._options.searchFor, this._rootElement ); + if( formElements.length ){ + var i, element; + for( i=0; i'); + this._errorMessages.push(paragraph); + }, this)); + return false; + } + } + }; + + /** + * Returns the FormValidator's Object + */ + return FormValidator; + +}); +/** + * @module Ink.UI.ImageQuery_1 + * Responsive image loading + * @version 1 + */ + +Ink.createModule('Ink.UI.ImageQuery', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Element_1','Ink.Util.Array_1'], function(Common, Event, Element, InkArray ) { + 'use strict'; + + /** + * @class Ink.UI.ImageQuery + * @constructor + * @version 1 + * + * @param {String|DOMElement} selector Selector or element + * @param {Object} [options] Options object + * @param {String|Function} [options.src] String or Callback function (that returns a string) with the path to be used to get the images. + * @param {String|Function} [options.retina] String or Callback function (that returns a string) with the path to be used to get RETINA specific images. + * @param {Array} [options.queries] Array of queries + * @param {String} [options.queries.label] Label of the query. Ex. 'small' + * @param {Number} [options.queries.width] Min-width to use this query + * @param {Function} [options.onLoad] Date format string + * + * @example + *
        + * + *
        + * + */ + var ImageQuery = function(selector, options){ + + /** + * Get elements, create more ImageQueries if selector finds more than one + * + * [improvement] This is a useful pattern. More UI modules could use it. + */ + this._element = Common.elsOrSelector(selector, 'Ink.UI.ImageQuery', /*required=*/true); + + // In case we have several elements + for (var i = 1 /* start from second element*/; i < this._element.length; i++) { + new ImageQuery(this._element[i], options); + } + + this._element = this._element[0]; + + /** + * Default options, overriden by data-attributes if any. + * The parameters are: + * @xparam {array} queries Array of objects that determine the label/name and its min-width to be applied. + * @xparam {boolean} allowFirstLoad Boolean flag to allow the loading of the first element. + */ + this._options = Ink.extendObj({ + queries:[], + onLoad: null + }, options || {}, Element.data(this._element)); + + /** + * Determining the original basename (with the querystring) of the file. + */ + var pos; + if( (pos=this._element.src.lastIndexOf('?')) !== -1 ){ + var search = this._element.src.substr(pos); + this._filename = this._element.src.replace(search,'').split('/').pop()+search; + } else { + this._filename = this._element.src.split('/').pop(); + } + + this._init(); + }; + + ImageQuery.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function(){ + // Sort queries by width, in descendant order. + this._options.queries = InkArray.sortMulti(this._options.queries, 'width').reverse(); + + if( typeof this._options.onLoad === 'function' ){ + Event.observe(this._element, 'onload', Ink.bindEvent(this._onLoad, this)); + } + + Event.observe(window, 'resize', Event.throttle(Ink.bindMethod(this, '_onResize'), 400)); + + // Imediate call to apply the right images based on the current viewport + this._onResize(); + }, + + /** + * Handles the resize event (as specified in the _init function) + * + * @method _onResize + * @private + */ + _onResize: function(){ + if( !this._options.queries.length ){ + return; + } + + var current = this._findCurrentQuery(); + + /** + * Choosing the right src. The rule is: + * + * "If there is specifically defined in the query object, use that. Otherwise uses the global src." + * + * The above rule applies to a retina src. + */ + var src = current.src || this._options.src; + if ( window.devicePixelRatio > 1 && ('retina' in this._options ) ) { + src = current.retina || this._options.retina; + } + + /** + * Injects the file variable for usage in the 'templating system' below + */ + current.file = this._filename; + + /** + * Since we allow the src to be a callback, let's run it and get the results. + * For the inside, we're passing the element (img) being processed and the object of the selected query. + */ + if( typeof src === 'function' ){ + src = src.apply(this,[this._element,current]); + if( typeof src !== 'string' ){ + throw '[ImageQuery] :: "src" callback does not return a string'; + } + } + + /** + * Replace the values of the existing properties on the query object (except src and retina) in the + * defined src and/or retina. + */ + src = src.replace(/{:(.*?)}/g, function(_, prop) { + return current[prop]; + }); + + this._element.src = src; + + // Removes the injected file property + delete current.file; + }, + + /** + * Queries are in a descendant order. We want to find the query with the highest width that fits the viewport, therefore the first one. + */ + _findCurrentQuery: function () { + /** + * Gets viewport width + */ + var viewportWidth = window.innerWidth || + document.documentElement.clientWidth || + document.body.clientWidth; + + var queries = this._options.queries; + var last = queries.length - 1; + + for( var query=0; query < last; query+=1 ){ + if (queries[query].width <= viewportWidth){ + return queries[query]; + } + } + + return queries[last]; + }, + + /** + * Handles the element loading (img onload) event + * + * @method _onLoad + * @private + */ + _onLoad: function(){ + + /** + * Since we allow a callback for this let's run it. + */ + this._options.onLoad.call(this); + } + + }; + + return ImageQuery; + +}); +/** + * @module Ink.UI.LazyLoad_1 + * Delays content loading + * @version 1 + */ + +Ink.createModule('Ink.UI.LazyLoad', '1', ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1'], function(UICommon, InkEvent, InkElement) { +'use strict'; + +var LazyLoad = function(selector, options) { + this._init(selector, options); +}; + +LazyLoad.prototype = { + /** + * Stops the browser from loading a barrage of content at once. + * + * This delays the loading of images and other content until the corresponding elements are visible in the browser viewport. + * This was created to load images later, but can be also used for widgets which are slow to load and are only useful when on screen. + * + * This works through copying the `src` attribute into `data-src`, and placing a `placeholder` string in the `src` attribute. Then, when the element is on screen, the `data-src` attribute is copied back to `src` and the content starts loading. You can use the options below to change what attributes are involved in the exchange. + * + * You can also provide your `onInsideViewport` callback and use it to start widgets which need javascript, such as an interactive map or an animation. + * + * @class Ink.UI.LazyLoad_1 + * @constructor + * + * @param rootElement {String|DOMElement} The element which contains the lazily-loaded items. + * @param {Object} [options] Options object, containing: + * @param {String} [options.item] Item selector. Defaults to '.lazyload-item'. + * @param {String} [options.placeholder] Placeholder value for items which are not 'visible', in case they don't already have a value set. + * @param {String} [options.source] Source attribute. When an item is 'visible', use this attribute's value to set its destination attribute. Defaults to 'data-src'. + * @param {String} [options.destination] Destination attribute. Attribute to change when the element is 'visible'. Defaults to 'src'. + * @param {Number} [options.delay] Milliseconds to wait before trying to load items. Defaults to 100. + * @param {Number} [options.delta] Offset distance in pixels. Determines how far the top of an item must be from the viewport be considered 'visible'. Negative values shrink the considered 'visible' viewport while positive values enlarge it. Defaults to 0. + * @param {Boolean} [options.image] Set to false to make this component do nothing to any elements and just give you the onInsideViewport callback. + * @param {DOMElement} [options.scrollElement] (advanced) What element is to be listened for the scroll event. Defaults to document.window. + * @param {Boolean} [options.touchEvents] Subscribe to touch events in addition to scroll events. Useful in mobile safari because 'scroll' events aren't frequent enough. Defaults to true. + * @param {Function} [options.onInsideViewport] Callback function for when an `item` is 'visible'. Receives an object containing the item's element as an argument. + * @param {Function} [options.onAfterAttributeChange] (advanced) Callback function when an item's attribute changes. Receives an object containing the item's element as an argument. + * @param {Boolean} [options.autoInit] (advanced) Set to false if you want to start LazyLoad yourself with `reload()`. Defaults to true. + * + * @sample Ink_UI_LazyLoad_1.html + */ + _init: function(selector) { + this._rootElm = UICommon.elsOrSelector(selector, 'Ink.UI.LazyLoad root element')[0] || null; + + this._options = UICommon.options({ + item: ['String', '.lazyload-item'], + placeholder: ['String', null], + source: ['String', 'data-src'], + destination: ['String', 'src'], + delay: ['Number', 100], + delta: ['Number', 0], + image: ['Boolean', true], + scrollElement: ['Element', window], + touchEvents: ['Boolean', true], + onInsideViewport: ['Function', false], + onAfterAttributeChange: ['Function', false], + autoInit: ['Boolean', true] + }, arguments[1] || {}, this._rootElm); + + this._aData = []; + this._hasEvents = false; + + if(this._options.autoInit) { + this._activate(); + } + }, + + _activate: function() + { + this._getData(); + if(!this._hasEvents) { + this._addEvents(); + } + this._onScrollThrottled(); + }, + + _getData: function() + { + var aElms = Ink.ss(this._options.item); + var attr = null; + for(var i=0, t=aElms.length; i < t; i++) { + if (this._options.placeholder != null && !InkElement.hasAttribute(aElms[i], this._options.destination)) { + aElms[i].setAttribute(this._options.destination, this._options.placeholder); + } + attr = aElms[i].getAttribute(this._options.source); + if(attr !== null || !this._options.image) { + this._aData.push({elm: aElms[i], original: attr}); + } + } + }, + + _addEvents: function() + { + this._onScrollThrottled = InkEvent.throttle(Ink.bindEvent(this._onScroll, this), this._options.delay); + if('ontouchmove' in document.documentElement && this._options.touchEvents) { + InkEvent.observe(document.documentElement, 'touchmove', this._onScrollThrottled); + } + InkEvent.observe(this._options.scrollElement, 'scroll', this._onScrollThrottled); + this._hasEvents = true; + }, + + _removeEvents: function() { + if('ontouchmove' in document.documentElement && this._options.touchEvents) { + InkEvent.stopObserving(document.documentElement, 'touchmove', this._onScrollThrottled); + } + InkEvent.stopObserving(this._options.scrollElement, 'scroll', this._onScrollThrottled); + this._hasEvents = false; + }, + + _onScroll: function() { + var curElm; + + for(var i=0; i < this._aData.length; i++) { + curElm = this._aData[i]; + + if(InkElement.inViewport(curElm.elm, { partial: true, margin: this._options.delta })) { + this._elInViewport(curElm); + if (this._options.image) { + /* [todo] a seemingly unrelated option creates a branch? Some of this belongs in another module. */ + this._aData.splice(i, 1); + i -= 1; + } + } + } + + if (this._aData.length === 0) { + this._removeEvents(); + } + }, + + /** + * Called when an element is detected inside the viewport + * + * @method _elInViewport + * @param {LazyLoadInternalElementData} curElm + * @private + **/ + _elInViewport: function (curElm) { + this._userCallback('onInsideViewport', { element: curElm.elm }); + + if(this._options.image) { + curElm.elm.setAttribute(this._options.destination, curElm.original); + curElm.elm.removeAttribute(this._options.source); + } + + this._userCallback('onAfterAttributeChange', { element: curElm.elm }); + }, + + /** + * Call a callback if it exists and its `typeof` is `"function"`. + * @method _userCallback + * @param name {String} Callback name in this._options. + * @private + **/ + _userCallback: function (name) { + if (typeof this._options[name] === 'function') { + this._options[name].apply(this, [].slice.call(arguments, 1)); + } + }, + + /** + * Load or reload the component. + * Adding the 'scroll' event listener if necessary and checks if anything needs to be loaded now. + * + * You can use this to manually invoke the loading logic without user action. + * + * @method reload + * @public + */ + reload: function() { + this._activate(); + }, + + /** + * Destroy this component + * @method destroy + * @public + **/ + destroy: function() { + if(this._hasEvents) { + this._removeEvents(); + } + UICommon.destroyComponent.call(this); + } +}; + +return LazyLoad; + +}); + +/** + * @module Ink.UI.Modal_1 + * Modal dialog prompts + * @version 1 + */ +Ink.createModule('Ink.UI.Modal', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1'], function(Common, Event, Css, InkElement, Selector, InkArray ) { + 'use strict'; + + var opacitySupported = (function (div) { + div.style.opacity = 'invalid'; + return div.style.opacity !== 'invalid'; + }(InkElement.create('div', {style: 'opacity: 1'}))); + + /** + * @class Ink.UI.Modal + * @constructor + * @version 1 + * @param {String|DOMElement} selector Element or ID + * @param {Object} [options] Options + * @param {String} [options.width] Default/Initial width. Ex: '600px' + * @param {String} [options.height] Default/Initial height. Ex: '400px' + * @param {String} [options.shadeClass] Custom class to be added to the div.ink-shade + * @param {String} [options.modalClass] Custom class to be added to the div.ink-modal + * @param {String} [options.trigger] CSS Selector for target elements that will trigger the Modal. + * @param {String} [options.triggerEvent] Trigger's event to be listened. Defaults to 'click'. + * @param {Boolean} [options.autoDisplay] Displays the Modal automatically when constructed. + * @param {String} [options.markup] Markup to be placed in the Modal when created + * @param {Function} [options.onShow] Callback function to run when the Modal is opened. + * @param {Function} [options.onDismiss] Callback function to run when the Modal is closed. Return `false` to cancel dismissing the Modal. + * @param {Boolean} [options.closeOnClick] Flag to close the modal when clicking outside of it. + * @param {Boolean} [options.closeOnEscape] Determines if the Modal should close when "Esc" key is pressed. Defaults to true. + * @param {Boolean} [options.responsive] Determines if the Modal should behave responsively (adapt to smaller viewports). + * @param {Boolean} [options.disableScroll] Determines if the Modal should 'disable' the page's scroll (not the Modal's body). + * + * @sample Ink_UI_Modal_1.html + */ + + function upName(dimension) { + // omg IE + var firstCharacter = dimension.match(/^./)[0]; + return firstCharacter.toUpperCase() + dimension.replace(/^./, ''); + } + function maxName(dimension) { + return 'max' + upName(dimension); + } + + var openModals = []; + + var Modal = function(selector, options) { + if (!selector) { + this._element = null; + } else { + this._element = Common.elOrSelector(selector, 'Ink.UI.Modal markup'); + } + + this._options = { + /** + * Width, height and markup really optional, as they can be obtained by the element + */ + width: undefined, + height: undefined, + + /** + * To add extra classes + */ + shadeClass: undefined, + modalClass: undefined, + + /** + * Optional trigger properties + */ + trigger: undefined, + triggerEvent: 'click', + autoDisplay: true, + + /** + * Remaining options + */ + markup: undefined, + onShow: undefined, + onDismiss: undefined, + closeOnClick: false, + closeOnEscape: true, + responsive: true, + disableScroll: true + }; + + + this._handlers = { + click: Ink.bindEvent(this._onShadeClick, this), + keyDown: Ink.bindEvent(this._onKeyDown, this), + resize: Ink.bindEvent(this._onResize, this) + }; + + this._wasDismissed = false; + + /** + * Modal Markup + */ + if( this._element ){ + this._markupMode = Css.hasClassName(this._element,'ink-modal'); // Check if the full modal comes from the markup + } else { + this._markupMode = false; + } + + if( !this._markupMode ){ + this._modalShadow = document.createElement('div'); + this._modalShadowStyle = this._modalShadow.style; + + this._modalDiv = document.createElement('div'); + this._modalDivStyle = this._modalDiv.style; + + if( !!this._element ){ + this._options.markup = this._element.innerHTML; + } + + /** + * Not in full markup mode, let's set the classes and css configurations + */ + Css.addClassName( this._modalShadow,'ink-shade' ); + Css.addClassName( this._modalDiv,'ink-modal ink-space' ); + + /** + * Applying the main css styles + */ + // this._modalDivStyle.position = 'absolute'; + this._modalShadow.appendChild( this._modalDiv); + document.body.appendChild( this._modalShadow ); + } else { + this._modalDiv = this._element; + this._modalDivStyle = this._modalDiv.style; + this._modalShadow = this._modalDiv.parentNode; + this._modalShadowStyle = this._modalShadow.style; + + this._contentContainer = Selector.select(".modal-body", this._modalDiv)[0]; + if( !this._contentContainer){ + throw new Error('Ink.UI.Modal: Missing div with class "modal-body"'); + } + + this._options.markup = this._contentContainer.innerHTML; + + /** + * First, will handle the least important: The dataset + */ + this._options = Ink.extendObj(this._options,InkElement.data(this._element)); + + } + + /** + * Now, the most important, the initialization options + */ + this._options = Ink.extendObj(this._options,options || {}); + + if( !this._markupMode ){ + this.setContentMarkup(this._options.markup); + } + + if( typeof this._options.shadeClass === 'string' ){ + Css.addClassName(this._modalShadow, this._options.shadeClass); + } + + if( typeof this._options.modalClass === 'string' ){ + Css.addClassName(this._modalDiv, this._options.modalClass); + } + + if( ("trigger" in this._options) && ( typeof this._options.trigger !== 'undefined' ) ){ + var triggerElement; + if( typeof this._options.trigger === 'string' ){ + triggerElement = Selector.select( this._options.trigger ); + Event.observeMulti(triggerElement, this._options.triggerEvent, Ink.bindEvent(this.open, this)); + } + } else if ( this._options.autoDisplay.toString() === "true" ) { + this.open(); + } + }; + + Modal.prototype = { + + /** + * Responsible for repositioning the modal + * + * @method _reposition + * @private + */ + _reposition: function(){ + this._modalDivStyle.marginTop = (-InkElement.elementHeight(this._modalDiv)/2) + 'px'; + this._modalDivStyle.marginLeft = (-InkElement.elementWidth(this._modalDiv)/2) + 'px'; + }, + + /** + * Responsible for resizing the modal + * + * @method _onResize + * @param {Boolean|Event} runNow Its executed in the begining to resize/reposition accordingly to the viewport. But usually it's an event object. + * @private + */ + _onResize: function( runNow ){ + if( typeof runNow === 'boolean' ){ + this._timeoutResizeFunction.call(this); + } else if( !this._resizeTimeout && (runNow && typeof runNow === 'object') ){ + this._resizeTimeout = setTimeout(Ink.bind(this._timeoutResizeFunction, this),250); + } + }, + + /** + * Timeout Resize Function + * + * @method _timeoutResizeFunction + * @private + */ + _timeoutResizeFunction: function(){ + /** + * Getting the current viewport size + */ + var isPercentage = { + width: ('' + this._options.width).indexOf('%') !== -1, + height: ('' + this._options.height).indexOf('%') !== -1 + }; + var currentViewport = { + height: InkElement.viewportHeight(), + width: InkElement.viewportWidth() + }; + + InkArray.forEach(['height', 'width'], Ink.bind(function (dimension) { + // Not used for percentage measurements + if (isPercentage[dimension]) { return; } + + if (currentViewport[dimension] > this.originalStatus[dimension]) { + this._modalDivStyle[dimension] = this._modalDivStyle[maxName(dimension)]; + } else { + this._modalDivStyle[dimension] = Math.round(currentViewport[dimension] * 0.9) + 'px'; + } + }, this)); + + this._resizeContainer(); + this._reposition(); + this._resizeTimeout = undefined; + }, + + /** + * Handle clicks on the shade element. + * + * @method _onShadeClick + * @param {Event} ev + * @private + */ + _onShadeClick: function(ev) { + var tgtEl = Event.element(ev); + + if (Css.hasClassName(tgtEl, 'ink-close') || Css.hasClassName(tgtEl, 'ink-dismiss') || + InkElement.findUpwardsBySelector(tgtEl, '.ink-close,.ink-dismiss') || + ( + this._options.closeOnClick && + (!InkElement.descendantOf(this._shadeElement, tgtEl) || (tgtEl === this._shadeElement)) + ) + ) { + var alertsInTheModal = Selector.select('.ink-alert', this._shadeElement), + alertsLength = alertsInTheModal.length; + for( var i = 0; i < alertsLength; i++ ){ + if( InkElement.descendantOf(alertsInTheModal[i], tgtEl) ){ + return; + } + } + + this.dismiss(); + + // Only stop the event if this dismisses this modal + if (this._wasDismissed) { + Event.stop(ev); + } + } + }, + + /** + * Responsible for handling the escape key pressing. + * + * @method _onKeyDown + * @param {Event} ev + * @private + */ + _onKeyDown: function(ev) { + if (ev.keyCode !== 27 || this._wasDismissed) { return; } + if (this._options.closeOnEscape.toString() === 'true' && + openModals[openModals.length - 1] === this) { + this.dismiss(); + if (this._wasDismissed) { + Event.stop(ev); + } + } + }, + + /** + * Responsible for setting the size of the modal (and position) based on the viewport. + * + * @method _resizeContainer + * @private + */ + _resizeContainer: function() { + // [3.0.0] drop this because everyone should have the new CSS now, which has this rule already with .ink-modal-is-open. + this._contentElement.style.overflow = this._contentElement.style.overflowX = this._contentElement.style.overflowY = 'hidden'; + var containerHeight = InkElement.elementHeight(this._modalDiv); + + this._modalHeader = Selector.select('.modal-header',this._modalDiv)[0]; + if( this._modalHeader ){ + containerHeight -= InkElement.elementHeight(this._modalHeader); + } + + this._modalFooter = Selector.select('.modal-footer',this._modalDiv)[0]; + if( this._modalFooter ){ + containerHeight -= InkElement.elementHeight(this._modalFooter); + } + + this._contentContainer.style.height = containerHeight + 'px'; + if( containerHeight !== InkElement.elementHeight(this._contentContainer) ){ + this._contentContainer.style.height = ~~(containerHeight - (InkElement.elementHeight(this._contentContainer) - containerHeight)) + 'px'; + } + + if( this._markupMode ){ return; } + + this._contentContainer.style.overflow = this._contentContainer.style.overflowX = 'hidden'; + this._contentContainer.style.overflowY = 'auto'; + this._contentElement.style.overflow = this._contentElement.style.overflowX = this._contentElement.style.overflowY = 'visible'; + }, + + /** + * Responsible for 'disabling' the page scroll + * + * @method _disableScroll + * @private + */ + _disableScroll: function() { + var htmlEl = document.documentElement; + this._oldHtmlOverflows = [ htmlEl.style.overflowX, + htmlEl.style.overflowY ]; + htmlEl.style.overflowX = htmlEl.style.overflowY = 'hidden'; + }, + + /************** + * PUBLIC API * + **************/ + + /** + * Opens this Modal. + * Useful if you have initialized the modal + * @method open + * @param {Event} [event] (internal) In case its fired by the internal trigger. + */ + open: function(event) { + + if( event ){ Event.stop(event); } + + var elem = (document.compatMode === "CSS1Compat") ? document.documentElement : document.body; + + this._resizeTimeout = null; + + Css.addClassName( this._modalShadow,'ink-shade' ); + this._modalShadowStyle.display = this._modalDivStyle.display = 'block'; + setTimeout(Ink.bind(function() { + Css.addClassName( this._modalShadow, 'visible' ); + Css.addClassName( this._modalDiv, 'visible' ); + }, this), 100); + + /** + * Fallback to the old one + */ + this._contentElement = this._modalDiv; + this._shadeElement = this._modalShadow; + + if( !this._markupMode ){ + /** + * Setting the content of the modal + */ + this.setContentMarkup( this._options.markup ); + } + + /** + * If any size has been user-defined, let's set them as max-width and max-height + */ + + var isPercentage = { + width: ('' + this._options.width).indexOf('%') !== -1, + height: ('' + this._options.height).indexOf('%') !== -1 + }; + + InkArray.forEach(['width', 'height'], Ink.bind(function (dimension) { + if (this._options[dimension] !== undefined) { + this._modalDivStyle[dimension] = this._options[dimension]; + if (!isPercentage[dimension]) { + this._modalDivStyle[maxName(dimension)] = + InkElement['element' + upName(dimension)](this._modalDiv) + 'px'; + } + } else { + this._modalDivStyle[maxName(dimension)] = InkElement['element' + upName(dimension)](this._modalDiv) + 'px'; + } + + if (isPercentage[dimension] && parseInt(elem['client' + maxName(dimension)], 10) <= parseInt(this._modalDivStyle[dimension], 10) ) { + this._modalDivStyle[dimension] = Math.round(parseInt(elem['client' + maxName(dimension)], 10) * 0.9) + 'px'; + } + }, this)); + + this.originalStatus = { + viewportHeight: InkElement.elementHeight(elem), + viewportWidth: InkElement.elementWidth(elem), + height: InkElement.elementHeight(this._modalDiv), + width: InkElement.elementWidth(this._modalDiv) + }; + + /** + * Let's 'resize' it: + */ + if( this._options.responsive.toString() === 'true' ) { + this._onResize(true); + Event.observe( window,'resize',this._handlers.resize ); + } else { + this._resizeContainer(); + this._reposition(); + } + + if (this._options.onShow) { + this._options.onShow(this); + } + + if(this._options.disableScroll.toString() === 'true') { + this._disableScroll(); + } + + // subscribe events + Event.observe(this._shadeElement, 'click', this._handlers.click); + if (this._options.closeOnEscape.toString() === 'true') { + Event.observe(document, 'keydown', this._handlers.keyDown); + } + + Common.registerInstance(this, this._shadeElement, 'modal'); + + this._wasDismissed = false; + openModals.push(this); + + Css.addClassName(document.documentElement, 'ink-modal-is-open'); + }, + + /** + * Closes the modal + * + * @method dismiss + * @public + */ + dismiss: function() { + if (this._wasDismissed) { /* Already dismissed. WTF IE. */ return; } + + if (this._options.onDismiss) { + var ret = this._options.onDismiss(this); + if (ret === false) { return; } + } + + this._wasDismissed = true; + + if( this._options.responsive ){ + Event.stopObserving(window, 'resize', this._handlers.resize); + } + + // this._modalShadow.parentNode.removeChild(this._modalShadow); + + if( !this._markupMode ){ + this._modalShadow.parentNode.removeChild(this._modalShadow); + this.destroy(); + } else { + Css.removeClassName( this._modalDiv, 'visible' ); + Css.removeClassName( this._modalShadow, 'visible' ); + + this._waitForFade(this._modalShadow, Ink.bind(function () { + this._modalShadowStyle.display = 'none'; + }, this)); + } + + openModals = InkArray.remove(openModals, InkArray.keyValue(this, openModals), 1); + + if (openModals.length === 0) { // Document level stuff now there are no modals in play. + var htmlEl = document.documentElement; + + // Reenable scroll + if(this._options.disableScroll) { + htmlEl.style.overflowX = this._oldHtmlOverflows[0]; + htmlEl.style.overflowY = this._oldHtmlOverflows[1]; + } + + // Remove the class from the HTML element. + Css.removeClassName(htmlEl, 'ink-modal-is-open'); + } + }, + + /** + * Utility function to listen to the onTransmissionEnd event, or wait using setTimeouts + * + * Specific to this._element + */ + _waitForFade: function (elem, callback) { + if (!opacitySupported) { return callback(); } + + var transitionEndEventNames = [ + 'transitionEnd', 'oTransitionEnd', 'webkitTransitionEnd']; + var classicName; + var evName; + for (var i = 0, len = transitionEndEventNames.length; i < len; i++) { + evName = transitionEndEventNames[i]; + classicName = 'on' + evName.toLowerCase(); + if (classicName in elem) { + Event.observeOnce(elem, evName, callback); + return; + } + } + var fadeChecker = function () { + if( +Css.getStyle(elem, 'opacity') > 0 ){ + setTimeout(fadeChecker, 250); + } else { + callback(); + } + }; + setTimeout(fadeChecker, 500); + }, + + /** + * Removes the modal from the DOM + * + * @method destroy + * @public + */ + destroy: function() { + Common.unregisterInstance(this._instanceId); + }, + + /** + * Returns the content DOM element + * + * @method getContentElement + * @return {DOMElement} Modal main cointainer. + * @public + */ + getContentElement: function() { + return this._contentContainer; + }, + + /** + * Replaces the content markup + * + * @method setContentMarkup + * @param {String} contentMarkup + * @public + */ + setContentMarkup: function(contentMarkup) { + if( !this._markupMode ){ + this._modalDiv.innerHTML = [contentMarkup].join(''); + this._contentContainer = Selector.select(".modal-body",this._modalDiv); + if( !this._contentContainer.length ){ + // throw 'Missing div with class "modal-body"'; + var tempHeader = Selector.select(".modal-header",this._modalDiv); + var tempFooter = Selector.select(".modal-footer",this._modalDiv); + + InkArray.each(tempHeader, InkElement.remove); + InkArray.each(tempFooter, InkElement.remove); + + var body = document.createElement('div'); + Css.addClassName(body,'modal-body'); + body.innerHTML = this._modalDiv.innerHTML; + this._modalDiv.innerHTML = ''; + + var toAdd = tempHeader.concat([body]).concat(tempFooter); + InkArray.each(toAdd, Ink.bindMethod(this._modalDiv, 'appendChild')); + + // InkArray.each(tempHeader,Ink.bind(function( element ){ this._modalDiv.appendChild(element); },this)); + // this._modalDiv.appendChild(body); + // InkArray.each(tempFooter,Ink.bind(function( element ){ this._modalDiv.appendChild(element); },this)); + + this._contentContainer = Selector.select(".modal-body",this._modalDiv); + } + this._contentContainer = this._contentContainer[0]; + } else { + this._contentContainer.innerHTML = contentMarkup; + } + this._contentElement = this._modalDiv; + this._resizeContainer(); + } + + }; + + return Modal; + +}); +/** + * @module Ink.UI.Pagination_1 + * Pagination elements + * @version 1 + */ + +Ink.createModule('Ink.UI.Pagination', '1', + ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1'], + function(Common, Event, Css, Element, Selector ) { + 'use strict'; + + /** + * Function to create the pagination anchors + * + * @method genAel + * @private + * @param {String} inner HTML to be placed inside the anchor. + * @return {DOMElement} Anchor created + */ + var genAEl = function(inner, index, options) { + var aEl = document.createElement('a'); + aEl.setAttribute('href', '#'); + if (typeof index === 'number') { + aEl.setAttribute('data-index', index); + } + if(options && options.wrapText) { + var spanEl = document.createElement('span'); + aEl.appendChild(spanEl); + spanEl.innerHTML = inner; + } else { + aEl.innerHTML = inner; + } + return aEl; + }; + + /** + * @class Ink.UI.Pagination + * @constructor + * @version 1 + * @param {String|DOMElement} selector Selector or element + * @param {Object} options Options + * @param {Number} [options.size] Number of pages. + * @param {Number} [options.totalItemCount] Total numeber of items to display + * @param {Number} [options.itemsPerPage] Number of items per page. + * @param {Number} [options.maxSize] If passed, only shows at most maxSize items. displays also first|prev page and next page|last buttons + * @param {Number} [options.start] Start page. defaults to 1 + * @param {Boolean} [options.sideButtons=true] Whether to show the first, last, previous, next, previousPage and lastPage buttons. Do not use together with maxSize. + * @param {String} [options.firstLabel] Text for the first page button. Defaults to 'First'. + * @param {String} [options.lastLabel] Text for the last page button. Defaults to 'Last'. + * @param {String} [options.previousLabel] Text for the previous button. Defaults to 'Previous'- + * @param {String} [options.nextLabel] Text for the next button. Defaults to 'Next' + * @param {String} [options.previousPageLabel] Text for the previous page button. Defaults to 'Previous {Items per page}'. + * @param {String} [options.nextPageLabel] Text for the next page button. Defaults to 'Next {Items per page}'. + * @param {Function} [options.onChange] Callback to be called when a page changes. Called with `(thisPaginator, newPageNumber)`. + * @param {String} [options.hashParameter] Parameter to use on setHash. Defaults to 'page'. + * @param {String} [options.parentTag] HTML Tag used as the parent node. + * @param {String} [options.childTag] HTML Tag used as the child nodes. + * @param {String} [options.wrapperClass] CSS Class used in the wrapper element + * @param {String} [options.paginationClass] CSS Class used in the pagination element + * @param {String} [options.activeClass] CSS Class used to mark page as active + * @param {String} [options.disabledClass] CSS Class used to mark page as disabled + * @param {String} [options.hideClass] CSS Class used to hide elements + * @param {String} [options.previousClass] CSS Class used in the previous element + * @param {String} [options.previousPageClass] CSS Class used in the previous page element + * @param {String} [options.nextClass] CSS Class used in the next element + * @param {String} [options.nextPageClass] CSS Class used in the next page element + * @param {Function} [options.numberFormatter] Number formatter function. Receives a 0-indexed number and returns the text for the numbered page button. + * + * @sample Ink_UI_Pagination_1.html + */ + var Pagination = function(selector, options) { + + this._element = Common.elOrSelector(selector, 'Ink.UI.Pagination element'); + + this._options = Common.options('Ink.UI.Pagination_1', { + size: ['Integer', null], + totalItemCount: ['Integer', null], + itemsPerPage: ['Integer', null], + maxSize: ['Integer', null], + start: ['Integer', 1], + sideButtons: ['Boolean', 1 /* actually `true` but we want to see if user is using the default or not. */], + // TODO add pagination-type which accepts color strings, "chevron" and "dotted". Basically classes to add to the UL. + firstLabel: ['String', 'First'], + lastLabel: ['String', 'Last'], + previousLabel: ['String', 'Previous'], + nextLabel: ['String', 'Next'], + previousPageLabel: ['String', null], + nextPageLabel: ['String', null], + onChange: ['Function', undefined], + hashParameter: ['String', 'page'], + parentTag: ['String', 'ul'], + childTag: ['String', 'li'], + wrapperClass: ['String', 'ink-navigation'], + paginationClass: ['String', 'pagination'], + activeClass: ['String', 'active'], + disabledClass: ['String', 'disabled'], + hideClass: ['String', 'hide-all'], + previousClass: ['String', 'previous'], + previousPageClass: ['String', 'previousPage'], + nextClass: ['String', 'next'], + nextPageClass: ['String', 'nextPage'], + + numberFormatter: ['Function', function(i) { return i + 1; }] + }, options || {}, this._element); + + if (!this._options.previousPageLabel) { + this._options.previousPageLabel = this._options.previousLabel + ' ' + this._options.maxSize; + } + + if (!this._options.nextPageLabel) { + this._options.nextPageLabel = this._options.nextLabel + ' ' + this._options.maxSize; + } + + this._handlers = { + click: Ink.bindEvent(this._onClick,this) + }; + + if (Common.isInteger(this._options.totalItemCount) && Common.isInteger(this._options.itemsPerPage)) { + this._size = this._calculateSize(this._options.totalItemCount, this._options.itemsPerPage); + } else if (Common.isInteger(this._options.size)) { + this._size = this._options.size; + } else { + Ink.error('Ink.UI.Pagination: Please supply a size option or totalItemCount and itemsPerPage options.'); + this._size = 0; + } + + this.setOnChange(this._options.onChange); + + this._current = this._options.start - 1; + this._itemLiEls = []; + + this._init(); + }; + + Pagination.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function() { + // generate and apply DOM + this._generateMarkup(this._element); + + this._updateItems(); + + // subscribe events + this._observe(); + + Common.registerInstance(this, this._element, 'pagination'); + }, + + /** + * Responsible for setting listener in the 'click' event of the Pagination element. + * + * @method _observe + * @private + */ + _observe: function() { + Event.observeDelegated(this._element, 'click', '.' + this._options.paginationClass + ' > ' + this._options.childTag, this._handlers.click); + }, + + /** + * Calculate how many pages are necessary for `count` items, and `itemsPerPage` items per page. + * + * @method _calculateSize + * @param count + * @param itemsPerPage + * @private + **/ + _calculateSize: function (count, itemsPerPage) { + return Math.ceil(count / itemsPerPage); + }, + /** + * Updates the markup everytime there's a change in the Pagination object. + * + * @method _updateItems + * @private + */ + _updateItems: function() { + var liEls = this._itemLiEls; + + var isSimpleToggle = this._size === liEls.length; + + var i, f, liEl; + + if (isSimpleToggle) { + // just toggle active class + for (i = 0, f = this._size; i < f; ++i) { + Css.setClassName(liEls[i], this._options.activeClass, i === this._current); + } + } + else { + // remove old items + for (i = liEls.length - 1; i >= 0; --i) { + this._ulEl.removeChild(liEls[i]); + } + + // add new items + liEls = []; + for (i = 0, f = this._size; i < f; ++i) { + liEl = document.createElement(this._options.childTag); + liEl.appendChild( genAEl( this._options.numberFormatter(i), i) ); + // add "active" class if this is the active element. + Css.setClassName(liEl, this._options.activeClass, i === this._current); + this._ulEl.insertBefore(liEl, this._nextEl); + liEls.push(liEl); + } + this._itemLiEls = liEls; + } + + if (this._options.maxSize) { + // toggle visible items + var page = Math.floor( this._current / this._options.maxSize ); + var pi = this._options.maxSize * page; + var pf = pi + this._options.maxSize - 1; + + for (i = 0, f = this._size; i < f; ++i) { + liEl = liEls[i]; + Css.setClassName(liEl, this._options.hideClass, i < pi || i > pf); + } + + this._pageStart = pi; + this._pageEnd = pf; + this._page = page; + + Css.setClassName(this._prevPageEl, this._options.disabledClass, !this.hasPreviousPage()); + Css.setClassName(this._nextPageEl, this._options.disabledClass, !this.hasNextPage()); + + Css.setClassName(this._firstEl, this._options.disabledClass, this.isFirst()); + Css.setClassName(this._lastEl, this._options.disabledClass, this.isLast()); + } + + // update prev and next + if (this._prevEl) { + Css.setClassName(this._prevEl, this._options.disabledClass, !this.hasPrevious()); + } + if (this._nextEl) { + Css.setClassName(this._nextEl, this._options.disabledClass, !this.hasNext()); + } + }, + + /** + * Returns the top element for the gallery DOM representation + * + * @method _generateMarkup + * @param {DOMElement} el + * @private + */ + _generateMarkup: function(el) { + Css.addClassName(el, 'ink-navigation'); + + var ulEl = Ink.s('.' + this._options.paginationClass, el); + var hasUlAlready = false; + + if( !ulEl ){ + ulEl = document.createElement(this._options.parentTag); + Css.addClassName(ulEl, this._options.paginationClass); + } else { + hasUlAlready = true; + } + + var isChevron = Css.hasClassName(ulEl, 'chevron'); + var isDotted = Css.hasClassName(ulEl, 'dotted'); + + // Creates
      • elements for firstPage, nextPage, first, last, etc. + var createLiEl = Ink.bind(function (name, options) { + var liEl = document.createElement(this._options.childTag); + var aEl = genAEl(this._options[name + 'Label'], undefined, { wrapText: options && options.wrapText }); + Css.addClassName(liEl, this._options[name + 'Class']); + liEl.appendChild(aEl); + ulEl.appendChild(liEl); + return liEl; + }, this); + + if (!isDotted && this._options.maxSize) { + this._firstEl = createLiEl('first'); + this._prevPageEl = createLiEl('previousPage'); + } + + // When we're dotted, the default for sideButtons is `false`. When we're note, it's `true`. + // Since the default is actually "1", we do a === true check when we're dotted, and a truthish check when we're not. + if ((isDotted && this._options.sideButtons === true) || (!isDotted && this._options.sideButtons)) { + this._prevEl = createLiEl('previous', { wrapText: isChevron }); + this._nextEl = createLiEl('next', { wrapText: isChevron }); + } + + if (!isDotted && this._options.maxSize) { + this._nextPageEl = createLiEl('nextPage'); + this._lastEl = createLiEl('last'); + } + + if( !hasUlAlready ){ + el.appendChild(ulEl); + } + + this._ulEl = ulEl; + }, + + /** + * Click handler + * + * @method _onClick + * @param {Event} ev + * @private + */ + _onClick: function(ev) { + Event.stop(ev); + + var liEl = Event.element(ev); + if ( Css.hasClassName(liEl, this._options.activeClass) || + Css.hasClassName(liEl, this._options.disabledClass) ) { return; } + + var isPrev = Css.hasClassName(liEl, this._options.previousClass); + var isNext = Css.hasClassName(liEl, this._options.nextClass); + var isPrevPage = Css.hasClassName(liEl, this._options.previousPageClass); + var isNextPage = Css.hasClassName(liEl, this._options.nextPageClass); + var isFirst = Css.hasClassName(liEl, this._options.firstClass); + var isLast = Css.hasClassName(liEl, this._options.lastClass); + + if (isFirst) { + this.setCurrent(0); + } + else if (isLast) { + this.setCurrent(this._size - 1); + } + else if (isPrevPage || isNextPage) { + this.setCurrent( (isPrevPage ? -1 : 1) * this._options.maxSize, true /* relative */); + } + else if (isPrev || isNext) { + this.setCurrent(isPrev ? -1 : 1, true /* relative */); + } + else { + var aElem = Selector.select('[data-index]', liEl)[0]; + var nr = aElem && parseInt( aElem.getAttribute('data-index'), 10); + this.setCurrent(nr); + } + }, + + + /** + * Allows you to subscribe to the onChange event + * + * @method setOnChange + * @param cb {Function} Callback called with `(thisPaginator, newPageNumber)`. + */ + setOnChange: function (onChange) { + if (onChange !== undefined && typeof onChange !== 'function') { + throw new TypeError('onChange option must be a function!'); + } + this._onChange = onChange; + }, + + /************** + * PUBLIC API * + **************/ + + /** + * Sets the number of pages + * + * @method setSize + * @param {Number} sz number of pages + * @public + */ + setSize: function(sz) { + if (!Common.isInteger(sz)) { + throw new TypeError('1st argument must be an integer number!'); + } + + this._size = sz; + this._updateItems(); + this._current = 0; + }, + + /** + * Sets the number of pages, then call setSize(). + * + * @param setSizeInItems + * @param {Number} totalItems Total number of items + * @param {Number} itemsPerPage Items per page + */ + setSizeInItems: function (totalItems, itemsPerPage) { + var pageNumber = Math.ceil(totalItems / itemsPerPage); + this.setSize(pageNumber); + }, + + /** + * Sets the current page. + * + * @method setCurrent + * @param {Number} nr Sets the current page to given number. + * @param {Boolean} isRelative Flag to change the position from absolute to relative. + * @public + */ + setCurrent: function(nr, isRelative) { + if (!Common.isInteger(nr)) { + throw new TypeError('1st argument must be an integer number!'); + } + + if (isRelative) { + nr += this._current; + } + + if (nr > this._size - 1) { + nr = this._size - 1; + } + + if (nr < 0) { + nr = 0; + } + + this._current = nr; + this._updateItems(); + + if (this._onChange) { + this._onChange(this, nr); + } + + /*if (this._options.setHash) { + var o = {}; + o[this._options.hashParameter] = nr; + Common.setHash(o); + }*/ // undocumented option, removing + }, + + /** + * Gets the number of pages + * + * @method getSize + * @return {Number} Number of pages + * @public + */ + getSize: function() { + return this._size; + }, + + /** + * Gets the current page index + * + * @method getCurrent + * @return {Number} Current page + * @public + */ + getCurrent: function() { + return this._current; + }, + + /** + * Checks if it's at the first page + * + * @method isFirst + * @return {Boolean} True if at first page + * @public + */ + isFirst: function() { + return this._current === 0; + }, + + /** + * Checks if it's on the last page + * + * @method isLast + * @return {Boolean} True if at last page + * @public + */ + isLast: function() { + return this._current === this._size - 1; + }, + + /** + * Checks if it has previous pages + * + * @method hasPrevious + * @return {Boolean} True if has prior pages + * @public + */ + hasPrevious: function() { + return this._current > 0; + }, + + /** + * Checks if it has next pages + * + * @method hasNext + * @return {Boolean} True if has pages ahead + * @public + */ + hasNext: function() { + return this._current < this._size - 1; + }, + + /** + * Checks if it has a previous set of pages + * + * @method hasPreviousPage + * @return {Boolean} Returns true iif has prior set of page(s) + * @public + */ + hasPreviousPage: function() { + return this._options.maxSize && this._current > this._options.maxSize - 1; + }, + + /** + * Checks if it has a next set of pages + * + * @method hasNextPage + * @return {Boolean} Returns true iif has set of page(s) ahead + * @public + */ + hasNextPage: function() { + return this._options.maxSize && this._size - this._current >= this._options.maxSize + 1; + }, + + /** + * Unregisters the component and removes its markup + * + * @method destroy + * @public + */ + destroy: Common.destroyComponent + }; + + return Pagination; + +}); +/** + * @module Ink.UI.ProgressBar_1 + * Animated progress bars + * @version 1 + */ + +Ink.createModule('Ink.UI.ProgressBar', '1', ['Ink.UI.Common_1', 'Ink.Dom.Selector_1','Ink.Dom.Element_1'], function( Common, Selector, Element ) { + 'use strict'; + + /** + * Associated to a .ink-progress-bar element, it provides a setValue() method to change the element's value. + * + * @class Ink.UI.ProgressBar + * @constructor + * @version 1 + * @param {String|DOMElement} selector Element or selector + * @param {Object} [options] Options object + * @param {Number} [options.startValue] Percentage of the bar that is filled. Ranges between 0 and 100. Default: 0 + * @param {Function} [options.onStart] Callback called when a change of value is started + * @param {Function} [options.onEnd] Callback called when a change of value ends + * + * @sample Ink_UI_ProgressBar_1.html + */ + var ProgressBar = function( selector, options ){ + this._element = Common.elOrSelector(selector); + + this._options = Ink.extendObj({ + 'startValue': 0, + 'onStart': function(){}, + 'onEnd': function(){} + },Element.data(this._element)); + + this._options = Ink.extendObj( this._options, options || {}); + this._value = this._options.startValue; + + this._init(); + }; + + ProgressBar.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function(){ + this._elementBar = Selector.select('.bar',this._element); + if( this._elementBar.length < 1 ){ + throw '[Ink.UI.ProgressBar] :: Bar element not found'; + } + this._elementBar = this._elementBar[0]; + + this._options.onStart = Ink.bind(this._options.onStart,this); + this._options.onEnd = Ink.bind(this._options.onEnd,this); + this.setValue( this._options.startValue ); + }, + + /** + * Sets the value of the Progressbar + * + * @method setValue + * @param {Number} newValue Numeric value, between 0 and 100, that represents the percentage of the bar. + * @public + */ + setValue: function( newValue ){ + this._options.onStart( this._value); + + newValue = parseInt(newValue,10); + if( isNaN(newValue) || (newValue < 0) ){ + newValue = 0; + } else if( newValue>100 ){ + newValue = 100; + } + this._value = newValue; + this._elementBar.style.width = this._value + '%'; + + this._options.onEnd( this._value ); + } + }; + + return ProgressBar; + +}); +/** + * @module Ink.UI.SmoothScroller_1 + * @author inkdev AT sapo.pt + * @version 1 + */ +Ink.createModule('Ink.UI.SmoothScroller', '1', ['Ink.Dom.Event_1', 'Ink.Dom.Element_1', 'Ink.Dom.Selector_1','Ink.Dom.Loaded_1'], function(Event, InkElement, Selector, Loaded) { + 'use strict'; + + var requestAnimationFrame = + window.requestAnimationFrame || + function (cb) { return setTimeout(cb, 10); }; + + var cancelAnimationFrame = + window.cancelAnimationFrame || + function (id) { clearTimeout(id); }; + + /** + * @namespace Ink.UI.SmoothScroller + * @version 1 + * @static + * + * SmoothScroller is a component which replaces the default scroll-to behaviour of `` tags which refer to IDs on the page. + * + * For example, when you have this: + * + * Todo + * [...] + *
        + * [...] + * + * You can click the `` and the page will scroll until the section you pointed to. + * + * When you use SmoothScroller, instead of immediately scrolling to the element, you get a smooth motion. + * + * Also, you can define the data-margin option if you have a `position:fixed` top menu ruining the behaviour. + * + * @example + * + * go to Part 1 + * + * [lots and lots of content...] + * + *

        Part 1

        + * + * + */ + var SmoothScroller = { + + /** + * Sets the speed of the scrolling + * + * @property speed + * @type {Number} + * @readOnly + * @static + */ + speed: 10, + + /** + * Returns the Y position of an element, relative to the document + * + * @method getTop + * @param {DOMElement} d DOMElement to get the Y position from + * @return {Number} Y position of div 'd' + * @public + * @static + */ + getTop: function(d) { + return Math.round( + SmoothScroller.scrollTop() + d.getBoundingClientRect().top); + }, + + + /** + * Returns the current scroll position + * + * @method scrollTop + * @return {Number} Current scroll position + * @public + * @static + */ + scrollTop: function() { + var body = document.body, + d = document.documentElement; + if (body && body.scrollTop){ + return body.scrollTop; + } + if (d && d.scrollTop){ + return d.scrollTop; + } + if (window.pageYOffset){ + return window.pageYOffset; + } + return 0; + }, + + /** + * Attaches an event for an element + * + * @method add + * @param {DOMElement} el DOMElement to make the listening of the event + * @param {String} event Event name to be listened + * @param {DOMElement} fn Callback function to run when the event is triggered. + * @public + * @static + */ + add: function(el, event, fn) { + Event.observe(el,event,fn); + }, + + + /** + * Kill an event of an element + * + * @method end + * @param {String} e Event to be killed/stopped + * @public + * @static + */ + // kill an event of an element + end: function(e) { + Event.stopDefault(e); + }, + + + /** + * Moves the scrollbar to the target element. This is the function + * which animates the scroll position bit by bit. It calls itself in + * the end through requestAnimationFrame + * + * @method scroll + * @param {Number} d Y coordinate value to stop + * @public + * @static + */ + scroll: function(d, options) { + var a = SmoothScroller.scrollTop(); + var margin = options.margin || 0; + + var endPos = d - margin; + + if (endPos > a) { + a += Math.ceil((endPos - a) / SmoothScroller.speed); + } else { + a = a + (endPos - a) / SmoothScroller.speed; + } + + cancelAnimationFrame(SmoothScroller.interval); + + if (!((a) === endPos || SmoothScroller.offsetTop === a)) { + SmoothScroller.interval = requestAnimationFrame( + Ink.bindMethod(SmoothScroller, 'scroll', d, options), document.body); + } else { + SmoothScroller.onDone(); + } + + window.scrollTo(0, a); + SmoothScroller.offsetTop = a; + }, + + + /** + * Has smooth scrolling applied to relevant elements upon page load. + * + * @method init + * @param [selector='a.scrollableLink,a.ink-smooth-scroll'] Selector string for finding links with smooth scrolling enabled. + * @public + * @static + */ + init: function(selector) { + Loaded.run(Ink.bindMethod(SmoothScroller, 'render', selector)); + }, + + /** + * This method extracts all the anchors and validates them as # and attaches the events + * + * @method render + * @public + * @static + */ + render: function(selector) { + var a = Selector.select(selector || 'a.scrollableLink,a.ink-smooth-scroll'); + + for (var i = 0; i < a.length; i++) { + var _elm = a[i]; + if (_elm.href && _elm.href.indexOf('#') !== -1 && ((_elm.pathname === location.pathname) || ('/' + _elm.pathname === location.pathname))) { + Event.observe(_elm,'click', Ink.bindEvent(SmoothScroller.onClick, this, _elm)); + } + } + }, + + + /** + * Click handler + * + * @method onClick + * @public + * @static + */ + onClick: function(event, _elm) { + SmoothScroller.end(event); + if(_elm != null && _elm.getAttribute('href') !== null) { + var hashIndex = _elm.href.indexOf('#'); + if (hashIndex === -1) { + return; + } + + var data = InkElement.data(_elm); + var hash = _elm.href.substr((hashIndex + 1)); + var activeLiSelector = 'ul > li.active > ' + selector; + + var selector = 'a[name="' + hash + '"],#' + hash; + var elm = Selector.select(selector)[0]; + var activeLi = Selector.select(activeLiSelector)[0]; + activeLi = activeLi && activeLi.parentNode; + + if (typeof(elm) !== 'undefined') { + if (_elm.parentNode.className.indexOf('active') === -1) { + if (activeLi) { + activeLi.className = activeLi.className.replace(/(^|\s+)active($|\s+)/g, ''); + } + _elm.parentNode.className += " active"; + } + SmoothScroller.hash = hash; + var options = {}; + if (parseFloat(data.margin)) { + options.margin = parseFloat(data.margin); + } + SmoothScroller.scroll(SmoothScroller.getTop(elm), options); + } + } + }, + + /** + * Called when the scroll movement is done. Updates browser address. + */ + onDone: function () { + window.location.hash = SmoothScroller.hash; + } + }; + + return SmoothScroller; + +}); + +/** + * @module Ink.UI.SortableList_1 + * Sortable lists + * @version 1 + */ + +Ink.createModule('Ink.UI.SortableList', '1', ['Ink.UI.Common_1','Ink.Dom.Css_1','Ink.Dom.Event_1','Ink.Dom.Element_1','Ink.Dom.Selector_1'], function( Common, Css, Events, Element, Selector ) { + 'use strict'; + var hasTouch = (('ontouchstart' in window) || // html5 browsers + (navigator.maxTouchPoints > 0) || // future IE + (navigator.msMaxTouchPoints > 0)); + + /** + * Adds sortable behaviour to any list. + * + * @class Ink.UI.SortableList + * @constructor + * @version 1 + * @param {String|DOMElement} selector + * @param {String} [options.placeholderClass] CSS class added to the "ghost" element being dragged around. Defaults to 'placeholder'. + * @param {String} [options.draggedClass] CSS class added to the original element being dragged around. Defaults to 'hide-all'. + * @param {String} [options.draggingClass] CSS class added to the html element when the user is dragging. Defaults to 'dragging'. + * @param {String} [options.dragSelector] CSS selector for the drag enabled nodes. Defaults to 'li'. + * @param {String} [options.handleSelector] CSS selector for the drag handle. If present, you can only drag nodes by this selector. + * @param {String} [options.moveSelector] CSS selector to validate a node move. If present, you can only move nodes inside this selector. + * @param {Boolean} [options.swap] Flag to swap dragged element and target element instead of reordering it. + * @param {Boolean} [options.cancelMouseOut] Flag to cancel draggin if mouse leaves the container element. + * + * @sample Ink_UI_SortableList_1.html + */ + var SortableList = function(selector, options) { + + this._element = Common.elOrSelector(selector, 'Ink.UI.SortableList'); + + this._options = Common.options('Sortable', { + 'placeholderClass': ['String', 'placeholder'], + 'draggedClass': ['String', 'hide-all'], + 'draggingClass': ['String', 'dragging'], + 'dragSelector': ['String', 'li'], + 'dragObject': ['String', null], // Deprecated. Use handleSelector instead. + 'handleSelector': ['String', null], + 'moveSelector': ['String', false], + 'swap': ['Boolean', false], + 'cancelMouseOut': ['Boolean', false] + }, options || {}, this._element); + + if (this._options.dragObject != null) { + // [3.0.0] Remove this deprecation notice and stop providing backwards compatibility + Ink.warn('Ink.UI.SortableList: options.dragObject is now deprecated. ' + + 'Please use options.handleSelector instead.'); + this._options.handleSelector = + this._options.handleSelector || this._options.dragObject; + } + + this._handlers = { + down: Ink.bind(this._onDown, this), + move: Ink.bind(this._onMove, this), + up: Ink.bind(this._onUp, this) + }; + + this._isMoving = false; + + this._init(); + }; + + SortableList.prototype = { + + /** + * Init function called by the constructor. + * + * @method _init + * @private + */ + _init: function() { + this._down = hasTouch ? 'touchstart mousedown' : 'mousedown'; + this._move = hasTouch ? 'touchmove mousemove' : 'mousemove'; + this._up = hasTouch ? 'touchend mouseup' : 'mouseup'; + + this._observe(); + Common.registerInstance(this, this._element, 'sortableList'); + }, + + /** + * Sets the event handlers. + * + * @method _observe + * @private + */ + _observe: function() { + Events.on(this._element, this._down, this._options.dragSelector, this._handlers.down); + Events.on(this._element, this._move, this._options.dragSelector, this._handlers.move); + if(this._options.cancelMouseOut) { + Events.on(this._element, 'mouseleave', Ink.bind(this.stopMoving, this)); + } + Events.on(document.documentElement, this._up, this._handlers.up); + }, + + /** + * Mousedown or touchstart handler + * + * @method _onDown + * @param {Event} ev + * @private + */ + _onDown: function(ev) { + if (this._isMoving || this._placeholder) { return; } + if(this._options.handleSelector && !Selector.matchesSelector(ev.target, this._options.handleSelector)) { return; } + var tgtEl = ev.currentTarget; + this._isMoving = tgtEl; + this._placeholder = tgtEl.cloneNode(true); + this._movePlaceholder(tgtEl); + this._addMovingClasses(); + return false; + }, + + /** + * Mousemove or touchmove handler + * + * @method _onMove + * @param {Event} ev + * @private + */ + _onMove: function(ev) { + this.validateMove(ev.currentTarget); + return false; + }, + + /** + * Mouseup or touchend handler + * + * @method _onUp + * @param {Event} ev + * @private + */ + _onUp: function(ev) { + if (!this._isMoving || !this._placeholder) { return; } + if (ev.currentTarget === this._isMoving) { return; } + if (ev.currentTarget === this._placeholder) { return; } + Element.insertBefore(this._isMoving, this._placeholder); + this.stopMoving(); + return false; + }, + + /** + * Adds the CSS classes to interactive elements + * + * @method _addMovingClasses + * @private + */ + _addMovingClasses: function(){ + Css.addClassName(this._placeholder, this._options.placeholderClass); + Css.addClassName(this._isMoving, this._options.draggedClass); + Css.addClassName(document.documentElement, this._options.draggingClass); + }, + + /** + * Removes the CSS classes from interactive elements + * + * @method _removeMovingClasses + * @private + */ + _removeMovingClasses: function(){ + if(this._isMoving) { Css.removeClassName(this._isMoving, this._options.draggedClass); } + if(this._placeholder) { Css.removeClassName(this._placeholder, this._options.placeholderClass); } + Css.removeClassName(document.documentElement, this._options.draggingClass); + }, + + /** + * Moves the placeholder element relative to the target element + * + * @method _movePlaceholder + * @param {Element} target_position + * @private + */ + _movePlaceholder: function(target){ + var placeholder = this._placeholder, + target_position, + placeholder_position, + from_top, + from_left; + if(!placeholder) { + Element.insertAfter(placeholder, target); + } else if(this._options.swap){ + Element.insertAfter(placeholder, target); + Element.insertBefore(target, this._isMoving); + Element.insertBefore(this._isMoving, placeholder); + } else { + target_position = Element.offset(target); + placeholder_position = Element.offset(this._placeholder); + from_top = target_position[1] > placeholder_position[1]; + from_left = target_position[0] > placeholder_position[0]; + if( ( from_top && from_left ) || ( !from_top && !from_left ) ) { + Element.insertBefore(placeholder, target); + } else { + Element.insertAfter(placeholder, target); + } + Element.insertBefore(this._isMoving, placeholder); + } + }, + + /************** + * PUBLIC API * + **************/ + + /** + * Unregisters the component and removes its markup + * + * @method destroy + * @public + */ + destroy: Common.destroyComponent, + + /** + * Visually stops moving. + * Removes the placeholder as well as the styling classes. + * + * @method _movePlaceholder + * @public + */ + stopMoving: function(){ + this._removeMovingClasses(); + Element.remove(this._placeholder); + this._placeholder = false; + this._isMoving = false; + }, + + /** + * Validate a move. + * This method is used by the move handler + * + * @method _movePlaceholder + * @param {Element} elem + * @public + */ + validateMove: function(elem){ + if (!this._isMoving || !this._placeholder) { return; } + if (elem === this._placeholder) { return; } + if (elem === this._isMoving) { return; } + if(!this._options.moveSelector || Selector.matchesSelector(elem, this._options.moveSelector)){ + this._movePlaceholder(elem); + } else { + this.stopMoving(); + } + } + + }; + + return SortableList; +}); +/** + * @module Ink.UI.Spy_1 + * @author inkdev AT sapo.pt + * @version 1 + * + * Highlight elements as you scroll + */ +Ink.createModule('Ink.UI.Spy', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1'], function(Common, Event, Css, Element, Selector ) { + 'use strict'; + + // Maps a spy target (EG a menu with links inside) to spied instances. + var spyTargets = [ + // [target, [spied, spied, spied...]], ... + ]; + + function targetIndex(target) { + for (var i = 0, len = spyTargets.length; i < len; i++) { + if (spyTargets[i][0] === target) { + return i; + } + } + return null; + } + + function addSpied(spied, target) { + var index = targetIndex(target); + + if (index === null) { + spyTargets.push([target, [spied]]); + } else { + spyTargets[index][1].push(spied); + } + } + + var observingOnScroll = false; + function observeOnScroll() { + if (!observingOnScroll) { + observingOnScroll = true; + Event.observe(document, 'scroll', Event.throttle(onScroll, 300)); + } + } + + function onScroll() { + for (var i = 0, len = spyTargets.length; i < len; i++) { + onScrollForTarget(spyTargets[i][0], spyTargets[i][1]); + } + } + + function onScrollForTarget(target, spied) { + var activeEl = findActiveElement(spied); + + // This selector finds li's to deactivate + var toDeactivate = Selector.select('li.active', target); + for (var i = 0, total = toDeactivate.length; i < total; i++) { + Css.removeClassName(toDeactivate[i], 'active'); + } + + if (activeEl === null) { + return; + } + + // The link which should be activated has a "href" ending with "#" + name or id of the element + var menuLinkSelector = 'a[href$="#' + (activeEl.name || activeEl.id) + '"]'; + + var toActivate = Selector.select(menuLinkSelector, target); + for (i = 0, total = toActivate.length; i < total; i++) { + Css.addClassName(Element.findUpwardsByTag(toActivate[i], 'li'), 'active'); + } + } + + function findActiveElement(spied) { + /* + * Find the element above the top of the screen, but closest to it. + * _____ + * |_____| element 1 (active element) + * + * ------------------------ + * | _____ | + * | | | element 2 | + * | | | | + * | |_____| | + * ------- Viewport ------- + */ + + // Remember that getBoundingClientRect returns coordinates + // relative to the top left corner of the screen. + // + // So checking if it's < 0 is used to tell if + // the element is above the top of the screen. + var closest = -Infinity; + var closestIndex; + var bBox; + for( var i = 0, total = spied.length; i < total; i++ ){ + bBox = spied[i].getBoundingClientRect(); + if (bBox.top <= 0 && bBox.top > closest) { + closest = bBox.top; + closestIndex = i; + } + } + if (closestIndex === undefined) { + return null; + } else { + return spied[closestIndex]; + } + } + + /** + * Spy is a UI component which tells the user which section is currently + * visible. + * + * Spy can be used to highlight a menu item for the section which is + * visible to the user. + * + * You need two things: A menu element (which contains your links inside + * `li` tags), and an element containing your section's content. + * + * The links must be inside `li` tags. These will get the 'active' class, + * to signal which item is currently visible. In your CSS you need to add + * styling for this class. + * + * To use Ink.UI.Spy for more than one section, loop through your + * sections (as you see in the sample below), or just load + * `autoload.js` and set add the `data-spy="true"` attribute to + * your sections. + * + * The currently visible element's corresponding link in the menu + * gets the 'visible' class added to it. + * + * @class Ink.UI.Spy + * @constructor + * @version 1 + * @param {String|DOMElement} selector + * @param {Object} [options] Options + * @param {DOMElement|String} options.target Target menu where the spy will highlight the right option. + * + * @sample Ink_UI_Spy_1.html + */ + var Spy = function( selector, options ){ + + this._element = Common.elOrSelector( selector, 'Ink.UI.Spy_1: Section element' ); + + /** + * Setting default options and - if needed - overriding it with the data attributes + */ + this._options = Ink.extendObj({ + target: undefined, + activeClass: 'active' // [todo] Spy#_options.activeClass + }, Element.data( this._element ) ); + + /** + * In case options have been defined when creating the instance, they've precedence + */ + this._options = Ink.extendObj(this._options,options || {}); + + this._options.target = Common.elOrSelector( this._options.target, 'Ink.UI.Spy_1: Target element' ); + + this._init(); + }; + + Spy.prototype = { + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function() { + addSpied(this._element, this._options.target); + observeOnScroll(); + onScroll(); + } + }; + + return Spy; + +}); + +/** + * @module Ink.UI.Stacker_1 + * Stacking items in columns + * @version 1 + **/ + +Ink.createModule('Ink.UI.Stacker', 1, ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1'], function(InkUICommon, InkEvent, InkElement) { + 'use strict'; + +function Stacker(selector, options) { + this._init(selector, options); +} + +Stacker.prototype = { + /** + * This module combines several stacks of items together, in smaller screen sizes. + * + * The purpose is to have several stacks of items which may have different heights and as such cannot be used because of `float: left` quirks. + * + * For example, when you have three different columns of information: + * + * [col. A: 1] [col. B: 1] [col. C: 1] + * [col. B: 2] [col. C: 2] [col. C: 2] + * + * and the screen resizes and you need a layout of 2 columns, Stacker reorders the stacks so that you get: + * + * [col. A: 1] [col. B: 1] + * [col. C: 1] [col. A: 2] + * [col. B: 2] [col. C: 2] + * + * Note: If you just want to use a different amount of columns for your items in several viewports, but these items are guaranteed to have a fixed height, don't use this module. Use the `small-*`, `medium-*` and `large-*` classes instead. + * + * @class Ink.UI.Stacker_1 + * + * @constructor + * @param {DOMElement|String} [container] Element which contains the stacks (identified by the options.column selector) + * @param {Object} [options] Options object. + * @param {String} [options.column] Selector for the the columns inside the container element. Defaults to '.stacker-column'. + * @param {String} [options.item] Selector for the items in your stack. Defaults to '.stacker-item'. + * @param {Object} [options.customBreakPoints] Options for each breakpoint name. Use this if you have more breakpoints than Ink by default (`large`, `medium`, `small`) + * @param {Object} [options.customBreakpoints.BREAKPOINT_NAME] Custom breakpoints object. + * @param {String} options.customBreakpoints.BREAKPOINT_NAME.max Maximum screen size as seen in your media query + * @param {String} options.customBreakpoints.BREAKPOINT_NAME.min Minimum screen size as seen in your media query + * @param {String} options.customBreakpoints.BREAKPOINT_NAME.cols Column count for this size. + * @param {Number} [options.largeMax] Upper bound of `large` breakpoint + * @param {Number} [options.largeMin] Lower bound of `large` breakpoint. Defaults to 961. + * @param {Number} [options.mediumMax] Upper bound of `medium` breakpoint. Defaults to 960. + * @param {Number} [options.mediumMin] Lower bound of `medium` breakpoint. Defaults to 651. + * @param {Number} [options.smallMax] Upper bound of `small` breakpoint. Defaults to 650. + * @param {Number} [options.smallMin] Lower bound of `small` breakpoint + * + * @param {Integer} [options.largeCols] Number of columns in the `large` viewport. Defaults to 3. + * @param {Integer} [options.mediumCols] Number of columns in the `medium` viewport. Defaults to 2. + * @param {Integer} [options.smallCols] Number of columns in the `small` viewport. Defaults to 1. + * + * @param {Boolean} [options.isOrdered] When false, doesn't reorder stacks when combining them. + * @param {Function} [options.onRunCallback] Called when instantiated. + * @param {Function} [options.onResizeCallback] Called when the window resizes. + * @param {Function} [options.onAPIReloadCallback] Called when the reload function executes. + * + * @example + * + * Html: + * + *
        + *
        + *
        a
        + *
        d
        + *
        g
        + *
        + *
        + *
        b
        + *
        e
        + *
        h
        + *
        + *
        + *
        c
        + *
        f
        + *
        i
        + *
        + *
        + * + * Javascript: + * + * Ink.requireModules(['Ink.UI.Stacker_1'], function (Stacker) { + * var stacker = new Stacker('#stacker-container'); + * // Keep the "stacker" variable around if you want to call addItem and reloadItems + * }); + **/ + _init: function(selector, options) { + /* globals console */ + this._rootElm = InkUICommon.elsOrSelector(selector, 'Ink.UI.Stacker root element')[0] || null; + if(this._rootElm === null) { + if(typeof console !== 'undefined') { + console.warn('Ink.UI.Stacker: No root element'); + } + } + + this._options = InkUICommon.options({ + column: ['String', '.stacker-column'], + item: ['String', '.stacker-item'], + + // [3.0.0] review this when we have info about our breakpoints from the CSS + customBreakPoints: ['Object', null], // Must be: {xlarge: {max: 9999, min: 1281, cols: 5}, large:{max:1280, min:1001, cols:4} medium:{max:1000, min:801,cols:3}, ...etc..} + largeMax: ['Number', Number.MAX_VALUE], + largeMin: ['Number', 961], + mediumMax: ['Number', 960], + mediumMin: ['Number', 651], + smallMax: ['Number', 650], + smallMin: ['Number', 0], + + largeCols: ['Integer', 3], + mediumCols: ['Integer', 2], + smallCols: ['Integer', 1], + + isOrdered: ['Boolean', true], + onRunCallback: ['Function', null], + onResizeCallback: ['Function', null], + onAPIReloadCallback: ['Function', null] + }, options || {}, this._rootElm); + + this._aList = []; + + this._curLayout = 'large'; + + // [todo] is this needed? + this._runFirstTime = false; + + this._getPageItemsToList(); + + if(this._canApplyLayoutChange() || !this._runFirstTime) { + this._runFirstTime = true; + this._applyLayoutChange(); + if(typeof(this._options.onRunCallback) === 'function') { + this._options.onRunCallback(this._curLayout); + } + } + this._addEvents(); + }, + + /** + * Adds an item to the end of your stacks. + * Call `reloadItems()` when you are done adding items. + * @method addItem + * @param {DOMElement} item Element + **/ + addItem: function(item) { + this._aList.push(item); + }, + + /** + * Updates the layout of your items. + * Call this method after adding items or changing their dimensions. This method is automatically called when the window resizes. + * + * @method reloadItems + **/ + reloadItems: function() { + this._applyLayoutChange(); + if(typeof(this._options.onAPIReloadCallback) === 'function') { + this._options.onAPIReloadCallback(this._curLayout); + } + }, + + _addEvents: function() { + InkEvent.observe(window, 'resize', Ink.bindEvent(this._onResize, this)); + }, + + _onResize: function() { + if(this._canApplyLayoutChange()) { + this._removeDomItems(); + this._applyLayoutChange(); + if(typeof(this._options.onResizeCallback) === 'function') { + this._options.onResizeCallback(this._curLayout); + } + } + }, + + _setCurLayout: function() { + var viewportWidth = InkElement.viewportWidth(); + if(this._options.customBreakpoints && typeof(this._options.customBreakPoints) === 'object') { + for(var prop in this._options.customBreakPoints) { + if(this._options.customBreakPoints.hasOwnProperty(prop)) { + if(viewportWidth >= Number(this._options.customBreakPoints[prop].min) && viewportWidth <= Number(this._options.customBreakPoints[prop].max) && this._curLayout !== prop) { + this._curLayout = prop; + return; + } + } + } + } else { + if(viewportWidth <= Number(this._options.largeMax) && viewportWidth >= Number(this._options.largeMin) && this._curLayout !== 'large') { + this._curLayout = 'large'; + } else if(viewportWidth >= Number(this._options.mediumMin) && viewportWidth <= Number(this._options.mediumMax) && this._curLayout !== 'medium') { + this._curLayout = 'medium'; + } else if(viewportWidth >= Number(this._options.smallMin) && viewportWidth <= Number(this._options.smallMax) && this._curLayout !== 'small') { + this._curLayout = 'small'; + } + } + }, + + _getColumnsToShow: function() { + if(this._options.customBreakPoints && typeof(this._options.customBreakPoints) === 'object') { + return Number(this._options.customBreakPoints[this._curLayout].cols); + } else { + return Number(this._options[this._curLayout+'Cols']); + } + }, + + _canApplyLayoutChange: function() { + var curLayout = this._curLayout; + this._setCurLayout(); + if(curLayout !== this._curLayout) { + return true; + } + return false; + }, + + _getPageItemsToList: function() { + this._aColumn = Ink.ss(this._options.column, this._rootElm); + var totalCols = this._aColumn.length; + var index = 0; + if(totalCols > 0) { + for(var i=0; i < this._aColumn.length; i++) { + var aItems = Ink.ss(this._options.item, this._aColumn[i]); + for(var j=0; j < aItems.length; j++) { + if(this._options.isOrdered) { + index = i + (j * totalCols); + } + this._aList[index] = aItems[j]; + if(!this._options.isOrdered) { + index++; + } + //aItems[j].style.height = (100 + (Math.random() * 100))+'px'; + aItems[j].parentNode.removeChild(aItems[j]); + } + } + if(this._aList.length > 0 && this._options.isOrdered) { + var aNewList = []; + for(var ii=0; ii < this._aList.length; ii++) { + if(typeof(this._aList[ii]) !== 'undefined') { + aNewList.push(this._aList[ii]); + } + } + this._aList = aNewList; + } + } + }, + + _removeDomItems: function() { + var totalCols = this._aColumn.length; + if(totalCols > 0) { + for(var i=0; i < totalCols; i++) { + var aItems = Ink.ss(this._options.item, this._aColumn[i]); + for(var j=aItems.length - 1; j >= 0; j--) { + aItems[j].parentNode.removeChild(aItems[j]); + } + } + } + }, + + _applyLayoutChange: function() { + var totalCols = this._getColumnsToShow(); + var totalItems = this._aList.length; + var index = 0; + var countCol = 0; + if(totalCols > 0) { + while(countCol < totalCols) { + this._aColumn[countCol].appendChild(this._aList[index]); + index++; + countCol++; + if(index === totalItems) { + return; + } + if(countCol === totalCols) { + countCol = 0; + } + } + } + } +}; + +return Stacker; + +}); +/** + * @module Ink.UI.Sticky_1 + * Stick elements to the viewport + * @version 1 + */ +Ink.createModule('Ink.UI.Sticky', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Element_1','Ink.Dom.Css_1'], function(Common, Event, Element, Css) { + 'use strict'; + + /** + * Ink.UI.Sticky makes an element "stick" to the screen and stay in the same place as the user scrolls. + * + * To use it, just select an element as you create the Sticky. As you scroll past it, it will stick to the top of the screen. + * + * The `activateInLayouts` option controls in what layouts this behaviour happens. By default, it is disabled for the `small` and `tiny` layouts. + * Pass a comma-separated string to choose just the layouts you need. + * + * You can use the `offsetTop` option if you want it to keep some distance from the top of the screen. + * + * To avoid it going under the footer of your page, pass a selector to your footer as the `bottomElement` option. + * + * + * @class Ink.UI.Sticky + * @constructor + * @version 1 + * @param {String|DOMElement} selector Element or selector + * @param {Object} [options] Options Options object. + * @param {Number} [options.offsetBottom] Number of pixels of distance from the bottomElement. Defaults to 0. + * @param {Number} [options.offsetTop] Number of pixels of distance from the topElement. Defaults to 0. + * @param {Boolean} [options.inlineDimensions] Set to false to disable setting inline CSS dimensions. Use this if you want to use CSS to define your own dimensions. Defaults to true. + * @param {Boolean} [options.inlinePosition] Set to false to disable setting inline CSS positions. Use this if you want to use CSS to define your own positioning. Defaults to true. + * @param {String} [options.wrapperClass] CSS class for the wrapper element. Defaults to 'ink-sticky-wrapper'. + * @param {String} [options.stickyClass] CSS class to stick the element to the screen. Defaults to 'ink-sticky-stuck'. + * @param {String} [options.topElement] CSS Selector that specifies a top element with which the component could collide. + * @param {String} [options.bottomElement] CSS Selector that specifies a bottom element with which the component could collide. + * @param {Array|String} [options.activateInLayouts] Layouts in which the sticky behaviour is present. Pass an array or comma-separated string. Defaults to 'medium,large'. + * + * @sample Ink_UI_Sticky_1.html + */ + var Sticky = function( selector, options ){ + this._rootElement = Common.elOrSelector(selector, 'Ink.UI.Sticky_1'); + + this._options = Common.options({ + offsetBottom: ['Integer', 0], + offsetTop: ['Integer', 0], + topElement: ['Element', null], + wrapperClass: ['String', 'ink-sticky-wrapper'], + stickyClass: ['String', 'ink-sticky-stuck'], + inlineDimensions: ['Boolean', true], + inlinePosition: ['Boolean', true], + bottomElement: ['Element', null], + activateInLayouts: ['String', 'medium,large'] + }, options || {}, this._rootElement ); + + // Because String#indexOf is compatible with lt IE8 but not Array#indexOf + this._options.activateInLayouts = this._options.activateInLayouts.toString(); + + this._dims = null; // force a recalculation of the dimensions later + + this._options.offsetTop = parseInt(this._options.offsetTop, 10) || 0; + this._options.offsetBottom = parseInt(this._options.offsetBottom, 10) || 0; + + if (this._options.topElement) { + this._options.topElement = Common.elOrSelector(this._options.topElement, 'Top Element'); + } + if (this._options.bottomElement) { + this._options.bottomElement = Common.elOrSelector(this._options.bottomElement, 'Sticky bottom Element'); + } + + this._wrapper = Element.create('div', { className: this._options.wrapperClass }); + Element.wrap(this._rootElement, this._wrapper); + + this._init(); + }; + + Sticky.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function() { + var scrollTarget = document.addEventListener ? document : window; + this._onScroll = Ink.bind(Event.throttle(this._onScroll, 33), this); // Because this is called directly. + Event.observe( scrollTarget, 'scroll', this._onScroll ); + Event.observe( window, 'resize', Ink.bindEvent(Event.throttle(this._onResize, 100), this) ); + this._onScroll(); + }, + + /** + * Returns whether the sticky is disabled in the current view + * + * @method isDisabledInLayout + * @private + */ + _isDisabledInLayout: function () { + var currentLayout = Common.currentLayout(); + if (!currentLayout) { return false; } + return this._options.activateInLayouts.indexOf(currentLayout) === -1; + }, + + /** + * Scroll handler. + * + * @method _onScroll + * @private + */ + _onScroll: function(){ + var dims = this._getDims(); + var scrollHeight = Element.scrollHeight(); + + var unstick = this._isDisabledInLayout() || + scrollHeight <= dims.top - this._options.offsetTop || + (this._options.topElement && this._options.topElement.getBoundingClientRect().bottom + this._options.offsetTop > 0); + + if( unstick ) { + // We're on top, no sticking. position:static is the "normal" position. + this._unstick(); + return; + } + + // If we stick it now, what will be its boundingClientRect.bottom ? + var bottomOfSticky = this._options.offsetTop + dims.height + Element.scrollHeight(); + var maxBottomOfSticky = document.body.scrollHeight; + + if (this._options.bottomElement) { + maxBottomOfSticky = + this._options.bottomElement.getBoundingClientRect().top + + Element.scrollHeight(); + } + + maxBottomOfSticky -= this._options.offsetBottom; + + if ( bottomOfSticky < maxBottomOfSticky ) { + // Stick to screen! + this._stickTo('screen'); + } else { + // Stick to bottom + this._stickTo('bottom'); + } + }, + + /** + * Have the sticky stick nowhere, to the screen, or to the bottom. + * + * @method _stickTo + * @private + */ + _stickTo: function (where) { + var style = this._rootElement.style; + var dims = this._getDims(); + + Css.addClassName(this._rootElement, this._options.stickyClass); + this._wrapper.style.height = dims.height + 'px'; + + this._inlineDimensions(dims.height + 'px', dims.width + 'px'); + + if (this._options.inlinePosition === false) { + return; + } + + style.left = dims.left + 'px'; + + if (where === 'screen') { + style.bottom = null; + style.top = this._options.offsetTop + 'px'; + } else if (where === 'bottom') { + // Distance between bottom of sticky and bottom of document + var bottom = this._getBottomOffset(); + + // Distance between bottom of viewport and bottom of document + var bottomOfViewport = Element.scrollHeight() + Element.viewportHeight(); + var toBottomOfDocument = Element.pageHeight() - bottomOfViewport; + + style.bottom = bottom - toBottomOfDocument + 'px'; + style.top = 'auto'; + } + }, + + /** + * "unstick" the sticky from the screen or bottom of the document + * @method _unstick + * @private + */ + _unstick: function () { + Css.removeClassName(this._rootElement, this._options.stickyClass); + // deinline dimensions of our root element + this._inlineDimensions(null, null); + + // deinline the position of our root element + if (this._options.inlinePosition) { + this._rootElement.style.left = null; + this._rootElement.style.top = null; + this._rootElement.style.bottom = null; + } + + // deinline dimensions of wrapper + this._wrapper.style.height = null; + this._wrapper.style.width = null; + + // Break the "getDims" cache + this._dims = null; + }, + + /** + * Resize handler + * + * @method _onResize + * @private + */ + _onResize: function(){ + this._dims = null; // Blow the cache so _getDims recalculates + this._onScroll(); + }, + + /** + * Recalculate the "dims" cache, or get it. + * + * The "dims" cache is to be set to null when the element is liable to have changed dimensions + * + * (eg: on resize) + * + **/ + _getDims: function () { + if (this._dims !== null) { return this._dims; } + + var style = this._rootElement.style; + + // We unstick the sticky so we can measure. + var oldPosition = style.position; + var oldWidth = style.width; + + style.position = 'static'; // [todo] this should be a class toggle + style.width = null; + + var dimensionsInStatic = Element.outerDimensions(this._rootElement); + var rect = this._wrapper.getBoundingClientRect(); + this._dims = { + height: dimensionsInStatic[1], + width: dimensionsInStatic[0], + left: rect.left + Element.scrollWidth(), + top: rect.top + Element.scrollHeight() + }; + + style.position = oldPosition; + style.width = oldWidth; + + return this._dims; + }, + + /** + * Set style.height and style.width, but not if options.inlineDimensions === false + * + * @method _inlineDimensions + * @private + */ + _inlineDimensions: function (height, width) { + if (this._options.inlineDimensions) { + this._rootElement.style.height = height; + this._rootElement.style.width = width; + } + }, + + /** + * Get the distance between the bottom of the element and the bottom of the page + * + * @method _getBottomOffset + * @private + */ + _getBottomOffset: function () { + var bottom = this._options.offsetBottom; + if (this._options.bottomElement) { + bottom += Element.pageHeight() - + Element.offsetTop(this._options.bottomElement); + } + return bottom; + } + }; + + return Sticky; + +}); +/** + * @module Ink.UI.Swipe_1 + * Swipe gestures + * @version 1 + */ +Ink.createModule('Ink.UI.Swipe', '1', ['Ink.Dom.Event_1', 'Ink.Dom.Element_1', 'Ink.UI.Common_1'], function(InkEvent, InkElement, Common) { + 'use strict'; + + /** + * Subscribe swipe gestures. + * + * Supports filtering swipes be any combination of the criteria supported in the options. + * + * @class Ink.UI.Swipe_1 + * @constructor + * @param {String|DOMElement} el Element or Selector + * @param {Object} options Options Object + * @param {Function} [options.onEnd] Callback function for the `touchend` event. Gets all the gesture information, and is filtered by min/max Dist and Duration options (see below) + * @param {Function} [options.onStart] Callback function for `touchstart` event. + * @param {Function} [options.onMove] Callback function for every `touchmove` event. Gets current gesture information. + * @param {Number} [options.minDist] Minimum allowed distance, in pixels. + * @param {Number} [options.maxDist] Maximum allowed distance, in pixels. + * @param {Number} [options.minDuration] Minimum allowed duration, in seconds. + * @param {Number} [options.maxDuration] Maximum allowed duration, in seconds. + * @param {String} [options.axis] If either 'x' or 'y' is passed, only swipes where the dominant axis is the given one trigger the callback + * @param {String} [options.storeGesture] If to store gesture information and provide it to the callback. Defaults to true. + * @param {String} [options.stopEvents] Flag to stop (default and propagation) of the received events. Defaults to true. + * + * ----- + * + * Arguments received by the callbacks + * ----------------------------------- + * + * `onStart`, `onMove`, and `onEnd` receive as argument an object containing: + * + * - `event`: the DOMEvent object + * - `element`: the target element + * - `Instance`: the `Ink.UI.Swipe_1` instance + * - `position`: `Array` with `[x, y]` coordinates of current position + * - `dt`: Time passed between now and the first event (onMove only) + * - `gesture`: an Array containing [x,y] coordinates of every touchmove event received (storeGesture only) (onEnd only) + * - `time`: an Array containing all the `dt` values for every touchmove event (onEnd only) + * - `overallMovement`: X and Y distance traveled by the touch movement (`[x, y]`) (onEnd only) + * - `overallTime`: total time passed (onEnd only) + * + * @sample Ink_UI_Swipe_1.html + */ + function Swipe(el, options) { + el = Common.elOrSelector(el, 'Swipe target'); + + this._options = Ink.extendObj({ + onEnd: undefined, + onStart: undefined, + onMove: undefined, + minDist: undefined, // in pixels + maxDist: undefined, + minDuration: undefined, // in seconds + maxDuration: undefined, + axis: undefined, // x | y + storeGesture: false, + stopEvents: true + }, InkElement.data(el), options || {}); + + if (typeof options === 'function') { + this._options.onEnd = options; + } + + this._handlers = { + down: Ink.bindEvent(this._onDown, this), + move: Ink.bindEvent(this._onMove, this), + up: Ink.bindEvent(this._onUp, this) + }; + + this._element = el; + + this._init(); + } + + Swipe.prototype = { + + version: '0.1', + + _supported: ('ontouchstart' in document.documentElement), + + _init: function() { + var db = document.body; + InkEvent.observe(db, 'touchstart', this._handlers.down); + if (this._options.storeGesture || this._options.onMove) { + InkEvent.observe(db, 'touchmove', this._handlers.move); + } + InkEvent.observe(db, 'touchend', this._handlers.up); + this._isOn = false; + }, + + _isMeOrParent: function(el, parentEl) { + if (!el) {return;} + do { + if (el === parentEl) { return true; } + el = el.parentNode; + } while (el); + return false; + }, + + _pushGesture: function (coords, dt) { + if (this._options.storeGesture) { + this._gesture.push(coords); + this._time.push(dt); + } + }, + + _onDown: function(event) { + if (event.changedTouches.length !== 1) { return; } + if (!this._isMeOrParent(event.target, this._element)) { return; } + + if( this._options.stopEvents === true ){ + InkEvent.stop(event); + } + event = event.changedTouches[0]; + this._isOn = true; + this._target = event.target; + + this._t0 = +new Date(); + this._p0 = [event.pageX, event.pageY]; + + if (this._options.storeGesture) { + this._gesture = []; + this._time = []; + } + + this._pushGesture(this._p0, 0); + + if (this._options.onStart) { + this._options.onStart({ + event: event, + element: this._element, + instance: this, + position: this._p0, + dt: 0 + }); + } + }, + + _onMove: function(event) { + if (!this._isOn || event.changedTouches.length !== 1) { return; } + if( this._options.stopEvents === true ) { + InkEvent.stop(event); + } + + event = event.changedTouches[0]; + var t1 = +new Date(); + var dt = (t1 - this._t0); + + var gesture = [event.pageX, event.pageY]; + + this._pushGesture(gesture, dt); + + if (this._options.onMove) { + this._options.onMove({ + event: event, + element: this._element, + instance: this, + position: gesture, + dt: dt + }); + } + }, + + _onUp: function(event) { + if (!this._isOn || event.changedTouches.length !== 1) { return; } + + if( this._options.stopEvents === true ){ + InkEvent.stop(event); + } + event = event.changedTouches[0]; // TODO SHOULD CHECK IT IS THE SAME TOUCH + this._isOn = false; + + var t1 = +new Date(); + var p1 = [event.pageX, event.pageY]; + var dt = (t1 - this._t0); + var dr = [ + p1[0] - this._p0[0], + p1[1] - this._p0[1] + ]; + var dist = Math.sqrt(dr[0]*dr[0] + dr[1]*dr[1]); + var axis = Math.abs(dr[0]) > Math.abs(dr[1]) ? 'x' : 'y'; + + var o = this._options; + if (o.minDist && dist < o.minDist) { return; } + if (o.maxDist && dist > o.maxDist) { return; } + if (o.minDuration && dt < o.minDuration) { return; } + if (o.maxDuration && dt > o.maxDuration) { return; } + if (o.axis && axis !== o.axis) { return; } + + if (this._options.onEnd) { + this._options.onEnd({ + event: event, + element: this._element, + instance: this, + gesture: this._gesture, + time: this._time, + axis: axis, + overallMovement: dr, + overallTime: dt + }); + } + } + }; + + return Swipe; +}); +/** + * @module Ink.UI.Table_1 + * Sort and paginate tabular data + * @version 1 + */ +Ink.createModule('Ink.UI.Table', '1', ['Ink.Util.Url_1','Ink.UI.Pagination_1','Ink.Net.Ajax_1','Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1','Ink.Util.String_1', 'Ink.Util.Json_1'], function(InkUrl,Pagination, Ajax, Common, Event, Css, Element, Selector, InkArray, InkString, Json) { + 'use strict'; + + var rNumber = /\d/g; + // Turn into a number, if we can. For sorting data which could be numeric or not. + function maybeTurnIntoNumber(value) { + if( !isNaN(value) && rNumber.test(value) ){ + return parseInt(value, 10); + } else if( !isNaN(value) ){ + return parseFloat(value); + } + return value; + } + function cmp (a, b) { + if( a === b ){ + return 0; + } + return ( ( a > b ) ? 1 : -1 ); + } + // cmp function for comparing data which might be a number. + function numberishEnabledCmp (a, b) { + var aValue = maybeTurnIntoNumber(Element.textContent(a)); + var bValue = maybeTurnIntoNumber(Element.textContent(b)); + + return cmp(aValue, bValue); + } + // Object.keys polyfill + function keys(obj) { + if (typeof Object.keys !== 'undefined') { + return Object.keys(obj); + } + var ret = []; + for (var k in obj) if (obj.hasOwnProperty(k)) { + ret.push(k); + } + return ret; + } + + // Most processJSON* functions can just default to this. + function sameSame(obj) { return obj; } + /** + * The Table component transforms the native/DOM table element into a sortable, paginated component. + * + * You can use this component to display data from a JSON endpoint, or + * from table rows in the DOM. Displaying from the DOM is more practical, + * but sometimes you don't want to load everything at once (if you have + * a HUGE table). In those cases, you should configure Ink.UI.Table to + * get data from JSON endpoint. + * + * To enable sorting, just set the `data-sortable` attribute of your table headers (they must be in the `thead` of the table) to "true". + * + * To enable pagination, you should pass either an `Ink.UI.Pagination` instance or a selector to create the Ink.UI.Paginate element on. + * + * @class Ink.UI.Table + * @constructor + * @version 1 + * @param {String|DOMElement} selector + * @param {Object} [options] Options + * @param {Number} [options.pageSize] Number of rows per page. Omit to avoid paginating. + * @param {String} [options.endpoint] Endpoint to get the records via AJAX. Omit if you don't want to do AJAX + * @param {Function} [options.createEndpointUrl] Callback to customise what URL the AJAX endpoint is at. Receives three arguments: base (the "endpoint" option), sort (`{ order: 'asc' or 'desc', field: fieldname }`) and page ({ page: page number, size: items per page }) + * @param {Function} [options.getDataFromEndPoint] Callback to allow the user to retrieve the data himself given an URL. Must accept two arguments: `url` and `callback`. This `callback` will take as a single argument a JavaScript object. + * @param {Function} [options.processJSONRows] Retrieve an array of rows from the data which came from AJAX. + * @param {Function} [options.processJSONHeaders] Get an object with all the headers' names as keys, and a { label, sortable } object as value. Example: `{col1: {label: "Column 1"}, col2: {label: "Column 2", sortable: true}`. Takes a single argument, the JSON response. + * @param {Function} [options.processJSONRow] Process a row object before it gets on the table. + * @param {Function} [options.processJSONField] Process the field data before putting it on the table. You can return HTML, a DOM element, or a string here. Arguments you receive: `(column, fieldData, rowIndex)`. + * @param {Function} [options.processJSONField.FIELD_NAME] The same as processJSONField, but for a particular field. + * @param {Function} [options.processJSONTotalRows] A callback where you have a chance to say how many rows are in the dataset (not only on this page) you have on the collection. You get as an argument the JSON response. + * @param {Function} [options.getSortKey] A function taking a `{ columnIndex, columnName, data, element }` object and returning a value which serves as a sort key for the sorting operation. For example, if you want to sort by a `data-sort-key` atribute, set `getSortKey` to: function (cell) { return cell.element.getAttribute('data-sort-key'); } + * @param {Function} [options.getSortKey.FIELD_NAME] Same as `options.getSortKey`, but for a particular field. + * @param {Object} [options.tdClassNames] An object mapping each field to what classes it gets. Example: `{ name: "large-10", isBoss: "hide-small" }` + * @param {Mixed} [options.pagination] Pagination instance, element or selector. + * @param {Object} [options.paginationOptions] Override the options with which we instantiate the Ink.UI.Pagination. + * @param {Boolean} [options.allowResetSorting] Allow sort order to be set to "none" in addition to "ascending" and "descending" + * @param {String|Array} [options.visibleFields] Set of fields which get shown on the table + * + * @sample Ink_UI_Table_1.html + */ + var Table = function( selector, options ){ + + /** + * Get the root element + */ + this._rootElement = Common.elOrSelector(selector, 'Ink.UI.Table :'); + + if( this._rootElement.nodeName.toLowerCase() !== 'table' ){ + throw new Error('[Ink.UI.Table] :: The element is not a table'); + } + + this._options = Common.options({ + pageSize: ['Integer', null], + caretUpClass: ['String', 'fa fa-caret-up'], + caretDownClass: ['String', 'fa fa-caret-down'], + endpoint: ['String', null], + createEndpointUrl: ['Function', null /* default func uses above option */], + getDataFromEndPoint: ['Function', null /* by default use plain ajax for JSON */], + processJSONRows: ['Function', sameSame], + processJSONRow: ['Function', sameSame], + processJSONField: ['Function', sameSame], + processJSONHeaders: ['Function', function (dt) { return dt.fields; }], + processJSONTotalRows: ['Function', function (dt) { return dt.length || dt.totalRows; }], + getSortKey: ['Function', null], + pagination: ['Element', null], + allowResetSorting: ['Boolean', false], + visibleFields: ['String', null], + tdClassNames: ['Object', {}], + paginationOptions: ['Object', null] + }, options || {}, this._rootElement); + + /** + * Checking if it's in markup mode or endpoint mode + */ + this._markupMode = !this._options.endpoint; + + if( this._options.visibleFields ){ + this._options.visibleFields = this._options.visibleFields.toString().split(/[, ]+/g); + } + + this._thead = this._rootElement.tHead || this._rootElement.createTHead(); + this._headers = Selector.select('th', this._thead); + + /** + * Initializing variables + */ + this._handlers = { + thClick: null + }; + this._originalFields = [ + // field headers from the DOM + ]; + this._sortableFields = { + // Identifies which columns are sorted and how. + // columnIndex: 'none'|'asc'|'desc' + }; + this._originalData = this._data = []; + this._pagination = null; + this._totalRows = 0; + + this._handlers.thClick = Event.observeDelegated(this._rootElement, 'click', + 'thead th[data-sortable="true"]', + Ink.bindMethod(this, '_onThClick')); + + this._init(); + }; + + Table.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function(){ + /** + * If not is in markup mode, we have to do the initial request + * to get the first data and the headers + */ + if( !this._markupMode ) { + /* Endpoint mode */ + this._getData( ); + } else /* Markup mode */ { + this._resetSortOrder(); + this._addHeadersClasses(); + + /** + * Getting the table's data + */ + this._data = Selector.select('tbody tr', this._rootElement); + this._originalData = this._data.slice(0); + + this._totalRows = this._data.length; + + /** + * Set pagination if options tell us to + */ + this._setPagination(); + } + }, + + /** + * Add the classes in this._options.tdClassNames to our table headers. + * @method _addHeadersClasses + * @private + */ + _addHeadersClasses: function () { + var headerLabel; + var classNames; + for (var i = 0, len = this._headers.length; i < len; i++) { + headerLabel = Element.textContent(this._headers[i]); + classNames = this._options.tdClassNames[headerLabel]; + // TODO do not find header labels this way. But how? + if (classNames) { + Css.addClassName(this._headers[i], classNames); + } + } + }, + + /** + * Click handler. This will mainly handle the sorting (when you click in the headers) + * + * @method _onThClick + * @param {Event} event Event obj + * @private + */ + _onThClick: function( event ){ + var tgtEl = Event.element(event), + paginated = this._options.pageSize !== undefined; + + Event.stop(event); + + var index = InkArray.keyValue(tgtEl, this._headers, true); + var sortable = index !== false && this._sortableFields[index] !== undefined; + + if( !sortable ){ + return; + } + + if( !this._markupMode && paginated ){ + this._invertSortOrder(index, false); + } else { + if ( (this._sortableFields[index] === 'desc') && this._options.allowResetSorting ) { + this._setSortOrderOfColumn(index, null); + this._data = this._originalData.slice(0); + } else { + this._invertSortOrder(index, true); + } + + var tbody = Selector.select('tbody',this._rootElement)[0]; + Common.cleanChildren(tbody); + InkArray.each(this._data, Ink.bindMethod(tbody, 'appendChild')); + + if (this._pagination) { + this._pagination.setCurrent(0); + this._paginate(1); + } + } + }, + + _invertSortOrder: function (index, sortAndReverse) { + var isAscending = this._sortableFields[index] === 'asc'; + + for (var i = 0, len = this._headers.length; i < len; i++) { + this._setSortOrderOfColumn(i, null); + } + + if (sortAndReverse) { + this._sort(index); + if (isAscending) { + this._data.reverse(); + } + } + + this._setSortOrderOfColumn(index, !isAscending); + }, + + _setSortOrderOfColumn: function(index, up) { + var header = this._headers[index]; + var caretHtml = ['']; + var order = 'none'; + + if (up === true) { + caretHtml = ['']; + order = 'asc'; + } else if (up === false) { + caretHtml = ['']; + order = 'desc'; + } + + this._sortableFields[index] = order; + header.innerHTML = Element.textContent(header) + caretHtml.join(''); + }, + + /** + * Applies and/or changes the CSS classes in order to show the right columns + * + * @method _paginate + * @param {Number} page Current page + * @private + */ + _paginate: function( page ){ + if (!this._pagination) { return; } + + var pageSize = this._options.pageSize; + + // Hide everything except the items between these indices + var firstIndex = (page - 1) * pageSize; + var lastIndex = firstIndex + pageSize; + + InkArray.each(this._data, function(item, index){ + if (index >= firstIndex && index < lastIndex) { + Css.removeClassName(item,'hide-all'); + } else { + Css.addClassName(item,'hide-all'); + } + }); + + }, + + /* register fields into this._originalFields, whether they come from JSON or a table. + * @method _registerFieldNames + * @private + * @param [names] The field names in an array + **/ + _registerFieldNames: function (names) { + this._originalFields = []; + + InkArray.forEach(names, Ink.bind(function (field) { + if( !this._fieldIsVisible(field) ){ + return; // The user deems this not to be necessary to see. + } + this._originalFields.push(field); + }, this)); + }, + + _fieldIsVisible: function (field) { + return !this._options.visibleFields || + (this._options.visibleFields.indexOf(field) !== -1); + }, + + /** + * Sorts by a specific column. + * + * @method _sort + * @param {Number} index Column number (starting at 0) + * @private + */ + _sort: function( index ){ + // TODO this is THE worst way to declare field names. Incompatible with i18n and a lot of other things. + var fieldName = Element.textContent(this._headers[index]); + var keyFunction = this._options.getSortKey; + + if (keyFunction) { + keyFunction = + typeof keyFunction[fieldName] === 'function' ? + keyFunction[fieldName] : + typeof keyFunction === 'function' ? + keyFunction : + null; + } + + var self = this; + + this._data.sort(function (trA, trB) { + var elementA = Ink.ss('td', trA)[index]; + var elementB = Ink.ss('td', trB)[index]; + if (keyFunction) { + return cmp(userKey(elementA), userKey(elementB)); + } else { + return numberishEnabledCmp(elementA, elementB, index); + } + }); + + function userKey(element) { + return keyFunction.call(self, { + columnIndex: index, + columnName: fieldName, + data: Element.textContent(element), + element: element + }); + } + }, + + /** + * Assembles the headers markup + * + * @method _createHeadersFromJson + * @param {Object} headers Key-value object that contains the fields as keys, their configuration (label and sorting ability) as value + * @private + */ + _createHeadersFromJson: function( headers ){ + this._registerFieldNames(keys(headers)); + + if (this._thead.children.length) { return; } + + var tr = this._thead.insertRow(0); + var th; + + for (var i = 0, len = headers.length; i < len; i++) { + if (this._fieldIsVisible(headers[i])) { + th = Element.create('th'); + th = this._createSingleHeaderFromJson(headers[i], th); + tr.appendChild(th); + this._headers.push(th); + } + } + }, + + _createSingleHeaderFromJson: function (header, th) { + if (header.sortable) { + th.setAttribute('data-sortable','true'); + } + + if (header.label){ + Element.setTextContent(th, header.label); + } + + return th; + }, + + /** + * Reset the sort order as marked on the table headers to "none" + * + * @method _resetSortOrder + * @private + */ + _resetSortOrder: function(){ + /** + * Setting the sortable columns and its event listeners + */ + for (var i = 0, len = this._headers.length; i < len; i++) { + var dataset = Element.data( this._headers[i] ); + if (dataset.sortable && dataset.sortable.toString() === 'true') { + this._sortableFields[i] = 'none'; + } + } + }, + + /** + * This method gets the rows from AJAX and places them as and + * + * @method _createRowsFromJSON + * @param {Object} rows Array of objects with the data to be showed + * @private + */ + _createRowsFromJSON: function( rows ){ + var tbody = Selector.select('tbody',this._rootElement)[0]; + + if( !tbody ){ + tbody = document.createElement('tbody'); + this._rootElement.appendChild( tbody ); + } else { + Element.setHTML(tbody, ''); + } + + this._data = []; + var row; + + for (var trIndex in rows) { + if (rows.hasOwnProperty(trIndex)) { + row = this._options.processJSONRow(rows[trIndex]); + this._createSingleRowFromJson(tbody, row, trIndex); + } + } + + this._originalData = this._data.slice(0); + }, + + _createSingleRowFromJson: function (tbody, row, rowIndex) { + var tr = document.createElement('tr'); + tbody.appendChild( tr ); + for( var field in row ){ + if (row.hasOwnProperty(field)) { + this._createFieldFromJson(tr, row[field], field, rowIndex); + } + } + this._data.push(tr); + }, + + _createFieldFromJson: function (tr, fieldData, fieldName, rowIndex) { + if (!this._fieldIsVisible(fieldName)) { return; } + + var processor = + this._options.processJSONField[fieldName] || // per-field callback + this._options.processJSONField; // generic callback + + var result; + if (typeof processor === 'function') { + result = processor(fieldData, fieldName, rowIndex); + } else { + result = fieldData; + } + var elm = this._elOrFieldData(result); + + var className = this._options.tdClassNames[fieldName]; + if (className) { + Css.addClassName(elm, className); + } + + tr.appendChild(elm); + }, + + _elOrFieldData: function (processed) { + if (Common.isDOMElement(processed)) { + return processed; + } + + var isString = typeof processed === 'string'; + var isNumber = typeof processed === 'number'; + var elm = Element.create('td'); + + if (isString && /^\s*? + * + * By applying this UI class to the above input, you get a tag field with the tags "initial" and "value". The class preserves the original input element. It remains hidden and is updated with new tag information dynamically, so regular HTML form logic still applies. + * + * Below "input" refers to the current value of the input tag (updated as the user enters text, of course), and "output" refers to the value which this class writes back to said input tag. + * + * @class Ink.UI.TagField + * @version 1 + * @constructor + * @param {String|DOMElement} element Selector or DOM Input Element. + * @param {Object} [options] Options object + * @param {String|Array} [options.tags] Initial tags in the input + * @param {Boolean} [options.allowRepeated] Flag to allow user to input several tags. Defaults to true. + * @param {RegExp} [options.separator] Split the input by this RegExp. Defaults to /[,;(space)]+/g (spaces, commas and semicolons) + * @param {String} [options.outSeparator] Use this string to separate each tag from the next in the output. Defaults to ','. + * @param {Boolean} [options.autoSplit] Flag to activate tag creation when the user types a separator. Defaults to true. + * @param {Integer} [options.maxTags] Maximum number of tags allowed. Set to -1 for no limit. Defaults to -1. + * @example + */ + function TagField(element, options) { + this.init(element, options); + } + + TagField.prototype = { + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + init: function(element, options) { + element = this._element = Common.elOrSelector(element, 'Ink.UI.TagField'); + var o = this._options = Common.options('Ink.UI.TagField', { + tags: ['String', []], + tagQuery: ['Object', null], + tagQueryAsync: ['Object', null], + allowRepeated: ['Boolean', false], + maxTags: ['Integer', -1], + outSeparator: ['String', ','], + separator: ['String', /[,; ]+/g], + autoSplit: ['Boolean', true] + }, options || {}, this._element); + + if (typeof o.separator === 'string') { + o.separator = new RegExp(o.separator, 'g'); + } + + if (typeof o.tags === 'string') { + // coerce to array using the separator + o.tags = this._readInput(o.tags); + } + + Css.addClassName(this._element, 'hide-all'); + + this._viewElm = InkElement.create('div', { + className: 'ink-tagfield', + insertAfter: this._element + }); + + this._input = InkElement.create('input', { + type: 'text', + className: 'new-tag-input', + insertBottom: this._viewElm + }); + + var tags = [].concat(o.tags, this._tagsFromMarkup(this._element)); + + this._tags = []; + + InkArray.each(tags, Ink.bindMethod(this, '_addTag')); + + InkEvent.observe(this._input, 'keyup', Ink.bindEvent(this._onKeyUp, this)); + InkEvent.observe(this._input, 'change', Ink.bindEvent(this._onKeyUp, this)); + InkEvent.observe(this._input, 'keydown', Ink.bindEvent(this._onKeyDown, this)); + InkEvent.observe(this._input, 'blur', Ink.bindEvent(this._onBlur, this)); + InkEvent.observe(this._viewElm, 'click', Ink.bindEvent(this._refocus, this)); + }, + + destroy: function () { + InkElement.remove(this._viewElm); + Css.removeClassName(this._element, 'hide-all'); + }, + + _tagsFromMarkup: function (element) { + var tagname = element.tagName.toLowerCase(); + if (tagname === 'input') { + return this._readInput(element.value); + } else if (tagname === 'select') { + return InkArray.map(element.getElementsByTagName('option'), function (option) { + return InkElement.textContent(option); + }); + } else { + throw new Error('Cannot read tags from a ' + tagname + ' tag. Unknown tag'); + } + }, + + _tagsToMarkup: function (tags, element) { + var tagname = element.tagName.toLowerCase(); + if (tagname === 'input') { + if (this._options.separator) { + element.value = tags.join(this._options.outSeparator); + } + } else if (tagname === 'select') { + element.innerHTML = ''; + InkArray.each(tags, function (tag) { + var opt = InkElement.create('option', {selected: 'selected'}); + InkElement.setTextContent(opt, tag); + element.appendChild(opt); + }); + } else { + throw new Error('TagField: Cannot read tags from a ' + tagname + ' tag. Unknown tag'); + } + }, + + _addTag: function (tag) { + if (this._options.maxTags !== -1 && + this._tags.length >= this._options.maxTags) { + return; + } + if ((!this._options.allowRepeated && + InkArray.inArray(tag, this._tags, tag)) || !tag) { + return false; + } + var elm = InkElement.create('span', { + className: 'ink-tag', + setTextContent: tag + ' ' + }); + + var remove = InkElement.create('span', { + className: 'remove fa fa-times', + insertBottom: elm + }); + InkEvent.observe(remove, 'click', Ink.bindEvent(this._removeTag, this, null)); + + var spc = document.createTextNode(' '); + + this._tags.push(tag); + this._viewElm.insertBefore(elm, this._input); + this._viewElm.insertBefore(spc, this._input); + this._tagsToMarkup(this._tags, this._element); + }, + + _readInput: function (text) { + if (this._options.separator) { + return InkArray.filter(text.split(this._options.separator), isTruthy); + } else { + return [text]; + } + }, + + _onKeyUp: function () { // TODO control input box size + if (!this._options.autoSplit) { + return; + } + var split = this._input.value.split(this._options.separator); + if (split.length <= 1) { + return; + } + var last = split[split.length - 1]; + split = split.splice(0, split.length - 1); + split = InkArray.filter(split, isTruthy); + + InkArray.each(split, Ink.bind(this._addTag, this)); + this._input.value = last; + }, + + _onKeyDown: function (event) { + if (event.which === enterKey) { + return this._onEnterKeyDown(event); + } else if (event.which === backspaceKey) { + return this._onBackspaceKeyDown(); + } else if (this._removeConfirm) { + // user pressed another key, cancel removal from a backspace key + this._unsetRemovingVisual(this._tags.length - 1); + } + }, + + /** + * When the user presses backspace twice on the empty input, we delete the last tag on the field. + * @method onBackspaceKeyDown + * @private + */ + _onBackspaceKeyDown: function () { + if (this._input.value) { return; } + + if (this._removeConfirm) { + this._unsetRemovingVisual(this._tags.length - 1); + this._removeTag(this._tags.length - 1); + this._removeConfirm = null; + } else { + this._setRemovingVisual(this._tags.length - 1); + } + }, + + _onEnterKeyDown: function (event) { + var tag = this._input.value; + if (tag) { + this._addTag(tag); + this._input.value = ''; + } + InkEvent.stopDefault(event); + }, + + _onBlur: function () { + this._addTag(this._input.value); + this._input.value = ''; + }, + + /* For when the user presses backspace. + * Set the style of the tag so that it seems like it's going to be removed + * if they press backspace again. */ + _setRemovingVisual: function (tagIndex) { + var elm = this._viewElm.children[tagIndex]; + Css.addClassName(elm, 'tag-deleting'); + + this._removeRemovingVisualTimeout = setTimeout(Ink.bindMethod(this, '_unsetRemovingVisual', tagIndex), 4000); + InkEvent.observe(this._input, 'blur', Ink.bindMethod(this, '_unsetRemovingVisual', tagIndex)); + this._removeConfirm = true; + }, + _unsetRemovingVisual: function (tagIndex) { + var elm = this._viewElm.children[tagIndex]; + if (elm) { + Css.removeClassName(elm, 'tag-deleting'); + clearTimeout(this._removeRemovingVisualTimeout); + } + this._removeConfirm = null; + }, + + _removeTag: function (event) { + var index; + if (typeof event === 'object') { // click event on close button + var elm = InkEvent.element(event).parentNode; + index = InkElement.parentIndexOf(this._viewElm, elm); + } else if (typeof event === 'number') { // manual removal + index = event; + } + this._tags = InkArray.remove(this._tags, index, 1); + InkElement.remove(this._viewElm.children[index]); + this._tagsToMarkup(this._tags, this._element); + }, + + _refocus: function (event) { + this._input.focus(); + InkEvent.stop(event); + return false; + } + }; + return TagField; +}); +/** + * @module Ink.UI.Toggle_1 + * Toggle the visibility of elements. + * @version 1 + */ + + Ink.createModule('Ink.UI.Toggle', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1'], function(Common, InkEvent, Css, InkElement, Selector, InkArray ) { + 'use strict'; + + /** + * + * You need two elements to use Toggle: the `trigger` element, and the `target` element (or elements). The default behaviour is to toggle the `target`(s) when you click the `trigger`. + * + * The toggle has a state. It is either "on" or "off". It works by switching between the CSS classes in `classNameOn` and `classNameOff` according to the current state. + * + * When you initialize the Toggle, it will check if the targets are visible to figure out what the initial state is. You can force the toggle to consider itself turned "on" or "off" by setting the `initialState` option to `true` or `false`, respectively. + * + * You can get the current state of the Toggle by calling `getState`, or by checking if your `trigger` element has the "active" class. + * The state can be changed through JavaScript. Just call `setState(true)` + * to turn the Toggle on (or `setState(false)` to turn it off). + * + * @class Ink.UI.Toggle + * @constructor + * @version 1 + * @param {String|DOMElement} selector Trigger element. By clicking this, the target (or targets) are triggered. + * @param {Object} [options] Options object, containing: + * + * @param {String} options.target CSS Selector that specifies the elements that this component will toggle + * @param {String} [options.classNameOn] CSS class to toggle when on. Defaults to 'show-all'. + * @param {String} [options.classNameOff] CSS class to toggle when off. Defaults to 'hide-all'. + * @param {String} [options.triggerEvent] Event that will trigger the toggling. Defaults to 'click'. + * @param {Boolean} [options.closeOnClick] Flag to toggle the targe off when clicking outside the toggled content. Defaults to true. + * @param {String} [options.closeOnInsideClick] Toggle off when an element matching this selector is clicked. Set to null to deactivate the check. Defaults to 'a[href]'. + * @param {Boolean} [options.initialState] Flag to define initial state. false: off, true: on, null: markup. Defaults to null. + * @param {Function} [options.onChangeState] Callback when the toggle state changes. Return `false` to cancel the event. + * + * @sample Ink_UI_Toggle_1_constructor.html + */ + var Toggle = function( selector, options ){ + this._rootElement = Common.elOrSelector(selector, '[Ink.UI.Toggle root element]:'); + + this._options = Ink.extendObj({ + target : undefined, + triggerEvent: 'click', + closeOnClick: true, + isAccordion: false, + initialState: null, + classNameOn: 'show-all', + classNameOff: 'hide-all', + togglesDisplay: null, + closeOnInsideClick: 'a[href]', // closes the toggle when a target is clicked and it is a link + onChangeState: null + }, options || {}, InkElement.data(this._rootElement)); + + this._targets = Common.elsOrSelector(this._options.target, 'Ink.UI.Toggle target option'); + + // Boolean option handling + this._options.closeOnClick = this._options.closeOnClick.toString() === 'true'; + // Actually a throolean + if (this._options.initialState !== null){ + this._options.initialState = this._options.initialState.toString() === 'true'; + } else { + this._options.initialState = Css.getStyle(this._targets[0], 'display') !== 'none'; + } + + if (this._options.classNameOn !== 'show-all' || this._options.classNameOff !== 'hide-all') { + for (var i = 0, len = this._targets.length; i < len; i++) { + Css.removeClassName(this._targets[i], 'show-all'); + Css.removeClassName(this._targets[i], 'hide-all'); + } + } + + this._init(); + }; + + Toggle.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function(){ + this._accordion = ( Css.hasClassName(this._rootElement.parentNode,'accordion') || Css.hasClassName(this._targets[0].parentNode,'accordion') ); + + this._firstTime = true; + + this._bindEvents(); + + if (this._options.initialState !== null) { + this.setState(this._options.initialState, true); + } else { + // Add initial classes matching the current "display" of the object. + var state = Css.getStyle(this._targets[0], 'display') !== 'none'; + this.setState(state, true); + } + // Aditionally, remove any inline "display" style. + for (var i = 0, len = this._targets.length; i < len; i++) { + if (this._targets[i].style.display) { + this._targets[i].style.display = ''; // becomes default + } + } + + this._rootElement.setAttribute('data-is-toggle-trigger', 'true'); + }, + + /** + * @method _bindEvents + * @private + */ + _bindEvents: function () { + if ( this._options.triggerEvent ) { + InkEvent.observe( + this._rootElement, + this._options.triggerEvent, + Ink.bind(this._onTriggerEvent, this)); + } + if( this._options.closeOnClick ){ + InkEvent.observe( document, 'click', Ink.bind(this._onOutsideClick, this)); + } + if( this._options.closeOnInsideClick && this._options.closeOnInsideClick !== 'false') { + var sel = this._options.closeOnInsideClick; + if (sel.toString() === 'true') { + sel = '*'; + } + InkEvent.observeMulti(this._targets, 'click', Ink.bind(function (e) { + if ( InkElement.findUpwardsBySelector(InkEvent.element(e), sel) ) { + this.setState(false, true); + } + }, this)); + } + }, + + /** + * Event handler. It's responsible for handling the `triggerEvent` as defined in the options. + * + * This will trigger the toggle. + * + * @method _onTriggerEvent + * @param {Event} event + * @private + */ + _onTriggerEvent: function( event ){ + // When the togglee is a child of the toggler, we get the togglee's events here. We have to check that this event is for us. + var target = InkEvent.element(event); + + var isAncestorOfClickedElement = InkArray.some(this._targets, function (thisOne) { + return thisOne === target || InkElement.isAncestorOf(thisOne, target); + }); + + if (isAncestorOfClickedElement) { + return; + } + + if (this._accordion) { + this._updateAccordion(); + } + + var has = this.getState(); + this.setState(!has, true); + if (!has && this._firstTime) { + this._firstTime = false; + } + + InkEvent.stopDefault(event); + }, + + /** + * Be compatible with accordions + * + * @method _updateAccordion + **/ + _updateAccordion: function () { + var elms, accordionElement; + if( Css.hasClassName(this._targets[0].parentNode,'accordion') ){ + accordionElement = this._targets[0].parentNode; + } else { + accordionElement = this._targets[0].parentNode.parentNode; + } + elms = Selector.select('.toggle, .ink-toggle',accordionElement); + for(var i=0; i 0) && (targetElm[0] !== this._targets[0]) ){ + targetElm[0].style.display = 'none'; + } + } + }, + + /** + * Click handler. Will handle clicks outside the toggle component. + * + * @method _onOutsideClick + * @param {Event} event + * @private + */ + _onOutsideClick: function( event ){ + var tgtEl = InkEvent.element(event), + shades; + + if (InkElement.findUpwardsBySelector(tgtEl, '[data-is-toggle-trigger="true"]')) return; + + var ancestorOfTargets = InkArray.some(this._targets, function (target) { + return InkElement.isAncestorOf(target, tgtEl) || target === tgtEl; + }); + + if( (this._rootElement === tgtEl) || InkElement.isAncestorOf(this._rootElement, tgtEl) || ancestorOfTargets) { + return; + } else if( (shades = Ink.ss('.ink-shade')).length ) { + var shadesLength = shades.length; + + for( var i = 0; i < shadesLength; i++ ){ + if( InkElement.isAncestorOf(shades[i],tgtEl) && InkElement.isAncestorOf(shades[i],this._rootElement) ){ + return; + } + } + } + + this.setState(false, true); // dismiss + }, + + /** + * Sets the state of the toggle. (on/off) + * + * @method setState + * @param newState {Boolean} New state (on/off) + */ + setState: function (on, callHandler) { + if (on === this.getState()) { return; } + if (callHandler && typeof this._options.onChangeState === 'function') { + var ret = this._options.onChangeState(on); + if (ret === false) { return false; } // Canceled by the event handler + } + for (var i = 0, len = this._targets.length; i < len; i++) { + Css.addRemoveClassName(this._targets[i], this._options.classNameOn, on); + Css.addRemoveClassName(this._targets[i], this._options.classNameOff, !on); + } + Css.addRemoveClassName(this._rootElement, 'active', on); + }, + + /** + * Gets the state of the toggle. (on/off) + * + * @method getState + * + * @return {Boolean} whether the toggle is toggled on. + */ + getState: function () { + return Css.hasClassName(this._rootElement, 'active'); + } + }; + + return Toggle; +}); +/** + * @module Ink.UI.Tooltip_1 + * Content Tooltips + * @version 1 + */ +Ink.createModule('Ink.UI.Tooltip', '1', ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1', 'Ink.Dom.Selector_1', 'Ink.Util.Array_1', 'Ink.Dom.Css_1', 'Ink.Dom.Browser_1'], function (Common, InkEvent, InkElement, Selector, InkArray, Css) { + 'use strict'; + + /** + * Tooltips are useful as a means to display information about functionality while avoiding clutter. + * + * Tooltips show up when you hover elements which "have" tooltips. + * + * This class will "give" a tooltip to many elements, selected by its first argument (`target`). This is contrary to the other UI modules in Ink, which are created once per element. + * + * You can define options either through the second argument of the Tooltip constructor, or as data-attributes in each `target` element. Options set through data-attributes all start with "data-tip", and override options passed into the Tooltip constructor. + * + * @class Ink.UI.Tooltip + * @constructor + * + * @param {DOMElement|String} target Target element or selector of elements, to display the tooltips on. + * @param {Object} [options] Options object + * @param {String} [options.text] Text content for the tooltip. + * @param {String} [options.html] HTML for the tooltip. Same as above, but won't escape HTML. + * @param {String} [options.where] Positioning for the tooltip. Options are 'up', 'down', 'left', 'right', 'mousemove' (follows the cursor), and 'mousefix' (stays fixed). Defaults to 'up'. + * + * @param {String} [options.color] Color of the tooltip. Options are red, orange, blue, green and black. Default is white. + * @param {Number} [options.fade] Number of seconds to fade in/out. Defaults to 0.3. + * @param {Boolean} [options.forever] Flag to prevent the tooltip from being erased when the mouse hovers away from the target. + * @param {Number} [options.timeout] Number of seconds the tooltip will stay open. Useful together with options.forever. Defaults to 0. + * @param {Number} [options.delay] Time the tooltip waits until it is displayed. Useful to avoid getting the attention of the user unnecessarily + * @param {DOMElement|Selector} [options.template] Element or selector containing HTML to be cloned into the tooltips. Can be a hidden element, because CSS `display` is set to `block`. + * @param {String} [options.templatefield] Selector within the template element to choose where the text is inserted into the tooltip. Useful when a wrapper DIV is required. + * @param {Number} [options.left] Spacing from the target to the tooltip, when `where` is `mousemove` or `mousefix`. Defaults to 10. + * @param {Number} [options.top] Spacing from the target to the tooltip, when `where` is `mousemove` or `mousefix`. Defaults to 10. + * @param {Number} [options.spacing] Spacing between the tooltip and the target element, when `where` is not `mousemove` or `mousefix`. Defaults to 8. + * + * @sample Ink_UI_Tooltip_1.html + */ + function Tooltip(element, options) { + this._init(element, options || {}); + } + + function EachTooltip(root, elm) { + this._init(root, elm); + } + + var transitionDurationName, + transitionPropertyName, + transitionTimingFunctionName; + (function () { // Feature detection + var test = document.createElement('DIV'); + var names = ['transition', 'oTransition', 'msTransition', 'mozTransition', + 'webkitTransition']; + for (var i = 0; i < names.length; i++) { + if (typeof test.style[names[i] + 'Duration'] !== 'undefined') { + transitionDurationName = names[i] + 'Duration'; + transitionPropertyName = names[i] + 'Property'; + transitionTimingFunctionName = names[i] + 'TimingFunction'; + break; + } + } + }()); + + // Body or documentElement + var bodies = document.getElementsByTagName('body'); + var body = bodies.length ? bodies[0] : document.documentElement; + + Tooltip.prototype = { + _init: function(element, options) { + var elements; + + this.options = Ink.extendObj({ + where: 'up', + zIndex: 10000, + left: 10, + top: 10, + spacing: 8, + forever: 0, + color: '', + timeout: 0, + delay: 0, + template: null, + templatefield: null, + fade: 0.3, + text: '' + }, options || {}); + + if (typeof element === 'string') { + elements = Selector.select(element); + } else if (typeof element === 'object') { + elements = [element]; + } else { + throw 'Element expected'; + } + + this.tooltips = []; + + for (var i = 0, len = elements.length; i < len; i++) { + this.tooltips[i] = new EachTooltip(this, elements[i]); + } + }, + /** + * Destroys the tooltips created by this instance + * + * @method destroy + */ + destroy: function () { + InkArray.each(this.tooltips, function (tooltip) { + tooltip._destroy(); + }); + this.tooltips = null; + this.options = null; + } + }; + + EachTooltip.prototype = { + _oppositeDirections: { + left: 'right', + right: 'left', + up: 'down', + down: 'up' + }, + _init: function(root, elm) { + InkEvent.observe(elm, 'mouseover', Ink.bindEvent(this._onMouseOver, this)); + InkEvent.observe(elm, 'mouseout', Ink.bindEvent(this._onMouseOut, this)); + InkEvent.observe(elm, 'mousemove', Ink.bindEvent(this._onMouseMove, this)); + + this.root = root; + this.element = elm; + this._delayTimeout = null; + this.tooltip = null; + }, + _makeTooltip: function (mousePosition) { + if (!this._getOpt('text') && + !this._getOpt('html') && + !InkElement.hasAttribute(this.element, 'title')) { + return false; + } + + var tooltip = this._createTooltipElement(); + + if (this.tooltip) { + this._removeTooltip(); + } + + this.tooltip = tooltip; + + this._fadeInTooltipElement(tooltip); + this._placeTooltipElement(tooltip, mousePosition); + + InkEvent.observe(tooltip, 'mouseover', Ink.bindEvent(this._onTooltipMouseOver, this)); + + var timeout = this._getFloatOpt('timeout'); + if (timeout) { + setTimeout(Ink.bind(function () { + if (this.tooltip === tooltip) { + this._removeTooltip(); + } + }, this), timeout * 1000); + } + }, + _createTooltipElement: function () { + var template = this._getOpt('template'), // User template instead of our HTML + templatefield = this._getOpt('templatefield'), + + tooltip, // The element we float + field; // Element where we write our message. Child or same as the above + + if (template) { // The user told us of a template to use. We copy it. + var temp = document.createElement('DIV'); + temp.innerHTML = Common.elOrSelector(template, 'options.template').outerHTML; + tooltip = temp.firstChild; + + if (templatefield) { + field = Selector.select(templatefield, tooltip); + if (field) { + field = field[0]; + } else { + throw 'options.templatefield must be a valid selector within options.template'; + } + } else { + field = tooltip; // Assume same element if user did not specify a field + } + } else { // We create the default structure + tooltip = document.createElement('DIV'); + Css.addClassName(tooltip, 'ink-tooltip'); + Css.addClassName(tooltip, this._getOpt('color')); + + field = document.createElement('DIV'); + Css.addClassName(field, 'content'); + + tooltip.appendChild(field); + } + + if (this._getOpt('html')) { + field.innerHTML = this._getOpt('html'); + } else if (this._getOpt('text')) { + InkElement.setTextContent(field, this._getOpt('text')); + } else { + InkElement.setTextContent(field, this.element.getAttribute('title')); + } + tooltip.style.display = 'block'; + tooltip.style.position = 'absolute'; + tooltip.style.zIndex = this._getIntOpt('zIndex'); + + return tooltip; + }, + _fadeInTooltipElement: function (tooltip) { + var fadeTime = this._getFloatOpt('fade'); + if (transitionDurationName && fadeTime) { + tooltip.style.opacity = '0'; + tooltip.style[transitionDurationName] = fadeTime + 's'; + tooltip.style[transitionPropertyName] = 'opacity'; + tooltip.style[transitionTimingFunctionName] = 'ease-in-out'; + setTimeout(function () { + tooltip.style.opacity = '1'; + }, 0); // Wait a tick + } + }, + _placeTooltipElement: function (tooltip, mousePosition) { + var where = this._getOpt('where'); + + if (where === 'mousemove' || where === 'mousefix') { + var mPos = mousePosition; + this._setPos(mPos[0], mPos[1]); + body.appendChild(tooltip); + } else if (where.match(/(up|down|left|right)/)) { + body.appendChild(tooltip); + var targetElementPos = InkElement.offset(this.element); + var tleft = targetElementPos[0], + ttop = targetElementPos[1]; + + var centerh = (InkElement.elementWidth(this.element) / 2) - (InkElement.elementWidth(tooltip) / 2), + centerv = (InkElement.elementHeight(this.element) / 2) - (InkElement.elementHeight(tooltip) / 2); + var spacing = this._getIntOpt('spacing'); + + var tooltipDims = InkElement.elementDimensions(tooltip); + var elementDims = InkElement.elementDimensions(this.element); + + var maxX = InkElement.scrollWidth() + InkElement.viewportWidth(); + var maxY = InkElement.scrollHeight() + InkElement.viewportHeight(); + + where = this._getWhereValueInsideViewport(where, { + left: tleft - tooltipDims[0], + right: tleft + tooltipDims[0], + top: ttop + tooltipDims[1], + bottom: ttop + tooltipDims[1] + }, { + right: maxX, + bottom: maxY + }); + + if (where === 'up') { + ttop -= tooltipDims[1]; + ttop -= spacing; + tleft += centerh; + } else if (where === 'down') { + ttop += elementDims[1]; + ttop += spacing; + tleft += centerh; + } else if (where === 'left') { + tleft -= tooltipDims[0]; + tleft -= spacing; + ttop += centerv; + } else if (where === 'right') { + tleft += elementDims[0]; + tleft += spacing; + ttop += centerv; + } + + var arrow = null; + if (where.match(/(up|down|left|right)/)) { + arrow = document.createElement('SPAN'); + Css.addClassName(arrow, 'arrow'); + Css.addClassName(arrow, this._oppositeDirections[where]); + tooltip.appendChild(arrow); + } + + var tooltipLeft = tleft; + var tooltipTop = ttop; + + var toBottom = (tooltipTop + tooltipDims[1]) - maxY; + var toRight = (tooltipLeft + tooltipDims[0]) - maxX; + var toLeft = 0 - tooltipLeft; + var toTop = 0 - tooltipTop; + + if (toBottom > 0) { + if (arrow) { arrow.style.top = (tooltipDims[1] / 2) + toBottom + 'px'; } + tooltipTop -= toBottom; + } else if (toTop > 0) { + if (arrow) { arrow.style.top = (tooltipDims[1] / 2) - toTop + 'px'; } + tooltipTop += toTop; + } else if (toRight > 0) { + if (arrow) { arrow.style.left = (tooltipDims[0] / 2) + toRight + 'px'; } + tooltipLeft -= toRight; + } else if (toLeft > 0) { + if (arrow) { arrow.style.left = (tooltipDims[0] / 2) - toLeft + 'px'; } + tooltipLeft += toLeft; + } + + tooltip.style.left = tooltipLeft + 'px'; + tooltip.style.top = tooltipTop + 'px'; + } + }, + + /** + * Get a value for "where" (left/right/up/down) which doesn't put the + * tooltip off the screen + * + * @method _getWhereValueInsideViewport + * @param where {String} "where" value which was given by the user and we might change + * @param bbox {BoundingBox} A bounding box like what you get from getBoundingClientRect ({top, bottom, left, right}) with pixel positions from the top left corner of the viewport. + * @param viewport {BoundingBox} Bounding box for the viewport. "top" and "left" are omitted because these coordinates are relative to the top-left corner of the viewport so they are zero. + * + * @TODO: we can't use getBoundingClientRect in this case because it returns {0,0,0,0} on our uncreated tooltip. + */ + _getWhereValueInsideViewport: function (where, bbox, viewport) { + if (where === 'left' && bbox.left < 0) { + return 'right'; + } else if (where === 'right' && bbox.right > viewport.right) { + return 'left'; + } else if (where === 'up' && bbox.top < 0) { + return 'down'; + } else if (where === 'down' && bbox.bottom > viewport.bottom) { + return 'up'; + } + + return where; + }, + _removeTooltip: function() { + var tooltip = this.tooltip; + if (!tooltip) {return;} + + var remove = Ink.bind(InkElement.remove, {}, tooltip); + + if (this._getOpt('where') !== 'mousemove' && transitionDurationName) { + tooltip.style.opacity = 0; + // remove() will operate on correct tooltip, although this.tooltip === null then + setTimeout(remove, this._getFloatOpt('fade') * 1000); + } else { + remove(); + } + this.tooltip = null; + }, + _getOpt: function (option) { + var dataAttrVal = InkElement.data(this.element)[InkElement._camelCase('tip-' + option)]; + if (dataAttrVal /* either null or "" may signify the absense of this attribute*/) { + return dataAttrVal; + } + var instanceOption = this.root.options[option]; + if (typeof instanceOption !== 'undefined') { + return instanceOption; + } + }, + _getIntOpt: function (option) { + return parseInt(this._getOpt(option), 10); + }, + _getFloatOpt: function (option) { + return parseFloat(this._getOpt(option), 10); + }, + _destroy: function () { + if (this.tooltip) { + InkElement.remove(this.tooltip); + } + this.root = null; // Cyclic reference = memory leaks + this.element = null; + this.tooltip = null; + }, + _onMouseOver: function(e) { + // on IE < 10 you can't access the mouse event not even a tick after it fired + var mousePosition = this._getMousePosition(e); + var delay = this._getFloatOpt('delay'); + if (delay) { + this._delayTimeout = setTimeout(Ink.bind(function () { + if (!this.tooltip) { + this._makeTooltip(mousePosition); + } + this._delayTimeout = null; + }, this), delay * 1000); + } else { + this._makeTooltip(mousePosition); + } + }, + _onMouseMove: function(e) { + if (this._getOpt('where') === 'mousemove' && this.tooltip) { + var mPos = this._getMousePosition(e); + this._setPos(mPos[0], mPos[1]); + } + }, + _onMouseOut: function () { + if (!this._getIntOpt('forever')) { + this._removeTooltip(); + } + if (this._delayTimeout) { + clearTimeout(this._delayTimeout); + this._delayTimeout = null; + } + }, + _onTooltipMouseOver: function () { + if (this.tooltip) { // If tooltip is already being removed, this has no effect + this._removeTooltip(); + } + }, + _setPos: function(left, top) { + left += this._getIntOpt('left'); + top += this._getIntOpt('top'); + var pageDims = this._getPageXY(); + if (this.tooltip) { + var elmDims = [InkElement.elementWidth(this.tooltip), InkElement.elementHeight(this.tooltip)]; + var scrollDim = this._getScroll(); + + if((elmDims[0] + left - scrollDim[0]) >= (pageDims[0] - 20)) { + left = (left - elmDims[0] - this._getIntOpt('left') - 10); + } + if((elmDims[1] + top - scrollDim[1]) >= (pageDims[1] - 20)) { + top = (top - elmDims[1] - this._getIntOpt('top') - 10); + } + + this.tooltip.style.left = left + 'px'; + this.tooltip.style.top = top + 'px'; + } + }, + _getPageXY: function() { + var cWidth = 0; + var cHeight = 0; + if( typeof( window.innerWidth ) === 'number' ) { + cWidth = window.innerWidth; + cHeight = window.innerHeight; + } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { + cWidth = document.documentElement.clientWidth; + cHeight = document.documentElement.clientHeight; + } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { + cWidth = document.body.clientWidth; + cHeight = document.body.clientHeight; + } + return [parseInt(cWidth, 10), parseInt(cHeight, 10)]; + }, + _getScroll: function() { + var dd = document.documentElement, db = document.body; + if (dd && (dd.scrollLeft || dd.scrollTop)) { + return [dd.scrollLeft, dd.scrollTop]; + } else if (db) { + return [db.scrollLeft, db.scrollTop]; + } else { + return [0, 0]; + } + }, + _getMousePosition: function(e) { + return [parseInt(InkEvent.pointerX(e), 10), parseInt(InkEvent.pointerY(e), 10)]; + } + }; + + return Tooltip; +}); +/** + * @module Ink.UI.TreeView_1 + * Elements in a tree structure + * @version 1 + */ +Ink.createModule('Ink.UI.TreeView', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1'], function(Common, Event, Css, Element, Selector, InkArray ) { + 'use strict'; + + + /** + * Shows elements in a tree structure which can be expanded and contracted. + * A TreeView is built with "node"s and "children". "node"s are `li` tags, and "children" are `ul` tags. + * You can build your TreeView out of a regular UL and LI element structure which you already use to display lists with several levels. + * If you want a node to be open when the TreeView is built, just add the data-open="true" attribute to it. + * + * @class Ink.UI.TreeView + * @constructor + * @version 1 + * @param {String|DOMElement} selector Element or selector. + * @param {String} [options] Options object, containing: + * @param {String} [options.node] Selector for the nodes. Defaults to 'li'. + * @param {String} [options.children] Selector for the children. Defaults to 'ul'. + * @param {String} [options.parentClass] CSS classes to be added to parent nodes. Defaults to 'parent'. + * @param {String} [options.openClass] CSS classes to be added to the icon when a parent is open. Defaults to 'fa fa-minus-circle'. + * @param {String} [options.closedClass] CSS classes to be added to the icon when a parent is closed. Defaults to 'fa fa-plus-circle'. + * @param {String} [options.hideClass] CSS Class to toggle visibility of the children. Defaults to 'hide-all'. + * @param {String} [options.iconTag] The name of icon tag. The component tries to find a tag with that name as a direct child of the node. If it doesn't find it, it creates it. Defaults to 'i'. + * @param {Boolean} [options.stopDefault] Flag to stops the default behavior of the click handler. Defaults to true. + * @example + * + * + * + * @sample Ink_UI_TreeView_1.html + */ + var TreeView = function(selector, options){ + this._element = Common.elOrSelector(selector, '[Ink.UI.TreeView_1]'); + + this._options = Common.options('Treeview', { + 'node': ['String', 'li'], + // [3.0.1] Deprecate this terrible, terrible name + 'child': ['String',null], + 'children': ['String','ul'], + 'parentClass': ['String','parent'], + 'openNodeClass': ['String', 'open'], + 'openClass': ['String','fa fa-minus-circle'], + 'closedClass': ['String','fa fa-plus-circle'], + 'hideClass': ['String','hide-all'], + 'iconTag': ['String', 'i'], + 'stopDefault' : ['Boolean', true] + }, options || {}, this._element); + + if (this._options.child) { + Ink.warn('Ink.UI.TreeView: options.child is being renamed to options.children.'); + this._options.children = this._options.child; + } + + this._init(); + }; + + TreeView.prototype = { + + /** + * Init function called by the constructor. Sets the necessary event handlers. + * + * @method _init + * @private + */ + _init: function(){ + this._handlers = { + click: Ink.bindEvent(this._onClick,this) + }; + + Event.on(this._element, 'click', this._options.node, this._handlers.click); + + InkArray.each(Ink.ss(this._options.node, this._element), Ink.bind(function(item){ + if( this.isParent(item) ) { + Css.addClassName(item, this._options.parentClass); + + var isOpen = this.isOpen(item); + if( !this._getIcon(item) ){ + Element.create(this._options.iconTag, { insertTop: item }); + } + + this._setNodeOpen(item, isOpen); + } + },this)); + }, + + _getIcon: function (node) { + return Ink.s('> ' + this._options.iconTag, node); + }, + + /** + * Checks if a node is open. + * + * @method isOpen + * @param {DOMElement} node The tree node to check + **/ + isOpen: function (node) { + if (!this._getChild(node)) { + throw new Error('not a node!'); + } + + return Element.data(node).open === 'true' || + Css.hasClassName(node, this._options.openNodeClass); + }, + + /** + * Checks if a node is a parent. + * + * @method isParent + * @param {DOMElement} node Node to check + **/ + isParent: function (node) { + return Css.hasClassName(node, this._options.parentClass) || + this._getChild(node) != null; + }, + + _setNodeOpen: function (node, beOpen) { + var child = this._getChild(node); + if (child) { + Css.setClassName(child, this._options.hideClass, !beOpen); + var icon = this._getIcon(node); + + node.setAttribute('data-open', beOpen); + + /* + * Don't refactor this to + * + * setClassName(el, className, status); setClassName(el, className, !status); + * + * because it won't work with multiple classes. + * + * Doing: + * setClassName(el, 'fa fa-whatever', true);setClassName(el, 'fa fa-whatever-else', false); + * + * will remove 'fa' although it is a class we want. + */ + + var toAdd = beOpen ? this._options.openClass : this._options.closedClass; + var toRemove = beOpen ? this._options.closedClass : this._options.openClass; + Css.removeClassName(icon, toRemove); + Css.addClassName(icon, toAdd); + + Css.setClassName(node, this._options.openNodeClass, beOpen); + } else { + Ink.error('Ink.UI.TreeView: node', node, 'is not a node!'); + } + }, + + /** + * Opens one of the tree nodes + * + * Make sure you pass the node's DOMElement + * @method open + * @param {DOMElement} node The node you wish to open. + **/ + open: function (node) { + this._setNodeOpen(node, true); + }, + + /** + * Closes one of the tree nodes + * + * Make sure you pass the node's DOMElement + * @method close + * @param {DOMElement} node The node you wish to close. + **/ + close: function (node) { + this._setNodeOpen(node, false); + }, + + /** + * Toggles a node state + * + * @method toggle + * @param {DOMElement} node The node to toggle. + **/ + toggle: function (node) { + if (this.isOpen(node)) { + this.close(node); + } else { + this.open(node); + } + }, + + _getChild: function (node) { + return Selector.select(this._options.children, node)[0] || null; + }, + + /** + * Handles the click event (as specified in the _init function). + * + * @method _onClick + * @param {Event} event + * @private + */ + _onClick: function(ev){ + /** + * Summary: + * If the clicked element is a "node" as defined in the options, will check if it has any "child". + * If so, will toggle its state and stop the event's default behavior if the stopDefault option is true. + **/ + + if (!this.isParent(ev.currentTarget) || + Selector.matchesSelector(ev.target, this._options.node) || + Selector.matchesSelector(ev.target, this._options.children)) { + return; + } + + if (this._options.stopDefault){ + ev.preventDefault(); + } + + this.toggle(ev.currentTarget); + } + }; + + return TreeView; +}); +Ink.createModule('Ink.UI.Upload', '1', [ + 'Ink.Dom.Event_1', + 'Ink.Dom.Element_1', + 'Ink.Dom.Browser_1', + 'Ink.UI.Common_1' +], function(Event, Element, Browser, Common) { + 'use strict'; + + var DirectoryReader = function(options) { + this.init(options); + }; + + DirectoryReader.prototype = { + init: function(options) { + this.options = Ink.extendObj({ + entry: undefined, + maxDepth: 10 + }, options || {}); + + try { + this._read(); + } catch(e) { + Ink.error(e); + } + }, + + + _read: function() { + if(!this.options.entry) { + throw("The entry specify you must"); + } + + try { + this._readDirectories(); + } catch(e) { + Ink.error(e); + } + }, + + + _readDirectories: function() { + var entries = [], + running = false, + maxDepth = 0; + + /* TODO return as tree because much better well */ + var _readEntries = Ink.bind(function(currentEntry) { + var dir = currentEntry.createReader(); + running = true; + + dir.readEntries(Ink.bind(function(res) { + if(res.length > 0) { + for(var i = 0, len = res.length; i=0; i--) { + if(typeof(arr[i]) === 'undefined' || arr[i] === null || arr[i] === '') { + arr.splice(i, 1); + } + } + return arr; + } + }; + + var Queue = { + lists: [], + items: [], + + + /** + * Create new queue list + * @function create + * @public + * @param {String} list name + * @param {Function} function to iterate on items + * @return {Object} list id + */ + create: function(name) { + var id; + name = String(name); + this.lists.push({name: name}); + id = this.lists.length - 1; + return id; + }, + + + getItems: function(parentId) { + if(!parentId) { + return this.items; + } + var items = []; + for(var i = 0, len = this.items.length; i=0; i--) { + if(this.items[i] && id === this.items[i].parentId) { + this.remove(this.items[i].parentId, this.items[i].pid); + } + } + if(!keepList) { + this.lists.splice(id, 1); + } + return true; + } catch(e) { + Ink.error('Purge: invalid id'); + return false; + } + }, + + + /** + * add an item to a list + * @function add + * @public + * @param {String} name + * @param {Object} item + * @return {Number} pid + */ + add: function(parentId, item, priority) { + if(!this.lists[parentId]) { + return false; + } + if(typeof(item) !== 'object') { + item = String(item); + } + + var pid = parseInt(Math.round(Math.random() * 100000) + "" + Math.round(Math.random() * 100000), 10); + priority = priority || 0; + + this.items.push({parentId: parentId, item: item, priority: priority || 0, pid: pid}); + return pid; + }, + + + /** + * View list + * @function view + * @public + * @param {Number} list id + * @param {Number} process id + * @return {Object} item + */ + view: function(parentId, pid) { + var id = this._searchByPid(parentId, pid); + if(id === false) { + return false; + } + return this.items[id]; + }, + + + /** + * Remove an item + * @function remove + * @public + * @param {Object} item + * @return {Object|Boolean} removed item or false if not found + */ + remove: function(parentId, pid) { + try { + var id = this._searchByPid(parentId, pid); + if(id === false) { + return false; + } + this.items.splice(id, 1); + return true; + } catch(e) { + Ink.error('Remove: invalid id'); + return false; + } + }, + + _searchByPid: function(parentId, pid) { + if(!parentId && typeof(parentId) === 'boolean' || !pid) { + return false; + } + + parentId = parseInt(parentId, 10); + pid = parseInt(pid, 10); + + if(isNaN(parentId) || isNaN(pid)) { + return false; + } + + for(var i = 0, len = this.items.length; i this.options.minSizeToUseChunks; + }, + + + _dropEventHandler: function(ev) { + if(ev && ev.stopPropagation) { + ev.stopPropagation(); + } + if(ev && ev.preventDefault) { + ev.preventDefault(); + } + if(ev) { + ev.returnValue = false; + } + + this.publish('DropComplete', ev.dataTransfer); + + var data = ev.dataTransfer; + + if(!data || !data.files || !data.files.length) { + return false; + } + + this._files = data.files; + this._files = Array.prototype.slice.call(this._files || [], 0); + + // check if webkitGetAsEntry exists on first item + if(data.items && data.items[0] && data.items[0].webkitGetAsEntry) { + if(!this.options.foldersEnabled) { + return setTimeout(Ink.bind(this._addFilesToQueue, this, this._files), 0); + } + var entry, folders = []; + for(var i = ev.dataTransfer.items.length-1; i>=0; i--) { + entry = ev.dataTransfer.items[i].webkitGetAsEntry(); + if(entry && entry.isDirectory) { + folders.push(entry); + this._files[i].isDirectory = true; + this._files.splice(i, 1); + } + } + // starting callback hell + this._addFolderToQueue(folders, Ink.bind(function() { + setTimeout(Ink.bind(this._addFilesToQueue, this, this._files), 0); + }, this)); + } else { + setTimeout(Ink.bind(this._addFilesToQueue, this, this._files), 0); + } + + return true; + }, + + + _addFolderToQueue: function(folders, cb) { + var files = [], invalidFolders = {}; + + if(!folders || !folders.length) { + cb(); + return files; + } + + var getFiles = function(entries) { + var files = []; + for(var i = 0, len = entries.length; i this.options.maxFilesize) { + this.publish('MaxSizeFailure', file, this.options.maxFilesize); + continue; + } + + fileID = parseInt(Math.round(Math.random() * 100000) + "" + Math.round(Math.random() * 100000), 10); + o = { id: i, data: file, fileID: fileID, directory: file.isDirectory }; + Queue.add(this._queueId, o); + + this.publish('FileAddedToQueue', o); + } + this._processQueue(true); + this._files = []; + }, + + + _processQueue: function(internalUpload) { + if(this._queueRunning) { + return false; + } + + this.running = 0; + var max = 1, i = 0, items, + queueLen = Queue.items.length; + this._queueRunning = true; + + this.interval = setInterval(Ink.bind(function() { + if(Queue.items.length === i && this.running === 0) { + Queue.purge(this._queueId, true); + this._queueRunning = false; + clearInterval(this.interval); + this.publish('QueueEnd', this._queueId, queueLen); + } + + items = Queue.getItems(this._queueId); + + if(this.running < max && items[i]) { + if(!items[i].canceled) { + _doRequest.call(this, items[i].pid, items[i].item.data, items[i].item.fileID, items[i].item.directory, internalUpload); + this.running++; + i++; + } else { + var j = i; + while(items[j] && items[j].canceled) { + i++; + j++; + } + } + return true; + } + return false; + }, this), 100); + + + var _doRequest = function(pid, data, fileID, directory, internalUpload) { + var o = { + file: data, + fileID: fileID, + cb: Ink.bind(function() { + this.running--; + }, this) + }; + if(internalUpload) { + if(directory) { + // do magic + o.cb(); + } else { + this._upload(o); + } + } + }; + + return true; + }, + + + _upload: function(o) { + var file = o.file, + xhr = new XMLHttpRequest(), + fileID = o.fileID; + + this.publish('BeforeUpload', file, this.options.extraData, fileID, xhr, this._supportChunks(file.size)); + + var forceAbort = function(showError) { + if(o.cb && typeof(o.cb === 'function')) { + o.cb(); + } + + this.publish('OnProgress', { + length: file.size, + lengthComputable: true, + loaded: file.size, + total: file.size + }, file, fileID); + this.publish('EndUpload', file, fileID, (showError ? { error: true } : true)); + this.publish('InvalidFile', file, 'name'); + xhr.abort(); + }; + + if(this.options.INVALID_FILE_NAME && this.options.INVALID_FILE_NAME instanceof RegExp) { + if(this.options.INVALID_FILE_NAME.test(o.file.name)) { + forceAbort.call(this); + return; + } + } + + // If file was renamed, abort it + // FU OPERA: Opera always return lastModified date as null + if(!file.lastModifiedDate && !Ink.Dom.Browser.OPERA) { + forceAbort.call(this, true); + return; + } + + xhr.upload.onprogress = Ink.bind(this.publish, this, 'OnProgress', file, fileID); + + var endpoint, method; + if(this._supportChunks(file.size)) { + if(file.size <= file.chunk_offset) { + endpoint = this.options.endpointChunkCommit; + method = 'POST'; + } else { + endpoint = this.options.endpointChunk; + if(file.chunk_upload_id) { + endpoint += '?upload_id=' + file.chunk_upload_id; + } + if(file.chunk_offset) { + endpoint += '&offset=' + file.chunk_offset; + } + method = 'PUT'; + } + } else { + endpoint = this.options.endpoint; + method = 'POST'; + } + + xhr.open(method, endpoint, true); + xhr.withCredentials = true; + xhr.setRequestHeader("x-requested-with", "XMLHttpRequest"); + if(this._supportChunks(file.size)) { + xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + } + + var fd = new FormData(), + blob; + + if("Blob" in window && typeof Blob === 'function') { + blob = new Blob([file], { type: file.type }); + if(this._supportChunks(file.size)) { + file.chunk_offset = file.chunk_offset || 0; + blob = blob.slice(file.chunk_offset, file.chunk_offset + this.options.chunkSize); + } else { + fd.append(this.options.fileFormName, blob, file.name); + } + } else { + fd.append(this.options.fileFormName, file); + } + + if(!this._supportChunks(file.size)) { + for(var k in this.options.extraData) { + if(this.options.extraData.hasOwnProperty(k)) { + fd.append(k, this.options.extraData[k]); + } + } + } else { + fd.append('upload_id', file.chunk_upload_id); + fd.append('path', file.upload_path); + } + + if(!file.hasParent) { + if(!this._supportChunks(file.size)) { + xhr.send(fd); + } else { + if(file.size <= file.chunk_offset) { + xhr.send('upload_id=' + file.chunk_upload_id + '&path=' + file.upload_path + '/' + file.name); + } else { + xhr.send(blob); + } + } + } else { + this.publish('cbCreateFolder', file.parentID, file.fullPath, this.options.extraData, this._folders, file.rootPath, Ink.bind(function() { + if(!this._supportChunks(file.size)) { + xhr.send(fd); + } else { + if(file.size <= file.chunk_offset) { + xhr.send('upload_id=' + file.chunk_upload_id + '&path=' + file.upload_path + '/' + file.name); + } else { + xhr.send(blob); + } + } + }, this)); + } + + + xhr.onload = Ink.bindEvent(function() { + /* jshint boss:true */ + if(this._supportChunks(file.size) && file.size > file.chunk_offset) { + if(xhr.response) { + var response = JSON.parse(xhr.response); + + // check expected offset + var invalidOffset = file.chunk_offset && response.offset !== (file.chunk_offset + this.options.chunkSize) && file.size !== response.offset; + if(invalidOffset) { + if(o.cb) { + o.cb(); + } + this.publish('ErrorUpload', file, fileID); + } else { + file.chunk_upload_id = response.upload_id; + file.chunk_offset = response.offset; + file.chunk_expires = response.expires; + this._upload(o); + } + } else { + if(o.cb) { + o.cb(); + } + this.publish('ErrorUpload', file, fileID); + } + return (xhr = null); + } + + if(o.cb) { + o.cb(); + } + + if(xhr.responseText && xhr['status'] < 400) { + this.publish('EndUpload', file, fileID, xhr.responseText); + } else { + this.publish('ErrorUpload', file, fileID); + } + return (xhr = null); + }, this); + + + xhr.onerror = Ink.bindEvent(function() { + if(o.cb) { + o.cb(); + } + this.publish('ErrorUpload', file, fileID); + }, this); + + xhr.onabort = Ink.bindEvent(function() { + if(o.cb) { + o.cb(); + } + this.publish('AbortUpload', file, fileID, { + abortAll: Ink.bind(this.abortAll, this), + abortOne: Ink.bind(this.abortOne, this) + }); + }, this); + }, + + + abortAll: function() { + if(!this._queueRunning) { + return false; + } + clearInterval(this.interval); + this._queueRunning = false; + Queue.purge(this._queueId, true); + return true; + }, + + abortOne: function(id, cb) { + var items = Queue.getItems(0), + o; + for(var i = 0, len = items.length; ic;c++)b("position","absolute"),b(this._isY?"top":"left",c*this._elLength+"px")},_onTouchStart:function(a){if(!(a.touches.length>1)){this._swipeData={x:b.pointerX(a),y:b.pointerY(a),lastUlPos:null};var c=this._ulEl.getBoundingClientRect();this._swipeData.inUlX=this._swipeData.x-c.left,this._swipeData.inUlY=this._swipeData.y-c.top,j(this._ulEl,"none"),this._touchMoveIsFirstTouchMove=!0,b.stopPropagation(a)}},_onTouchMove:function(a){if(!(a.touches.length>1)){var c=b.pointerX(a),d=b.pointerY(a),e=Math.abs(d-this._swipeData.y),f=Math.abs(c-this._swipeData.x);this._touchMoveIsFirstTouchMove&&(this._touchMoveIsFirstTouchMove=void 0,this._scrolling=this._isY?f>e:e>f,this._scrolling||this._onAnimationFrame()),!this._scrolling&&this._swipeData&&(b.stopDefault(a),this._swipeData.pointerPos=this._isY?d:c),b.stopPropagation(a)}},_onAnimationFrame:function(){var a=this._swipeData;if(a&&!this._scrolling&&!this._touchMoveIsFirstTouchMove){var b=this._element.getBoundingClientRect(),c;c=this._isY?a.pointerPos-a.inUlY-b.top:a.pointerPos-a.inUlX-b.left,this._ulEl.style[this._isY?"top":"left"]=c+"px",a.lastUlPos=c,h(Ink.bindMethod(this,"_onAnimationFrame"))}},_onTouchEnd:function(a){if(this._swipeData&&this._swipeData.pointerPos&&!this._scrolling&&!this._touchMoveIsFirstTouchMove){var c=.1,d=-this._swipeData.lastUlPos,e=this.getPage(),f=d/this._elLength/this._slidesPerPage;if(Math.round(f)===e){var g=f-e;Math.abs(g)>c&&(g=g>0?1:-1,e+=g)}else e=Math.round(f);this.setPage(e),b.stopPropagation(a),b.stopDefault(a)}j(this._ulEl,null),this._swipeData=null,this._touchMoveIsFirstTouchMove=void 0,this._scrolling=void 0},_onPaginationChange:function(a){this._setPage(a.getCurrent())},getPage:function(){return this._pagination?this._pagination.getCurrent():this._currentPage||0},setPage:function(a,b){b&&(a%=this._numPages,0>a&&(a=this._numPages-a)),a=g(a,0,this._numPages-1),this._pagination?this._pagination.setCurrent(a):this._setPage(a)},_setPage:function(a){var b=a*this._deltaLength,c=a===this._numPages-1;if(!this._options.spaceAfterLastSlide&&c&&a>0){var d=this._liEls.length-a*this._slidesPerPage;d2)&&q('the "defaults" argument must be an object mapping option names to [typestring, optional] arrays.'),k=a in g?j._coerce_from_string(m,g[a],a,b):h,k!==h?j._options_validate(k,m)?k:(r("("+a+" option) Invalid "+m+" "+p(k)),n):a in d?d[a]:n!==h?n:void q("Option "+a+" is required!")}for(var t in c)c.hasOwnProperty(t)&&(f[t]=s(t));return f},_coerce_from_string:function(a,b,c,d){return a in j._coerce_funcs?j._coerce_funcs[a](b,c,d):b},_options_validate:function(a,b){return b in j._options_validate_types?j._options_validate_types[b].call(j,a):!1},_coerce_funcs:function(){var a={element:function(a){return j.elOrSelector(a,"")},elements:function(a){return j.elsOrSelector(a,"",!1)},object:function(a){return a},number:function(a){return parseFloat(a)},"boolean":function(a){return!("false"===a||""===a||null===a)},string:function(a){return a},"function":function(a,b,c){return Ink.error(c+': You cannot specify the option "'+b+"\" through data-attributes because it's a function"),h}};return a["float"]=a.integer=a.number,a}(),_options_validate_types:function(){var a={string:function(a){return"string"==typeof a},number:function(a){return"number"==typeof a&&!isNaN(a)&&isFinite(a)},integer:function(a){return a===Math.round(a)},element:function(a){return j.isDOMElement(a)},elements:function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&a.length},"boolean":function(a){return"boolean"==typeof a}};return a["float"]=a.number,a}(),clone:function(a){try{return JSON.parse(JSON.stringify(a))}catch(b){throw new Error("Given object cannot have loops!")}},childIndex:function(a){if(j.isDOMElement(a))for(var b=d.select("> *",a.parentNode),c=0,e=b.length;e>c;++c)if(b[c]===a)return c;throw"not found!"},ajaxJSON:function(a,c,d){new b(a,{evalJS:"force",method:"POST",parameters:c,onSuccess:function(a){try{if(a=a.responseJSON,"ok"!==a.status)throw"server error: "+a.message;d(null,a)}catch(b){d(b)}},onFailure:function(){d("communication failure")}})},currentLayout:function(){var a,b,e,f,g,h=d.select("#ink-layout-detector")[0];if(!h){h=document.createElement("div"),h.id="ink-layout-detector";for(e in this.Layouts)this.Layouts.hasOwnProperty(e)&&(f=this.Layouts[e],g=document.createElement("div"),g.className="show-"+f+" hide-all",g.setAttribute("data-ink-layout",f),h.appendChild(g));document.body.appendChild(h)}var i="",j=0;for(a=0,b=h.childNodes.length;b>a;++a)g=h.childNodes[a],"block"===c.getStyle(g,"display")&&(i=g.getAttribute("data-ink-layout"),j+=1);return 1===j?i:"large"},hashSet:function(a){if("object"!=typeof a)throw new TypeError("o should be an object!");var b=e.getAnchorString();b=Ink.extendObj(b,a),window.location.hash=e.genQueryString("",b).substring(1)},cleanChildren:function(a){if(!j.isDOMElement(a))throw"Please provide a valid DOMElement";for(var b,c=a.lastChild;c;)b=c.previousSibling,a.removeChild(c),c=b},storeIdAndClasses:function(a,b){if(!j.isDOMElement(a))throw"Please provide a valid DOMElement as first parameter";var c=a.id;c&&(b._id=c);var d=a.className;d&&(b._classes=d)},restoreIdAndClasses:function(a,b){if(!j.isDOMElement(a))throw"Please provide a valid DOMElement as first parameter";b._id&&a.id!==b._id&&(a.id=b._id),b._classes&&-1===a.className.indexOf(b._classes)&&(a.className?a.className+=" "+b._classes:a.className=b._classes),b._instanceId&&!a.getAttribute("data-instance")&&a.setAttribute("data-instance",b._instanceId)},registerInstance:function(a,b,c){if(!a._instanceId){if("object"!=typeof a)throw new TypeError("1st argument must be a JavaScript object!");if(!a._options||!a._options.skipRegister){if(!this.isDOMElement(b))throw new TypeError("2nd argument must be a DOM element!");if(void 0!==c&&"string"!=typeof c)throw new TypeError("3rd argument must be a string!");var d=(c||"instance")+ ++g;f[d]=a,a._instanceId=d;var e=b.getAttribute("data-instance");e=null!==e?[e,d].join(" "):d,b.setAttribute("data-instance",e)}}},unregisterInstance:function(a){delete f[a]},getInstance:function(a){var b;if(this.isDOMElement(a)){if(b=a.getAttribute("data-instance"),null===b)throw new Error("argument is not a DOM instance element!")}else b=a;b=b.split(" ");var c,d,e,g=b.length,h=[];for(e=0;g>e;++e){if(d=b[e],!d)throw new Error("Element is not a JS instance!");if(c=f[d],!c)throw new Error('Instance "'+d+'" not found!');h.push(c)}return 1===g?h[0]:h},getInstanceFromSelector:function(a){var b=d.select(a)[0];if(!b)throw new Error("Element not found!");return this.getInstance(b)},getInstanceIds:function(){var a=[];for(var b in f)f.hasOwnProperty(b)&&a.push(b);return a},getInstances:function(){var a=[];for(var b in f)f.hasOwnProperty(b)&&a.push(f[b]);return a},destroyComponent:function(){j.unregisterInstance(this._instanceId),this._element.parentNode.removeChild(this._element)}};return j}),Ink.createModule("Ink.UI.DatePicker","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1","Ink.Util.Date_1","Ink.Dom.Browser_1"],function(a,b,c,d,e,f,g){"use strict";function h(a,b){for(var c="",d=0;a>d;d++)c+=b;return c}function i(a,b,c){return a>c&&(a=c),b>a&&(a=b),a}function j(a){var b=a.split("-");return k(+b[0],+b[1]-1,+b[2])}function k(a,b,c){return{_year:a,_month:b,_day:c}}function l(a){return{_year:a.getFullYear(),_month:a.getMonth(),_day:a.getDate()}}var m=function(b,c){if(this._element=b&&a.elOrSelector(b,"[Ink.UI.DatePicker_1]: selector argument"),this._options=a.options("Ink.UI.DatePicker_1",{autoOpen:["Boolean",!1],cleanText:["String","Clear"],closeText:["String","Close"],containerElement:["Element",null],cssClass:["String","ink-calendar bottom"],dateRange:["String",null],displayInSelect:["Boolean",!1],dayField:["Element",null],monthField:["Element",null],yearField:["Element",null],format:["String","yyyy-mm-dd"],instance:["String","scdp_"+Math.round(99999*Math.random())],nextLinkText:["String","»"],ofText:["String"," de "],onFocus:["Boolean",!0],onMonthSelected:["Function",null],onSetDate:["Function",null],onYearSelected:["Function",null],position:["String","right"],prevLinkText:["String","«"],showClean:["Boolean",!0],showClose:["Boolean",!0],shy:["Boolean",!0],startDate:["String",null],startWeekDay:["Number",1],validDayFn:["Function",null],validMonthFn:["Function",null],validYearFn:["Function",null],nextValidDateFn:["Function",null],prevValidDateFn:["Function",null],yearRange:["String",null],month:["Object",{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}],wDay:["Object",{0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"}]},c||{},this._element),this._options.format=this._dateParsers[this._options.format]||this._options.format,this._hoverPicker=!1,this._picker=this._options.pickerField&&a.elOrSelector(this._options.pickerField,"pickerField"),this._setMinMax(this._options.dateRange||this._options.yearRange),this._options.startDate)this.setDate(this._options.startDate);else if(this._element&&this._element.value)this.setDate(this._element.value);else{var d=new Date;this._day=d.getDate(),this._month=d.getMonth(),this._year=d.getFullYear()}if((this._options.startWeekDay<0||this._options.startWeekDay>6)&&(Ink.warn('Ink.UI.DatePicker_1: option "startWeekDay" must be between 0 (sunday) and 6 (saturday)'),this._options.startWeekDay=i(this._options.startWeekDay,0,6)),this._options.displayInSelect&&!(this._options.dayField&&this._options.monthField&&this._options.yearField))throw new Error("Ink.UI.DatePicker: displayInSelect option enabled.Please specify dayField, monthField and yearField selectors.");this._init()};return m.prototype={version:"0.1",_init:function(){Ink.extendObj(this._options,this._lang||{}),this._render(),this._listenToContainerObjectEvents(),a.registerInstance(this,this._containerObject,"datePicker")},_render:function(){this._containerObject=document.createElement("div"),this._containerObject.id=this._options.instance,this._containerObject.className=this._options.cssClass+" ink-datepicker-calendar hide-all",this._renderSuperTopBar();var b=document.createElement("div");b.className="ink-calendar-top",this._monthDescContainer=document.createElement("div"),this._monthDescContainer.className="ink-calendar-month_desc",this._monthPrev=document.createElement("div"),this._monthPrev.className="ink-calendar-prev",this._monthPrev.innerHTML=''+this._options.prevLinkText+"",this._monthNext=document.createElement("div"),this._monthNext.className="ink-calendar-next",this._monthNext.innerHTML=''+this._options.nextLinkText+"",b.appendChild(this._monthPrev),b.appendChild(this._monthDescContainer),b.appendChild(this._monthNext),this._monthContainer=document.createElement("div"),this._monthContainer.className="ink-calendar-month",this._containerObject.appendChild(b),this._containerObject.appendChild(this._monthContainer),this._monthSelector=this._renderMonthSelector(),this._containerObject.appendChild(this._monthSelector),this._yearSelector=document.createElement("ul"),this._yearSelector.className="ink-calendar-year-selector",this._containerObject.appendChild(this._yearSelector),(!this._options.onFocus||this._options.displayInSelect)&&(this._options.pickerField?this._picker=a.elOrSelector(this._options.pickerField,"pickerField"):(this._picker=document.createElement("a"),this._picker.href="#open_cal",this._picker.innerHTML="open",this._element.parentNode.appendChild(this._picker),this._picker.className="ink-datepicker-picker-field")),this._appendDatePickerToDom(),this._renderMonth(),this._monthChanger=document.createElement("a"),this._monthChanger.href="#monthchanger",this._monthChanger.className="ink-calendar-link-month",this._monthChanger.innerHTML=this._options.month[this._month+1],this._ofText=document.createElement("span"),this._ofText.innerHTML=this._options.ofText,this._yearChanger=document.createElement("a"),this._yearChanger.href="#yearchanger",this._yearChanger.className="ink-calendar-link-year",this._yearChanger.innerHTML=this._year,this._monthDescContainer.innerHTML="",this._monthDescContainer.appendChild(this._monthChanger),this._monthDescContainer.appendChild(this._ofText),this._monthDescContainer.appendChild(this._yearChanger),this._options.inline?this.show():this._addOpenCloseEvents(),this._addDateChangeHandlersToInputs()},_addDateChangeHandlersToInputs:function(){var a=this._element;this._options.displayInSelect&&(a=[this._options.dayField,this._options.monthField,this._options.yearField]),b.observeMulti(a,"change",Ink.bindEvent(function(){this._updateDate(),this._showDefaultView(),this.setDate(),this._inline||this._hoverPicker||this._hide(!0)},this))},show:function(){this._updateDate(),this._renderMonth(),c.removeClassName(this._containerObject,"hide-all")},_addOpenCloseEvents:function(){var a=this._picker||this._element;b.observe(a,"click",Ink.bindEvent(function(a){b.stop(a),this.show()},this)),this._options.autoOpen&&this.show(),this._options.displayInSelect||b.observe(a,"blur",Ink.bindEvent(function(){this._hoverPicker||this._hide(!0)},this)),this._options.shy&&b.observe(document,"click",Ink.bindEvent(function(a){for(var c=b.element(a),e=[this._options.dayField,this._options.monthField,this._options.yearField,this._picker,this._element],f=0,g=e.length;g>f;f++)if(e[f]&&d.descendantOf(e[f],c))return;this._hide(!0)},this))},_renderMonthSelector:function(){var a=document.createElement("ul");a.className="ink-calendar-month-selector";for(var b=document.createElement("ul"),c=1;12>=c;c++)b.appendChild(this._renderMonthButton(c)),c%4===0&&(a.appendChild(b),b=document.createElement("ul"));return a},_renderMonthButton:function(a){var b=document.createElement("li"),c=document.createElement("a");return c.setAttribute("data-cal-month",a),c.innerHTML=this._options.month[a].substring(0,3),b.appendChild(c),b},_appendDatePickerToDom:function(){if(this._options.containerElement){var b=Ink.i(this._options.containerElement)||a.elOrSelector(this._options.containerElement);b.appendChild(this._containerObject)}d.findUpwardsBySelector(this._element,".ink-form .control-group .control")===this._element.parentNode?(this._wrapper=this._element.parentNode,this._wrapperIsControl=!0):(this._wrapper=d.create("div",{className:"ink-datepicker-wrapper"}),d.wrap(this._element,this._wrapper)),d.insertAfter(this._containerObject,this._element)},_renderSuperTopBar:function(){this._options.showClose&&this._options.showClean&&(this._superTopBar=document.createElement("div"),this._superTopBar.className="ink-calendar-top-options",this._options.showClean&&this._superTopBar.appendChild(d.create("a",{className:"clean",setHTML:this._options.cleanText})),this._options.showClose&&this._superTopBar.appendChild(d.create("a",{className:"close",setHTML:this._options.closeText})),this._containerObject.appendChild(this._superTopBar))},_listenToContainerObjectEvents:function(){b.observe(this._containerObject,"mouseover",Ink.bindEvent(function(a){b.stop(a),this._hoverPicker=!0},this)),b.observe(this._containerObject,"mouseout",Ink.bindEvent(function(a){b.stop(a),this._hoverPicker=!1},this)),b.observe(this._containerObject,"click",Ink.bindEvent(this._onClick,this))},_onClick:function(a){var d=b.element(a);return c.hasClassName(d,"ink-calendar-off")?(b.stopDefault(a),null):(b.stop(a),this._onRelativeChangerClick(d),this._onAbsoluteChangerClick(d),c.hasClassName(d,"ink-calendar-link-month")?this._showMonthSelector():c.hasClassName(d,"ink-calendar-link-year")?this._showYearSelector():c.hasClassName(d,"clean")?this._clean():c.hasClassName(d,"close")&&this._hide(!1),void this._updateDescription())},_onRelativeChangerClick:function(a){var b={change_year_next:1,change_year_prev:-1},c={change_month_next:1,change_month_prev:-1};a.className in c?this._updateCal(c[a.className]):a.className in b&&this._showYearSelector(b[a.className])},_onAbsoluteChangerClick:function(a){var b=d.data(a);Number(b.calDay)?(this.setDate([this._year,this._month+1,b.calDay].join("-")),this._hide()):Number(b.calMonth)?(this._month=Number(b.calMonth)-1,this._showDefaultView(),this._updateCal()):Number(b.calYear)&&this._changeYear(Number(b.calYear))},_changeYear:function(a){a=+a,a&&(this._year=a,"function"==typeof this._options.onYearSelected&&this._options.onYearSelected(this,{year:this._year}),this._showMonthSelector())},_clean:function(){this._options.displayInSelect?(this._options.yearField.selectedIndex=0,this._options.monthField.selectedIndex=0,this._options.dayField.selectedIndex=0):this._element.value=""},_hide:function(a){a=void 0===a?!0:a,(a===!1||a&&this._options.shy)&&c.addClassName(this._containerObject,"hide-all")},_setMinMax:function(a){var b=this,c={_year:-Number.MAX_VALUE,_month:0,_day:1},d={_year:Number.MAX_VALUE,_month:11,_day:31};function e(){b._min=c,b._max=d}if(!a)return e();var g=a.split(":"),h=/^(\d{4})((\-)(\d{1,2})((\-)(\d{1,2}))?)?$/;f.each([{name:"_min",date:g[0],noLim:c},{name:"_max",date:g[1],noLim:d}],Ink.bind(function(a){var b=a.noLim;if("NOW"===a.date.toUpperCase()){var c=new Date;b=l(c)}else"EVER"===a.date.toUpperCase()?b=a.noLim:h.test(a.date)&&(b=j(a.date),b._month=i(b._month,0,11),b._day=i(b._day,1,this._daysInMonth(b._year,b._month+1)));this[a.name]=b},this));var k=-1!==this._dateCmp(this._max,this._min);k||e()},_fitDateToRange:function(a){return this._isValidDate(a)||(a=l(new Date)),-1===this._dateCmp(a,this._min)?Ink.extendObj({},this._min):1===this._dateCmp(a,this._max)?Ink.extendObj({},this._max):Ink.extendObj({},a)},_dateWithinRange:function(a){return arguments.length||(a=this),!this._dateAboveMax(a)&&!this._dateBelowMin(a)},_dateAboveMax:function(a){return 1===this._dateCmp(a,this._max)},_dateBelowMin:function(a){return-1===this._dateCmp(a,this._min)},_dateCmp:function(a,b){return this._dateCmpUntil(a,b,"_day")},_dateCmpUntil:function(a,b,c){var d=["_year","_month","_day"],e=-1;do{if(e++,a[d[e]]>b[d[e]])return 1;if(a[d[e]]
      • ",this._yearSelector.innerHTML=d,this._monthPrev.childNodes[0].className="action_inactive",this._monthNext.childNodes[0].className="action_inactive",this._monthSelector.style.display="none",this._monthContainer.style.display="none",this._yearSelector.style.display="block"},_incrementViewingYear:function(a){if(a){var b=+this._year+10*a;b-=b%10,b>this._max._year||b+9"+a+""}return'
      • '+a+"
      • "},_showMonthSelector:function(){this._yearSelector.style.display="none",this._monthContainer.style.display="none",this._monthPrev.childNodes[0].className="action_inactive",this._monthNext.childNodes[0].className="action_inactive",this._addMonthClassNames(),this._monthSelector.style.display="block"},_parseDate:function(a){var b=g.set(this._options.format,a);return b?l(b):null},_isValidDate:function(a){var b=/^\d{4}$/,c=/^\d{1,2}$/;return b.test(a._year)&&c.test(a._month)&&c.test(a._day)&&+a._month+1>=1&&+a._month+1<=12&&+a._day>=1&&+a._day<=this._daysInMonth(a._year,a._month+1)},_isDate:function(a,b){try{if("undefined"==typeof a)return!1;var c=g.set(a,b);if(c&&this._isValidDate(l(c)))return!0}catch(d){}return!1},_acceptableDay:function(a){return this._acceptableDateComponent(a,"validDayFn")},_acceptableMonth:function(a){return this._acceptableDateComponent(a,"validMonthFn")},_acceptableYear:function(a){return this._acceptableDateComponent(a,"validYearFn")},_acceptableDateComponent:function(a,b){return this._options[b]?this._callUserCallbackBool(this._options[b],a):this._dateWithinRange(a)},_writeDateInFormat:function(){return g.get(this._options.format,this.getDate())},setDate:function(a){if(/\d{4}-\d{1,2}-\d{1,2}/.test(a)){var b=a.split("-");this._year=+b[0],this._month=+b[1]-1,this._day=+b[2]}this._setDate()},getDate:function(){if(!this._day)throw"Ink.UI.DatePicker: Still picking a date. Cannot getDate now!";return new Date(this._year,this._month,this._day)},_setDate:function(a){if(a){var b=d.data(a);this._day=+b.calDay||this._day}var c=this._fitDateToRange(this);this._year=c._year,this._month=c._month,this._day=c._day,this._options.displayInSelect?(this._options.dayField.value=this._day,this._options.monthField.value=this._month+1,this._options.yearField.value=this._year):this._element.value=this._writeDateInFormat(),this._options.onSetDate&&this._options.onSetDate(this,{date:this.getDate()})},_updateCal:function(a){"function"==typeof this._options.onMonthSelected&&this._options.onMonthSelected(this,{year:this._year,month:this._month}),a&&null===this._updateMonth(a)||this._renderMonth()},_daysInMonth:function(a,b){var c={2:a%400===0||a%4===0&&a%100!==0?29:28,4:30,6:30,9:30,11:30};return c[b]||31},_updateMonth:function(a){var b;return a>0?b=this._getNextMonth():0>a&&(b=this._getPrevMonth()),b?(this._year=b._year,this._month=b._month,void(this._day=b._day)):null},_getNextMonth:function(a){return this._tryLeap(a,"Month","next",function(a){return a._month+=1,a._month>11&&(a._month=0,a._year+=1),a})},_getPrevMonth:function(a){return this._tryLeap(a,"Month","prev",function(a){return a._month-=1,a._month<0&&(a._month=11,a._year-=1),a})},_getPrevYear:function(a){return this._tryLeap(a,"Year","prev",function(a){return a._year-=1,a})},_getNextYear:function(a){return this._tryLeap(a,"Year","next",function(a){return a._year+=1,a})},_tryLeap:function(a,b,c,d){a=a||{_year:this._year,_month:this._month,_day:this._day};var e="prev"===c?"_min":"_max",f=this[e];if(0===this._dateCmpUntil(a,f,b))return null;var g=this._options[c+"ValidDateFn"];return g?this._callUserCallbackDate(g,a):(a=d(a),a=this._fitDateToRange(a),this["_acceptable"+b](a)?a:null)},_getNextDecade:function(a){a=a||{_year:this._year,_month:this._month,_day:this._day};var b=this._getCurrentDecade(a);return b+10>this._max._year?null:b+10},_getPrevDecade:function(a){a=a||{_year:this._year,_month:this._month,_day:this._day}; +var b=this._getCurrentDecade(a);return b-10";var e='
      •  
      • ',f=this._getFirstDayIndex(b,a);f>0&&(d+=f,c+=h(f,e)),c+=this._getDayButtonsHtml(b,a),c+="
      ",this._monthContainer.innerHTML=c},_getFirstDayIndex:function(a,b){var c=new Date(a,b,1).getDay(),d=this._options.startWeekDay||0,e=c-d;return e%=7,0>e&&(e+=6),e},_getDayButtonsHtml:function(a,b){for(var c=this._getFirstDayIndex(a,b),d=this._daysInMonth(a,b+1),e="",f=1;d>=f;f++)7===c&&(c=0,e+="
        "),e+=this._getDayButtonHtml(a,b,f),c++,7===c&&(e+="
      ");return e},_getDayButtonHtml:function(a,b,c){var d=" ",e=k(a,b,c);return d+=this._acceptableDay(e)?'data-cal-day="'+c+'"':'class="ink-calendar-off"',this._day&&0===this._dateCmp(e,this)&&(d+='class="ink-calendar-on" data-cal-day="'+c+'"'),'
    • "+c+"
    • "},_getMonthCalendarHeaderHtml:function(a){for(var b='
        ',c,d=0;7>d;d++)c=(a+d)%7,b+="
      • "+this._options.wDay[c].substring(0,1)+"
      • ";return b+"
      "},_addMonthClassNames:function(a){f.forEach((a||this._monthSelector).getElementsByTagName("a"),Ink.bindMethod(this,"_addMonthButtonClassNames"))},_addMonthButtonClassNames:function(a){var b=d.data(a);if(!b.calMonth)throw"not a calendar month button!";var e=+b.calMonth-1;if(e===this._month)c.addClassName(a,"ink-calendar-on"),c.removeClassName(a,"ink-calendar-off");else{c.removeClassName(a,"ink-calendar-on");var f=!this._acceptableMonth({_year:this._year,_month:e});c.addRemoveClassName(a,"ink-calendar-off",f)}},lang:function(a){this._lang=a},showMonth:function(){this._renderMonth()},isMonthRendered:function(){var a=e.select(".ink-calendar-header",this._containerObject)[0];return"none"!==c.getStyle(a.parentNode,"display")&&"none"!==c.getStyle(a.parentNode.parentNode,"display")},destroy:function(){d.unwrap(this._element),d.remove(this._wrapper),d.remove(this._containerObject),a.unregisterInstance.call(this)}},m}),Ink.createModule("Ink.UI.Draggable","1",["Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Browser_1","Ink.Dom.Selector_1","Ink.UI.Common_1"],function(a,b,c,d,e,f){"use strict";var g=0,h=1;function i(a,b,c){return a=Math.min(a,c),a=Math.max(a,b)}var j=function(a,b){this.init(a,b)};return j.prototype={init:function(c,e){var g=Ink.extendObj({constraint:!1,constraintElm:!1,top:!1,right:!1,bottom:!1,left:!1,handle:e.handler||!1,revert:!1,cursor:"move",zindex:e.zindex||9999,dragClass:"drag",onStart:!1,onEnd:!1,onDrag:!1,onChange:!1,droppableProxy:!1,mouseAnchor:void 0,skipChildren:!0,fps:100,debug:!1},e||{},a.data(c));this.options=g,this.element=f.elOrSelector(c),this.constraintElm=g.constraintElm&&f.elOrSelector(g.constraintElm),this.handle=!1,this.elmStartPosition=!1,this.active=!1,this.dragged=!1,this.prevCoords=!1,this.placeholder=!1,this.position=!1,this.zindex=!1,this.firstDrag=!0,g.fps&&(this.deltaMs=1e3/g.fps,this.lastRunAt=0),this.handlers={},this.handlers.start=Ink.bindEvent(this._onStart,this),this.handlers.dragFacade=Ink.bindEvent(this._onDragFacade,this),this.handlers.drag=Ink.bindEvent(this._onDrag,this),this.handlers.end=Ink.bindEvent(this._onEnd,this),this.handlers.selectStart=function(a){return b.stop(a),!1},this.handle=this.options.handle?f.elOrSelector(this.options.handle):this.element,this.handle.style.cursor=g.cursor,b.observe(this.handle,"touchstart",this.handlers.start),b.observe(this.handle,"mousedown",this.handlers.start),d.IE&&b.observe(this.element,"selectstart",this.handlers.selectStart)},destroy:function(){b.stopObserving(this.handle,"touchstart",this.handlers.start),b.stopObserving(this.handle,"mousedown",this.handlers.start),d.IE&&b.stopObserving(this.element,"selectstart",this.handlers.selectStart)},_getCoords:function(b){var c=[a.scrollWidth(),a.scrollHeight()];return{x:(b.touches?b.touches[0].clientX:b.clientX)+c[g],y:(b.touches?b.touches[0].clientY:b.clientY)+c[h]}},_cloneStyle:function(b,d){d.className=b.className,d.style.borderWidth="0",d.style.padding="0",d.style.position="absolute",d.style.width=a.elementWidth(b)+"px",d.style.height=a.elementHeight(b)+"px",d.style.left=a.elementLeft(b)+"px",d.style.top=a.elementTop(b)+"px",d.style.cssFloat=c.getStyle(b,"float"),d.style.display=c.getStyle(b,"display")},_onStart:function(d){if(!this.active&&b.isLeftClick(d)||"undefined"==typeof d.button){var e=b.element(d);if(this.options.skipChildren&&e!==this.handle)return;b.stop(d),c.addClassName(this.element,this.options.dragClass),this.elmStartPosition=[a.elementLeft(this.element),a.elementTop(this.element)];var f=[parseInt(c.getStyle(this.element,"left"),10),parseInt(c.getStyle(this.element,"top"),10)],i=a.elementDimensions(this.element);this.originalPosition=[f[g]?f[g]:null,f[h]?f[h]:null],this.delta=this._getCoords(d),this.active=!0,this.position=c.getStyle(this.element,"position"),this.zindex=c.getStyle(this.element,"zIndex");var j=document.createElement("div");if(j.style.position=this.position,j.style.width=i[g]+"px",j.style.height=i[h]+"px",j.style.marginTop=c.getStyle(this.element,"margin-top"),j.style.marginBottom=c.getStyle(this.element,"margin-bottom"),j.style.marginLeft=c.getStyle(this.element,"margin-left"),j.style.marginRight=c.getStyle(this.element,"margin-right"),j.style.borderWidth="0",j.style.padding="0",j.style.cssFloat=c.getStyle(this.element,"float"),j.style.display=c.getStyle(this.element,"display"),j.style.visibility="hidden",this.delta2=[this.delta.x-this.elmStartPosition[g],this.delta.y-this.elmStartPosition[h]],this.options.mouseAnchor){var k=this.options.mouseAnchor.split(" "),l=[i[g],i[h]];"left"===k[0]?l[g]=0:"center"===k[0]&&(l[g]=parseInt(l[g]/2,10)),"top"===k[1]?l[h]=0:"center"===k[1]&&(l[h]=parseInt(l[h]/2,10)),this.applyDelta=[this.delta2[g]-l[g],this.delta2[h]-l[h]]}var m=this.options.fps?"dragFacade":"drag";if(this.placeholder=j,this.options.onStart&&this.options.onStart(this.element,d),this.options.droppableProxy){this.proxy=document.createElement("div"),i=[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight];var n=this.proxy.style;n.width=i[g]+"px",n.height=i[h]+"px",n.position="fixed",n.left="0",n.top="0",n.zIndex=this.options.zindex+1,n.backgroundColor="#FF0000",c.setOpacity(this.proxy,0);for(var o=document.body.firstChild;o&&1!==o.nodeType;)o=o.nextSibling;document.body.insertBefore(this.proxy,o),b.observe(this.proxy,"mousemove",this.handlers[m]),b.observe(this.proxy,"touchmove",this.handlers[m])}else b.observe(document,"mousemove",this.handlers[m]);return this.element.style.position="absolute",this.element.style.zIndex=this.options.zindex,this.element.parentNode.insertBefore(this.placeholder,this.element),this._onDrag(d),b.observe(document,"mouseup",this.handlers.end),b.observe(document,"touchend",this.handlers.end),!1}},_onDragFacade:function(a){var b=+new Date;(!this.lastRunAt||b>this.lastRunAt+this.deltaMs)&&(this.lastRunAt=b,this._onDrag(a))},_onDrag:function(c){if(this.active){b.stop(c),this.dragged=!0;var d=this._getCoords(c),e=d.x,f=d.y,j=this.options,k=!1,l=!1;if(this.prevCoords&&e!==this.prevCoords.x||f!==this.prevCoords.y){j.onDrag&&j.onDrag(this.element,c),this.prevCoords=d,k=this.elmStartPosition[g]+e-this.delta.x,l=this.elmStartPosition[h]+f-this.delta.y;var m=a.elementDimensions(this.element);if(this.constraintElm){var n=a.offset(this.constraintElm),o=a.elementDimensions(this.constraintElm),p=n[h]+(j.top||0),q=n[h]+o[h]-(j.bottom||0),r=n[g]+(j.left||0),s=n[g]+o[g]-(j.right||0);l=i(l,p,q-m[h]),k=i(k,r,s-m[g])}else if(j.constraint){var t=j.right===!1?a.pageWidth()-m[g]:j.right,u=j.left===!1?0:j.left,v=j.top===!1?0:j.top,w=j.bottom===!1?a.pageHeight()-m[h]:j.bottom;("horizontal"===j.constraint||"both"===j.constraint)&&(k=i(k,u,t)),("vertical"===j.constraint||"both"===j.constraint)&&(l=i(l,v,w))}var x=Ink.getModule("Ink.UI.Droppable_1");if(this.firstDrag&&(x&&x.updateAll(),this.firstDrag=!1),k&&(this.element.style.left=k+"px"),l&&(this.element.style.top=l+"px"),x){var y=this.options.mouseAnchor?{x:e-this.applyDelta[g],y:f-this.applyDelta[h]}:d;x.action(y,"drag",c,this.element)}j.onChange&&j.onChange(this)}}},_onEnd:function(d){if(b.stopObserving(document,"mousemove",this.handlers.drag),b.stopObserving(document,"touchmove",this.handlers.drag),this.options.fps&&this._onDrag(d),c.removeClassName(this.element,this.options.dragClass),this.active&&this.dragged){this.options.droppableProxy&&document.body.removeChild(this.proxy),this.pt&&(a.remove(this.pt),this.pt=void 0),this.placeholder&&a.remove(this.placeholder),this.options.revert&&(this.element.style.position=this.position,this.element.style.zIndex=null!==this.zindex?this.zindex:"auto",this.element.style.left=this.originalPosition[g]?this.originalPosition[g]+"px":"",this.element.style.top=this.originalPosition[h]?this.originalPosition[h]+"px":""),this.options.onEnd&&this.options.onEnd(this.element,d);var e=Ink.getModule("Ink.UI.Droppable_1");e&&e.action(this._getCoords(d),"drop",d,this.element),this.position=!1,this.zindex=!1,this.firstDrag=!0}this.active=!1,this.dragged=!1}},j}),Ink.createModule("Ink.UI.Drawer","1",["Ink.UI.Common_1","Ink.Dom.Loaded_1","Ink.Dom.Selector_1","Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Css_1"],function(a,b,c,d,e,f){"use strict";function g(a){Ink.warn('Ink.UI.Drawer_1: Could not find the "'+a+'" element on this page. Please make sure it exists.')}function h(a){this._init(a)}return h.prototype={_init:function(b){switch(this._options=a.options({parentSelector:["String",".ink-drawer"],leftDrawer:["String",".left-drawer"],leftTrigger:["String",".left-drawer-trigger"],rightDrawer:["String",".right-drawer"],rightTrigger:["String",".right-drawer-trigger"],contentDrawer:["String",".content-drawer"],closeOnContentClick:["Boolean",!0],closeOnLinkClick:["Boolean",!0],mode:["String","push"],sides:["String","both"]},b||{}),this._contentDrawers=Ink.ss(this._options.contentDrawer),this._leftDrawer=Ink.s(this._options.leftDrawer),this._leftTriggers=Ink.ss(this._options.leftTrigger),this._rightDrawer=Ink.s(this._options.rightDrawer),this._rightTriggers=Ink.ss(this._options.rightTrigger),f.addClassName(document.body,"ink-drawer"),0===this._contentDrawers.length&&Ink.warn('Ink.UI.Drawer_1: Could not find any "'+this._options.contentDrawer+'" elements on this page. Please make sure you have at least one.'),this._options.sides){case"both":this._leftDrawer||g(this._options.leftDrawer),0===this._leftTriggers.length&&g(this._options.leftTrigger),this._rightDrawer||g(this._options.rightDrawer),0===this._rightTriggers.length&&g(this._options.rightTrigger),this._triggers=this._options.leftTrigger+", "+this._options.rightTrigger+", "+this._options.contentDrawer;break;case"left":this._leftDrawer||g(this._options.leftDrawer),0===this._leftTriggers.length&&g(this._options.leftTrigger),this._triggers=this._options.leftTrigger+", "+this._options.contentDrawer;break;case"right":this._rightDrawer||g(this._options.rightDrawer),0===this._rightTriggers.length&&g(this._options.rightTrigger),this._triggers=this._options.rightTrigger+", "+this._options.contentDrawer}this._isOpen=!1,this._direction=void 0,this._handlers={click:Ink.bindEvent(this._onClick,this),afterTransition:Ink.bindEvent(this._afterTransition,this)},this._delay=10,this._addEvents()},_onClick:function(a){var b=Ink.bind(function(a){this._isOpen?this.close():this.open(a)},this);c.matchesSelector(a.currentTarget,this._options.leftTrigger)?b("left"):c.matchesSelector(a.currentTarget,this._options.rightTrigger)?b("right"):c.matchesSelector(a.currentTarget,this._options.contentDrawer)&&this._options.closeOnContentClick&&this.close(),this._options.closeOnLinkClick&&d.isLink(a.target)&&this.close()},_afterTransition:function(){this._isOpen||("left"===this._direction?f.removeClassName(this._leftDrawer,"show"):f.removeClassName(this._rightDrawer,"show"))},_addEvents:function(){e.on(document.body,"click",this._triggers+', a[href*="#"]',this._handlers.click)},open:function(a){this._isOpen=!0,this._direction=a;var b="left"===a?this._leftDrawer:this._rightDrawer;f.addClassName(b,"show"),setTimeout(Ink.bind(function(){f.addClassName(document.body,[this._options.mode,a])},this),this._delay)},close:function(){this._isOpen!==!1&&(this._isOpen=!1,e.one(document.body,"transitionend oTransitionEnd transitionend webkitTransitionEnd",this._handlers.afterTransition),f.removeClassName(document.body,[this._options.mode,this._direction]))}},h}),Ink.createModule("Ink.UI.Dropdown","1",["Ink.UI.Common_1","Ink.UI.Toggle_1","Ink.Dom.Event_1","Ink.Dom.Element_1"],function(a,b,c,d){"use strict";function e(a,b){this._init(a,b)}return e.prototype={_init:function(d,e){this._element=a.elOrSelector(d),this._options=a.options("Ink.UI.Dropdown_1",{target:["Element"],hoverOpen:["Number",null],dismissOnInsideClick:["Boolean",!1],dismissOnOutsideClick:["Boolean",!0],dismissAfter:["Number",null],onInsideClick:["Function",null],onOutsideClick:["Function",null],onOpen:["Function",null],onDismiss:["Function",null]},e||{},this._element),this._toggle=new b(this._element,{target:this._options.target,closeOnInsideClick:null,closeOnClick:!1,onChangeState:Ink.bind(function(a){return this._openOrDismiss(a,!0,!0)},this)}),c.observeMulti([this._options.target,this._element],"mouseout",Ink.bindMethod(this,"_onMouseOut")),c.observeMulti([this._options.target,this._element],"mouseover",Ink.bindMethod(this,"_onMouseOver")),c.observe(this._options.target,"click",Ink.bindMethod(this,"_onInsideClick")),c.observe(document,"click",Ink.bindMethod(this,"_onOutsideClick"))},_onMouseOver:function(){"number"==typeof this._options.hoverOpen&&this._toggle.getState()===!1&&(clearTimeout(this._openTimeout),this._openTimeout=setTimeout(Ink.bindMethod(this,"open",!0),1e3*this._options.hoverOpen)),"number"==typeof this._options.dismissAfter&&clearTimeout(this._dismissTimeout)},_onMouseOut:function(){"number"==typeof this._options.dismissAfter&&this._toggle.getState()===!0&&(clearTimeout(this._dismissTimeout),this._dismissTimeout=setTimeout(Ink.bindMethod(this,"dismiss",!0),1e3*this._options.dismissAfter)),"number"==typeof this._options.hoverOpen&&clearTimeout(this._openTimeout)},_onInsideClick:function(a){var b=this._handlerCall("onInsideClick",c.element(a));return b===!1?!1:(this._options.dismissOnInsideClick&&this.dismiss(!0),void c.stop(a))},_onOutsideClick:function(a){var b=c.element(a),e=d.findUpwardsHaving(b,Ink.bind(function(a){return a===this._element},this)),f=d.findUpwardsHaving(b,Ink.bind(function(a){return a===this._options.target},this));if(!e&&!f){var g=this._handlerCall("onOutsideClick",b);if(g===!1)return!1;this._options.dismissOnOutsideClick&&this.dismiss(!0),c.stop(a)}},dismiss:function(a,b){this._openOrDismiss(!1,a,b)},open:function(a,b){this._openOrDismiss(!0,a,b)},_openOrDismiss:function(a,b,c){if(!this._toggle||this._toggle.getState()!==a){if(b&&this._handlerCall(a?"onOpen":"onDismiss")===!1)return!1;c||this._toggle.setState(a),clearTimeout(this._dismissTimeout),clearTimeout(this._openTimeout)}},_handlerCall:function(a){return this._options[a]?this._options[a].call(this,[].slice.call(arguments,1)):void 0}},e}),Ink.createModule("Ink.UI.Droppable","1",["Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.UI.Common_1","Ink.Util.Array_1","Ink.Dom.Selector_1"],function(a,b,c,d,e,f){"use strict";var g=function(a){return function(b){return c.addClassName(a,b)}},h=function(a){return function(b){return c.removeClassName(a,b)}},i={debug:!1,_droppables:[],_draggables:[],add:function(b,c){b=d.elOrSelector(b,"Droppable.add target element");var e=Ink.extendObj({hoverClass:c.hoverclass||!1,accept:!1,onHover:!1,onDrop:!1,onDropOut:!1},c||{},a.data(b));"string"==typeof e.hoverClass&&(e.hoverClass=e.hoverClass.split(/\s+/));function f(a){a.style.position="inherit"}var g=this,h={move:function(a,b){f(a),b.appendChild(a)},copy:function(a,b){f(a),b.appendChild(a.cloneNode)},revert:function(a){g._findDraggable(a).originalParent.appendChild(a),f(a)}},i;if("string"==typeof e.onHover&&(i=e.onHover,e.onHover=h[i],void 0===e.onHover))throw new Error("Unknown hover event handler: "+i);if("string"==typeof e.onDrop&&(i=e.onDrop,e.onDrop=h[i],void 0===e.onDrop))throw new Error("Unknown drop event handler: "+i);if("string"==typeof e.onDropOut&&(i=e.onDropOut,e.onDropOut=h[i],void 0===e.onDropOut))throw new Error("Unknown dropOut event handler: "+i);var j={element:b,data:{},options:e};this._droppables.push(j),this._update(j)},_findData:function(a){for(var b=this._droppables,c=0,d=b.length;d>c;c++)if(b[c].element===a)return b[c]},_findDraggable:function(a){for(var b=this._draggables,c=0,d=b.length;d>c;c++)if(b[c].element===a)return b[c]},updateAll:function(){e.each(this._droppables,i._update)},update:function(a){this._update(this._findData(a))},_update:function(b){var c=b.data,d=b.element;c.left=a.offsetLeft(d),c.top=a.offsetTop(d),c.right=c.left+a.elementWidth(d),c.bottom=c.top+a.elementHeight(d)},remove:function(a){a=d.elOrSelector(a);for(var b=this._droppables.length,c=0;b>c;c++)if(this._droppables[c].element===a){this._droppables.splice(c,1);break}return b!==this._droppables.length},action:function(a,b,c,d){e.each(this._droppables,Ink.bind(function(i){var j=i.data,k=i.options,l=i.element;(!k.accept||f.matches(k.accept,[d]).length)&&("drag"!==b||this._findDraggable(d)||this._draggables.push({element:d,originalParent:d.parentNode}),a.x>=j.left&&a.x<=j.right&&a.y>=j.top&&a.y<=j.bottom?"drag"===b?(k.hoverClass&&e.each(k.hoverClass,g(l)),k.onHover&&k.onHover(d,l)):"drop"===b&&(k.hoverClass&&e.each(k.hoverClass,h(l)),k.onDrop&&k.onDrop(d,l,c)):"drag"===b&&k.hoverClass?e.each(k.hoverClass,h(l)):"drop"===b&&k.onDropOut&&k.onDropOut(d,l,c))},this))}};return i}),Ink.createModule("Ink.UI.FormValidator","1",["Ink.Dom.Element_1","Ink.Dom.Css_1","Ink.Util.Validator_1","Ink.Dom.Selector_1"],function(a,b,c,d){"use strict";function e(a){if(!a.name)return[];if(!a.form)return d.select('name="'+a.name+'"');var b=a.form[a.name];return"undefined"==typeof b.length&&(b=[b]),b}var f={version:"1",_flagMap:{"ink-fv-required":{msg:"Required field"},"ink-fv-email":{msg:"Invalid e-mail address"},"ink-fv-url":{msg:"Invalid URL"},"ink-fv-number":{msg:"Invalid number"},"ink-fv-phone_pt":{msg:"Invalid phone number"},"ink-fv-phone_cv":{msg:"Invalid phone number"},"ink-fv-phone_mz":{msg:"Invalid phone number"},"ink-fv-phone_ao":{msg:"Invalid phone number"},"ink-fv-date":{msg:"Invalid date"},"ink-fv-confirm":{msg:"Confirmation does not match"},"ink-fv-custom":{msg:""}},elements:{},confirmElms:{},hasConfirm:{},_errorClassName:"tip error",_errorValidationClassName:"validaton",_errorTypeWarningClassName:"warning",_errorTypeErrorClassName:"error",validate:function(a,b){if(this._free(),b=Ink.extendObj({onSuccess:!1,onError:!1,customFlag:!1,confirmGroup:[]},b||{}),"string"==typeof a&&(a=document.getElementById(a)),null===a)return!1;this.element=a,("undefined"==typeof this.element.id||null===this.element.id||""===this.element.id)&&(this.element.id="ink-fv_randomid_"+Math.round(99999*Math.random())),this.custom=b.customFlag,this.confirmGroup=b.confirmGroup;var c=this._validateElements();return c.length>0?(b.onError?b.onError(c):this._showError(a,c),!1):(b.onError||this._clearError(a),this._clearCache(),b.onSuccess&&b.onSuccess(),!0)},reset:function(){this._clearError(),this._clearCache()},_free:function(){this.element=null,this.custom=!1,this.confirmGroup=!1},_clearCache:function(){this.element=null,this.elements=[],this.custom=!1,this.confirmGroup=!1},_getElements:function(){var a=this.elements[this.element.id]=[];this.confirmElms[this.element.id]=[];for(var c=d.select(":input",this.element),e=!1,f=0,g=c.length;g>f;f++){e=c[f];var h=(e.getAttribute("type")+"").toLowerCase();if("radio"===h||"checkbox"===h){if(0===a.length||e.getAttribute("type")!==a[a.length-1].getAttribute("type")&&e.getAttribute("name")!==a[a.length-1].getAttribute("name"))for(var i in this._flagMap)if(b.hasClassName(e,i)){a.push(e);break}}else{for(var j in this._flagMap)if(b.hasClassName(e,j)&&"ink-fv-confirm"!==j){a.push(e);break}b.hasClassName(e,"ink-fv-confirm")&&(this.confirmElms[this.element.id].push(e),this.hasConfirm[this.element.id]=!0)}}},_validateElements:function(){var a;this._getElements(),this.hasConfirm[this.element.id]===!0&&(a=this._makeConfirmGroups());for(var c=[],d=!1,e=!1,f,g=0,h=this.elements[this.element.id].length;h>g;g++)if(f=!1,d=this.elements[this.element.id][g],!d.disabled)for(var i in this._flagMap)if(b.hasClassName(d,i))if("ink-fv-custom"!==i&&"ink-fv-confirm"!==i)this._isValid(d,i)||(f?c[c.length-1].errors.push(i):(c.push({elm:d,errors:[i]}),f=!0));else if("ink-fv-confirm"!==i)e=this._isCustomValid(d),e.length>0&&c.push({elm:d,errors:[i],custom:e});else if("ink-fv-confirm"===i)continue;return c=this._validateConfirmGroups(a,c)},_validateConfirmGroups:function(a,b){var c=!1;for(var d in a)a.hasOwnProperty(d)&&(c=a[d],2===c.length&&c[0].value!==c[1].value&&b.push({elm:c[1],errors:["ink-fv-confirm"]}));return b},_makeConfirmGroups:function(){var a;if(this.confirmGroup&&this.confirmGroup.length>0){a={};for(var c=!1,d=!1,e=0,f=this.confirmElms[this.element.id].length;f>e;e++){c=this.confirmElms[this.element.id][e];for(var g=0,h=this.confirmGroup.length;h>g;g++)d=this.confirmGroup[g],b.hasClassName(c,d)&&("undefined"==typeof a[d]?a[d]=[c]:a[d].push(c))}return a}return 2===this.confirmElms[this.element.id].length&&(a={"ink-fv-confirm":[this.confirmElms[this.element.id][0],this.confirmElms[this.element.id][1]]}),a;return!1},_isCustomValid:function(a){for(var c=[],d=!1,e=0,f=this.custom.length;f>e;e++)d=this.custom[e],b.hasClassName(a,d.flag)&&(d.callback(a,d.msg)||c.push({flag:d.flag,msg:d.msg}));return c},_isValid:function(a,d){var f=a.nodeName.toLowerCase(),g=(a.getAttribute("type")||"").toLowerCase(),h=this._trim(a.value);if("ink-fv-required"!==d&&"checkbox"!==g&&"radio"!==g&&""===h)return!b.hasClassName(a,"ink-fv-required");switch(d){case"ink-fv-required":if("select"===f)return a.selectedIndex>0?!0:!1;if("checkbox"!==g&&"radio"!==g&&""!==h)return!0;if("checkbox"===g||"radio"===g){for(var i=e(a),j=!1,k=0,l=i.length;l>k;k++)if(i[k].checked===!0){j=!0;break}return j}return!1;case"ink-fv-email":return c.mail(a.value);case"ink-fv-url":return c.url(a.value);case"ink-fv-number":return!isNaN(Number(a.value))&&isFinite(Number(a.value));case"ink-fv-phone_pt":return c.isPTPhone(a.value);case"ink-fv-phone_cv":return c.isCVPhone(a.value);case"ink-fv-phone_ao":return c.isAOPhone(a.value);case"ink-fv-phone_mz":return c.isMZPhone(a.value);case"ink-fv-date":var m=Ink.getModule("Ink.Dom.Element",1),n=m.data(a),o="yyyy-mm-dd";if(b.hasClassName(a,"ink-datepicker")&&"format"in n?o=n.format:"validFormat"in n&&(o=n.validFormat),!(o in c._dateParsers)){var p=[];for(var q in c._dateParsers)c._dateParsers.hasOwnProperty(q)&&p.push(q);throw new Error("The attribute data-valid-format must be one of the following values: "+p.join(", "))}return c.isDate(o,a.value);case"ink-fv-custom":}return!1},_showError:function(a,b){this._clearError(a);for(var c=!1,d=0,e=b.length;e>d;d++)c=b[d].elm,c&&this._showAnErrorOnElement(c,b[d])},_showAnErrorOnElement:function(c,d){var e=a.findUpwardsByClass(c,"control-group"),f=a.findUpwardsByClass(c,"control"),g=[this._errorClassName,this._errorTypeClassName].join(" "),h=a.create("p",{className:g});h.innerHTML="ink-fv-custom"!==d.errors[0]?this._flagMap[d.errors[0]].msg:d.custom[0].msg;var i=f||e;i?i.appendChild(h):a.insertAfter(h,c),f&&("ink-fv-required"===d.errors[0]?b.addClassName(e,"validation error"):b.addClassName(e,"validation warning"))},_clearError:function(c){for(var d=c.getElementsByTagName("p"),e,f,g=d.length-1;g>=0;g--)e=d[g],b.hasClassName(e,this._errorClassName)&&(f=a.findUpwardsBySelector(e,".control-group"),f&&b.removeClassName(f,["validation","error","warning"]),b.hasClassName(e,this._errorClassName,!0)&&a.remove(e));var h=c.getElementsByTagName("ul");for(g=h.length-1;g>=0;g--)e=h[g],b.hasClassName(e,"control-group")&&b.removeClassName(e,"validation error")},_trim:function(a){return"string"==typeof a?a.replace(/^\s+|\s+$|\n+$/g,""):void 0}};return f}),Ink.createModule("Ink.UI.FormValidator","2",["Ink.UI.Common_1","Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Selector_1","Ink.Dom.Css_1","Ink.Util.Array_1","Ink.Util.I18n_1","Ink.Util.Validator_1"],function(a,b,c,d,e,f,g,h){"use strict";var i={required:function(a){return"undefined"!=typeof a&&!/^\s*$/.test(a)},min_length:function(a,b){return"string"==typeof a&&a.length>=parseInt(b,10)},max_length:function(a,b){return"string"==typeof a&&a.length<=parseInt(b,10)},exact_length:function(a,b){return"string"==typeof a&&a.length===parseInt(b,10)},email:function(a){return"string"==typeof a&&h.mail(a)},url:function(a,b){return b=b||!1,"string"==typeof a&&h.url(a,b)},ip:function(a,b){return"string"!=typeof a?!1:h.isIP(a,b)},phone:function(a,b){if("string"!=typeof a)return!1;var c=b?b.toUpperCase():"";return h["is"+c+"Phone"](a)},credit_card:function(a,b){return"string"!=typeof a?!1:h.isCreditCard(a,b||"default")},date:function(a,b){return"string"==typeof a&&h.isDate(b,a)},alpha:function(a,b){return h.ascii(a,{singleLineWhitespace:b})},text:function(a,b,c){return h.unicode(a,{singleLineWhitespace:b,unicodePunctuation:c})},latin:function(a,b,c){return"string"!=typeof a?!1:h.latin1(a,{latin1Punctuation:b,singleLineWhitespace:c})},alpha_numeric:function(a){return h.ascii(a,{numbers:!0})},alpha_dash:function(a){return h.ascii(a,{dash:!0,underscore:!0})},digit:function(a){return"string"==typeof a&&/^[0-9]{1}$/.test(a)},integer:function(a,b){return h.number(a,{negative:!b,decimalPlaces:0})},decimal:function(a,b,c,d){return h.number(a,{decimalSep:b||".",decimalPlaces:+c||null,maxDigits:+d})},numeric:function(a,b,c,d){return b=b||".",-1!==a.indexOf(b)?i.decimal(a,b,c,d):i.integer(a)},range:function(a,b,c,d){return a=+a,b=+b,c=+c,isNaN(a)||isNaN(b)||isNaN(c)?!1:b>a||a>c?!1:d?(a-b)%d===0:!0},color:function(a){return h.isColor(a)},matches:function(a,b){return a===this.getFormElements()[b][0].getValue()}},j=new g({en_US:{"formvalidator.required":"The {field} filling is mandatory","formvalidator.min_length":"The {field} must have a minimum size of {param1} characters","formvalidator.max_length":"The {field} must have a maximum size of {param1} characters","formvalidator.exact_length":"The {field} must have an exact size of {param1} characters","formvalidator.email":"The {field} must have a valid e-mail address","formvalidator.url":"The {field} must have a valid URL","formvalidator.ip":"The {field} does not contain a valid {param1} IP address","formvalidator.phone":"The {field} does not contain a valid {param1} phone number","formvalidator.credit_card":"The {field} does not contain a valid {param1} credit card","formvalidator.date":"The {field} should contain a date in the {param1} format","formvalidator.alpha":"The {field} should only contain letters","formvalidator.text":"The {field} should only contain alphabetic characters","formvalidator.latin":"The {field} should only contain alphabetic characters","formvalidator.alpha_numeric":"The {field} should only contain letters or numbers","formvalidator.alpha_dashes":"The {field} should only contain letters or dashes","formvalidator.digit":"The {field} should only contain a digit","formvalidator.integer":"The {field} should only contain an integer","formvalidator.decimal":"The {field} should contain a valid decimal number","formvalidator.numeric":"The {field} should contain a number","formvalidator.range":"The {field} should contain a number between {param1} and {param2}","formvalidator.color":"The {field} should contain a valid color","formvalidator.matches":"The {field} should match the field {param1}","formvalidator.validation_function_not_found":"The rule {rule} has not been defined"},pt_PT:{"formvalidator.required":"Preencher {field} é obrigatório","formvalidator.min_length":"{field} deve ter no mínimo {param1} caracteres","formvalidator.max_length":"{field} tem um tamanho máximo de {param1} caracteres","formvalidator.exact_length":"{field} devia ter exactamente {param1} caracteres","formvalidator.email":"{field} deve ser um e-mail válido","formvalidator.url":"O {field} deve ser um URL válido","formvalidator.ip":"{field} não tem um endereço IP {param1} válido","formvalidator.phone":"{field} deve ser preenchido com um número de telefone {param1} válido.","formvalidator.credit_card":"{field} não tem um cartão de crédito {param1} válido","formvalidator.date":"{field} deve conter uma data no formato {param1}","formvalidator.alpha":"O campo {field} deve conter apenas caracteres alfabéticos","formvalidator.text":"O campo {field} deve conter apenas caracteres alfabéticos","formvalidator.latin":"O campo {field} deve conter apenas caracteres alfabéticos","formvalidator.alpha_numeric":"{field} deve conter apenas letras e números","formvalidator.alpha_dashes":"{field} deve conter apenas letras e traços","formvalidator.digit":"{field} destina-se a ser preenchido com apenas um dígito","formvalidator.integer":"{field} deve conter um número inteiro","formvalidator.decimal":"{field} deve conter um número válido","formvalidator.numeric":"{field} deve conter um número válido","formvalidator.range":"{field} deve conter um número entre {param1} e {param2}","formvalidator.color":"{field} deve conter uma cor válida","formvalidator.matches":"{field} deve corresponder ao campo {param1}","formvalidator.validation_function_not_found":"[A regra {rule} não foi definida]"}},"en_US"),k=function(c,d){this._element=a.elOrSelector(c,"Invalid FormElement"),this._errors={},this._rules={},this._value=null,this._options=Ink.extendObj({label:this._getLabel()},b.data(this._element)),this._options=Ink.extendObj(this._options,d||{})};k.prototype={_getLabel:function(){var a=b.findUpwardsByClass(this._element,"control-group"),c=Ink.s("label",a);return c=c?b.textContent(c):this._element.name||this._element.id||""},_parseRules:function(a){this._rules={},a=a.split("|");var b,c=a.length,d,e,f;if(c>0)for(b=0;c>b;b++)if(d=a[b])if(-1!==(f=d.indexOf("["))){e=d.substr(f+1),e=e.split("]"),e=e[0],e=e.split(",");for(var g=0,h=e.length;h>g;g++)e[g]="true"===e[g]?!0:"false"===e[g]?!1:e[g];e.splice(0,0,this.getValue()),d=d.substr(0,f),this._rules[d]=e}else this._rules[d]=[this.getValue()]},_addError:function(a){for(var b=this._rules[a]||[],c={field:this._options.label,value:this.getValue()},d=1;d"),this._errorMessages.push(f)},this)),!1)}},l}),Ink.createModule("Ink.UI.ImageQuery","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Util.Array_1"],function(a,b,c,d){"use strict";var e=function(b,d){this._element=a.elsOrSelector(b,"Ink.UI.ImageQuery",!0);for(var f=1;f1&&"retina"in this._options&&(b=a.retina||this._options.retina),a.file=this._filename,"function"==typeof b&&(b=b.apply(this,[this._element,a]),"string"!=typeof b))throw'[ImageQuery] :: "src" callback does not return a string';b=b.replace(/{:(.*?)}/g,function(b,c){return a[c]}),this._element.src=b,delete a.file}},_findCurrentQuery:function(){for(var a=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,b=this._options.queries,c=b.length-1,d=0;c>d;d+=1)if(b[d].width<=a)return b[d];return b[c]},_onLoad:function(){this._options.onLoad.call(this)}},e}),Ink.createModule("Ink.UI.LazyLoad","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1"],function(a,b,c){"use strict";var d=function(a,b){this._init(a,b)};return d.prototype={_init:function(b){this._rootElm=a.elsOrSelector(b,"Ink.UI.LazyLoad root element")[0]||null,this._options=a.options({item:["String",".lazyload-item"],placeholder:["String",null],source:["String","data-src"],destination:["String","src"],delay:["Number",100],delta:["Number",0],image:["Boolean",!0],scrollElement:["Element",window],touchEvents:["Boolean",!0],onInsideViewport:["Function",!1],onAfterAttributeChange:["Function",!1],autoInit:["Boolean",!0]},arguments[1]||{},this._rootElm),this._aData=[],this._hasEvents=!1,this._options.autoInit&&this._activate()},_activate:function(){this._getData(),this._hasEvents||this._addEvents(),this._onScrollThrottled()},_getData:function(){for(var a=Ink.ss(this._options.item),b=null,d=0,e=a.length;e>d;d++)null==this._options.placeholder||c.hasAttribute(a[d],this._options.destination)||a[d].setAttribute(this._options.destination,this._options.placeholder),b=a[d].getAttribute(this._options.source),null===b&&this._options.image||this._aData.push({elm:a[d],original:b})},_addEvents:function(){this._onScrollThrottled=b.throttle(Ink.bindEvent(this._onScroll,this),this._options.delay),"ontouchmove"in document.documentElement&&this._options.touchEvents&&b.observe(document.documentElement,"touchmove",this._onScrollThrottled),b.observe(this._options.scrollElement,"scroll",this._onScrollThrottled),this._hasEvents=!0},_removeEvents:function(){"ontouchmove"in document.documentElement&&this._options.touchEvents&&b.stopObserving(document.documentElement,"touchmove",this._onScrollThrottled),b.stopObserving(this._options.scrollElement,"scroll",this._onScrollThrottled),this._hasEvents=!1},_onScroll:function(){for(var a,b=0;bthis.originalStatus[c]?this._modalDivStyle[i(c)]:Math.round(.9*b[c])+"px")},this)),this._resizeContainer(),this._reposition(),this._resizeTimeout=void 0},_onShadeClick:function(a){var f=b.element(a);if(c.hasClassName(f,"ink-close")||c.hasClassName(f,"ink-dismiss")||d.findUpwardsBySelector(f,".ink-close,.ink-dismiss")||this._options.closeOnClick&&(!d.descendantOf(this._shadeElement,f)||f===this._shadeElement)){for(var g=e.select(".ink-alert",this._shadeElement),h=g.length,i=0;h>i;i++)if(d.descendantOf(g[i],f))return;this.dismiss(),this._wasDismissed&&b.stop(a)}},_onKeyDown:function(a){27!==a.keyCode||this._wasDismissed||"true"===this._options.closeOnEscape.toString()&&j[j.length-1]===this&&(this.dismiss(),this._wasDismissed&&b.stop(a))},_resizeContainer:function(){this._contentElement.style.overflow=this._contentElement.style.overflowX=this._contentElement.style.overflowY="hidden";var a=d.elementHeight(this._modalDiv);this._modalHeader=e.select(".modal-header",this._modalDiv)[0],this._modalHeader&&(a-=d.elementHeight(this._modalHeader)),this._modalFooter=e.select(".modal-footer",this._modalDiv)[0],this._modalFooter&&(a-=d.elementHeight(this._modalFooter)),this._contentContainer.style.height=a+"px",a!==d.elementHeight(this._contentContainer)&&(this._contentContainer.style.height=~~(a-(d.elementHeight(this._contentContainer)-a))+"px"),this._markupMode||(this._contentContainer.style.overflow=this._contentContainer.style.overflowX="hidden",this._contentContainer.style.overflowY="auto",this._contentElement.style.overflow=this._contentElement.style.overflowX=this._contentElement.style.overflowY="visible")},_disableScroll:function(){var a=document.documentElement;this._oldHtmlOverflows=[a.style.overflowX,a.style.overflowY],a.style.overflowX=a.style.overflowY="hidden"},open:function(e){e&&b.stop(e);var g="CSS1Compat"===document.compatMode?document.documentElement:document.body;this._resizeTimeout=null,c.addClassName(this._modalShadow,"ink-shade"),this._modalShadowStyle.display=this._modalDivStyle.display="block",setTimeout(Ink.bind(function(){c.addClassName(this._modalShadow,"visible"),c.addClassName(this._modalDiv,"visible")},this),100),this._contentElement=this._modalDiv,this._shadeElement=this._modalShadow,this._markupMode||this.setContentMarkup(this._options.markup);var k={width:-1!==(""+this._options.width).indexOf("%"),height:-1!==(""+this._options.height).indexOf("%")};f.forEach(["width","height"],Ink.bind(function(a){void 0!==this._options[a]?(this._modalDivStyle[a]=this._options[a],k[a]||(this._modalDivStyle[i(a)]=d["element"+h(a)](this._modalDiv)+"px")):this._modalDivStyle[i(a)]=d["element"+h(a)](this._modalDiv)+"px",k[a]&&parseInt(g["client"+i(a)],10)<=parseInt(this._modalDivStyle[a],10)&&(this._modalDivStyle[a]=Math.round(.9*parseInt(g["client"+i(a)],10))+"px")},this)),this.originalStatus={viewportHeight:d.elementHeight(g),viewportWidth:d.elementWidth(g),height:d.elementHeight(this._modalDiv),width:d.elementWidth(this._modalDiv)},"true"===this._options.responsive.toString()?(this._onResize(!0),b.observe(window,"resize",this._handlers.resize)):(this._resizeContainer(),this._reposition()),this._options.onShow&&this._options.onShow(this),"true"===this._options.disableScroll.toString()&&this._disableScroll(),b.observe(this._shadeElement,"click",this._handlers.click),"true"===this._options.closeOnEscape.toString()&&b.observe(document,"keydown",this._handlers.keyDown),a.registerInstance(this,this._shadeElement,"modal"),this._wasDismissed=!1,j.push(this),c.addClassName(document.documentElement,"ink-modal-is-open")},dismiss:function(){if(!this._wasDismissed){if(this._options.onDismiss){var a=this._options.onDismiss(this);if(a===!1)return}if(this._wasDismissed=!0,this._options.responsive&&b.stopObserving(window,"resize",this._handlers.resize),this._markupMode?(c.removeClassName(this._modalDiv,"visible"),c.removeClassName(this._modalShadow,"visible"),this._waitForFade(this._modalShadow,Ink.bind(function(){this._modalShadowStyle.display="none"},this))):(this._modalShadow.parentNode.removeChild(this._modalShadow),this.destroy()),j=f.remove(j,f.keyValue(this,j),1),0===j.length){var d=document.documentElement;this._options.disableScroll&&(d.style.overflowX=this._oldHtmlOverflows[0],d.style.overflowY=this._oldHtmlOverflows[1]),c.removeClassName(d,"ink-modal-is-open")}}},_waitForFade:function(a,d){if(!g)return d();for(var e=["transitionEnd","oTransitionEnd","webkitTransitionEnd"],f,h,i=0,j=e.length;j>i;i++)if(h=e[i],f="on"+h.toLowerCase(),f in a)return void b.observeOnce(a,h,d);var k=function(){+c.getStyle(a,"opacity")>0?setTimeout(k,250):d()};setTimeout(k,500)},destroy:function(){a.unregisterInstance(this._instanceId)},getContentElement:function(){return this._contentContainer},setContentMarkup:function(a){if(this._markupMode)this._contentContainer.innerHTML=a;else{if(this._modalDiv.innerHTML=[a].join(""),this._contentContainer=e.select(".modal-body",this._modalDiv),!this._contentContainer.length){var b=e.select(".modal-header",this._modalDiv),g=e.select(".modal-footer",this._modalDiv);f.each(b,d.remove),f.each(g,d.remove);var h=document.createElement("div");c.addClassName(h,"modal-body"),h.innerHTML=this._modalDiv.innerHTML,this._modalDiv.innerHTML="";var i=b.concat([h]).concat(g);f.each(i,Ink.bindMethod(this._modalDiv,"appendChild")),this._contentContainer=e.select(".modal-body",this._modalDiv)}this._contentContainer=this._contentContainer[0]}this._contentElement=this._modalDiv,this._resizeContainer()}},k}),Ink.createModule("Ink.UI.Pagination","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1"],function(a,b,c,d,e){"use strict";var f=function(a,b,c){var d=document.createElement("a");if(d.setAttribute("href","#"),"number"==typeof b&&d.setAttribute("data-index",b),c&&c.wrapText){var e=document.createElement("span");d.appendChild(e),e.innerHTML=a}else d.innerHTML=a;return d},g=function(b,c){this._element=a.elOrSelector(b,"Ink.UI.Pagination element"),this._options=a.options("Ink.UI.Pagination_1",{size:["Integer",null],totalItemCount:["Integer",null],itemsPerPage:["Integer",null],maxSize:["Integer",null],start:["Integer",1],sideButtons:["Boolean",1],firstLabel:["String","First"],lastLabel:["String","Last"],previousLabel:["String","Previous"],nextLabel:["String","Next"],previousPageLabel:["String",null],nextPageLabel:["String",null],onChange:["Function",void 0],hashParameter:["String","page"],parentTag:["String","ul"],childTag:["String","li"],wrapperClass:["String","ink-navigation"],paginationClass:["String","pagination"],activeClass:["String","active"],disabledClass:["String","disabled"],hideClass:["String","hide-all"],previousClass:["String","previous"],previousPageClass:["String","previousPage"],nextClass:["String","next"],nextPageClass:["String","nextPage"],numberFormatter:["Function",function(a){return a+1}]},c||{},this._element),this._options.previousPageLabel||(this._options.previousPageLabel=this._options.previousLabel+" "+this._options.maxSize),this._options.nextPageLabel||(this._options.nextPageLabel=this._options.nextLabel+" "+this._options.maxSize),this._handlers={click:Ink.bindEvent(this._onClick,this)},a.isInteger(this._options.totalItemCount)&&a.isInteger(this._options.itemsPerPage)?this._size=this._calculateSize(this._options.totalItemCount,this._options.itemsPerPage):a.isInteger(this._options.size)?this._size=this._options.size:(Ink.error("Ink.UI.Pagination: Please supply a size option or totalItemCount and itemsPerPage options."),this._size=0),this.setOnChange(this._options.onChange),this._current=this._options.start-1,this._itemLiEls=[],this._init()};return g.prototype={_init:function(){this._generateMarkup(this._element),this._updateItems(),this._observe(),a.registerInstance(this,this._element,"pagination")},_observe:function(){b.observeDelegated(this._element,"click","."+this._options.paginationClass+" > "+this._options.childTag,this._handlers.click)},_calculateSize:function(a,b){return Math.ceil(a/b)},_updateItems:function(){var a=this._itemLiEls,b=this._size===a.length,d,e,g;if(b)for(d=0,e=this._size;e>d;++d)c.setClassName(a[d],this._options.activeClass,d===this._current);else{for(d=a.length-1;d>=0;--d)this._ulEl.removeChild(a[d]);for(a=[],d=0,e=this._size;e>d;++d)g=document.createElement(this._options.childTag),g.appendChild(f(this._options.numberFormatter(d),d)),c.setClassName(g,this._options.activeClass,d===this._current),this._ulEl.insertBefore(g,this._nextEl),a.push(g);this._itemLiEls=a}if(this._options.maxSize){var h=Math.floor(this._current/this._options.maxSize),i=this._options.maxSize*h,j=i+this._options.maxSize-1;for(d=0,e=this._size;e>d;++d)g=a[d],c.setClassName(g,this._options.hideClass,i>d||d>j);this._pageStart=i,this._pageEnd=j,this._page=h,c.setClassName(this._prevPageEl,this._options.disabledClass,!this.hasPreviousPage()),c.setClassName(this._nextPageEl,this._options.disabledClass,!this.hasNextPage()),c.setClassName(this._firstEl,this._options.disabledClass,this.isFirst()),c.setClassName(this._lastEl,this._options.disabledClass,this.isLast())}this._prevEl&&c.setClassName(this._prevEl,this._options.disabledClass,!this.hasPrevious()),this._nextEl&&c.setClassName(this._nextEl,this._options.disabledClass,!this.hasNext())},_generateMarkup:function(a){c.addClassName(a,"ink-navigation");var b=Ink.s("."+this._options.paginationClass,a),d=!1;b?d=!0:(b=document.createElement(this._options.parentTag),c.addClassName(b,this._options.paginationClass));var e=c.hasClassName(b,"chevron"),g=c.hasClassName(b,"dotted"),h=Ink.bind(function(a,d){var e=document.createElement(this._options.childTag),g=f(this._options[a+"Label"],void 0,{wrapText:d&&d.wrapText});return c.addClassName(e,this._options[a+"Class"]),e.appendChild(g),b.appendChild(e),e},this);!g&&this._options.maxSize&&(this._firstEl=h("first"),this._prevPageEl=h("previousPage")),(g&&this._options.sideButtons===!0||!g&&this._options.sideButtons)&&(this._prevEl=h("previous",{wrapText:e}),this._nextEl=h("next",{wrapText:e})),!g&&this._options.maxSize&&(this._nextPageEl=h("nextPage"),this._lastEl=h("last")),d||a.appendChild(b),this._ulEl=b},_onClick:function(a){b.stop(a);var d=b.element(a);if(!c.hasClassName(d,this._options.activeClass)&&!c.hasClassName(d,this._options.disabledClass)){var f=c.hasClassName(d,this._options.previousClass),g=c.hasClassName(d,this._options.nextClass),h=c.hasClassName(d,this._options.previousPageClass),i=c.hasClassName(d,this._options.nextPageClass),j=c.hasClassName(d,this._options.firstClass),k=c.hasClassName(d,this._options.lastClass);if(j)this.setCurrent(0);else if(k)this.setCurrent(this._size-1);else if(h||i)this.setCurrent((h?-1:1)*this._options.maxSize,!0);else if(f||g)this.setCurrent(f?-1:1,!0);else{var l=e.select("[data-index]",d)[0],m=l&&parseInt(l.getAttribute("data-index"),10);this.setCurrent(m)}}},setOnChange:function(a){if(void 0!==a&&"function"!=typeof a)throw new TypeError("onChange option must be a function!");this._onChange=a},setSize:function(b){if(!a.isInteger(b))throw new TypeError("1st argument must be an integer number!");this._size=b,this._updateItems(),this._current=0},setSizeInItems:function(a,b){var c=Math.ceil(a/b);this.setSize(c)},setCurrent:function(b,c){if(!a.isInteger(b))throw new TypeError("1st argument must be an integer number!");c&&(b+=this._current),b>this._size-1&&(b=this._size-1),0>b&&(b=0),this._current=b,this._updateItems(),this._onChange&&this._onChange(this,b)},getSize:function(){return this._size},getCurrent:function(){return this._current},isFirst:function(){return 0===this._current},isLast:function(){return this._current===this._size-1},hasPrevious:function(){return this._current>0},hasNext:function(){return this._currentthis._options.maxSize-1},hasNextPage:function(){return this._options.maxSize&&this._size-this._current>=this._options.maxSize+1},destroy:a.destroyComponent},g}),Ink.createModule("Ink.UI.ProgressBar","1",["Ink.UI.Common_1","Ink.Dom.Selector_1","Ink.Dom.Element_1"],function(a,b,c){"use strict";var d=function(b,d){this._element=a.elOrSelector(b),this._options=Ink.extendObj({startValue:0,onStart:function(){},onEnd:function(){}},c.data(this._element)),this._options=Ink.extendObj(this._options,d||{}),this._value=this._options.startValue,this._init()};return d.prototype={_init:function(){if(this._elementBar=b.select(".bar",this._element),this._elementBar.length<1)throw"[Ink.UI.ProgressBar] :: Bar element not found";this._elementBar=this._elementBar[0],this._options.onStart=Ink.bind(this._options.onStart,this),this._options.onEnd=Ink.bind(this._options.onEnd,this),this.setValue(this._options.startValue)},setValue:function(a){this._options.onStart(this._value),a=parseInt(a,10),isNaN(a)||0>a?a=0:a>100&&(a=100),this._value=a,this._elementBar.style.width=this._value+"%",this._options.onEnd(this._value)}},d}),Ink.createModule("Ink.UI.SmoothScroller","1",["Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Dom.Loaded_1"],function(a,b,c,d){"use strict";var e=window.requestAnimationFrame||function(a){return setTimeout(a,10)},f=window.cancelAnimationFrame||function(a){clearTimeout(a)},g={speed:10,getTop:function(a){return Math.round(g.scrollTop()+a.getBoundingClientRect().top)},scrollTop:function(){var a=document.body,b=document.documentElement;return a&&a.scrollTop?a.scrollTop:b&&b.scrollTop?b.scrollTop:window.pageYOffset?window.pageYOffset:0},add:function(b,c,d){a.observe(b,c,d)},end:function(b){a.stopDefault(b)},scroll:function(a,b){var c=g.scrollTop(),d=b.margin||0,h=a-d;c+=h>c?Math.ceil((h-c)/g.speed):(h-c)/g.speed,f(g.interval),c!==h&&g.offsetTop!==c?g.interval=e(Ink.bindMethod(g,"scroll",a,b),document.body):g.onDone(),window.scrollTo(0,c),g.offsetTop=c},init:function(a){d.run(Ink.bindMethod(g,"render",a))},render:function(b){for(var d=c.select(b||"a.scrollableLink,a.ink-smooth-scroll"),e=0;e li.active > "+j,j='a[name="'+h+'"],#'+h,k=c.select(j)[0],l=c.select(i)[0];if(l=l&&l.parentNode,"undefined"!=typeof k){-1===d.parentNode.className.indexOf("active")&&(l&&(l.className=l.className.replace(/(^|\s+)active($|\s+)/g,"")),d.parentNode.className+=" active"),g.hash=h;var m={};parseFloat(f.margin)&&(m.margin=parseFloat(f.margin)),g.scroll(g.getTop(k),m)}}},onDone:function(){window.location.hash=g.hash}};return g}),Ink.createModule("Ink.UI.SortableList","1",["Ink.UI.Common_1","Ink.Dom.Css_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Selector_1"],function(a,b,c,d,e){"use strict";var f="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,g=function(b,c){this._element=a.elOrSelector(b,"Ink.UI.SortableList"),this._options=a.options("Sortable",{placeholderClass:["String","placeholder"],draggedClass:["String","hide-all"],draggingClass:["String","dragging"],dragSelector:["String","li"],dragObject:["String",null],handleSelector:["String",null],moveSelector:["String",!1],swap:["Boolean",!1],cancelMouseOut:["Boolean",!1]},c||{},this._element),null!=this._options.dragObject&&(Ink.warn("Ink.UI.SortableList: options.dragObject is now deprecated. Please use options.handleSelector instead."),this._options.handleSelector=this._options.handleSelector||this._options.dragObject),this._handlers={down:Ink.bind(this._onDown,this),move:Ink.bind(this._onMove,this),up:Ink.bind(this._onUp,this)},this._isMoving=!1,this._init()};return g.prototype={_init:function(){this._down=f?"touchstart mousedown":"mousedown",this._move=f?"touchmove mousemove":"mousemove",this._up=f?"touchend mouseup":"mouseup",this._observe(),a.registerInstance(this,this._element,"sortableList")},_observe:function(){c.on(this._element,this._down,this._options.dragSelector,this._handlers.down),c.on(this._element,this._move,this._options.dragSelector,this._handlers.move),this._options.cancelMouseOut&&c.on(this._element,"mouseleave",Ink.bind(this.stopMoving,this)),c.on(document.documentElement,this._up,this._handlers.up)},_onDown:function(a){if(!(this._isMoving||this._placeholder||this._options.handleSelector&&!e.matchesSelector(a.target,this._options.handleSelector))){var b=a.currentTarget;return this._isMoving=b,this._placeholder=b.cloneNode(!0),this._movePlaceholder(b),this._addMovingClasses(),!1}},_onMove:function(a){return this.validateMove(a.currentTarget),!1},_onUp:function(a){return this._isMoving&&this._placeholder&&a.currentTarget!==this._isMoving&&a.currentTarget!==this._placeholder?(d.insertBefore(this._isMoving,this._placeholder),this.stopMoving(),!1):void 0},_addMovingClasses:function(){b.addClassName(this._placeholder,this._options.placeholderClass),b.addClassName(this._isMoving,this._options.draggedClass),b.addClassName(document.documentElement,this._options.draggingClass)},_removeMovingClasses:function(){this._isMoving&&b.removeClassName(this._isMoving,this._options.draggedClass),this._placeholder&&b.removeClassName(this._placeholder,this._options.placeholderClass),b.removeClassName(document.documentElement,this._options.draggingClass)},_movePlaceholder:function(a){var b=this._placeholder,c,e,f,g;b?this._options.swap?(d.insertAfter(b,a),d.insertBefore(a,this._isMoving),d.insertBefore(this._isMoving,b)):(c=d.offset(a),e=d.offset(this._placeholder),f=c[1]>e[1],g=c[0]>e[0],f&&g||!f&&!g?d.insertBefore(b,a):d.insertAfter(b,a),d.insertBefore(this._isMoving,b)):d.insertAfter(b,a)},destroy:a.destroyComponent,stopMoving:function(){this._removeMovingClasses(),d.remove(this._placeholder),this._placeholder=!1,this._isMoving=!1},validateMove:function(a){this._isMoving&&this._placeholder&&a!==this._placeholder&&a!==this._isMoving&&(!this._options.moveSelector||e.matchesSelector(a,this._options.moveSelector)?this._movePlaceholder(a):this.stopMoving())}},g}),Ink.createModule("Ink.UI.Spy","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1"],function(a,b,c,d,e){"use strict";var f=[];function g(a){for(var b=0,c=f.length;c>b;b++)if(f[b][0]===a)return b;return null}function h(a,b){var c=g(b);null===c?f.push([b,[a]]):f[c][1].push(a)}var i=!1;function j(){i||(i=!0,b.observe(document,"scroll",b.throttle(k,300)))}function k(){for(var a=0,b=f.length;b>a;a++)l(f[a][0],f[a][1])}function l(a,b){for(var f=m(b),g=e.select("li.active",a),h=0,i=g.length;i>h;h++)c.removeClassName(g[h],"active");if(null!==f){var j='a[href$="#'+(f.name||f.id)+'"]',k=e.select(j,a);for(h=0,i=k.length;i>h;h++)c.addClassName(d.findUpwardsByTag(k[h],"li"),"active")}}function m(a){for(var b=-1/0,c,d,e=0,f=a.length;f>e;e++)d=a[e].getBoundingClientRect(),d.top<=0&&d.top>b&&(b=d.top,c=e);return void 0===c?null:a[c]}var n=function(b,c){this._element=a.elOrSelector(b,"Ink.UI.Spy_1: Section element"),this._options=Ink.extendObj({target:void 0,activeClass:"active"},d.data(this._element)),this._options=Ink.extendObj(this._options,c||{}),this._options.target=a.elOrSelector(this._options.target,"Ink.UI.Spy_1: Target element"),this._init()};return n.prototype={_init:function(){h(this._element,this._options.target),j(),k()}},n}),Ink.createModule("Ink.UI.Stacker",1,["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1"],function(a,b,c){"use strict";function d(a,b){this._init(a,b)}return d.prototype={_init:function(b,c){this._rootElm=a.elsOrSelector(b,"Ink.UI.Stacker root element")[0]||null,null===this._rootElm&&"undefined"!=typeof console&&console.warn("Ink.UI.Stacker: No root element"),this._options=a.options({column:["String",".stacker-column"],item:["String",".stacker-item"],customBreakPoints:["Object",null],largeMax:["Number",Number.MAX_VALUE],largeMin:["Number",961],mediumMax:["Number",960],mediumMin:["Number",651],smallMax:["Number",650],smallMin:["Number",0],largeCols:["Integer",3],mediumCols:["Integer",2],smallCols:["Integer",1],isOrdered:["Boolean",!0],onRunCallback:["Function",null],onResizeCallback:["Function",null],onAPIReloadCallback:["Function",null]},c||{},this._rootElm),this._aList=[],this._curLayout="large",this._runFirstTime=!1,this._getPageItemsToList(),(this._canApplyLayoutChange()||!this._runFirstTime)&&(this._runFirstTime=!0,this._applyLayoutChange(),"function"==typeof this._options.onRunCallback&&this._options.onRunCallback(this._curLayout)),this._addEvents()},addItem:function(a){this._aList.push(a)},reloadItems:function(){this._applyLayoutChange(),"function"==typeof this._options.onAPIReloadCallback&&this._options.onAPIReloadCallback(this._curLayout)},_addEvents:function(){b.observe(window,"resize",Ink.bindEvent(this._onResize,this))},_onResize:function(){this._canApplyLayoutChange()&&(this._removeDomItems(),this._applyLayoutChange(),"function"==typeof this._options.onResizeCallback&&this._options.onResizeCallback(this._curLayout))},_setCurLayout:function(){var a=c.viewportWidth();if(this._options.customBreakpoints&&"object"==typeof this._options.customBreakPoints){for(var b in this._options.customBreakPoints)if(this._options.customBreakPoints.hasOwnProperty(b)&&a>=Number(this._options.customBreakPoints[b].min)&&a<=Number(this._options.customBreakPoints[b].max)&&this._curLayout!==b)return void(this._curLayout=b)}else a<=Number(this._options.largeMax)&&a>=Number(this._options.largeMin)&&"large"!==this._curLayout?this._curLayout="large":a>=Number(this._options.mediumMin)&&a<=Number(this._options.mediumMax)&&"medium"!==this._curLayout?this._curLayout="medium":a>=Number(this._options.smallMin)&&a<=Number(this._options.smallMax)&&"small"!==this._curLayout&&(this._curLayout="small") +},_getColumnsToShow:function(){return Number(this._options.customBreakPoints&&"object"==typeof this._options.customBreakPoints?this._options.customBreakPoints[this._curLayout].cols:this._options[this._curLayout+"Cols"])},_canApplyLayoutChange:function(){var a=this._curLayout;return this._setCurLayout(),a!==this._curLayout?!0:!1},_getPageItemsToList:function(){this._aColumn=Ink.ss(this._options.column,this._rootElm);var a=this._aColumn.length,b=0;if(a>0){for(var c=0;c0&&this._options.isOrdered){for(var f=[],g=0;g0)for(var b=0;a>b;b++)for(var c=Ink.ss(this._options.item,this._aColumn[b]),d=c.length-1;d>=0;d--)c[d].parentNode.removeChild(c[d])},_applyLayoutChange:function(){var a=this._getColumnsToShow(),b=this._aList.length,c=0,d=0;if(a>0)for(;a>d;){if(this._aColumn[d].appendChild(this._aList[c]),c++,d++,c===b)return;d===a&&(d=0)}}},d}),Ink.createModule("Ink.UI.Sticky","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Css_1"],function(a,b,c,d){"use strict";var e=function(b,d){this._rootElement=a.elOrSelector(b,"Ink.UI.Sticky_1"),this._options=a.options({offsetBottom:["Integer",0],offsetTop:["Integer",0],topElement:["Element",null],wrapperClass:["String","ink-sticky-wrapper"],stickyClass:["String","ink-sticky-stuck"],inlineDimensions:["Boolean",!0],inlinePosition:["Boolean",!0],bottomElement:["Element",null],activateInLayouts:["String","medium,large"]},d||{},this._rootElement),this._options.activateInLayouts=this._options.activateInLayouts.toString(),this._dims=null,this._options.offsetTop=parseInt(this._options.offsetTop,10)||0,this._options.offsetBottom=parseInt(this._options.offsetBottom,10)||0,this._options.topElement&&(this._options.topElement=a.elOrSelector(this._options.topElement,"Top Element")),this._options.bottomElement&&(this._options.bottomElement=a.elOrSelector(this._options.bottomElement,"Sticky bottom Element")),this._wrapper=c.create("div",{className:this._options.wrapperClass}),c.wrap(this._rootElement,this._wrapper),this._init()};return e.prototype={_init:function(){var a=document.addEventListener?document:window;this._onScroll=Ink.bind(b.throttle(this._onScroll,33),this),b.observe(a,"scroll",this._onScroll),b.observe(window,"resize",Ink.bindEvent(b.throttle(this._onResize,100),this)),this._onScroll()},_isDisabledInLayout:function(){var b=a.currentLayout();return b?-1===this._options.activateInLayouts.indexOf(b):!1},_onScroll:function(){var a=this._getDims(),b=c.scrollHeight(),d=this._isDisabledInLayout()||b<=a.top-this._options.offsetTop||this._options.topElement&&this._options.topElement.getBoundingClientRect().bottom+this._options.offsetTop>0;if(d)return void this._unstick();var e=this._options.offsetTop+a.height+c.scrollHeight(),f=document.body.scrollHeight;this._options.bottomElement&&(f=this._options.bottomElement.getBoundingClientRect().top+c.scrollHeight()),f-=this._options.offsetBottom,this._stickTo(f>e?"screen":"bottom")},_stickTo:function(a){var b=this._rootElement.style,e=this._getDims();if(d.addClassName(this._rootElement,this._options.stickyClass),this._wrapper.style.height=e.height+"px",this._inlineDimensions(e.height+"px",e.width+"px"),this._options.inlinePosition!==!1)if(b.left=e.left+"px","screen"===a)b.bottom=null,b.top=this._options.offsetTop+"px";else if("bottom"===a){var f=this._getBottomOffset(),g=c.scrollHeight()+c.viewportHeight(),h=c.pageHeight()-g;b.bottom=f-h+"px",b.top="auto"}},_unstick:function(){d.removeClassName(this._rootElement,this._options.stickyClass),this._inlineDimensions(null,null),this._options.inlinePosition&&(this._rootElement.style.left=null,this._rootElement.style.top=null,this._rootElement.style.bottom=null),this._wrapper.style.height=null,this._wrapper.style.width=null,this._dims=null},_onResize:function(){this._dims=null,this._onScroll()},_getDims:function(){if(null!==this._dims)return this._dims;var a=this._rootElement.style,b=a.position,d=a.width;a.position="static",a.width=null;var e=c.outerDimensions(this._rootElement),f=this._wrapper.getBoundingClientRect();return this._dims={height:e[1],width:e[0],left:f.left+c.scrollWidth(),top:f.top+c.scrollHeight()},a.position=b,a.width=d,this._dims},_inlineDimensions:function(a,b){this._options.inlineDimensions&&(this._rootElement.style.height=a,this._rootElement.style.width=b)},_getBottomOffset:function(){var a=this._options.offsetBottom;return this._options.bottomElement&&(a+=c.pageHeight()-c.offsetTop(this._options.bottomElement)),a}},e}),Ink.createModule("Ink.UI.Swipe","1",["Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.UI.Common_1"],function(a,b,c){"use strict";function d(a,d){a=c.elOrSelector(a,"Swipe target"),this._options=Ink.extendObj({onEnd:void 0,onStart:void 0,onMove:void 0,minDist:void 0,maxDist:void 0,minDuration:void 0,maxDuration:void 0,axis:void 0,storeGesture:!1,stopEvents:!0},b.data(a),d||{}),"function"==typeof d&&(this._options.onEnd=d),this._handlers={down:Ink.bindEvent(this._onDown,this),move:Ink.bindEvent(this._onMove,this),up:Ink.bindEvent(this._onUp,this)},this._element=a,this._init()}return d.prototype={version:"0.1",_supported:"ontouchstart"in document.documentElement,_init:function(){var b=document.body;a.observe(b,"touchstart",this._handlers.down),(this._options.storeGesture||this._options.onMove)&&a.observe(b,"touchmove",this._handlers.move),a.observe(b,"touchend",this._handlers.up),this._isOn=!1},_isMeOrParent:function(a,b){if(a){do{if(a===b)return!0;a=a.parentNode}while(a);return!1}},_pushGesture:function(a,b){this._options.storeGesture&&(this._gesture.push(a),this._time.push(b))},_onDown:function(b){1===b.changedTouches.length&&this._isMeOrParent(b.target,this._element)&&(this._options.stopEvents===!0&&a.stop(b),b=b.changedTouches[0],this._isOn=!0,this._target=b.target,this._t0=+new Date,this._p0=[b.pageX,b.pageY],this._options.storeGesture&&(this._gesture=[],this._time=[]),this._pushGesture(this._p0,0),this._options.onStart&&this._options.onStart({event:b,element:this._element,instance:this,position:this._p0,dt:0}))},_onMove:function(b){if(this._isOn&&1===b.changedTouches.length){this._options.stopEvents===!0&&a.stop(b),b=b.changedTouches[0];var c=+new Date,d=c-this._t0,e=[b.pageX,b.pageY];this._pushGesture(e,d),this._options.onMove&&this._options.onMove({event:b,element:this._element,instance:this,position:e,dt:d})}},_onUp:function(b){if(this._isOn&&1===b.changedTouches.length){this._options.stopEvents===!0&&a.stop(b),b=b.changedTouches[0],this._isOn=!1;var c=+new Date,d=[b.pageX,b.pageY],e=c-this._t0,f=[d[0]-this._p0[0],d[1]-this._p0[1]],g=Math.sqrt(f[0]*f[0]+f[1]*f[1]),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",i=this._options;i.minDist&&gi.maxDist||i.minDuration&&ei.maxDuration||i.axis&&h!==i.axis||this._options.onEnd&&this._options.onEnd({event:b,element:this._element,instance:this,gesture:this._gesture,time:this._time,axis:h,overallMovement:f,overallTime:e})}}},d}),Ink.createModule("Ink.UI.Table","1",["Ink.Util.Url_1","Ink.UI.Pagination_1","Ink.Net.Ajax_1","Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1","Ink.Util.String_1","Ink.Util.Json_1"],function(a,b,c,d,e,f,g,h,i,j,k){"use strict";var l=/\d/g;function m(a){return!isNaN(a)&&l.test(a)?parseInt(a,10):isNaN(a)?a:parseFloat(a)}function n(a,b){return a===b?0:a>b?1:-1}function o(a,b){var c=m(g.textContent(a)),d=m(g.textContent(b));return n(c,d)}function p(a){if("undefined"!=typeof Object.keys)return Object.keys(a);var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}function q(a){return a}var r=function(a,b){if(this._rootElement=d.elOrSelector(a,"Ink.UI.Table :"),"table"!==this._rootElement.nodeName.toLowerCase())throw new Error("[Ink.UI.Table] :: The element is not a table");this._options=d.options({pageSize:["Integer",null],caretUpClass:["String","fa fa-caret-up"],caretDownClass:["String","fa fa-caret-down"],endpoint:["String",null],createEndpointUrl:["Function",null],getDataFromEndPoint:["Function",null],processJSONRows:["Function",q],processJSONRow:["Function",q],processJSONField:["Function",q],processJSONHeaders:["Function",function(a){return a.fields}],processJSONTotalRows:["Function",function(a){return a.length||a.totalRows}],getSortKey:["Function",null],pagination:["Element",null],allowResetSorting:["Boolean",!1],visibleFields:["String",null],tdClassNames:["Object",{}],paginationOptions:["Object",null]},b||{},this._rootElement),this._markupMode=!this._options.endpoint,this._options.visibleFields&&(this._options.visibleFields=this._options.visibleFields.toString().split(/[, ]+/g)),this._thead=this._rootElement.tHead||this._rootElement.createTHead(),this._headers=h.select("th",this._thead),this._handlers={thClick:null},this._originalFields=[],this._sortableFields={},this._originalData=this._data=[],this._pagination=null,this._totalRows=0,this._handlers.thClick=e.observeDelegated(this._rootElement,"click",'thead th[data-sortable="true"]',Ink.bindMethod(this,"_onThClick")),this._init()};return r.prototype={_init:function(){this._markupMode?(this._resetSortOrder(),this._addHeadersClasses(),this._data=h.select("tbody tr",this._rootElement),this._originalData=this._data.slice(0),this._totalRows=this._data.length,this._setPagination()):this._getData()},_addHeadersClasses:function(){for(var a,b,c=0,d=this._headers.length;d>c;c++)a=g.textContent(this._headers[c]),b=this._options.tdClassNames[a],b&&f.addClassName(this._headers[c],b)},_onThClick:function(a){var b=e.element(a),c=void 0!==this._options.pageSize;e.stop(a);var f=i.keyValue(b,this._headers,!0),g=f!==!1&&void 0!==this._sortableFields[f];if(g)if(!this._markupMode&&c)this._invertSortOrder(f,!1);else{"desc"===this._sortableFields[f]&&this._options.allowResetSorting?(this._setSortOrderOfColumn(f,null),this._data=this._originalData.slice(0)):this._invertSortOrder(f,!0);var j=h.select("tbody",this._rootElement)[0];d.cleanChildren(j),i.each(this._data,Ink.bindMethod(j,"appendChild")),this._pagination&&(this._pagination.setCurrent(0),this._paginate(1))}},_invertSortOrder:function(a,b){for(var c="asc"===this._sortableFields[a],d=0,e=this._headers.length;e>d;d++)this._setSortOrderOfColumn(d,null);b&&(this._sort(a),c&&this._data.reverse()),this._setSortOrderOfColumn(a,!c)},_setSortOrderOfColumn:function(a,b){var c=this._headers[a],d=[""],e="none";b===!0?(d=[''],e="asc"):b===!1&&(d=[''],e="desc"),this._sortableFields[a]=e,c.innerHTML=g.textContent(c)+d.join("")},_paginate:function(a){if(this._pagination){var b=this._options.pageSize,c=(a-1)*b,d=c+b;i.each(this._data,function(a,b){b>=c&&d>b?f.removeClassName(a,"hide-all"):f.addClassName(a,"hide-all")})}},_registerFieldNames:function(a){this._originalFields=[],i.forEach(a,Ink.bind(function(a){this._fieldIsVisible(a)&&this._originalFields.push(a)},this))},_fieldIsVisible:function(a){return!this._options.visibleFields||-1!==this._options.visibleFields.indexOf(a)},_sort:function(a){var b=g.textContent(this._headers[a]),c=this._options.getSortKey;c&&(c="function"==typeof c[b]?c[b]:"function"==typeof c?c:null);var d=this;this._data.sort(function(b,d){var f=Ink.ss("td",b)[a],g=Ink.ss("td",d)[a];return c?n(e(f),e(g)):o(f,g,a)});function e(e){return c.call(d,{columnIndex:a,columnName:b,data:g.textContent(e),element:e})}},_createHeadersFromJson:function(a){if(this._registerFieldNames(p(a)),!this._thead.children.length)for(var b=this._thead.insertRow(0),c,d=0,e=a.length;e>d;d++)this._fieldIsVisible(a[d])&&(c=g.create("th"),c=this._createSingleHeaderFromJson(a[d],c),b.appendChild(c),this._headers.push(c))},_createSingleHeaderFromJson:function(a,b){return a.sortable&&b.setAttribute("data-sortable","true"),a.label&&g.setTextContent(b,a.label),b},_resetSortOrder:function(){for(var a=0,b=this._headers.length;b>a;a++){var c=g.data(this._headers[a]);c.sortable&&"true"===c.sortable.toString()&&(this._sortableFields[a]="none")}},_createRowsFromJSON:function(a){var b=h.select("tbody",this._rootElement)[0];b?g.setHTML(b,""):(b=document.createElement("tbody"),this._rootElement.appendChild(b)),this._data=[];var c;for(var d in a)a.hasOwnProperty(d)&&(c=this._options.processJSONRow(a[d]),this._createSingleRowFromJson(b,c,d));this._originalData=this._data.slice(0)},_createSingleRowFromJson:function(a,b,c){var d=document.createElement("tr");a.appendChild(d);for(var e in b)b.hasOwnProperty(e)&&this._createFieldFromJson(d,b[e],e,c);this._data.push(d)},_createFieldFromJson:function(a,b,c,d){if(this._fieldIsVisible(c)){var e=this._options.processJSONField[c]||this._options.processJSONField,g;g="function"==typeof e?e(b,c,d):b;var h=this._elOrFieldData(g),i=this._options.tdClassNames[c];i&&f.addClassName(h,i),a.appendChild(h)}},_elOrFieldData:function(a){if(d.isDOMElement(a))return a;var b="string"==typeof a,c="number"==typeof a,e=g.create("td");if(b&&/^\s*?=this._options.maxTags)){if(!this._options.allowRepeated&&f.inArray(c,this._tags,c)||!c)return!1;var d=a.create("span",{className:"ink-tag",setTextContent:c+" "}),e=a.create("span",{className:"remove fa fa-times",insertBottom:d});b.observe(e,"click",Ink.bindEvent(this._removeTag,this,null));var g=document.createTextNode(" ");this._tags.push(c),this._viewElm.insertBefore(d,this._input),this._viewElm.insertBefore(g,this._input),this._tagsToMarkup(this._tags,this._element)}},_readInput:function(a){return this._options.separator?f.filter(a.split(this._options.separator),k):[a]},_onKeyUp:function(){if(this._options.autoSplit){var a=this._input.value.split(this._options.separator);if(!(a.length<=1)){var b=a[a.length-1];a=a.splice(0,a.length-1),a=f.filter(a,k),f.each(a,Ink.bind(this._addTag,this)),this._input.value=b}}},_onKeyDown:function(a){return a.which===i?this._onEnterKeyDown(a):a.which===j?this._onBackspaceKeyDown():void(this._removeConfirm&&this._unsetRemovingVisual(this._tags.length-1))},_onBackspaceKeyDown:function(){this._input.value||(this._removeConfirm?(this._unsetRemovingVisual(this._tags.length-1),this._removeTag(this._tags.length-1),this._removeConfirm=null):this._setRemovingVisual(this._tags.length-1))},_onEnterKeyDown:function(a){var c=this._input.value;c&&(this._addTag(c),this._input.value=""),b.stopDefault(a)},_onBlur:function(){this._addTag(this._input.value),this._input.value=""},_setRemovingVisual:function(a){var d=this._viewElm.children[a];c.addClassName(d,"tag-deleting"),this._removeRemovingVisualTimeout=setTimeout(Ink.bindMethod(this,"_unsetRemovingVisual",a),4e3),b.observe(this._input,"blur",Ink.bindMethod(this,"_unsetRemovingVisual",a)),this._removeConfirm=!0},_unsetRemovingVisual:function(a){var b=this._viewElm.children[a];b&&(c.removeClassName(b,"tag-deleting"),clearTimeout(this._removeRemovingVisualTimeout)),this._removeConfirm=null},_removeTag:function(c){var d;if("object"==typeof c){var e=b.element(c).parentNode;d=a.parentIndexOf(this._viewElm,e)}else"number"==typeof c&&(d=c);this._tags=f.remove(this._tags,d,1),a.remove(this._viewElm.children[d]),this._tagsToMarkup(this._tags,this._element)},_refocus:function(a){return this._input.focus(),b.stop(a),!1}},l}),Ink.createModule("Ink.UI.Toggle","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1"],function(a,b,c,d,e,f){"use strict";var g=function(b,e){if(this._rootElement=a.elOrSelector(b,"[Ink.UI.Toggle root element]:"),this._options=Ink.extendObj({target:void 0,triggerEvent:"click",closeOnClick:!0,isAccordion:!1,initialState:null,classNameOn:"show-all",classNameOff:"hide-all",togglesDisplay:null,closeOnInsideClick:"a[href]",onChangeState:null},e||{},d.data(this._rootElement)),this._targets=a.elsOrSelector(this._options.target,"Ink.UI.Toggle target option"),this._options.closeOnClick="true"===this._options.closeOnClick.toString(),this._options.initialState=null!==this._options.initialState?"true"===this._options.initialState.toString():"none"!==c.getStyle(this._targets[0],"display"),"show-all"!==this._options.classNameOn||"hide-all"!==this._options.classNameOff)for(var f=0,g=this._targets.length;g>f;f++)c.removeClassName(this._targets[f],"show-all"),c.removeClassName(this._targets[f],"hide-all");this._init()};return g.prototype={_init:function(){if(this._accordion=c.hasClassName(this._rootElement.parentNode,"accordion")||c.hasClassName(this._targets[0].parentNode,"accordion"),this._firstTime=!0,this._bindEvents(),null!==this._options.initialState)this.setState(this._options.initialState,!0);else{var a="none"!==c.getStyle(this._targets[0],"display");this.setState(a,!0)}for(var b=0,d=this._targets.length;d>b;b++)this._targets[b].style.display&&(this._targets[b].style.display="");this._rootElement.setAttribute("data-is-toggle-trigger","true")},_bindEvents:function(){if(this._options.triggerEvent&&b.observe(this._rootElement,this._options.triggerEvent,Ink.bind(this._onTriggerEvent,this)),this._options.closeOnClick&&b.observe(document,"click",Ink.bind(this._onOutsideClick,this)),this._options.closeOnInsideClick&&"false"!==this._options.closeOnInsideClick){var a=this._options.closeOnInsideClick;"true"===a.toString()&&(a="*"),b.observeMulti(this._targets,"click",Ink.bind(function(c){d.findUpwardsBySelector(b.element(c),a)&&this.setState(!1,!0)},this))}},_onTriggerEvent:function(a){var c=b.element(a),e=f.some(this._targets,function(a){return a===c||d.isAncestorOf(a,c)});if(!e){this._accordion&&this._updateAccordion();var g=this.getState();this.setState(!g,!0),!g&&this._firstTime&&(this._firstTime=!1),b.stopDefault(a)}},_updateAccordion:function(){var a,b;b=c.hasClassName(this._targets[0].parentNode,"accordion")?this._targets[0].parentNode:this._targets[0].parentNode.parentNode,a=e.select(".toggle, .ink-toggle",b);for(var f=0;f0&&h[0]!==this._targets[0]&&(h[0].style.display="none")}},_onOutsideClick:function(a){var c=b.element(a),e;if(!d.findUpwardsBySelector(c,'[data-is-toggle-trigger="true"]')){var g=f.some(this._targets,function(a){return d.isAncestorOf(a,c)||a===c});if(this._rootElement!==c&&!d.isAncestorOf(this._rootElement,c)&&!g){if((e=Ink.ss(".ink-shade")).length)for(var h=e.length,i=0;h>i;i++)if(d.isAncestorOf(e[i],c)&&d.isAncestorOf(e[i],this._rootElement))return;this.setState(!1,!0)}}},setState:function(a,b){if(a!==this.getState()){if(b&&"function"==typeof this._options.onChangeState){var d=this._options.onChangeState(a);if(d===!1)return!1}for(var e=0,f=this._targets.length;f>e;e++)c.addRemoveClassName(this._targets[e],this._options.classNameOn,a),c.addRemoveClassName(this._targets[e],this._options.classNameOff,!a);c.addRemoveClassName(this._rootElement,"active",a)}},getState:function(){return c.hasClassName(this._rootElement,"active")}},g}),Ink.createModule("Ink.UI.Tooltip","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1","Ink.Dom.Css_1","Ink.Dom.Browser_1"],function(a,b,c,d,e,f){"use strict";function g(a,b){this._init(a,b||{})}function h(a,b){this._init(a,b)}var i,j,k;!function(){for(var a=document.createElement("DIV"),b=["transition","oTransition","msTransition","mozTransition","webkitTransition"],c=0;ce;e++)this.tooltips[e]=new h(this,c[e])},destroy:function(){e.each(this.tooltips,function(a){a._destroy()}),this.tooltips=null,this.options=null}},h.prototype={_oppositeDirections:{left:"right",right:"left",up:"down",down:"up"},_init:function(a,c){b.observe(c,"mouseover",Ink.bindEvent(this._onMouseOver,this)),b.observe(c,"mouseout",Ink.bindEvent(this._onMouseOut,this)),b.observe(c,"mousemove",Ink.bindEvent(this._onMouseMove,this)),this.root=a,this.element=c,this._delayTimeout=null,this.tooltip=null},_makeTooltip:function(a){if(!this._getOpt("text")&&!this._getOpt("html")&&!c.hasAttribute(this.element,"title"))return!1;var d=this._createTooltipElement();this.tooltip&&this._removeTooltip(),this.tooltip=d,this._fadeInTooltipElement(d),this._placeTooltipElement(d,a),b.observe(d,"mouseover",Ink.bindEvent(this._onTooltipMouseOver,this));var e=this._getFloatOpt("timeout");e&&setTimeout(Ink.bind(function(){this.tooltip===d&&this._removeTooltip()},this),1e3*e)},_createTooltipElement:function(){var b=this._getOpt("template"),e=this._getOpt("templatefield"),g,h;if(b){var i=document.createElement("DIV");if(i.innerHTML=a.elOrSelector(b,"options.template").outerHTML,g=i.firstChild,e){if(h=d.select(e,g),!h)throw"options.templatefield must be a valid selector within options.template";h=h[0]}else h=g}else g=document.createElement("DIV"),f.addClassName(g,"ink-tooltip"),f.addClassName(g,this._getOpt("color")),h=document.createElement("DIV"),f.addClassName(h,"content"),g.appendChild(h);return this._getOpt("html")?h.innerHTML=this._getOpt("html"):this._getOpt("text")?c.setTextContent(h,this._getOpt("text")):c.setTextContent(h,this.element.getAttribute("title")),g.style.display="block",g.style.position="absolute",g.style.zIndex=this._getIntOpt("zIndex"),g},_fadeInTooltipElement:function(a){var b=this._getFloatOpt("fade");i&&b&&(a.style.opacity="0",a.style[i]=b+"s",a.style[j]="opacity",a.style[k]="ease-in-out",setTimeout(function(){a.style.opacity="1"},0))},_placeTooltipElement:function(a,b){var d=this._getOpt("where");if("mousemove"===d||"mousefix"===d){var e=b;this._setPos(e[0],e[1]),m.appendChild(a)}else if(d.match(/(up|down|left|right)/)){m.appendChild(a);var g=c.offset(this.element),h=g[0],i=g[1],j=c.elementWidth(this.element)/2-c.elementWidth(a)/2,k=c.elementHeight(this.element)/2-c.elementHeight(a)/2,l=this._getIntOpt("spacing"),n=c.elementDimensions(a),o=c.elementDimensions(this.element),p=c.scrollWidth()+c.viewportWidth(),q=c.scrollHeight()+c.viewportHeight();d=this._getWhereValueInsideViewport(d,{left:h-n[0],right:h+n[0],top:i+n[1],bottom:i+n[1]},{right:p,bottom:q}),"up"===d?(i-=n[1],i-=l,h+=j):"down"===d?(i+=o[1],i+=l,h+=j):"left"===d?(h-=n[0],h-=l,i+=k):"right"===d&&(h+=o[0],h+=l,i+=k);var r=null;d.match(/(up|down|left|right)/)&&(r=document.createElement("SPAN"),f.addClassName(r,"arrow"),f.addClassName(r,this._oppositeDirections[d]),a.appendChild(r));var s=h,t=i,u=t+n[1]-q,v=s+n[0]-p,w=0-s,x=0-t;u>0?(r&&(r.style.top=n[1]/2+u+"px"),t-=u):x>0?(r&&(r.style.top=n[1]/2-x+"px"),t+=x):v>0?(r&&(r.style.left=n[0]/2+v+"px"),s-=v):w>0&&(r&&(r.style.left=n[0]/2-w+"px"),s+=w),a.style.left=s+"px",a.style.top=t+"px" +}},_getWhereValueInsideViewport:function(a,b,c){return"left"===a&&b.left<0?"right":"right"===a&&b.right>c.right?"left":"up"===a&&b.top<0?"down":"down"===a&&b.bottom>c.bottom?"up":a},_removeTooltip:function(){var a=this.tooltip;if(a){var b=Ink.bind(c.remove,{},a);"mousemove"!==this._getOpt("where")&&i?(a.style.opacity=0,setTimeout(b,1e3*this._getFloatOpt("fade"))):b(),this.tooltip=null}},_getOpt:function(a){var b=c.data(this.element)[c._camelCase("tip-"+a)];if(b)return b;var d=this.root.options[a];return"undefined"!=typeof d?d:void 0},_getIntOpt:function(a){return parseInt(this._getOpt(a),10)},_getFloatOpt:function(a){return parseFloat(this._getOpt(a),10)},_destroy:function(){this.tooltip&&c.remove(this.tooltip),this.root=null,this.element=null,this.tooltip=null},_onMouseOver:function(a){var b=this._getMousePosition(a),c=this._getFloatOpt("delay");c?this._delayTimeout=setTimeout(Ink.bind(function(){this.tooltip||this._makeTooltip(b),this._delayTimeout=null},this),1e3*c):this._makeTooltip(b)},_onMouseMove:function(a){if("mousemove"===this._getOpt("where")&&this.tooltip){var b=this._getMousePosition(a);this._setPos(b[0],b[1])}},_onMouseOut:function(){this._getIntOpt("forever")||this._removeTooltip(),this._delayTimeout&&(clearTimeout(this._delayTimeout),this._delayTimeout=null)},_onTooltipMouseOver:function(){this.tooltip&&this._removeTooltip()},_setPos:function(a,b){a+=this._getIntOpt("left"),b+=this._getIntOpt("top");var d=this._getPageXY();if(this.tooltip){var e=[c.elementWidth(this.tooltip),c.elementHeight(this.tooltip)],f=this._getScroll();e[0]+a-f[0]>=d[0]-20&&(a=a-e[0]-this._getIntOpt("left")-10),e[1]+b-f[1]>=d[1]-20&&(b=b-e[1]-this._getIntOpt("top")-10),this.tooltip.style.left=a+"px",this.tooltip.style.top=b+"px"}},_getPageXY:function(){var a=0,b=0;return"number"==typeof window.innerWidth?(a=window.innerWidth,b=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(a=document.documentElement.clientWidth,b=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(a=document.body.clientWidth,b=document.body.clientHeight),[parseInt(a,10),parseInt(b,10)]},_getScroll:function(){var a=document.documentElement,b=document.body;return a&&(a.scrollLeft||a.scrollTop)?[a.scrollLeft,a.scrollTop]:b?[b.scrollLeft,b.scrollTop]:[0,0]},_getMousePosition:function(a){return[parseInt(b.pointerX(a),10),parseInt(b.pointerY(a),10)]}},g}),Ink.createModule("Ink.UI.TreeView","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1"],function(a,b,c,d,e,f){"use strict";var g=function(b,c){this._element=a.elOrSelector(b,"[Ink.UI.TreeView_1]"),this._options=a.options("Treeview",{node:["String","li"],child:["String",null],children:["String","ul"],parentClass:["String","parent"],openNodeClass:["String","open"],openClass:["String","fa fa-minus-circle"],closedClass:["String","fa fa-plus-circle"],hideClass:["String","hide-all"],iconTag:["String","i"],stopDefault:["Boolean",!0]},c||{},this._element),this._options.child&&(Ink.warn("Ink.UI.TreeView: options.child is being renamed to options.children."),this._options.children=this._options.child),this._init()};return g.prototype={_init:function(){this._handlers={click:Ink.bindEvent(this._onClick,this)},b.on(this._element,"click",this._options.node,this._handlers.click),f.each(Ink.ss(this._options.node,this._element),Ink.bind(function(a){if(this.isParent(a)){c.addClassName(a,this._options.parentClass);var b=this.isOpen(a);this._getIcon(a)||d.create(this._options.iconTag,{insertTop:a}),this._setNodeOpen(a,b)}},this))},_getIcon:function(a){return Ink.s("> "+this._options.iconTag,a)},isOpen:function(a){if(!this._getChild(a))throw new Error("not a node!");return"true"===d.data(a).open||c.hasClassName(a,this._options.openNodeClass)},isParent:function(a){return c.hasClassName(a,this._options.parentClass)||null!=this._getChild(a)},_setNodeOpen:function(a,b){var d=this._getChild(a);if(d){c.setClassName(d,this._options.hideClass,!b);var e=this._getIcon(a);a.setAttribute("data-open",b);var f=b?this._options.openClass:this._options.closedClass,g=b?this._options.closedClass:this._options.openClass;c.removeClassName(e,g),c.addClassName(e,f),c.setClassName(a,this._options.openNodeClass,b)}else Ink.error("Ink.UI.TreeView: node",a,"is not a node!")},open:function(a){this._setNodeOpen(a,!0)},close:function(a){this._setNodeOpen(a,!1)},toggle:function(a){this.isOpen(a)?this.close(a):this.open(a)},_getChild:function(a){return e.select(this._options.children,a)[0]||null},_onClick:function(a){!this.isParent(a.currentTarget)||e.matchesSelector(a.target,this._options.node)||e.matchesSelector(a.target,this._options.children)||(this._options.stopDefault&&a.preventDefault(),this.toggle(a.currentTarget))}},g}),Ink.createModule("Ink.UI.Upload","1",["Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Browser_1","Ink.UI.Common_1"],function(a,b,c,d){"use strict";var e=function(a){this.init(a)};e.prototype={init:function(a){this.options=Ink.extendObj({entry:void 0,maxDepth:10},a||{});try{this._read()}catch(b){Ink.error(b)}},_read:function(){if(!this.options.entry)throw"The entry specify you must";try{this._readDirectories()}catch(a){Ink.error(a)}},_readDirectories:function(){var a=[],b=!1,c=0,d=Ink.bind(function(e){var f=e.createReader();b=!0,f.readEntries(Ink.bind(function(e){if(e.length>0){for(var f=0,g=e.length;g>f;f++)a.push(e[f]),e[f].isDirectory&&(c=this.clearArray(e[f].fullPath.split("/")),c.shift(),c=c.length,c<=this.options.maxDepth&&d(e[f]));this._stopActivityTimeout&&clearTimeout(this._stopActivityTimeout),this._stopActivityTimeout=setTimeout(function(){b=!1},250)}e.length||(b=!1)},this),Ink.bind(function(a){this.options.readError(a,e)},this))},this);d(this.options.entry);var e,f=function(){return b?!1:(clearInterval(e),this.options.readComplete&&"function"==typeof this.options.readComplete&&this.options.readComplete(a),!0)};e=setInterval(Ink.bind(f,this),250)},clearArray:function(a){for(var b=a.length-1;b>=0;b--)("undefined"==typeof a[b]||null===a[b]||""===a[b])&&a.splice(b,1);return a}};var f={lists:[],items:[],create:function(a){var b;return a=String(a),this.lists.push({name:a}),b=this.lists.length-1},getItems:function(a){if(!a)return this.items;for(var b=[],c=0,d=this.items.length;d>c;c++)this.items[c].parentId===a&&b.push(this.items[c]);return b},purge:function(a,b){if("number"!=typeof a||isNaN(Number(a)))return!1;try{for(var c=this.items.length;c>=0;c--)this.items[c]&&a===this.items[c].parentId&&this.remove(this.items[c].parentId,this.items[c].pid);return b||this.lists.splice(a,1),!0}catch(d){return Ink.error("Purge: invalid id"),!1}},add:function(a,b,c){if(!this.lists[a])return!1;"object"!=typeof b&&(b=String(b));var d=parseInt(Math.round(1e5*Math.random())+""+Math.round(1e5*Math.random()),10);return c=c||0,this.items.push({parentId:a,item:b,priority:c||0,pid:d}),d},view:function(a,b){var c=this._searchByPid(a,b);return c===!1?!1:this.items[c]},remove:function(a,b){try{var c=this._searchByPid(a,b);return c===!1?!1:(this.items.splice(c,1),!0)}catch(d){return Ink.error("Remove: invalid id"),!1}},_searchByPid:function(a,b){if(!a&&"boolean"==typeof a||!b)return!1;if(a=parseInt(a,10),b=parseInt(b,10),isNaN(a)||isNaN(b))return!1;for(var c=0,d=this.items.length;d>c;c++)if(this.items[c].parentId===a&&this.items[c].pid===b)return c;return!1}},g=function(a){this.Upload=a,this.init()};g.prototype={init:function(){this._fileButton=this.Upload.options.fileButton,this._dropzone=this.Upload.options.dropzone,this._setDropEvent(),this._setFileButton()},_setDropEvent:function(){for(var a=this._dropzone,b=0,c=a.length;c>b;b++)a[b].ondrop=Ink.bindEvent(this.Upload._dropEventHandler,this.Upload),a[b].ondragleave=Ink.bindEvent(this._onDragLeave,this),a[b].ondragend=Ink.bindEvent(this._onDragEndEventHandler,this),a[b].ondragenter=Ink.bindEvent(this._onDragEnterHandler,this),a[b].ondragover=Ink.bindEvent(this._onDragOverHandler,this)},_onDragEnterHandler:function(a){return a&&a.stopPropagation&&a.stopPropagation(),a&&a.preventDefault&&a.preventDefault(),a&&(a.returnValue=!1),this.Upload.publish("DragEnter",a),!1},_onDragOverHandler:function(a){return a?(a.preventDefault(),a.stopPropagation(),a.returnValue=!1,!0):!1},_onDragLeave:function(a){return this.Upload.publish("DragLeave",a)},_onDragEndEventHandler:function(a){return this.Upload.publish("DragEnd",a)},_setFileButton:function(){var b=this._fileButton;a.observeMulti(b,"change",Ink.bindEvent(this._fileChangeHandler,this))},_fileChangeHandler:function(c){var d=a.element(c),e=d.files,f=b.findUpwardsByTag(d,"form");return e&&window.FormData&&"withCredentials"in new XMLHttpRequest?(this.Upload._addFilesToQueue(e),void(d.value="")):(f.parentNode.submit(),!1)}};var h=function(a){this.Queue=f,this.init(a),this._events={}};return h.prototype={init:function(a){if("string"==typeof a&&(a=b.data(d.elOrSelector(a,"1st argument"))),this.options=Ink.extendObj({extraData:{},fileFormName:"Ink_Filelist",dropzone:void 0,fileButton:void 0,endpoint:"",endpointChunk:"",endpointChunkCommit:"",maxFilesize:300<<20,chunkSize:4194304,minSizeToUseChunks:20971520,INVALID_FILE_NAME:void 0,foldersEnabled:!0,useChunks:!0,directoryMaxDepth:10},a||{}),this._queueId=f.create("Ink_UPLOAD"),this._queueRunning=!1,this._folders={},this.options.dropzone&&d.elOrSelector(this.options.dropzone,"Upload - dropzone"),this.options.fileButton&&d.elOrSelector(this.options.fileButton,"Upload - fileButton"),!this.options.dropzone&&!this.options.fileButton)throw new TypeError("A file button or dropzone, specify you must, my young padawan");this.options.dropzone=Ink.ss(this.options.dropzone),this.options.fileButton=Ink.ss(this.options.fileButton),new g(this)},_supportChunks:function(a){return this.options.useChunks&&"Blob"in window&&(new Blob).slice&&a>this.options.minSizeToUseChunks},_dropEventHandler:function(a){a&&a.stopPropagation&&a.stopPropagation(),a&&a.preventDefault&&a.preventDefault(),a&&(a.returnValue=!1),this.publish("DropComplete",a.dataTransfer);var b=a.dataTransfer;if(!b||!b.files||!b.files.length)return!1;if(this._files=b.files,this._files=Array.prototype.slice.call(this._files||[],0),b.items&&b.items[0]&&b.items[0].webkitGetAsEntry){if(!this.options.foldersEnabled)return setTimeout(Ink.bind(this._addFilesToQueue,this,this._files),0);for(var c,d=[],e=a.dataTransfer.items.length-1;e>=0;e--)c=a.dataTransfer.items[e].webkitGetAsEntry(),c&&c.isDirectory&&(d.push(c),this._files[e].isDirectory=!0,this._files.splice(e,1));this._addFolderToQueue(d,Ink.bind(function(){setTimeout(Ink.bind(this._addFilesToQueue,this,this._files),0)},this))}else setTimeout(Ink.bind(this._addFilesToQueue,this,this._files),0);return!0},_addFolderToQueue:function(a,b){var c=[],d={};if(!a||!a.length)return b(),c;var f=function(a){for(var b=[],c=0,d=a.length;d>c;c++)a[c].isFile&&b.push(a[c]);return b},g=function(a,b){var d;return b=b||0,this._files[b]?"fileentry"!==this._files[b].constructor.name.toLowerCase()?g.apply(this,[a,++b]):void this._files[b].file(Ink.bind(function(c){d=this._files[b].fullPath,this._files[b]=c,this._files[b].hasParent=!0,this._files[b].fullPath||(this._files[b].fullPath=d),g.apply(this,[a,++b])},this),Ink.bind(function(){this._files.splice(b,1),g.apply(this,[a,b])},this)):(a(),c)},h=Ink.bind(function(i){return a[i]?void new e({entry:a[i],maxDepth:this.options.directoryMaxDepth,readComplete:Ink.bind(function(b){if(c=c.concat(f(b)),a[i]&&!(a[i].fullPath in this._folders)){this._folders[a[i].fullPath]={items:b,files:c,length:b.length,created:!1,root:!0};for(var e=0,g=b.length;g>e;e++)b[e].isFile||(b[e].fullPath in d?delete d[b[e].fullPath]:this._folders[b[e].fullPath]={created:!1,root:!1});h(++i)}},this),readError:Ink.bind(function(a,b){d[b.fullPath]={},d[b.fullPath].error=a},this)}):(this._files=this._files.concat(c),g.call(this,b),!1)},this);return h(0),c},_addFilesToQueue:function(a){for(var b,d,e,g=0,h=a.length;h>g;g++)b=a[g],b.isDirectory||null!==b&&(b.type||b.size%4096!==0||c.CHROME&&this.options.foldersEnabled)?b.size>this.options.maxFilesize?this.publish("MaxSizeFailure",b,this.options.maxFilesize):(d=parseInt(Math.round(1e5*Math.random())+""+Math.round(1e5*Math.random()),10),e={id:g,data:b,fileID:d,directory:b.isDirectory},f.add(this._queueId,e),this.publish("FileAddedToQueue",e)):this.publish("InvalidFile",b,"size");this._processQueue(!0),this._files=[]},_processQueue:function(a){if(this._queueRunning)return!1;this.running=0;var b=1,c=0,d,e=f.items.length;this._queueRunning=!0,this.interval=setInterval(Ink.bind(function(){if(f.items.length===c&&0===this.running&&(f.purge(this._queueId,!0),this._queueRunning=!1,clearInterval(this.interval),this.publish("QueueEnd",this._queueId,e)),d=f.getItems(this._queueId),this.runningb.chunk_offset){if(c.response){var e=JSON.parse(c.response),f=b.chunk_offset&&e.offset!==b.chunk_offset+this.options.chunkSize&&b.size!==e.offset;f?(a.cb&&a.cb(),this.publish("ErrorUpload",b,d)):(b.chunk_upload_id=e.upload_id,b.chunk_offset=e.offset,b.chunk_expires=e.expires,this._upload(a))}else a.cb&&a.cb(),this.publish("ErrorUpload",b,d);return c=null}return a.cb&&a.cb(),c.responseText&&c.status<400?this.publish("EndUpload",b,d,c.responseText):this.publish("ErrorUpload",b,d),c=null},this),c.onerror=Ink.bindEvent(function(){a.cb&&a.cb(),this.publish("ErrorUpload",b,d)},this),c.onabort=Ink.bindEvent(function(){a.cb&&a.cb(),this.publish("AbortUpload",b,d,{abortAll:Ink.bind(this.abortAll,this),abortOne:Ink.bind(this.abortOne,this)})},this)},abortAll:function(){return this._queueRunning?(clearInterval(this.interval),this._queueRunning=!1,f.purge(this._queueId,!0),!0):!1},abortOne:function(a,b){for(var c=f.getItems(0),d,e=0,g=c.length;g>e;e++)if(c[e].item.fileID===a)return d={id:c[e].item.fileID,name:c[e].item.data.name,size:c[e].item.data.size,hasParent:c[e].item.data.hasParent},f.remove(0,c[e].pid),b&&b(d),!0;return!1},subscribe:function(a,b){return this._events[a]||(this._events[a]=[]),this._events[a].push(b),this._events[a]},publish:function(a){var b=this._events[a],c=Array.prototype.slice.call(arguments||[],0);if(b)for(var d=0,e=b.length;e>d;d++)try{b[d].apply(this,c.splice(1,c.length))}catch(f){Ink.error(a+": "+f)}}},h}); +//# sourceMappingURL=ink-ui.js.map \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.animate.js b/ajax/libs/ink/3.0.0/js/ink.animate.js new file mode 100644 index 000000000..c11a9d173 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.animate.js @@ -0,0 +1,160 @@ +/** + * @module Ink.UI.Animate_1 + * Animate.css Utility + * @version 1 + */ + +Ink.createModule('Ink.UI.Animate', 1, ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Css_1'], function (Common, InkEvent, Css) { + 'use strict'; + + var animationPrefix = (function (el) { + return ('animationName' in el.style) ? 'animation' : + ('oAnimationName' in el.style) ? 'oAnimation' : + ('msAnimationName' in el.style) ? 'msAnimation' : + ('webkitAnimationName' in el.style) ? 'webkitAnimation' : null; + }(document.createElement('div'))); + + var animationEndEventName = { + animation: 'animationend', + oAnimation: 'oanimationend', + msAnimation: 'MSAnimationEnd', + webkitAnimation: 'webkitAnimationEnd' + }[animationPrefix]; + + /** + * @class Ink.UI.Animate_1 + * @constructor + * + * @param {DOMElement} element Animated element + * @param {Object} options Options object + * @param {String} options.animation Animation name + * @param {String|Number} [options.duration] Duration name (fast|medium|slow) or duration in milliseconds. Defaults to 'medium'. + * @param {Boolean} [options.removeClass] Flag to remove the CSS class when finished animating. Defaults to false. + * @param {Function} [options.onEnd] Callback for the animation end + * + * @sample Ink_Animate_1.html + * + **/ + function Animate(elOrSelector, options) { + this._element = Common.elOrSelector(elOrSelector); + this._options = Common.options({ + trigger: ['Element', null], + duration: ['String', 'slow'], // Actually a string with a duration name, or a number of ms + animation: ['String'], + removeClass: ['Boolean', true], + onEnd: ['Function', function () {}] + }, options || {}, this._element); + + if (!isNaN(parseInt(this._options.duration, 10))) { + this._options.duration = parseInt(this._options.duration, 10); + } + + if (this._options.trigger) { + InkEvent.observe(this._options.trigger, 'click', Ink.bind(function () { + this.animate(); + }, this)); // later + } else { + this.animate(); + } + } + + Animate.prototype.animate = function () { + Animate.animate(this._element, this._options.animation, this._options); + }; + + Ink.extendObj(Animate, { + /** + * Browser prefix for the CSS animations. + * + * @property _animationPrefix + * @private + **/ + _animationPrefix: animationPrefix, + + /** + * CSS3 animation browser support. + * + * @property {Boolean} animationSupported + **/ + animationSupported: !!animationPrefix, + + /** + * Prefixed animation end event name. + * + * @property {String} animationEndEventName + **/ + animationEndEventName: animationEndEventName, + + /** + * Animate an element using one of the animate.css classes + * + * **Note: This is a utility method inside the `Animate` class, which you can access through `Animate.animate()`. Do not mix these up.** + * + * @example + * + * Animate.animate(myDiv, 'shake', { + * onEnd: function () { + * alert('Finished shaking!'); + * } + * }); + * + * @static + * @method animate + * @param element {DOMElement} animated element + * @param animation {String} animation name + * @param [options] {Object} + * @param [options.onEnd=null] {Function} callback for animation end + * @param [options.removeClass=false] {Boolean} whether to remove the Css class when finished + * @param [options.duration=medium] {String|Number} duration name (fast|medium|slow) or duration in ms + **/ + animate: function (element, animation, options) { + element = Common.elOrSelector(element); + + if (typeof options === 'number' || typeof options === 'string') { + options = { duration: options }; + } + + if (typeof arguments[3] === 'function') { + options.onEnd = arguments[3]; + } + + if (typeof options.duration !== 'number' && typeof options.duration !== 'string') { + options.duration = 400; + } + + if (!Animate.animationSupported) { + if (options.onEnd) { + setTimeout(function () { + options.onEnd(null); + }, 0); + } + return; + } + + if (typeof options.duration === 'number') { + element.style[animationPrefix + 'Duration'] = options.duration + 'ms'; + } else if (typeof options.duration === 'string') { + Css.addClassName(element, options.duration); + } + + Css.addClassName(element, ['animated', animation]); + + function onAnimationEnd(event) { + if (event.target !== element) { return; } + if (event.animationName !== animation) { return; } + if (options.onEnd) { options.onEnd(event); } + if (options.removeClass) { + Css.removeClassName(element, animation); + } + if (typeof options.duration === 'string') { + Css.removeClassName(element, options.duration); + } + element.removeEventListener(animationEndEventName, onAnimationEnd, false); + } + + element.addEventListener(animationEndEventName, onAnimationEnd, false); + } + }); + + return Animate; +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.animate.min.js b/ajax/libs/ink/3.0.0/js/ink.animate.min.js new file mode 100644 index 000000000..a98fa9331 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.animate.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Animate",1,["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1"],function(n,t,i){"use strict";function o(i,o){this._element=n.elOrSelector(i),this._options=n.options({trigger:["Element",null],duration:["String","slow"],animation:["String"],removeClass:["Boolean",!0],onEnd:["Function",function(){}]},o||{},this._element),isNaN(parseInt(this._options.duration,10))||(this._options.duration=parseInt(this._options.duration,10)),this._options.trigger?t.observe(this._options.trigger,"click",Ink.bind(function(){this.animate()},this)):this.animate()}var e=function(n){return"animationName"in n.style?"animation":"oAnimationName"in n.style?"oAnimation":"msAnimationName"in n.style?"msAnimation":"webkitAnimationName"in n.style?"webkitAnimation":null}(document.createElement("div")),a={animation:"animationend",oAnimation:"oanimationend",msAnimation:"MSAnimationEnd",webkitAnimation:"webkitAnimationEnd"}[e];return o.prototype.animate=function(){o.animate(this._element,this._options.animation,this._options)},Ink.extendObj(o,{_animationPrefix:e,animationSupported:!!e,animationEndEventName:a,animate:function(t,m,s){function r(n){n.target===t&&n.animationName===m&&(s.onEnd&&s.onEnd(n),s.removeClass&&i.removeClassName(t,m),"string"==typeof s.duration&&i.removeClassName(t,s.duration),t.removeEventListener(a,r,!1))}return t=n.elOrSelector(t),("number"==typeof s||"string"==typeof s)&&(s={duration:s}),"function"==typeof arguments[3]&&(s.onEnd=arguments[3]),"number"!=typeof s.duration&&"string"!=typeof s.duration&&(s.duration=400),o.animationSupported?("number"==typeof s.duration?t.style[e+"Duration"]=s.duration+"ms":"string"==typeof s.duration&&i.addClassName(t,s.duration),i.addClassName(t,["animated",m]),void t.addEventListener(a,r,!1)):void(s.onEnd&&setTimeout(function(){s.onEnd(null)},0))}}),o}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.carousel.js b/ajax/libs/ink/3.0.0/js/ink.carousel.js new file mode 100644 index 000000000..821c8a46c --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.carousel.js @@ -0,0 +1,420 @@ +/** + * @module Ink.UI.Carousel_1 + * Flexible Carousel + * @version 1 + */ + +Ink.createModule('Ink.UI.Carousel', '1', + ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Css_1', 'Ink.Dom.Element_1', 'Ink.UI.Pagination_1', 'Ink.Dom.Browser_1', 'Ink.Dom.Selector_1'], + function(Common, InkEvent, Css, InkElement, Pagination, Browser/*, Selector*/) { + 'use strict'; + + /* + * TODO: + * keyboardSupport + */ + + function limitRange(n, min, max) { + return Math.min(max, Math.max(min, n)); + } + + var requestAnimationFrame = window.requestAnimationFrame || + window.mozRequestAnimationFrame || + window.webkitRequestAnimationFrame || + function (cb) {return setTimeout(cb, 1000 / 30); }; + + /** + * @class Ink.UI.Carousel_1 + * @constructor + * + * @param {String|DOMElement} selector DOM element or element id + * @param {Object} [options] Carousel Options + * @param {Integer} [options.autoAdvance] Milliseconds to wait before auto-advancing pages. Set to 0 to disable auto-advance. Defaults to 0. + * @param {String} [options.axis] Axis of the carousel. Set to 'y' for a vertical carousel. Defaults to 'x'. + * @param {Boolean} [options.center] Flag to center the carousel horizontally. + * @param {Number} [options.initialPage] Initial index page of the carousel. Defaults to 0. + * @param {Boolean} [options.spaceAfterLastSlide=true] If there are not enough slides to fill the full width of the last page, leave white space. Defaults to `true`. + * @param {Boolean} [options.swipe] Enable swipe support if available. Defaults to true. + * @param {Mixed} [options.pagination] Either an `
        ` element to add pagination markup to or an `Ink.UI.Pagination` instance to use. + * @param {Function} [options.onChange] Callback to be called when the page changes. + * + * @sample Ink_UI_Carousel_1.html + */ + var Carousel = function(selector, options) { + this._handlers = { + paginationChange: Ink.bindMethod(this, '_onPaginationChange'), + windowResize: InkEvent.throttle(Ink.bindMethod(this, 'refit'), 200) + }; + + InkEvent.observe(window, 'resize', this._handlers.windowResize); + + var element = this._element = Common.elOrSelector(selector, '1st argument'); + + var opts = this._options = Common.options({ + autoAdvance: ['Integer', 0], + axis: ['String', 'x'], + initialPage: ['Integer', 0], + spaceAfterLastSlide: ['Boolean', true], + hideLast: ['Boolean', false], + center: ['Boolean', false], + keyboardSupport:['Boolean', false], + pagination: ['String', null], + onChange: ['Function', null], + swipe: ['Boolean', true] + // TODO exponential swipe + // TODO specify break point for next page when moving finger + }, options || {}, element, this); + + this._isY = (opts.axis === 'y'); + + var ulEl = Ink.s('ul.stage', element); + this._ulEl = ulEl; + + InkElement.removeTextNodeChildren(ulEl); + + if (this._options.pagination == null) { + this._currentPage = this._options.initialPage; + } + + this.refit(); // recalculate this._numPages + + if (this._isY) { + // Override white-space: no-wrap which is only necessary to make sure horizontal stuff stays horizontal, but breaks stuff intended to be vertical. + this._ulEl.style.whiteSpace = 'normal'; + } + + if (opts.swipe) { + InkEvent.observe(element, 'touchstart', Ink.bindMethod(this, '_onTouchStart')); + InkEvent.observe(element, 'touchmove', Ink.bindMethod(this, '_onTouchMove')); + InkEvent.observe(element, 'touchend', Ink.bindMethod(this, '_onTouchEnd')); + } + + this._setUpPagination(); + this._setUpAutoAdvance(); + this._setUpHider(); + }; + + Carousel.prototype = { + /** + * Repositions elements around. + * Measure the carousel once again, adjusting the involved elements' sizes. This is called automatically when the window resizes, in order to cater for changes from responsive media queries, for instance. + * + * @method refit + * @public + */ + refit: function() { + var _isY = this._isY; + + var size = function (elm, perpendicular) { + if (!perpendicular) { + return InkElement.outerDimensions(elm)[_isY ? 1 : 0]; + } else { + return InkElement.outerDimensions(elm)[_isY ? 0 : 1]; + } + }; + + this._liEls = Ink.ss('li.slide', this._ulEl); + var numSlides = this._liEls.length; + + var contRect = this._ulEl.getBoundingClientRect(); + this._ctnLength = _isY ? contRect.bottom - contRect.top : contRect.right - contRect.left; + this._elLength = size(this._liEls[0]); + this._slidesPerPage = Math.floor( this._ctnLength / this._elLength ) || 1; + + var numPages = Math.ceil( numSlides / this._slidesPerPage ); + var numPagesChanged = this._numPages !== numPages; + this._numPages = numPages; + this._deltaLength = this._slidesPerPage * this._elLength; + + this._center(); + this._updateHider(); + this._IE7(); + + if (this._pagination && numPagesChanged) { + this._pagination.setSize(this._numPages); + } + this.setPage(limitRange(this.getPage(), 0, this._numPages)); + }, + + _setUpPagination: function () { + if (this._options.pagination) { + if (Common.isDOMElement(this._options.pagination) || + typeof this._options.pagination === 'string') { + // if dom element or css selector string... + this._pagination = new Pagination(this._options.pagination, { + size: this._numPages, + onChange: this._handlers.paginationChange + }); + } else { + // assumes instantiated pagination + this._pagination = this._options.pagination; + this._pagination._options.onChange = this._handlers.paginationChange; + this._pagination.setSize(this._numPages); + } + this._pagination.setCurrent(this._options.initialPage || 0); + } else { + this._currentPage = this._options.initialPage || 0; + } + }, + + _setUpAutoAdvance: function () { + if (!this._options.autoAdvance) { return; } + var self = this; + + setTimeout(function autoAdvance() { + self.nextPage(true /* wrap */); + setTimeout(autoAdvance, self._options.autoAdvance); + }, this._options.autoAdvance); + }, + + _setUpHider: function () { + if (this._options.hideLast) { + var hiderEl = InkElement.create('div', { + className: 'hider', + insertBottom: this._element + }); + hiderEl.style.position = 'absolute'; + hiderEl.style[ this._isY ? 'left' : 'top' ] = '0'; // fix to top.. + hiderEl.style[ this._isY ? 'right' : 'bottom' ] = '0'; // and bottom... + hiderEl.style[ this._isY ? 'bottom' : 'right' ] = '0'; // and move to the end. + this._hiderEl = hiderEl; + } + }, + + _center: function() { + if (!this._options.center) { return; } + var gap = Math.floor( (this._ctnLength - (this._elLength * this._slidesPerPage) ) / 2 ); + + var pad; + if (this._isY) { + pad = [gap, 'px 0']; + } else { + pad = ['0 ', gap, 'px']; + } + + this._ulEl.style.padding = pad.join(''); + }, + + _updateHider: function() { + if (!this._hiderEl) { return; } + if (this.getPage() === 0) { + var gap = Math.floor( this._ctnLength - (this._elLength * this._slidesPerPage) ); + if (this._options.center) { + gap /= 2; + } + this._hiderEl.style[ this._isY ? 'height' : 'width' ] = gap + 'px'; + } else { + this._hiderEl.style[ this._isY ? 'height' : 'width' ] = '0px'; + } + }, + + /** + * Refits elements for IE7 because it doesn't support inline-block. + * + * @method _IE7 + * @private + */ + _IE7: function () { + if (Browser.IE && '' + Browser.version.split('.')[0] === '7') { + // var numPages = this._numPages; + var slides = Ink.ss('li.slide', this._ulEl); + var stl = function (prop, val) {slides[i].style[prop] = val; }; + for (var i = 0, len = slides.length; i < len; i++) { + stl('position', 'absolute'); + stl(this._isY ? 'top' : 'left', (i * this._elLength) + 'px'); + } + } + }, + + _onTouchStart: function (event) { + if (event.touches.length > 1) { return; } + + this._swipeData = { + x: InkEvent.pointerX(event), + y: InkEvent.pointerY(event), + lastUlPos: null + }; + + var ulRect = this._ulEl.getBoundingClientRect(); + + this._swipeData.inUlX = this._swipeData.x - ulRect.left; + this._swipeData.inUlY = this._swipeData.y - ulRect.top; + + setTransitionProperty(this._ulEl, 'none'); + + this._touchMoveIsFirstTouchMove = true; + + // InkEvent.stopDefault(event); + InkEvent.stopPropagation(event); + }, + + _onTouchMove: function (event) { + if (event.touches.length > 1) { return; /* multitouch event, not my problem. */ } + + var pointerX = InkEvent.pointerX(event); + var pointerY = InkEvent.pointerY(event); + + var deltaY = Math.abs(pointerY - this._swipeData.y); + var deltaX = Math.abs(pointerX - this._swipeData.x); + + if (this._touchMoveIsFirstTouchMove) { + this._touchMoveIsFirstTouchMove = undefined; + this._scrolling = this._isY ? + deltaX > deltaY : + deltaY > deltaX ; + + if (!this._scrolling) { + this._onAnimationFrame(); + } + } + + if (!this._scrolling && this._swipeData) { + InkEvent.stopDefault(event); + + this._swipeData.pointerPos = this._isY ? pointerY : pointerX; + } + + InkEvent.stopPropagation(event); + }, + + _onAnimationFrame: function () { + var swipeData = this._swipeData; + + if (!swipeData || this._scrolling || this._touchMoveIsFirstTouchMove) { return; } + + var elRect = this._element.getBoundingClientRect(); + + var newPos; + + if (!this._isY) { + newPos = swipeData.pointerPos - swipeData.inUlX - elRect.left; + } else { + newPos = swipeData.pointerPos - swipeData.inUlY - elRect.top; + } + + this._ulEl.style[this._isY ? 'top' : 'left'] = newPos + 'px'; + + swipeData.lastUlPos = newPos; + + requestAnimationFrame(Ink.bindMethod(this, '_onAnimationFrame')); + }, + + _onTouchEnd: function (event) { + if (this._swipeData && this._swipeData.pointerPos && !this._scrolling && !this._touchMoveIsFirstTouchMove) { + var snapToNext = 0.1; // swipe 10% of the way to change page + var progress = - this._swipeData.lastUlPos; + + var curPage = this.getPage(); + var estimatedPage = progress / this._elLength / this._slidesPerPage; + + if (Math.round(estimatedPage) === curPage) { + var diff = estimatedPage - curPage; + if (Math.abs(diff) > snapToNext) { + diff = diff > 0 ? 1 : -1; + curPage += diff; + } + } else { + curPage = Math.round(estimatedPage); + } + + this.setPage(curPage); + + InkEvent.stopPropagation(event); + InkEvent.stopDefault(event); + } + + setTransitionProperty(this._ulEl, null /* transition: left, top */); + this._swipeData = null; + this._touchMoveIsFirstTouchMove = undefined; + this._scrolling = undefined; + }, + + _onPaginationChange: function(pgn) { + this._setPage(pgn.getCurrent()); + }, + + /** + * Gets the current page index + * @method getPage + * @return The current page number + **/ + getPage: function () { + if (this._pagination) { + return this._pagination.getCurrent(); + } else { + return this._currentPage || 0; + } + }, + + /** + * Sets the current page index + * @method setPage + * @param {Number} page Index of the destination page. + * @param {Boolean} [wrap] Flag to activate circular counting. + **/ + setPage: function (page, wrap) { + if (wrap) { + // Pages outside the range [0..this._numPages] are wrapped. + page = page % this._numPages; + if (page < 0) { page = this._numPages - page; } + } + page = limitRange(page, 0, this._numPages - 1); + + if (this._pagination) { + this._pagination.setCurrent(page); + } else { + this._setPage(page); + } + }, + + _setPage: function (page) { + var _lengthToGo = page * this._deltaLength; + var isLastPage = page === (this._numPages - 1); + + if (!this._options.spaceAfterLastSlide && isLastPage && page > 0) { + var _itemsInLastPage = this._liEls.length - (page * this._slidesPerPage); + if(_itemsInLastPage < this._slidesPerPage) { + _lengthToGo = ((page - 1) * this._deltaLength) + (_itemsInLastPage * this._elLength); + } + } + + this._ulEl.style[ this._isY ? 'top' : 'left'] = + ['-', _lengthToGo, 'px'].join(''); + + if (this._options.onChange) { + this._options.onChange.call(this, page); + } + + this._currentPage = page; + + this._updateHider(); + }, + + /** + * Goes to the next page + * @method nextPage + * @param {Boolean} [wrap] Flag to loop from last page to first page. + **/ + nextPage: function (wrap) { + this.setPage(this.getPage() + 1, wrap); + }, + + /** + * Goes to the previous page + * @method previousPage + * @param {Boolean} [wrap] Flag to loop from first page to last page. + **/ + previousPage: function (wrap) { this.setPage(this.getPage() - 1, wrap); } + }; + + function setTransitionProperty(el, newTransition) { + el.style.transitionProperty = + el.style.oTransitionProperty = + el.style.msTransitionProperty = + el.style.mozTransitionProperty = + el.style.webkitTransitionProperty = newTransition; + } + + return Carousel; + +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.carousel.min.js b/ajax/libs/ink/3.0.0/js/ink.carousel.min.js new file mode 100644 index 000000000..4458aded8 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.carousel.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Carousel","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.UI.Pagination_1","Ink.Dom.Browser_1","Ink.Dom.Selector_1"],function(t,i,s,e,n,o){"use strict";function h(t,i,s){return Math.min(s,Math.max(i,t))}function a(t,i){t.style.transitionProperty=t.style.oTransitionProperty=t.style.msTransitionProperty=t.style.mozTransitionProperty=t.style.webkitTransitionProperty=i}var _=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,1e3/30)},r=function(s,n){this._handlers={paginationChange:Ink.bindMethod(this,"_onPaginationChange"),windowResize:i.throttle(Ink.bindMethod(this,"refit"),200)},i.observe(window,"resize",this._handlers.windowResize);var o=this._element=t.elOrSelector(s,"1st argument"),h=this._options=t.options({autoAdvance:["Integer",0],axis:["String","x"],initialPage:["Integer",0],spaceAfterLastSlide:["Boolean",!0],hideLast:["Boolean",!1],center:["Boolean",!1],keyboardSupport:["Boolean",!1],pagination:["String",null],onChange:["Function",null],swipe:["Boolean",!0]},n||{},o,this);this._isY="y"===h.axis;var a=Ink.s("ul.stage",o);this._ulEl=a,e.removeTextNodeChildren(a),null==this._options.pagination&&(this._currentPage=this._options.initialPage),this.refit(),this._isY&&(this._ulEl.style.whiteSpace="normal"),h.swipe&&(i.observe(o,"touchstart",Ink.bindMethod(this,"_onTouchStart")),i.observe(o,"touchmove",Ink.bindMethod(this,"_onTouchMove")),i.observe(o,"touchend",Ink.bindMethod(this,"_onTouchEnd"))),this._setUpPagination(),this._setUpAutoAdvance(),this._setUpHider()};return r.prototype={refit:function(){var t=this._isY,i=function(i,s){return s?e.outerDimensions(i)[t?0:1]:e.outerDimensions(i)[t?1:0]};this._liEls=Ink.ss("li.slide",this._ulEl);var s=this._liEls.length,n=this._ulEl.getBoundingClientRect();this._ctnLength=t?n.bottom-n.top:n.right-n.left,this._elLength=i(this._liEls[0]),this._slidesPerPage=Math.floor(this._ctnLength/this._elLength)||1;var o=Math.ceil(s/this._slidesPerPage),a=this._numPages!==o;this._numPages=o,this._deltaLength=this._slidesPerPage*this._elLength,this._center(),this._updateHider(),this._IE7(),this._pagination&&a&&this._pagination.setSize(this._numPages),this.setPage(h(this.getPage(),0,this._numPages))},_setUpPagination:function(){this._options.pagination?(t.isDOMElement(this._options.pagination)||"string"==typeof this._options.pagination?this._pagination=new n(this._options.pagination,{size:this._numPages,onChange:this._handlers.paginationChange}):(this._pagination=this._options.pagination,this._pagination._options.onChange=this._handlers.paginationChange,this._pagination.setSize(this._numPages)),this._pagination.setCurrent(this._options.initialPage||0)):this._currentPage=this._options.initialPage||0},_setUpAutoAdvance:function(){if(this._options.autoAdvance){var t=this;setTimeout(function i(){t.nextPage(!0),setTimeout(i,t._options.autoAdvance)},this._options.autoAdvance)}},_setUpHider:function(){if(this._options.hideLast){var t=e.create("div",{className:"hider",insertBottom:this._element});t.style.position="absolute",t.style[this._isY?"left":"top"]="0",t.style[this._isY?"right":"bottom"]="0",t.style[this._isY?"bottom":"right"]="0",this._hiderEl=t}},_center:function(){if(this._options.center){var t,i=Math.floor((this._ctnLength-this._elLength*this._slidesPerPage)/2);t=this._isY?[i,"px 0"]:["0 ",i,"px"],this._ulEl.style.padding=t.join("")}},_updateHider:function(){if(this._hiderEl)if(0===this.getPage()){var t=Math.floor(this._ctnLength-this._elLength*this._slidesPerPage);this._options.center&&(t/=2),this._hiderEl.style[this._isY?"height":"width"]=t+"px"}else this._hiderEl.style[this._isY?"height":"width"]="0px"},_IE7:function(){if(o.IE&&""+o.version.split(".")[0]=="7")for(var t=Ink.ss("li.slide",this._ulEl),i=function(i,e){t[s].style[i]=e},s=0,e=t.length;e>s;s++)i("position","absolute"),i(this._isY?"top":"left",s*this._elLength+"px")},_onTouchStart:function(t){if(!(t.touches.length>1)){this._swipeData={x:i.pointerX(t),y:i.pointerY(t),lastUlPos:null};var s=this._ulEl.getBoundingClientRect();this._swipeData.inUlX=this._swipeData.x-s.left,this._swipeData.inUlY=this._swipeData.y-s.top,a(this._ulEl,"none"),this._touchMoveIsFirstTouchMove=!0,i.stopPropagation(t)}},_onTouchMove:function(t){if(!(t.touches.length>1)){var s=i.pointerX(t),e=i.pointerY(t),n=Math.abs(e-this._swipeData.y),o=Math.abs(s-this._swipeData.x);this._touchMoveIsFirstTouchMove&&(this._touchMoveIsFirstTouchMove=void 0,this._scrolling=this._isY?o>n:n>o,this._scrolling||this._onAnimationFrame()),!this._scrolling&&this._swipeData&&(i.stopDefault(t),this._swipeData.pointerPos=this._isY?e:s),i.stopPropagation(t)}},_onAnimationFrame:function(){var t=this._swipeData;if(t&&!this._scrolling&&!this._touchMoveIsFirstTouchMove){var i,s=this._element.getBoundingClientRect();i=this._isY?t.pointerPos-t.inUlY-s.top:t.pointerPos-t.inUlX-s.left,this._ulEl.style[this._isY?"top":"left"]=i+"px",t.lastUlPos=i,_(Ink.bindMethod(this,"_onAnimationFrame"))}},_onTouchEnd:function(t){if(this._swipeData&&this._swipeData.pointerPos&&!this._scrolling&&!this._touchMoveIsFirstTouchMove){var s=.1,e=-this._swipeData.lastUlPos,n=this.getPage(),o=e/this._elLength/this._slidesPerPage;if(Math.round(o)===n){var h=o-n;Math.abs(h)>s&&(h=h>0?1:-1,n+=h)}else n=Math.round(o);this.setPage(n),i.stopPropagation(t),i.stopDefault(t)}a(this._ulEl,null),this._swipeData=null,this._touchMoveIsFirstTouchMove=void 0,this._scrolling=void 0},_onPaginationChange:function(t){this._setPage(t.getCurrent())},getPage:function(){return this._pagination?this._pagination.getCurrent():this._currentPage||0},setPage:function(t,i){i&&(t%=this._numPages,0>t&&(t=this._numPages-t)),t=h(t,0,this._numPages-1),this._pagination?this._pagination.setCurrent(t):this._setPage(t)},_setPage:function(t){var i=t*this._deltaLength,s=t===this._numPages-1;if(!this._options.spaceAfterLastSlide&&s&&t>0){var e=this._liEls.length-t*this._slidesPerPage;e + * Ink.requireModules(['Ink.UI.Close_1'],function( Close ){ + * new Close(); + * }); + * + * + * @sample Ink_UI_Close_1.html + */ + var Close = function() { + InkEvent.observe(document.body, 'click', function(ev) { + var el = InkEvent.element(ev); + + el = InkElement.findUpwardsByClass(el, 'ink-close') || + InkElement.findUpwardsByClass(el, 'ink-dismiss'); + + if (!el) { + return; // ink-close or ink-dismiss class not found + } + + var toRemove = el; + toRemove = InkElement.findUpwardsByClass(el, 'ink-alert') || + InkElement.findUpwardsByClass(el, 'ink-alert-block'); + + if (toRemove) { + InkEvent.stop(ev); + InkElement.remove(toRemove); + } + }); + }; + + return Close; + +}); diff --git a/ajax/libs/ink/3.0.0/js/ink.close.min.js b/ajax/libs/ink/3.0.0/js/ink.close.min.js new file mode 100644 index 000000000..91701ae90 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.close.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Close","1",["Ink.Dom.Event_1","Ink.Dom.Element_1"],function(n,s){"use strict";var e=function(){n.observe(document.body,"click",function(e){var i=n.element(e);if(i=s.findUpwardsByClass(i,"ink-close")||s.findUpwardsByClass(i,"ink-dismiss")){var r=i;r=s.findUpwardsByClass(i,"ink-alert")||s.findUpwardsByClass(i,"ink-alert-block"),r&&(n.stop(e),s.remove(r))}})};return e}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.common.js b/ajax/libs/ink/3.0.0/js/ink.common.js new file mode 100644 index 000000000..46ac30b70 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.common.js @@ -0,0 +1,749 @@ +/** + * @module Ink.UI.Common_1 + * Auxiliar utilities for UI Modules + * @version 1 + */ + +Ink.createModule('Ink.UI.Common', '1', ['Ink.Dom.Element_1', 'Ink.Net.Ajax_1','Ink.Dom.Css_1','Ink.Dom.Selector_1','Ink.Util.Url_1'], function(InkElement, Ajax,Css,Selector,Url) { + + 'use strict'; + + var instances = {}; + var lastIdNum = 0; + var nothing = {} /* a marker, for reference comparison. */; + + var keys = Object.keys || function (obj) { + var ret = []; + for (var k in obj) if (obj.hasOwnProperty(k)) { + ret.push(k); + } + return ret; + }; + + var Common = { + + /** + * Supported Ink Layouts + * + * @property Layouts + * @type Object + * @readOnly + */ + Layouts: { + TINY: 'tiny', + SMALL: 'small', + MEDIUM: 'medium', + LARGE: 'large', + XLARGE: 'xlarge' + }, + + /** + * Checks if an item is a valid DOM Element. + * + * @method isDOMElement + * @static + * @param {Mixed} o The object to be checked. + * @return {Boolean} True if it's a valid DOM Element. + * @example + * var el = Ink.s('#element'); + * if( Ink.UI.Common.isDOMElement( el ) === true ){ + * // It is a DOM Element. + * } else { + * // It is NOT a DOM Element. + * } + */ + isDOMElement: function(o) { + return o && typeof o === 'object' && 'nodeType' in o && o.nodeType === 1; + }, + + /** + * Checks if an item is a valid integer. + * + * @method isInteger + * @static + * @param {Mixed} n The value to be checked. + * @return {Boolean} True if it's a valid integer. + * @example + * var value = 1; + * if( Ink.UI.Common.isInteger( value ) === true ){ + * // It is an integer. + * } else { + * // It is NOT an integer. + * } + */ + isInteger: function(n) { + return (typeof n === 'number' && n % 1 === 0); + }, + + /** + * Gets a DOM Element. + * + * @method elOrSelector + * @static + * @param {DOMElement|String} elOrSelector DOM Element or CSS Selector + * @param {String} fieldName The name of the field. Commonly used for debugging. + * @return {DOMElement} Returns the DOMElement passed or the first result of the CSS Selector. Otherwise it throws an exception. + * @example + * // In case there are several .myInput, it will retrieve the first found + * var el = Ink.UI.Common.elOrSelector('.myInput','My Input'); + */ + elOrSelector: function(elOrSelector, fieldName) { + if (!this.isDOMElement(elOrSelector)) { + var t = Selector.select(elOrSelector); + if (t.length === 0) { + Ink.warn(fieldName + ' must either be a DOM Element or a selector expression!\nThe script element must also be after the DOM Element itself.'); + return null; + } + return t[0]; + } + return elOrSelector; + }, + + /** + * Alias for `elOrSelector` but returns an array of elements. + * + * @method elsOrSelector + * + * @static + * @param {DOMElement|String} elOrSelector DOM Element or CSS Selector + * @param {String} fieldName The name of the field. Commonly used for debugging. + * @return {DOMElement} Returns the DOMElement passed or the first result of the CSS Selector. Otherwise it throws an exception. + * @param {Boolean} required Flag to accept an empty array as output. + * @return {Array} The selected DOM Elements. + * @example + * var elements = Ink.UI.Common.elsOrSelector('input.my-inputs', 'My Input'); + */ + elsOrSelector: function(elsOrSelector, fieldName, required) { + var ret; + if (typeof elsOrSelector === 'string') { + ret = Selector.select(elsOrSelector); + } else if (Common.isDOMElement(elsOrSelector)) { + ret = [elsOrSelector]; + } else if (elsOrSelector && typeof elsOrSelector === 'object' && typeof elsOrSelector.length === 'number') { + ret = elsOrSelector; + } + + if (ret && ret.length) { + return ret; + } else { + if (required || arguments.length === 2) { + throw new TypeError(fieldName + ' must either be a DOM Element, an Array of elements, or a selector expression!\nThe script element must also be after the DOM Element itself.'); + } else { + return []; + } + } + }, + + /** + * Gets options an object and element's metadata. + * + * The element's data attributes take precedence. Values from the element's data-atrributes are coerced into the required type. + * + * @method options + * + * @param {Object} [fieldId] Name to be used in debugging features. + * @param {Object} defaults Object with the options' types and defaults. + * @param {Object} overrides Options to override the defaults. Usually passed when instantiating an UI module. + * @param {DOMElement} [element] Element with data-attributes + * + * @example + * + * this._options = Ink.UI.Common.options('MyComponent', { + * 'anobject': ['Object', null], // Defaults to null + * 'target': ['Element', null], + * 'stuff': ['Number', 0.1], + * 'stuff2': ['Integer', 0], + * 'doKickFlip': ['Boolean', false], + * 'targets': ['Elements'], // Required option since no default was given + * 'onClick': ['Function', null] + * }, options || {}, elm) + * + * @example + * + * ### Note about booleans + * + * Here is how options are read from the markup + * data-attributes, for several values`data-a-boolean`. + * + * Options considered true: + * + * - `data-a-boolean="true"` + * - (Every other value which is not on the list below.) + * + * Options considered false: + * + * - `data-a-boolean="false"` + * - `data-a-boolean=""` + * - `data-a-boolean` + * + * Options which go to default: + * + * - (no attribute). When `data-a-boolean` is ommitted, the + * option is not considered true nor false, and as such + * defaults to what is in the `defaults` argument. + * + **/ + options: function (fieldId, defaults, overrides, element) { + if (typeof fieldId !== 'string') { + element = overrides; + overrides = defaults; + defaults = fieldId; + fieldId = ''; + } + overrides = overrides || {}; + var out = {}; + var dataAttrs = element ? InkElement.data(element) : {}; + var fromDataAttrs; + var type; + var lType; + var defaultVal; + + var invalidStr = function (str) { + if (fieldId) { str = fieldId + ': "' + ('' + str).replace(/"/, '\\"') + '"'; } + return str; + }; + + var quote = function (str) { + return '"' + ('' + str).replace(/"/, '\\"') + '"'; + }; + + var invalidThrow = function (str) { + throw new Error(invalidStr(str)); + }; + + var invalid = function (str) { + Ink.error(invalidStr(str) + '. Ignoring option.'); + }; + + function optionValue(key) { + type = defaults[key][0]; + lType = type.toLowerCase(); + defaultVal = defaults[key].length === 2 ? defaults[key][1] : nothing; + + if (!type) { + invalidThrow('Ink.UI.Common.options: Always specify a type!'); + } + if (!(lType in Common._coerce_funcs)) { + invalidThrow('Ink.UI.Common.options: ' + defaults[key][0] + ' is not a valid type. Use one of ' + keys(Common._coerce_funcs).join(', ')); + + } + if (!defaults[key].length || defaults[key].length > 2) { + invalidThrow('the "defaults" argument must be an object mapping option names to [typestring, optional] arrays.'); + } + + if (key in dataAttrs) { + fromDataAttrs = Common._coerce_from_string(lType, dataAttrs[key], key, fieldId); + // (above can return `nothing`) + } else { + fromDataAttrs = nothing; + } + + if (fromDataAttrs !== nothing) { + if (!Common._options_validate(fromDataAttrs, lType)) { + invalid('(' + key + ' option) Invalid ' + lType + ' ' + quote(fromDataAttrs)); + return defaultVal; + } else { + return fromDataAttrs; + } + } else if (key in overrides) { + return overrides[key]; + } else if (defaultVal !== nothing) { + return defaultVal; + } else { + invalidThrow('Option ' + key + ' is required!'); + } + } + + for (var key in defaults) { + if (defaults.hasOwnProperty(key)) { + out[key] = optionValue(key); + } + } + + return out; + }, + + _coerce_from_string: function (type, val, paramName, fieldId) { + if (type in Common._coerce_funcs) { + return Common._coerce_funcs[type](val, paramName, fieldId); + } else { + return val; + } + }, + + _options_validate: function (val, type) { + if (type in Common._options_validate_types) { + return Common._options_validate_types[type].call(Common, val); + } else { + // 'object' options cannot be passed through data-attributes. + // Json you say? Not any good to embed in HTML. + return false; + } + }, + + _coerce_funcs: (function () { + var ret = { + element: function (val) { + return Common.elOrSelector(val, ''); + }, + elements: function (val) { + return Common.elsOrSelector(val, '', false /*not required, so don't throw an exception now*/); + }, + object: function (val) { return val; }, + number: function (val) { return parseFloat(val); }, + 'boolean': function (val) { + return !(val === 'false' || val === '' || val === null); + }, + string: function (val) { return val; }, + 'function': function (val, paramName, fieldId) { + Ink.error(fieldId + ': You cannot specify the option "' + paramName + '" through data-attributes because it\'s a function'); + return nothing; + } + }; + ret['float'] = ret.integer = ret.number; + return ret; + }()), + + _options_validate_types: (function () { + var types = { + string: function (val) { + return typeof val === 'string'; + }, + number: function (val) { + return typeof val === 'number' && !isNaN(val) && isFinite(val); + }, + integer: function (val) { + return val === Math.round(val); + }, + element: function (val) { + return Common.isDOMElement(val); + }, + elements: function (val) { + return val && typeof val === 'object' && typeof val.length === 'number' && val.length; + }, + 'boolean': function (val) { + return typeof val === 'boolean'; + } + }; + types['float'] = types.number; + return types; + }()), + + /** + * Deep copy (clone) an object. + * Note: The object cannot have referece loops. + * + * @method clone + * @static + * @param {Object} o The object to be cloned/copied. + * @return {Object} Returns the result of the clone/copy. + * @example + * var originalObj = { + * key1: 'value1', + * key2: 'value2', + * key3: 'value3' + * }; + * var cloneObj = Ink.UI.Common.clone( originalObj ); + */ + clone: function(o) { + try { + return JSON.parse( JSON.stringify(o) ); + } catch (ex) { + throw new Error('Given object cannot have loops!'); + } + }, + + + /** + * Gets an element's one-base index relative to its parent. + * + * @method childIndex + * @static + * @param {DOMElement} childEl Valid DOM Element. + * @return {Number} Numerical position of an element relatively to its parent. + * @example + * + *
          + *
        • One
        • + *
        • Two
        • + *
        • Three
        • + *
        • Four
        • + *
        + * + * + */ + childIndex: function(childEl) { + if( Common.isDOMElement(childEl) ){ + var els = Selector.select('> *', childEl.parentNode); + for (var i = 0, f = els.length; i < f; ++i) { + if (els[i] === childEl) { + return i; + } + } + } + throw 'not found!'; + }, + + + /** + * AJAX JSON request shortcut method + * It provides a more convenient way to do an AJAX request and expect a JSON response. + * It offers a callback option, as third parameter, for better async handling. + * + * @method ajaxJSON + * @static + * @async + * @param {String} endpoint Valid URL to be used as target by the request. + * @param {Object} params This field is used in the thrown Exception to identify the parameter. + * @param {Function} cb Callback for the request. + * @example + * // In case there are several .myInput, it will retrieve the first found + * var el = Ink.UI.Common.elOrSelector('.myInput','My Input'); + */ + ajaxJSON: function(endpoint, params, cb) { + new Ajax( + endpoint, + { + evalJS: 'force', + method: 'POST', + parameters: params, + + onSuccess: function( r) { + try { + r = r.responseJSON; + if (r.status !== 'ok') { + throw 'server error: ' + r.message; + } + cb(null, r); + } catch (ex) { + cb(ex); + } + }, + + onFailure: function() { + cb('communication failure'); + } + } + ); + }, + + + /** + * Gets the current Ink layout. + * + * @method currentLayout + * @static + * @return {String} A string representation of the current layout name. + * @example + * var inkLayout = Ink.UI.Common.currentLayout(); + * if (inkLayout === 'small') { + * // ... + * } + */ + currentLayout: function() { + var i, f, k, v, el, detectorEl = Selector.select('#ink-layout-detector')[0]; + if (!detectorEl) { + detectorEl = document.createElement('div'); + detectorEl.id = 'ink-layout-detector'; + for (k in this.Layouts) { + if (this.Layouts.hasOwnProperty(k)) { + v = this.Layouts[k]; + el = document.createElement('div'); + el.className = 'show-' + v + ' hide-all'; + el.setAttribute('data-ink-layout', v); + detectorEl.appendChild(el); + } + } + document.body.appendChild(detectorEl); + } + + var result = ''; + var resultCount = 0; + for (i = 0, f = detectorEl.childNodes.length; i < f; ++i) { + el = detectorEl.childNodes[i]; + if (Css.getStyle(el, 'display') === 'block') { + result = el.getAttribute('data-ink-layout'); + resultCount += 1; + } + } + + if (resultCount === 1) { + return result; + } else { + return 'large'; + } + }, + + + /** + * Sets the location's hash (window.location.hash). + * + * @method hashSet + * @static + * @param {Object} o Object with the info to be placed in the location's hash. + * @example + * // It will set the location's hash like: #key1=value1&key2=value2&key3=value3 + * Ink.UI.Common.hashSet({ + * key1: 'value1', + * key2: 'value2', + * key3: 'value3' + * }); + */ + hashSet: function(o) { + if (typeof o !== 'object') { throw new TypeError('o should be an object!'); } + var hashParams = Url.getAnchorString(); + hashParams = Ink.extendObj(hashParams, o); + window.location.hash = Url.genQueryString('', hashParams).substring(1); + }, + + /** + * Removes children nodes from a given object. + * This method was initially created to help solve a problem in Internet Explorer(s) that occurred when trying to set the innerHTML of some specific elements like 'table'. + * + * @method cleanChildren + * @static + * @param {DOMElement} parentEl Valid DOM Element + * @example + * + *
          + *
        • One
        • + *
        • Two
        • + *
        • Three
        • + *
        • Four
        • + *
        + * + * + * + * + *
          + */ + cleanChildren: function(parentEl) { + if( !Common.isDOMElement(parentEl) ){ + throw 'Please provide a valid DOMElement'; + } + var prevEl, el = parentEl.lastChild; + while (el) { + prevEl = el.previousSibling; + parentEl.removeChild(el); + el = prevEl; + } + }, + + /** + * Stores the id and/or classes of an element in an object. + * + * @method storeIdAndClasses + * @static + * @param {DOMElement} fromEl Valid DOM Element to get the id and classes from. + * @param {Object} inObj Object where the id and classes will be saved. + * @example + *
          + * + * + */ + storeIdAndClasses: function(fromEl, inObj) { + if( !Common.isDOMElement(fromEl) ){ + throw 'Please provide a valid DOMElement as first parameter'; + } + + var id = fromEl.id; + if (id) { + inObj._id = id; + } + + var classes = fromEl.className; + if (classes) { + inObj._classes = classes; + } + }, + + /** + * Sets the id and className properties of an element based + * + * @method restoreIdAndClasses + * @static + * @param {DOMElement} toEl Valid DOM Element to set the id and classes on. + * @param {Object} inObj Object where the id and classes to be set are. This method uses the same format as the one given in `storeIdAndClasses` + * @example + *
          + * + * + * + * + *
          + */ + restoreIdAndClasses: function(toEl, inObj) { + + if( !Common.isDOMElement(toEl) ){ + throw 'Please provide a valid DOMElement as first parameter'; + } + + if (inObj._id && toEl.id !== inObj._id) { + toEl.id = inObj._id; + } + + if (inObj._classes && toEl.className.indexOf(inObj._classes) === -1) { + if (toEl.className) { toEl.className += ' ' + inObj._classes; } + else { toEl.className = inObj._classes; } + } + + if (inObj._instanceId && !toEl.getAttribute('data-instance')) { + toEl.setAttribute('data-instance', inObj._instanceId); + } + }, + + /** + * Saves a component's instance reference for later retrieval. + * + * @method registerInstance + * @static + * @param {Object} inst Object that holds the instance. + * @param {DOMElement} el DOM Element to associate with the object. + * @param {Object} [optionalPrefix] Defaults to 'instance' + */ + registerInstance: function(inst, el, optionalPrefix) { + if (inst._instanceId) { return; } + + if (typeof inst !== 'object') { throw new TypeError('1st argument must be a JavaScript object!'); } + + if (inst._options && inst._options.skipRegister) { return; } + + if (!this.isDOMElement(el)) { throw new TypeError('2nd argument must be a DOM element!'); } + if (optionalPrefix !== undefined && typeof optionalPrefix !== 'string') { throw new TypeError('3rd argument must be a string!'); } + var id = (optionalPrefix || 'instance') + (++lastIdNum); + instances[id] = inst; + inst._instanceId = id; + var dataInst = el.getAttribute('data-instance'); + dataInst = (dataInst !== null) ? [dataInst, id].join(' ') : id; + el.setAttribute('data-instance', dataInst); + }, + + /** + * Deletes an instance with a given id. + * + * @method unregisterInstance + * @static + * @param {String} id Id of the instance to be destroyed. + */ + unregisterInstance: function(id) { + delete instances[id]; + }, + + /** + * Gets an UI instance from an element or instance id. + * + * @method getInstance + * @static + * @param {String|DOMElement} instanceIdOrElement Instance's id or DOM Element from which we want the instances. + * @return {Object|Array} Returns an instance or a collection of instances. + */ + getInstance: function(instanceIdOrElement) { + var ids; + if (this.isDOMElement(instanceIdOrElement)) { + ids = instanceIdOrElement.getAttribute('data-instance'); + if (ids === null) { throw new Error('argument is not a DOM instance element!'); } + } + else { + ids = instanceIdOrElement; + } + + ids = ids.split(' '); + var inst, id, i, l = ids.length; + + var res = []; + for (i = 0; i < l; ++i) { + id = ids[i]; + if (!id) { throw new Error('Element is not a JS instance!'); } + inst = instances[id]; + if (!inst) { throw new Error('Instance "' + id + '" not found!'); } + res.push(inst); + } + + return (l === 1) ? res[0] : res; + }, + + /** + * Gets an instance based on a selector. + * + * @method getInstanceFromSelector + * @static + * @param {String} selector CSS selector to get the instances from. + * @return {Object|Array} Returns an instance or a collection of instances. + */ + getInstanceFromSelector: function(selector) { + var el = Selector.select(selector)[0]; + if (!el) { throw new Error('Element not found!'); } + return this.getInstance(el); + }, + + /** + * Gets all the instance ids + * + * @method getInstanceIds + * @static + * @return {Array} Collection of instance ids + */ + getInstanceIds: function() { + var res = []; + for (var id in instances) { + if (instances.hasOwnProperty(id)) { + res.push( id ); + } + } + return res; + }, + + /** + * Gets all the instances + * + * @method getInstances + * @static + * @return {Array} Collection of existing instances. + */ + getInstances: function() { + var res = []; + for (var id in instances) { + if (instances.hasOwnProperty(id)) { + res.push( instances[id] ); + } + } + return res; + }, + + /** + * Boilerplate method to destroy a component. + * Components should copy this method as its destroy method and modify it. + * + * @method destroyComponent + * @static + */ + destroyComponent: function() { + Common.unregisterInstance(this._instanceId); + this._element.parentNode.removeChild(this._element); + } + + }; + + return Common; + +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.common.min.js b/ajax/libs/ink/3.0.0/js/ink.common.min.js new file mode 100644 index 000000000..25e9ee81b --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.common.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Common","1",["Ink.Dom.Element_1","Ink.Net.Ajax_1","Ink.Dom.Css_1","Ink.Dom.Selector_1","Ink.Util.Url_1"],function(e,t,n,r,o){"use strict";var i={},s=0,a={},u=Object.keys||function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},c={Layouts:{TINY:"tiny",SMALL:"small",MEDIUM:"medium",LARGE:"large",XLARGE:"xlarge"},isDOMElement:function(e){return e&&"object"==typeof e&&"nodeType"in e&&1===e.nodeType},isInteger:function(e){return"number"==typeof e&&e%1===0},elOrSelector:function(e,t){if(!this.isDOMElement(e)){var n=r.select(e);return 0===n.length?(Ink.warn(t+" must either be a DOM Element or a selector expression!\nThe script element must also be after the DOM Element itself."),null):n[0]}return e},elsOrSelector:function(e,t,n){var o;if("string"==typeof e?o=r.select(e):c.isDOMElement(e)?o=[e]:e&&"object"==typeof e&&"number"==typeof e.length&&(o=e),o&&o.length)return o;if(n||2===arguments.length)throw new TypeError(t+" must either be a DOM Element, an Array of elements, or a selector expression!\nThe script element must also be after the DOM Element itself.");return[]},options:function(t,n,r,o){function i(e){return l=n[e][0],f=l.toLowerCase(),m=2===n[e].length?n[e][1]:a,l||y("Ink.UI.Common.options: Always specify a type!"),f in c._coerce_funcs||y("Ink.UI.Common.options: "+n[e][0]+" is not a valid type. Use one of "+u(c._coerce_funcs).join(", ")),(!n[e].length||n[e].length>2)&&y('the "defaults" argument must be an object mapping option names to [typestring, optional] arrays.'),s=e in p?c._coerce_from_string(f,p[e],e,t):a,s!==a?c._options_validate(s,f)?s:(_("("+e+" option) Invalid "+f+" "+g(s)),m):e in r?r[e]:m!==a?m:void y("Option "+e+" is required!")}"string"!=typeof t&&(o=r,r=n,n=t,t=""),r=r||{};var s,l,f,m,d={},p=o?e.data(o):{},h=function(e){return t&&(e=t+': "'+(""+e).replace(/"/,'\\"')+'"'),e},g=function(e){return'"'+(""+e).replace(/"/,'\\"')+'"'},y=function(e){throw new Error(h(e))},_=function(e){Ink.error(h(e)+". Ignoring option.")};for(var v in n)n.hasOwnProperty(v)&&(d[v]=i(v));return d},_coerce_from_string:function(e,t,n,r){return e in c._coerce_funcs?c._coerce_funcs[e](t,n,r):t},_options_validate:function(e,t){return t in c._options_validate_types?c._options_validate_types[t].call(c,e):!1},_coerce_funcs:function(){var e={element:function(e){return c.elOrSelector(e,"")},elements:function(e){return c.elsOrSelector(e,"",!1)},object:function(e){return e},number:function(e){return parseFloat(e)},"boolean":function(e){return!("false"===e||""===e||null===e)},string:function(e){return e},"function":function(e,t,n){return Ink.error(n+': You cannot specify the option "'+t+"\" through data-attributes because it's a function"),a}};return e["float"]=e.integer=e.number,e}(),_options_validate_types:function(){var e={string:function(e){return"string"==typeof e},number:function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)},integer:function(e){return e===Math.round(e)},element:function(e){return c.isDOMElement(e)},elements:function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&e.length},"boolean":function(e){return"boolean"==typeof e}};return e["float"]=e.number,e}(),clone:function(e){try{return JSON.parse(JSON.stringify(e))}catch(t){throw new Error("Given object cannot have loops!")}},childIndex:function(e){if(c.isDOMElement(e))for(var t=r.select("> *",e.parentNode),n=0,o=t.length;o>n;++n)if(t[n]===e)return n;throw"not found!"},ajaxJSON:function(e,n,r){new t(e,{evalJS:"force",method:"POST",parameters:n,onSuccess:function(e){try{if(e=e.responseJSON,"ok"!==e.status)throw"server error: "+e.message;r(null,e)}catch(t){r(t)}},onFailure:function(){r("communication failure")}})},currentLayout:function(){var e,t,o,i,s,a=r.select("#ink-layout-detector")[0];if(!a){a=document.createElement("div"),a.id="ink-layout-detector";for(o in this.Layouts)this.Layouts.hasOwnProperty(o)&&(i=this.Layouts[o],s=document.createElement("div"),s.className="show-"+i+" hide-all",s.setAttribute("data-ink-layout",i),a.appendChild(s));document.body.appendChild(a)}var u="",c=0;for(e=0,t=a.childNodes.length;t>e;++e)s=a.childNodes[e],"block"===n.getStyle(s,"display")&&(u=s.getAttribute("data-ink-layout"),c+=1);return 1===c?u:"large"},hashSet:function(e){if("object"!=typeof e)throw new TypeError("o should be an object!");var t=o.getAnchorString();t=Ink.extendObj(t,e),window.location.hash=o.genQueryString("",t).substring(1)},cleanChildren:function(e){if(!c.isDOMElement(e))throw"Please provide a valid DOMElement";for(var t,n=e.lastChild;n;)t=n.previousSibling,e.removeChild(n),n=t},storeIdAndClasses:function(e,t){if(!c.isDOMElement(e))throw"Please provide a valid DOMElement as first parameter";var n=e.id;n&&(t._id=n);var r=e.className;r&&(t._classes=r)},restoreIdAndClasses:function(e,t){if(!c.isDOMElement(e))throw"Please provide a valid DOMElement as first parameter";t._id&&e.id!==t._id&&(e.id=t._id),t._classes&&-1===e.className.indexOf(t._classes)&&(e.className?e.className+=" "+t._classes:e.className=t._classes),t._instanceId&&!e.getAttribute("data-instance")&&e.setAttribute("data-instance",t._instanceId)},registerInstance:function(e,t,n){if(!e._instanceId){if("object"!=typeof e)throw new TypeError("1st argument must be a JavaScript object!");if(!e._options||!e._options.skipRegister){if(!this.isDOMElement(t))throw new TypeError("2nd argument must be a DOM element!");if(void 0!==n&&"string"!=typeof n)throw new TypeError("3rd argument must be a string!");var r=(n||"instance")+ ++s;i[r]=e,e._instanceId=r;var o=t.getAttribute("data-instance");o=null!==o?[o,r].join(" "):r,t.setAttribute("data-instance",o)}}},unregisterInstance:function(e){delete i[e]},getInstance:function(e){var t;if(this.isDOMElement(e)){if(t=e.getAttribute("data-instance"),null===t)throw new Error("argument is not a DOM instance element!")}else t=e;t=t.split(" ");var n,r,o,s=t.length,a=[];for(o=0;s>o;++o){if(r=t[o],!r)throw new Error("Element is not a JS instance!");if(n=i[r],!n)throw new Error('Instance "'+r+'" not found!');a.push(n)}return 1===s?a[0]:a},getInstanceFromSelector:function(e){var t=r.select(e)[0];if(!t)throw new Error("Element not found!");return this.getInstance(t)},getInstanceIds:function(){var e=[];for(var t in i)i.hasOwnProperty(t)&&e.push(t);return e},getInstances:function(){var e=[];for(var t in i)i.hasOwnProperty(t)&&e.push(i[t]);return e},destroyComponent:function(){c.unregisterInstance(this._instanceId),this._element.parentNode.removeChild(this._element)}};return c}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.datepicker.js b/ajax/libs/ink/3.0.0/js/ink.datepicker.js new file mode 100644 index 000000000..3f137ac06 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.datepicker.js @@ -0,0 +1,1414 @@ +/** + * @module Ink.UI.DatePicker_1 + * @version 1 + * Date selector + */ + +Ink.createModule('Ink.UI.DatePicker', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1','Ink.Util.Date_1', 'Ink.Dom.Browser_1'], function(Common, Event, Css, InkElement, Selector, InkArray, InkDate ) { + 'use strict'; + + // Repeat a string. Long version of (new Array(n)).join(str); + function strRepeat(n, str) { + var ret = ''; + for (var i = 0; i < n; i++) { + ret += str; + } + return ret; + } + + // Clamp a number into a min/max limit + function clamp(n, min, max) { + if (n > max) { n = max; } + if (n < min) { n = min; } + + return n; + } + + function dateishFromYMDString(YMD) { + var split = YMD.split('-'); + return dateishFromYMD(+split[0], +split[1] - 1, +split[2]); + } + + function dateishFromYMD(year, month, day) { + return {_year: year, _month: month, _day: day}; + } + + function dateishFromDate(date) { + return {_year: date.getFullYear(), _month: date.getMonth(), _day: date.getDate()}; + } + + /** + * @class Ink.UI.DatePicker + * @constructor + * @version 1 + * + * @param {String|DOMElement} selector + * @param {Object} [options] Options + * @param {Boolean} [options.autoOpen] Flag to automatically open the datepicker. + * @param {String} [options.cleanText] Text for the clean button. Defaults to 'Limpar'. + * @param {String} [options.closeText] Text for the close button. Defaults to 'Fechar'. + * @param {String} [options.cssClass] CSS class to be applied on the datepicker + * @param {String} [options.dateRange] Enforce limits to year, month and day for the Date, ex: '1990-08-25:2020-11' + * @param {Boolean} [options.displayInSelect] Flag to display the component in a select element. + * @param {String|DOMElement} [options.dayField] (if using options.displayInSelect) `select` field with days. + * @param {String|DOMElement} [options.monthField] (if using options.displayInSelect) `select` field with months. + * @param {String|DOMElement} [options.yearField] (if using options.displayInSelect) `select` field with years. + * @param {String} [options.format] Date format string + * @param {String} [options.instance] Unique id for the datepicker + * @param {Object} [options.month] Hash of month names. Defaults to portuguese month names. January is 1. + * @param {String} [options.nextLinkText] Text for the previous button. Defaults to '«'. + * @param {String} [options.ofText] Text to show between month and year. Defaults to ' of '. + * @param {Boolean} [options.onFocus] If the datepicker should open when the target element is focused. Defaults to true. + * @param {Function} [options.onMonthSelected] Callback to execute when the month is selected. + * @param {Function} [options.onSetDate] Callback to execute when the date is set. + * @param {Function} [options.onYearSelected] Callback to execute when the year is selected. + * @param {String} [options.position] Position for the datepicker. Either 'right' or 'bottom'. Defaults to 'right'. + * @param {String} [options.prevLinkText] Text for the previous button. Defaults to '«'. + * @param {Boolean} [options.showClean] If the clean button should be visible. Defaults to true. + * @param {Boolean} [options.showClose] If the close button should be visible. Defaults to true. + * @param {Boolean} [options.shy] If the datepicker should start automatically. Defaults to true. + * @param {String} [options.startDate] Date to define initial month. Must be in yyyy-mm-dd format. + * @param {Number} [options.startWeekDay] First day of the week. Sunday is zero. Defaults to 1 (Monday). + * @param {Function} [options.validYearFn] Callback to execute when 'rendering' the month (in the month view) + * @param {Function} [options.validMonthFn] Callback to execute when 'rendering' the month (in the month view) + * @param {Function} [options.validDayFn] Callback to execute when 'rendering' the day (in the month view) + * @param {Function} [options.nextValidDateFn] Function to calculate the next valid date, given the current. Useful when there's invalid dates or time frames. + * @param {Function} [options.prevValidDateFn] Function to calculate the previous valid date, given the current. Useful when there's invalid dates or time frames. + * @param {Object} [options.wDay] Hash of weekdays. Defaults to portuguese names. Sunday is 0. + * @param {String} [options.yearRange] Enforce limits to year for the Date, ex: '1990:2020' (deprecated) + * + * @sample Ink_UI_DatePicker_1.html + */ + var DatePicker = function(selector, options) { + this._element = selector && + Common.elOrSelector(selector, '[Ink.UI.DatePicker_1]: selector argument'); + + this._options = Common.options('Ink.UI.DatePicker_1', { + autoOpen: ['Boolean', false], + cleanText: ['String', 'Clear'], + closeText: ['String', 'Close'], + containerElement:['Element', null], + cssClass: ['String', 'ink-calendar bottom'], + dateRange: ['String', null], + + // use this in a must be a direct child of .control, and if not, remove this block. + this._wrapper = this._element.parentNode; + this._wrapperIsControl = true; + } else { + this._wrapper = InkElement.create('div', { className: 'ink-datepicker-wrapper' }); + InkElement.wrap(this._element, this._wrapper); + } + InkElement.insertAfter(this._containerObject, this._element); + }, + + /** + * Render the topmost bar with the "close" and "clear" buttons. + */ + _renderSuperTopBar: function () { + if((!this._options.showClose) || (!this._options.showClean)){ return; } + + this._superTopBar = document.createElement("div"); + this._superTopBar.className = 'ink-calendar-top-options'; + if(this._options.showClean){ + this._superTopBar.appendChild(InkElement.create('a', { + className: 'clean', + setHTML: this._options.cleanText + })); + } + if(this._options.showClose){ + this._superTopBar.appendChild(InkElement.create('a', { + className: 'close', + setHTML: this._options.closeText + })); + } + this._containerObject.appendChild(this._superTopBar); + }, + + _listenToContainerObjectEvents: function () { + Event.observe(this._containerObject,'mouseover',Ink.bindEvent(function(e){ + Event.stop( e ); + this._hoverPicker = true; + },this)); + + Event.observe(this._containerObject,'mouseout',Ink.bindEvent(function(e){ + Event.stop( e ); + this._hoverPicker = false; + },this)); + + Event.observe(this._containerObject,'click',Ink.bindEvent(this._onClick, this)); + }, + + _onClick: function(e){ + var elem = Event.element(e); + + if (Css.hasClassName(elem, 'ink-calendar-off')) { + Event.stopDefault(e); + return null; + } + + Event.stop(e); + + // Relative changers + this._onRelativeChangerClick(elem); + + // Absolute changers + this._onAbsoluteChangerClick(elem); + + // Mode changers + if (Css.hasClassName(elem, 'ink-calendar-link-month')) { + this._showMonthSelector(); + } else if (Css.hasClassName(elem, 'ink-calendar-link-year')) { + this._showYearSelector(); + } else if(Css.hasClassName(elem, 'clean')){ + this._clean(); + } else if(Css.hasClassName(elem, 'close')){ + this._hide(false); + } + + this._updateDescription(); + }, + + /** + * Handles click events on a changer (« ») for next/prev year/month + * @method _onChangerClick + * @private + **/ + _onRelativeChangerClick: function (elem) { + var changeYear = { + change_year_next: 1, + change_year_prev: -1 + }; + var changeMonth = { + change_month_next: 1, + change_month_prev: -1 + }; + + if( elem.className in changeMonth ) { + this._updateCal(changeMonth[elem.className]); + } else if( elem.className in changeYear ) { + this._showYearSelector(changeYear[elem.className]); + } + }, + + /** + * Handles click events on an atom-changer (day button, month button, year button) + * + * @method _onAbsoluteChangerClick + * @private + */ + _onAbsoluteChangerClick: function (elem) { + var elemData = InkElement.data(elem); + + if( Number(elemData.calDay) ){ + this.setDate( [this._year, this._month + 1, elemData.calDay].join('-') ); + this._hide(); + } else if( Number(elemData.calMonth) ) { + this._month = Number(elemData.calMonth) - 1; + this._showDefaultView(); + this._updateCal(); + } else if( Number(elemData.calYear) ){ + this._changeYear(Number(elemData.calYear)); + } + }, + + _changeYear: function (year) { + year = +year; + if(year){ + this._year = year; + if( typeof this._options.onYearSelected === 'function' ){ + this._options.onYearSelected(this, { + 'year': this._year + }); + } + this._showMonthSelector(); + } + }, + + _clean: function () { + if(this._options.displayInSelect){ + this._options.yearField.selectedIndex = 0; + this._options.monthField.selectedIndex = 0; + this._options.dayField.selectedIndex = 0; + } else { + this._element.value = ''; + } + }, + + /** + * Hides the DatePicker. + * If the component is shy (options.shy), behaves differently. + * + * @method _hide + * @param {Boolean} [blur] If false, forces hiding even if the component is shy. + */ + _hide: function(blur) { + blur = blur === undefined ? true : blur; + if (blur === false || (blur && this._options.shy)) { + Css.addClassName(this._containerObject, 'hide-all'); + } + }, + + /** + * Sets the range of dates allowed to be selected in the Date Picker + * + * @method _setMinMax + * @param {String} dateRange Two dates separated by a ':'. Example: 2013-01-01:2013-12-12 + * @private + */ + _setMinMax: function( dateRange ) { + var self = this; + + var noMinLimit = { + _year: -Number.MAX_VALUE, + _month: 0, + _day: 1 + }; + + var noMaxLimit = { + _year: Number.MAX_VALUE, + _month: 11, + _day: 31 + }; + + function noLimits() { + self._min = noMinLimit; + self._max = noMaxLimit; + } + + if (!dateRange) { return noLimits(); } + + var dates = dateRange.split( ':' ); + var rDate = /^(\d{4})((\-)(\d{1,2})((\-)(\d{1,2}))?)?$/; + + InkArray.each([ + {name: '_min', date: dates[0], noLim: noMinLimit}, + {name: '_max', date: dates[1], noLim: noMaxLimit} + ], Ink.bind(function (data) { + + var lim = data.noLim; + + if ( data.date.toUpperCase() === 'NOW' ) { + var now = new Date(); + lim = dateishFromDate(now); + } else if (data.date.toUpperCase() === 'EVER') { + lim = data.noLim; + } else if ( rDate.test( data.date ) ) { + lim = dateishFromYMDString(data.date); + + lim._month = clamp(lim._month, 0, 11); + lim._day = clamp(lim._day, 1, this._daysInMonth( lim._year, lim._month + 1 )); + } + + this[data.name] = lim; + }, this)); + + // Should be equal, or min should be smaller + var valid = this._dateCmp(this._max, this._min) !== -1; + + if (!valid) { + noLimits(); + } + }, + + /** + * Checks if a date is between the valid range. + * Starts by checking if the date passed is valid. If not, will fallback to the 'today' date. + * Then checks if the all params are inside of the date range specified. If not, it will fallback to the nearest valid date (either Min or Max). + * + * @method _fitDateToRange + * @param {Number} year Year with 4 digits (yyyy) + * @param {Number} month Month + * @param {Number} day Day + * @return {Array} Array with the final processed date. + * @private + */ + _fitDateToRange: function( date ) { + if ( !this._isValidDate( date ) ) { + date = dateishFromDate(new Date()); + } + + if (this._dateCmp(date, this._min) === -1) { + return Ink.extendObj({}, this._min); + } else if (this._dateCmp(date, this._max) === 1) { + return Ink.extendObj({}, this._max); + } + + return Ink.extendObj({}, date); // date is okay already, just copy it. + }, + + /** + * Checks whether a date is within the valid date range + * @method _dateWithinRange + * @param year + * @param month + * @param day + * @return {Boolean} + * @private + */ + _dateWithinRange: function (date) { + if (!arguments.length) { + date = this; + } + + return (!this._dateAboveMax(date) && + (!this._dateBelowMin(date))); + }, + + _dateAboveMax: function (date) { + return this._dateCmp(date, this._max) === 1; + }, + + _dateBelowMin: function (date) { + return this._dateCmp(date, this._min) === -1; + }, + + _dateCmp: function (self, oth) { + return this._dateCmpUntil(self, oth, '_day'); + }, + + /** + * _dateCmp with varied precision. You can compare down to the day field, or, just to the month. + * // the following two dates are considered equal because we asked + * // _dateCmpUntil to just check up to the years. + * + * _dateCmpUntil({_year: 2000, _month: 10}, {_year: 2000, _month: 11}, '_year') === 0 + */ + _dateCmpUntil: function (self, oth, depth) { + var props = ['_year', '_month', '_day']; + var i = -1; + + do { + i++; + if (self[props[i]] > oth[props[i]]) { return 1; } + else if (self[props[i]] < oth[props[i]]) { return -1; } + } while (props[i] !== depth && + self[props[i + 1]] !== undefined && oth[props[i + 1]] !== undefined); + + return 0; + }, + + /** + * Sets the markup in the default view mode (showing the days). + * Also disables the previous and next buttons in case they don't meet the range requirements. + * + * @method _showDefaultView + * @private + */ + _showDefaultView: function(){ + this._yearSelector.style.display = 'none'; + this._monthSelector.style.display = 'none'; + this._monthPrev.childNodes[0].className = 'change_month_prev'; + this._monthNext.childNodes[0].className = 'change_month_next'; + + if ( !this._getPrevMonth() ) { + this._monthPrev.childNodes[0].className = 'action_inactive'; + } + + if ( !this._getNextMonth() ) { + this._monthNext.childNodes[0].className = 'action_inactive'; + } + + this._monthContainer.style.display = 'block'; + }, + + /** + * Updates the date shown on the datepicker + * + * @method _updateDate + * @private + */ + _updateDate: function(){ + var dataParsed; + if(!this._options.displayInSelect && this._element.value){ + dataParsed = this._parseDate(this._element.value); + } else if (this._options.displayInSelect) { + dataParsed = { + _year: this._options.yearField[this._options.yearField.selectedIndex].value, + _month: this._options.monthField[this._options.monthField.selectedIndex].value - 1, + _day: this._options.dayField[this._options.dayField.selectedIndex].value + }; + } + + if (dataParsed) { + dataParsed = this._fitDateToRange(dataParsed); + this._year = dataParsed._year; + this._month = dataParsed._month; + this._day = dataParsed._day; + } + this.setDate(); + this._updateDescription(); + this._renderMonth(); + }, + + /** + * Updates the date description shown at the top of the datepicker + * + * EG "12 de November" + * + * @method _updateDescription + * @private + */ + _updateDescription: function(){ + this._monthChanger.innerHTML = this._options.month[ this._month + 1 ]; + this._ofText.innerHTML = this._options.ofText; + this._yearChanger.innerHTML = this._year; + }, + + /** + * Renders the year selector view of the datepicker + * + * @method _showYearSelector + * @private + */ + _showYearSelector: function(inc){ + this._incrementViewingYear(inc); + + var firstYear = this._year - (this._year % 10); + var thisYear = firstYear - 1; + var str = "
          • "; + + if (thisYear > this._min._year) { + str += '
          • ' + this._options.prevLinkText + '
          • '; + } else { + str += '
          •  
          • '; + } + + for (var i=1; i < 11; i++){ + if (i % 4 === 0){ + str+='
            '; + } + + thisYear = firstYear + i - 1; + + str += this._getYearButtonHtml(thisYear); + } + + if( thisYear < this._max._year){ + str += '
          • ' + this._options.nextLinkText + '
          • '; + } else { + str += '
          •  
          • '; + } + + str += "
        • "; + + this._yearSelector.innerHTML = str; + this._monthPrev.childNodes[0].className = 'action_inactive'; + this._monthNext.childNodes[0].className = 'action_inactive'; + this._monthSelector.style.display = 'none'; + this._monthContainer.style.display = 'none'; + this._yearSelector.style.display = 'block'; + }, + + /** + * For the year selector. + * + * Update this._year, to find the next decade or use nextValidDateFn to find it. + */ + _incrementViewingYear: function (inc) { + if (!inc) { return; } + + var year = +this._year + inc*10; + year = year - year % 10; + if ( year > this._max._year || year + 9 < this._min._year){ + return; + } + this._year = +this._year + inc*10; + }, + + _getYearButtonHtml: function (thisYear) { + if ( this._acceptableYear({_year: thisYear}) ){ + var className = (thisYear === this._year) ? ' class="ink-calendar-on"' : ''; + return '
        • ' + thisYear +'
        • '; + } else { + return '
        • ' + thisYear +'
        • '; + + } + }, + + /** + * Show the month selector (happens when you click a year, or the "month" link. + * @method _showMonthSelector + * @private + */ + _showMonthSelector: function () { + this._yearSelector.style.display = 'none'; + this._monthContainer.style.display = 'none'; + this._monthPrev.childNodes[0].className = 'action_inactive'; + this._monthNext.childNodes[0].className = 'action_inactive'; + this._addMonthClassNames(); + this._monthSelector.style.display = 'block'; + }, + + /** + * This function returns the given date in the dateish format + * + * @method _parseDate + * @param {String} dateStr A date on a string. + * @private + */ + _parseDate: function(dateStr){ + var date = InkDate.set( this._options.format , dateStr ); + if (date) { + return dateishFromDate(date); + } + return null; + }, + + /** + * Checks if a date is valid + * + * @method _isValidDate + * @param {Dateish} date + * @private + * @return {Boolean} True if the date is valid, false otherwise + */ + _isValidDate: function(date){ + var yearRegExp = /^\d{4}$/; + var validOneOrTwo = /^\d{1,2}$/; + return ( + yearRegExp.test(date._year) && + validOneOrTwo.test(date._month) && + validOneOrTwo.test(date._day) && + +date._month + 1 >= 1 && + +date._month + 1 <= 12 && + +date._day >= 1 && + +date._day <= this._daysInMonth(date._year, date._month + 1) + ); + }, + + /** + * Checks if a given date is an valid format. + * + * @method _isDate + * @param {String} format A date format. + * @param {String} dateStr A date on a string. + * @private + * @return {Boolean} True if the given date is valid according to the given format + */ + _isDate: function(format, dateStr){ + try { + if (typeof format === 'undefined'){ + return false; + } + var date = InkDate.set( format , dateStr ); + if( date && this._isValidDate( dateishFromDate(date) )) { + return true; + } + } catch (ex) {} + + return false; + }, + + _acceptableDay: function (date) { + return this._acceptableDateComponent(date, 'validDayFn'); + }, + + _acceptableMonth: function (date) { + return this._acceptableDateComponent(date, 'validMonthFn'); + }, + + _acceptableYear: function (date) { + return this._acceptableDateComponent(date, 'validYearFn'); + }, + + /** DRY base for the above 2 functions */ + _acceptableDateComponent: function (date, userCb) { + if (this._options[userCb]) { + return this._callUserCallbackBool(this._options[userCb], date); + } else { + return this._dateWithinRange(date); + } + }, + + /** + * This method returns the date written with the format specified on the options + * + * @method _writeDateInFormat + * @private + * @return {String} Returns the current date of the object in the specified format + */ + _writeDateInFormat:function(){ + return InkDate.get( this._options.format , this.getDate()); + }, + + /** + * This method allows the user to set the DatePicker's date on run-time. + * + * @method setDate + * @param {String} dateString A date string in yyyy-mm-dd format. + * @public + */ + setDate: function( dateString ) { + if ( /\d{4}-\d{1,2}-\d{1,2}/.test( dateString ) ) { + var auxDate = dateString.split( '-' ); + this._year = +auxDate[ 0 ]; + this._month = +auxDate[ 1 ] - 1; + this._day = +auxDate[ 2 ]; + } + + this._setDate( ); + }, + + /** + * Gets the current date as a JavaScript date. + * + * @method getDate + */ + getDate: function () { + if (!this._day) { + throw 'Ink.UI.DatePicker: Still picking a date. Cannot getDate now!'; + } + return new Date(this._year, this._month, this._day); + }, + + /** + * Sets the chosen date on the target input field + * + * @method _setDate + * @param {DOMElement} objClicked Clicked object inside the DatePicker's calendar. + * @private + */ + _setDate : function( objClicked ) { + if (objClicked) { + var data = InkElement.data(objClicked); + this._day = (+data.calDay) || this._day; + } + + var dt = this._fitDateToRange(this); + + this._year = dt._year; + this._month = dt._month; + this._day = dt._day; + + if(!this._options.displayInSelect){ + this._element.value = this._writeDateInFormat(); + } else { + this._options.dayField.value = this._day; + this._options.monthField.value = this._month + 1; + this._options.yearField.value = this._year; + } + + if(this._options.onSetDate) { + this._options.onSetDate( this , { date : this.getDate() } ); + } + }, + + /** + * Makes the necessary work to update the calendar + * when choosing a different month + * + * @method _updateCal + * @param {Number} inc Indicates previous or next month + * @private + */ + _updateCal: function(inc){ + if( typeof this._options.onMonthSelected === 'function' ){ + this._options.onMonthSelected(this, { + 'year': this._year, + 'month' : this._month + }); + } + if (inc && this._updateMonth(inc) === null) { + return; + } + this._renderMonth(); + }, + + /** + * Function that returns the number of days on a given month on a given year + * + * @method _daysInMonth + * @param {Number} _y - year + * @param {Number} _m - month + * @private + * @return {Number} The number of days on a given month on a given year + */ + _daysInMonth: function(_y,_m){ + var exceptions = { + 2: ((_y % 400 === 0) || (_y % 4 === 0 && _y % 100 !== 0)) ? 29 : 28, + 4: 30, + 6: 30, + 9: 30, + 11: 30 + }; + + return exceptions[_m] || 31; + }, + + + /** + * Updates the calendar when a different month is chosen + * + * @method _updateMonth + * @param {Number} incValue - indicates previous or next month + * @private + */ + _updateMonth: function(incValue){ + var date; + if (incValue > 0) { + date = this._getNextMonth(); + } else if (incValue < 0) { + date = this._getPrevMonth(); + } + if (!date) { return null; } + this._year = date._year; + this._month = date._month; + this._day = date._day; + }, + + /** + * Get the next month we can show. + */ + _getNextMonth: function (date) { + return this._tryLeap( date, 'Month', 'next', function (d) { + d._month += 1; + if (d._month > 11) { + d._month = 0; + d._year += 1; + } + return d; + }); + }, + + /** + * Get the previous month we can show. + */ + _getPrevMonth: function (date) { + return this._tryLeap( date, 'Month', 'prev', function (d) { + d._month -= 1; + if (d._month < 0) { + d._month = 11; + d._year -= 1; + } + return d; + }); + }, + + /** + * Get the next year we can show. + */ + _getPrevYear: function (date) { + return this._tryLeap( date, 'Year', 'prev', function (d) { + d._year -= 1; + return d; + }); + }, + + /** + * Get the next year we can show. + */ + _getNextYear: function (date) { + return this._tryLeap( date, 'Year', 'next', function (d) { + d._year += 1; + return d; + }); + }, + + /** + * DRY base for a function which tries to get the next or previous valid year or month. + * + * It checks if we can go forward by using _dateCmp with atomic + * precision (this means, {_year} for leaping years, and + * {_year, month} for leaping months), then it tries to get the + * result from the user-supplied callback (nextDateFn or prevDateFn), + * and when this is not present, advance the date forward using the + * `advancer` callback. + */ + _tryLeap: function (date, atomName, directionName, advancer) { + date = date || { _year: this._year, _month: this._month, _day: this._day }; + + var maxOrMin = directionName === 'prev' ? '_min' : '_max'; + var boundary = this[maxOrMin]; + + // Check if we're by the boundary of min/max year/month + if (this._dateCmpUntil(date, boundary, atomName) === 0) { + return null; // We're already at the boundary. Bail. + } + + var leapUserCb = this._options[directionName + 'ValidDateFn']; + if (leapUserCb) { + return this._callUserCallbackDate(leapUserCb, date); + } else { + date = advancer(date); + } + + date = this._fitDateToRange(date); + + return this['_acceptable' + atomName](date) ? date : null; + }, + + _getNextDecade: function (date) { + date = date || { _year: this._year, _month: this._month, _day: this._day }; + var decade = this._getCurrentDecade(date); + if (decade + 10 > this._max._year) { return null; } + return decade + 10; + }, + + _getPrevDecade: function (date) { + date = date || { _year: this._year, _month: this._month, _day: this._day }; + var decade = this._getCurrentDecade(date); + if (decade - 10 < this._min._year) { return null; } + return decade - 10; + }, + + /** Returns the decade given a date or year*/ + _getCurrentDecade: function (year) { + year = year ? (year._year || year) : this._year; + return Math.floor(year / 10) * 10; // Round to first place + }, + + _callUserCallbackBase: function (cb, date) { + return cb.call(this, date._year, date._month + 1, date._day); + }, + + _callUserCallbackBool: function (cb, date) { + return !!this._callUserCallbackBase(cb, date); + }, + + _callUserCallbackDate: function (cb, date) { + var ret = this._callUserCallbackBase(cb, date); + return ret ? dateishFromDate(ret) : null; + }, + + /** + * Key-value object that (for a given key) points to the correct parsing format for the DatePicker + * @property _dateParsers + * @type {Object} + * @readOnly + */ + _dateParsers: { + 'yyyy-mm-dd' : 'Y-m-d' , + 'yyyy/mm/dd' : 'Y/m/d' , + 'yy-mm-dd' : 'y-m-d' , + 'yy/mm/dd' : 'y/m/d' , + 'dd-mm-yyyy' : 'd-m-Y' , + 'dd/mm/yyyy' : 'd/m/Y' , + 'dd-mm-yy' : 'd-m-y' , + 'dd/mm/yy' : 'd/m/y' , + 'mm/dd/yyyy' : 'm/d/Y' , + 'mm-dd-yyyy' : 'm-d-Y' + }, + + /** + * Renders the current month + * + * @method _renderMonth + * @private + */ + _renderMonth: function(){ + var month = this._month; + var year = this._year; + + this._showDefaultView(); + + var html = ''; + + html += this._getMonthCalendarHeaderHtml(this._options.startWeekDay); + + var counter = 0; + html+='
            '; + + var emptyHtml = '
          •  
          • '; + + var firstDayIndex = this._getFirstDayIndex(year, month); + + // Add padding if the first day of the month is not monday. + if(firstDayIndex > 0) { + counter += firstDayIndex; + html += strRepeat(firstDayIndex, emptyHtml); + } + + html += this._getDayButtonsHtml(year, month); + + html += '
          '; + + this._monthContainer.innerHTML = html; + }, + + /** + * Figure out where the first day of a month lies + * in the first row of the calendar. + * + * having options.startWeekDay === 0 + * + * Su Mo Tu We Th Fr Sa + * 1 <- The "1" is in the 7th day. return 6. + * 2 3 4 5 6 7 8 + * 9 10 11 12 13 14 15 + * 16 17 18 19 20 21 22 + * 23 24 25 26 27 28 29 + * 30 31 + * + * This obviously changes according to the user option "startWeekDay" + **/ + _getFirstDayIndex: function (year, month) { + var wDayFirst = (new Date( year , month , 1 )).getDay(); // Sunday=0 + var startWeekDay = this._options.startWeekDay || 0; // Sunday=0 + + var result = wDayFirst - startWeekDay; + + result %= 7; + + if (result < 0) { + result += 6; + } + + return result; + }, + + _getDayButtonsHtml: function (year, month) { + var counter = this._getFirstDayIndex(year, month); + var daysInMonth = this._daysInMonth(year, month + 1); + var ret = ''; + for (var day = 1; day <= daysInMonth; day++) { + if (counter === 7){ // new week + counter=0; + ret += '
            '; + } + + ret += this._getDayButtonHtml(year, month, day); + + counter++; + if(counter === 7){ + ret += '
          '; + } + } + return ret; + }, + + /** + * Get the HTML markup for a single day in month view, given year, month, day. + * + * @method _getDayButtonHtml + * @private + */ + _getDayButtonHtml: function (year, month, day) { + var attrs = ' '; + var date = dateishFromYMD(year, month, day); + if (!this._acceptableDay(date)) { + attrs += 'class="ink-calendar-off"'; + } else { + attrs += 'data-cal-day="' + day + '"'; + } + + if (this._day && this._dateCmp(date, this) === 0) { + attrs += 'class="ink-calendar-on" data-cal-day="' + day + '"'; + } + + return '
        • ' + day + '
        • '; + }, + + /** Write the top bar of the calendar (M T W T F S S) */ + _getMonthCalendarHeaderHtml: function (startWeekDay) { + var ret = '
            '; + var wDay; + for(var i=0; i<7; i++){ + wDay = (startWeekDay + i) % 7; + ret += '
          • ' + + this._options.wDay[wDay].substring(0,1) + + '
          • '; + } + return ret + '
          '; + }, + + /** + * This method adds class names to month buttons, to visually distinguish. + * + * @method _addMonthClassNames + * @param {DOMElement} parent DOMElement where all the months are. + * @private + */ + _addMonthClassNames: function(parent){ + InkArray.forEach( + (parent || this._monthSelector).getElementsByTagName('a'), + Ink.bindMethod(this, '_addMonthButtonClassNames')); + }, + + /** + * Add the ink-calendar-on className if the given button is the current month, + * otherwise add the ink-calendar-off className if the given button refers to + * an unacceptable month (given dateRange and validMonthFn) + */ + _addMonthButtonClassNames: function (btn) { + var data = InkElement.data(btn); + if (!data.calMonth) { throw 'not a calendar month button!'; } + + var month = +data.calMonth - 1; + + if ( month === this._month ) { + Css.addClassName( btn, 'ink-calendar-on' ); // This month + Css.removeClassName( btn, 'ink-calendar-off' ); + } else { + Css.removeClassName( btn, 'ink-calendar-on' ); // Not this month + + var toDisable = !this._acceptableMonth({_year: this._year, _month: month}); + Css.addRemoveClassName( btn, 'ink-calendar-off', toDisable); + } + }, + + /** + * Prototype's method to allow the 'i18n files' to change all objects' language at once. + * @param {Object} options Object with the texts' configuration. + * @param {String} options.closeText Text of the close anchor + * @param {String} options.cleanText Text of the clean text anchor + * @param {String} options.prevLinkText "Previous" link's text + * @param {String} options.nextLinkText "Next" link's text + * @param {String} options.ofText The text "of", present in 'May of 2013' + * @param {Object} options.month An object with keys from 1 to 12 for the full months' names + * @param {Object} options.wDay An object with keys from 0 to 6 for the full weekdays' names + * @public + */ + lang: function( options ){ + this._lang = options; + }, + + /** + * This calls the rendering of the selected month. (Deprecated: use show() instead) + * + */ + showMonth: function(){ + this._renderMonth(); + }, + + /** + * Checks if the calendar screen is in 'select day' mode + * + * @return {Boolean} True if the calendar screen is in 'select day' mode + * @public + */ + isMonthRendered: function(){ + var header = Selector.select('.ink-calendar-header', this._containerObject)[0]; + + return ((Css.getStyle(header.parentNode,'display') !== 'none') && + (Css.getStyle(header.parentNode.parentNode,'display') !== 'none') ); + }, + + /** + * Destroys this datepicker, removing it from the page. + * + * @public + **/ + destroy: function () { + InkElement.unwrap(this._element); + InkElement.remove(this._wrapper); + InkElement.remove(this._containerObject); + Common.unregisterInstance.call(this); + } + }; + + return DatePicker; +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.datepicker.min.js b/ajax/libs/ink/3.0.0/js/ink.datepicker.min.js new file mode 100644 index 000000000..600f7120a --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.datepicker.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.DatePicker","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1","Ink.Util.Date_1","Ink.Dom.Browser_1"],function(t,e,n,i,a,s,o){"use strict";function r(t,e){for(var n="",i=0;t>i;i++)n+=e;return n}function h(t,e,n){return t>n&&(t=n),e>t&&(t=e),t}function l(t){var e=t.split("-");return _(+e[0],+e[1]-1,+e[2])}function _(t,e,n){return{_year:t,_month:e,_day:n}}function c(t){return{_year:t.getFullYear(),_month:t.getMonth(),_day:t.getDate()}}var d=function(e,n){if(this._element=e&&t.elOrSelector(e,"[Ink.UI.DatePicker_1]: selector argument"),this._options=t.options("Ink.UI.DatePicker_1",{autoOpen:["Boolean",!1],cleanText:["String","Clear"],closeText:["String","Close"],containerElement:["Element",null],cssClass:["String","ink-calendar bottom"],dateRange:["String",null],displayInSelect:["Boolean",!1],dayField:["Element",null],monthField:["Element",null],yearField:["Element",null],format:["String","yyyy-mm-dd"],instance:["String","scdp_"+Math.round(99999*Math.random())],nextLinkText:["String","»"],ofText:["String"," de "],onFocus:["Boolean",!0],onMonthSelected:["Function",null],onSetDate:["Function",null],onYearSelected:["Function",null],position:["String","right"],prevLinkText:["String","«"],showClean:["Boolean",!0],showClose:["Boolean",!0],shy:["Boolean",!0],startDate:["String",null],startWeekDay:["Number",1],validDayFn:["Function",null],validMonthFn:["Function",null],validYearFn:["Function",null],nextValidDateFn:["Function",null],prevValidDateFn:["Function",null],yearRange:["String",null],month:["Object",{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}],wDay:["Object",{0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"}]},n||{},this._element),this._options.format=this._dateParsers[this._options.format]||this._options.format,this._hoverPicker=!1,this._picker=this._options.pickerField&&t.elOrSelector(this._options.pickerField,"pickerField"),this._setMinMax(this._options.dateRange||this._options.yearRange),this._options.startDate)this.setDate(this._options.startDate);else if(this._element&&this._element.value)this.setDate(this._element.value);else{var i=new Date;this._day=i.getDate(),this._month=i.getMonth(),this._year=i.getFullYear()}if((this._options.startWeekDay<0||this._options.startWeekDay>6)&&(Ink.warn('Ink.UI.DatePicker_1: option "startWeekDay" must be between 0 (sunday) and 6 (saturday)'),this._options.startWeekDay=h(this._options.startWeekDay,0,6)),this._options.displayInSelect&&!(this._options.dayField&&this._options.monthField&&this._options.yearField))throw new Error("Ink.UI.DatePicker: displayInSelect option enabled.Please specify dayField, monthField and yearField selectors.");this._init()};return d.prototype={version:"0.1",_init:function(){Ink.extendObj(this._options,this._lang||{}),this._render(),this._listenToContainerObjectEvents(),t.registerInstance(this,this._containerObject,"datePicker")},_render:function(){this._containerObject=document.createElement("div"),this._containerObject.id=this._options.instance,this._containerObject.className=this._options.cssClass+" ink-datepicker-calendar hide-all",this._renderSuperTopBar();var e=document.createElement("div");e.className="ink-calendar-top",this._monthDescContainer=document.createElement("div"),this._monthDescContainer.className="ink-calendar-month_desc",this._monthPrev=document.createElement("div"),this._monthPrev.className="ink-calendar-prev",this._monthPrev.innerHTML=''+this._options.prevLinkText+"",this._monthNext=document.createElement("div"),this._monthNext.className="ink-calendar-next",this._monthNext.innerHTML=''+this._options.nextLinkText+"",e.appendChild(this._monthPrev),e.appendChild(this._monthDescContainer),e.appendChild(this._monthNext),this._monthContainer=document.createElement("div"),this._monthContainer.className="ink-calendar-month",this._containerObject.appendChild(e),this._containerObject.appendChild(this._monthContainer),this._monthSelector=this._renderMonthSelector(),this._containerObject.appendChild(this._monthSelector),this._yearSelector=document.createElement("ul"),this._yearSelector.className="ink-calendar-year-selector",this._containerObject.appendChild(this._yearSelector),(!this._options.onFocus||this._options.displayInSelect)&&(this._options.pickerField?this._picker=t.elOrSelector(this._options.pickerField,"pickerField"):(this._picker=document.createElement("a"),this._picker.href="#open_cal",this._picker.innerHTML="open",this._element.parentNode.appendChild(this._picker),this._picker.className="ink-datepicker-picker-field")),this._appendDatePickerToDom(),this._renderMonth(),this._monthChanger=document.createElement("a"),this._monthChanger.href="#monthchanger",this._monthChanger.className="ink-calendar-link-month",this._monthChanger.innerHTML=this._options.month[this._month+1],this._ofText=document.createElement("span"),this._ofText.innerHTML=this._options.ofText,this._yearChanger=document.createElement("a"),this._yearChanger.href="#yearchanger",this._yearChanger.className="ink-calendar-link-year",this._yearChanger.innerHTML=this._year,this._monthDescContainer.innerHTML="",this._monthDescContainer.appendChild(this._monthChanger),this._monthDescContainer.appendChild(this._ofText),this._monthDescContainer.appendChild(this._yearChanger),this._options.inline?this.show():this._addOpenCloseEvents(),this._addDateChangeHandlersToInputs()},_addDateChangeHandlersToInputs:function(){var t=this._element;this._options.displayInSelect&&(t=[this._options.dayField,this._options.monthField,this._options.yearField]),e.observeMulti(t,"change",Ink.bindEvent(function(){this._updateDate(),this._showDefaultView(),this.setDate(),this._inline||this._hoverPicker||this._hide(!0)},this))},show:function(){this._updateDate(),this._renderMonth(),n.removeClassName(this._containerObject,"hide-all")},_addOpenCloseEvents:function(){var t=this._picker||this._element;e.observe(t,"click",Ink.bindEvent(function(t){e.stop(t),this.show()},this)),this._options.autoOpen&&this.show(),this._options.displayInSelect||e.observe(t,"blur",Ink.bindEvent(function(){this._hoverPicker||this._hide(!0)},this)),this._options.shy&&e.observe(document,"click",Ink.bindEvent(function(t){for(var n=e.element(t),a=[this._options.dayField,this._options.monthField,this._options.yearField,this._picker,this._element],s=0,o=a.length;o>s;s++)if(a[s]&&i.descendantOf(a[s],n))return;this._hide(!0)},this))},_renderMonthSelector:function(){var t=document.createElement("ul");t.className="ink-calendar-month-selector";for(var e=document.createElement("ul"),n=1;12>=n;n++)e.appendChild(this._renderMonthButton(n)),n%4===0&&(t.appendChild(e),e=document.createElement("ul"));return t},_renderMonthButton:function(t){var e=document.createElement("li"),n=document.createElement("a");return n.setAttribute("data-cal-month",t),n.innerHTML=this._options.month[t].substring(0,3),e.appendChild(n),e},_appendDatePickerToDom:function(){if(this._options.containerElement){var e=Ink.i(this._options.containerElement)||t.elOrSelector(this._options.containerElement);e.appendChild(this._containerObject)}i.findUpwardsBySelector(this._element,".ink-form .control-group .control")===this._element.parentNode?(this._wrapper=this._element.parentNode,this._wrapperIsControl=!0):(this._wrapper=i.create("div",{className:"ink-datepicker-wrapper"}),i.wrap(this._element,this._wrapper)),i.insertAfter(this._containerObject,this._element)},_renderSuperTopBar:function(){this._options.showClose&&this._options.showClean&&(this._superTopBar=document.createElement("div"),this._superTopBar.className="ink-calendar-top-options",this._options.showClean&&this._superTopBar.appendChild(i.create("a",{className:"clean",setHTML:this._options.cleanText})),this._options.showClose&&this._superTopBar.appendChild(i.create("a",{className:"close",setHTML:this._options.closeText})),this._containerObject.appendChild(this._superTopBar))},_listenToContainerObjectEvents:function(){e.observe(this._containerObject,"mouseover",Ink.bindEvent(function(t){e.stop(t),this._hoverPicker=!0},this)),e.observe(this._containerObject,"mouseout",Ink.bindEvent(function(t){e.stop(t),this._hoverPicker=!1},this)),e.observe(this._containerObject,"click",Ink.bindEvent(this._onClick,this))},_onClick:function(t){var i=e.element(t);return n.hasClassName(i,"ink-calendar-off")?(e.stopDefault(t),null):(e.stop(t),this._onRelativeChangerClick(i),this._onAbsoluteChangerClick(i),n.hasClassName(i,"ink-calendar-link-month")?this._showMonthSelector():n.hasClassName(i,"ink-calendar-link-year")?this._showYearSelector():n.hasClassName(i,"clean")?this._clean():n.hasClassName(i,"close")&&this._hide(!1),void this._updateDescription())},_onRelativeChangerClick:function(t){var e={change_year_next:1,change_year_prev:-1},n={change_month_next:1,change_month_prev:-1};t.className in n?this._updateCal(n[t.className]):t.className in e&&this._showYearSelector(e[t.className])},_onAbsoluteChangerClick:function(t){var e=i.data(t);Number(e.calDay)?(this.setDate([this._year,this._month+1,e.calDay].join("-")),this._hide()):Number(e.calMonth)?(this._month=Number(e.calMonth)-1,this._showDefaultView(),this._updateCal()):Number(e.calYear)&&this._changeYear(Number(e.calYear))},_changeYear:function(t){t=+t,t&&(this._year=t,"function"==typeof this._options.onYearSelected&&this._options.onYearSelected(this,{year:this._year}),this._showMonthSelector())},_clean:function(){this._options.displayInSelect?(this._options.yearField.selectedIndex=0,this._options.monthField.selectedIndex=0,this._options.dayField.selectedIndex=0):this._element.value=""},_hide:function(t){t=void 0===t?!0:t,(t===!1||t&&this._options.shy)&&n.addClassName(this._containerObject,"hide-all")},_setMinMax:function(t){function e(){n._min=i,n._max=a}var n=this,i={_year:-Number.MAX_VALUE,_month:0,_day:1},a={_year:Number.MAX_VALUE,_month:11,_day:31};if(!t)return e();var o=t.split(":"),r=/^(\d{4})((\-)(\d{1,2})((\-)(\d{1,2}))?)?$/;s.each([{name:"_min",date:o[0],noLim:i},{name:"_max",date:o[1],noLim:a}],Ink.bind(function(t){var e=t.noLim;if("NOW"===t.date.toUpperCase()){var n=new Date;e=c(n)}else"EVER"===t.date.toUpperCase()?e=t.noLim:r.test(t.date)&&(e=l(t.date),e._month=h(e._month,0,11),e._day=h(e._day,1,this._daysInMonth(e._year,e._month+1)));this[t.name]=e},this));var _=-1!==this._dateCmp(this._max,this._min);_||e()},_fitDateToRange:function(t){return this._isValidDate(t)||(t=c(new Date)),-1===this._dateCmp(t,this._min)?Ink.extendObj({},this._min):1===this._dateCmp(t,this._max)?Ink.extendObj({},this._max):Ink.extendObj({},t)},_dateWithinRange:function(t){return arguments.length||(t=this),!this._dateAboveMax(t)&&!this._dateBelowMin(t)},_dateAboveMax:function(t){return 1===this._dateCmp(t,this._max)},_dateBelowMin:function(t){return-1===this._dateCmp(t,this._min)},_dateCmp:function(t,e){return this._dateCmpUntil(t,e,"_day")},_dateCmpUntil:function(t,e,n){var i=["_year","_month","_day"],a=-1;do{if(a++,t[i[a]]>e[i[a]])return 1;if(t[i[a]]",this._yearSelector.innerHTML=i,this._monthPrev.childNodes[0].className="action_inactive",this._monthNext.childNodes[0].className="action_inactive",this._monthSelector.style.display="none",this._monthContainer.style.display="none",this._yearSelector.style.display="block"},_incrementViewingYear:function(t){if(t){var e=+this._year+10*t;e-=e%10,e>this._max._year||e+9"+t+""}return'
        • '+t+"
        • "},_showMonthSelector:function(){this._yearSelector.style.display="none",this._monthContainer.style.display="none",this._monthPrev.childNodes[0].className="action_inactive",this._monthNext.childNodes[0].className="action_inactive",this._addMonthClassNames(),this._monthSelector.style.display="block"},_parseDate:function(t){var e=o.set(this._options.format,t);return e?c(e):null},_isValidDate:function(t){var e=/^\d{4}$/,n=/^\d{1,2}$/;return e.test(t._year)&&n.test(t._month)&&n.test(t._day)&&+t._month+1>=1&&+t._month+1<=12&&+t._day>=1&&+t._day<=this._daysInMonth(t._year,t._month+1)},_isDate:function(t,e){try{if("undefined"==typeof t)return!1;var n=o.set(t,e);if(n&&this._isValidDate(c(n)))return!0}catch(i){}return!1},_acceptableDay:function(t){return this._acceptableDateComponent(t,"validDayFn")},_acceptableMonth:function(t){return this._acceptableDateComponent(t,"validMonthFn")},_acceptableYear:function(t){return this._acceptableDateComponent(t,"validYearFn")},_acceptableDateComponent:function(t,e){return this._options[e]?this._callUserCallbackBool(this._options[e],t):this._dateWithinRange(t)},_writeDateInFormat:function(){return o.get(this._options.format,this.getDate())},setDate:function(t){if(/\d{4}-\d{1,2}-\d{1,2}/.test(t)){var e=t.split("-");this._year=+e[0],this._month=+e[1]-1,this._day=+e[2]}this._setDate()},getDate:function(){if(!this._day)throw"Ink.UI.DatePicker: Still picking a date. Cannot getDate now!";return new Date(this._year,this._month,this._day)},_setDate:function(t){if(t){var e=i.data(t);this._day=+e.calDay||this._day}var n=this._fitDateToRange(this);this._year=n._year,this._month=n._month,this._day=n._day,this._options.displayInSelect?(this._options.dayField.value=this._day,this._options.monthField.value=this._month+1,this._options.yearField.value=this._year):this._element.value=this._writeDateInFormat(),this._options.onSetDate&&this._options.onSetDate(this,{date:this.getDate()})},_updateCal:function(t){"function"==typeof this._options.onMonthSelected&&this._options.onMonthSelected(this,{year:this._year,month:this._month}),t&&null===this._updateMonth(t)||this._renderMonth()},_daysInMonth:function(t,e){var n={2:t%400===0||t%4===0&&t%100!==0?29:28,4:30,6:30,9:30,11:30};return n[e]||31},_updateMonth:function(t){var e;return t>0?e=this._getNextMonth():0>t&&(e=this._getPrevMonth()),e?(this._year=e._year,this._month=e._month,void(this._day=e._day)):null},_getNextMonth:function(t){return this._tryLeap(t,"Month","next",function(t){return t._month+=1,t._month>11&&(t._month=0,t._year+=1),t})},_getPrevMonth:function(t){return this._tryLeap(t,"Month","prev",function(t){return t._month-=1,t._month<0&&(t._month=11,t._year-=1),t})},_getPrevYear:function(t){return this._tryLeap(t,"Year","prev",function(t){return t._year-=1,t})},_getNextYear:function(t){return this._tryLeap(t,"Year","next",function(t){return t._year+=1,t})},_tryLeap:function(t,e,n,i){t=t||{_year:this._year,_month:this._month,_day:this._day};var a="prev"===n?"_min":"_max",s=this[a];if(0===this._dateCmpUntil(t,s,e))return null;var o=this._options[n+"ValidDateFn"];return o?this._callUserCallbackDate(o,t):(t=i(t),t=this._fitDateToRange(t),this["_acceptable"+e](t)?t:null)},_getNextDecade:function(t){t=t||{_year:this._year,_month:this._month,_day:this._day};var e=this._getCurrentDecade(t);return e+10>this._max._year?null:e+10},_getPrevDecade:function(t){t=t||{_year:this._year,_month:this._month,_day:this._day};var e=this._getCurrentDecade(t);return e-10";var a='
        •  
        • ',s=this._getFirstDayIndex(e,t);s>0&&(i+=s,n+=r(s,a)),n+=this._getDayButtonsHtml(e,t),n+="
        ",this._monthContainer.innerHTML=n},_getFirstDayIndex:function(t,e){var n=new Date(t,e,1).getDay(),i=this._options.startWeekDay||0,a=n-i;return a%=7,0>a&&(a+=6),a},_getDayButtonsHtml:function(t,e){for(var n=this._getFirstDayIndex(t,e),i=this._daysInMonth(t,e+1),a="",s=1;i>=s;s++)7===n&&(n=0,a+="
          "),a+=this._getDayButtonHtml(t,e,s),n++,7===n&&(a+="
        ");return a},_getDayButtonHtml:function(t,e,n){var i=" ",a=_(t,e,n);return i+=this._acceptableDay(a)?'data-cal-day="'+n+'"':'class="ink-calendar-off"',this._day&&0===this._dateCmp(a,this)&&(i+='class="ink-calendar-on" data-cal-day="'+n+'"'),'
      • "+n+"
      • "},_getMonthCalendarHeaderHtml:function(t){for(var e,n='
          ',i=0;7>i;i++)e=(t+i)%7,n+="
        • "+this._options.wDay[e].substring(0,1)+"
        • ";return n+"
        "},_addMonthClassNames:function(t){s.forEach((t||this._monthSelector).getElementsByTagName("a"),Ink.bindMethod(this,"_addMonthButtonClassNames"))},_addMonthButtonClassNames:function(t){var e=i.data(t);if(!e.calMonth)throw"not a calendar month button!";var a=+e.calMonth-1;if(a===this._month)n.addClassName(t,"ink-calendar-on"),n.removeClassName(t,"ink-calendar-off");else{n.removeClassName(t,"ink-calendar-on");var s=!this._acceptableMonth({_year:this._year,_month:a});n.addRemoveClassName(t,"ink-calendar-off",s)}},lang:function(t){this._lang=t},showMonth:function(){this._renderMonth()},isMonthRendered:function(){var t=a.select(".ink-calendar-header",this._containerObject)[0];return"none"!==n.getStyle(t.parentNode,"display")&&"none"!==n.getStyle(t.parentNode.parentNode,"display")},destroy:function(){i.unwrap(this._element),i.remove(this._wrapper),i.remove(this._containerObject),t.unregisterInstance.call(this)}},d}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.draggable.js b/ajax/libs/ink/3.0.0/js/ink.draggable.js new file mode 100644 index 000000000..2360d5c53 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.draggable.js @@ -0,0 +1,448 @@ +/** + * @module Ink.UI.Draggable_1 + * Dragging elements around + * @version 1 + */ + +Ink.createModule("Ink.UI.Draggable","1",["Ink.Dom.Element_1", "Ink.Dom.Event_1", "Ink.Dom.Css_1", "Ink.Dom.Browser_1", "Ink.Dom.Selector_1", "Ink.UI.Common_1"],function( InkElement, InkEvent, Css, Browser, Selector, Common) { + 'use strict'; + + var x = 0, + y = 1; // For accessing coords in [x, y] arrays + + // Get a value between two boundaries + function between (val, min, max) { + val = Math.min(val, max); + val = Math.max(val, min); + return val; + } + + /** + * @class Ink.UI.Draggable + * @version 1 + * @constructor + * @param {String|DOMElement} target Target element. + * @param {Object} [options] Optional object to configure the component. + * @param {String} [options.constraint] Movement constraint. None by default. Can be `vertical`, `horizontal`, or `both`. + * @param {String|DOMElement} [options.constraintElm] Constrain dragging to be within this element. None by default. + * @param {Number} [options.top] Limits to constrain draggable movement. + * @param {Number} [options.right] Limits to constrain draggable movement. + * @param {Number} [options.bottom] Limits to constrain draggable movement. + * @param {Number} [options.left] Limits to constrain draggable movement. + * @param {String|DOMElement} [options.handle] If specified, this element or CSS ID will be used as a handle for dragging. + * @param {Boolean} [options.revert] Flag to revert the draggable to the original position when dragging stops. + * @param {String} [options.cursor] Cursor type (CSS `cursor` value) used when the mouse is over the draggable object. + * @param {Number} [options.zIndex] Z-index applied to the draggable element while dragged. + * @param {Number} [options.fps] If set, throttles the drag effect to this number of frames per second. + * @param {DOMElement} [options.droppableProxy] If set, a shallow copy of this element will be moved around with transparent background. + * @param {String} [options.mouseAnchor] Anchor for the drag. Can be one of: 'left','center','right','top','center','bottom'. + * @param {String} [options.dragClass] Class to add when the draggable is being dragged. Defaults to drag. + * @param {Function} [options.onStart] Callback called when dragging starts. + * @param {Function} [options.onEnd] Callback called when dragging stops. + * @param {Function} [options.onDrag] Callback called while dragging, prior to position updates. + * @param {Function} [options.onChange] Callback called while dragging, after position updates. + * + * @example + * Ink.requireModules( ['Ink.UI.Draggable_1'], function( Draggable ){ + * new Draggable( '#myElementId' ); + * }); + * + * @sample Ink_UI_Swipe_1.html + */ + var Draggable = function(element, options) { + this.init(element, options); + }; + + Draggable.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @param {String|DOMElement} element Element ID of the element or DOM Element. + * @param {Object} [options] Options object for configuration of the module. + * @private + */ + init: function(element, options) { + var o = Ink.extendObj( { + constraint: false, + constraintElm: false, + top: false, + right: false, + bottom: false, + left: false, + handle: options.handler /* old option name */ || false, + revert: false, + cursor: 'move', + zindex: options.zindex /* old option name */ || 9999, + dragClass: 'drag', + onStart: false, + onEnd: false, + onDrag: false, + onChange: false, + droppableProxy: false, + mouseAnchor: undefined, + skipChildren: true, + fps: 100, + debug: false + }, options || {}, InkElement.data(element)); + + this.options = o; + this.element = Common.elOrSelector(element); + this.constraintElm = o.constraintElm && Common.elOrSelector(o.constraintElm); + + this.handle = false; + this.elmStartPosition = false; + this.active = false; + this.dragged = false; + this.prevCoords = false; + this.placeholder = false; + + this.position = false; + this.zindex = false; + this.firstDrag = true; + + if (o.fps) { + this.deltaMs = 1000 / o.fps; + this.lastRunAt = 0; + } + + this.handlers = {}; + this.handlers.start = Ink.bindEvent(this._onStart,this); + this.handlers.dragFacade = Ink.bindEvent(this._onDragFacade,this); + this.handlers.drag = Ink.bindEvent(this._onDrag,this); + this.handlers.end = Ink.bindEvent(this._onEnd,this); + this.handlers.selectStart = function(event) { InkEvent.stop(event); return false; }; + + // set handle + this.handle = (this.options.handle) ? + Common.elOrSelector(this.options.handle) : this.element; + this.handle.style.cursor = o.cursor; + + InkEvent.observe(this.handle, 'touchstart', this.handlers.start); + InkEvent.observe(this.handle, 'mousedown', this.handlers.start); + + if (Browser.IE) { + InkEvent.observe(this.element, 'selectstart', this.handlers.selectStart); + } + }, + + /** + * Removes the ability of the element of being dragged + * + * @method destroy + * @public + */ + destroy: function() { + InkEvent.stopObserving(this.handle, 'touchstart', this.handlers.start); + InkEvent.stopObserving(this.handle, 'mousedown', this.handlers.start); + + if (Browser.IE) { + InkEvent.stopObserving(this.element, 'selectstart', this.handlers.selectStart); + } + }, + + /** + * Gets coordinates for a given event (with added page scroll) + * + * @method _getCoords + * @param {Object} e window.event object. + * @return {Array} Array where the first position is the x coordinate, the second is the y coordinate + * @private + */ + _getCoords: function(e) { + var ps = [InkElement.scrollWidth(), InkElement.scrollHeight()]; + return { + x: (e.touches ? e.touches[0].clientX : e.clientX) + ps[x], + y: (e.touches ? e.touches[0].clientY : e.clientY) + ps[y] + }; + }, + + /** + * Clones src element's relevant properties to dst + * + * @method _cloneStyle + * @param {DOMElement} src Element from where we're getting the styles + * @param {DOMElement} dst Element where we're placing the styles. + * @private + */ + _cloneStyle: function(src, dst) { + dst.className = src.className; + dst.style.borderWidth = '0'; + dst.style.padding = '0'; + dst.style.position = 'absolute'; + dst.style.width = InkElement.elementWidth(src) + 'px'; + dst.style.height = InkElement.elementHeight(src) + 'px'; + dst.style.left = InkElement.elementLeft(src) + 'px'; + dst.style.top = InkElement.elementTop(src) + 'px'; + dst.style.cssFloat = Css.getStyle(src, 'float'); + dst.style.display = Css.getStyle(src, 'display'); + }, + + /** + * onStart event handler + * + * @method _onStart + * @param {Object} e window.event object + * @return {Boolean|void} In some cases return false. Otherwise is void + * @private + */ + _onStart: function(e) { + if (!this.active && InkEvent.isLeftClick(e) || typeof e.button === 'undefined') { + + var tgtEl = InkEvent.element(e); + if (this.options.skipChildren && tgtEl !== this.handle) { return; } + + InkEvent.stop(e); + + Css.addClassName(this.element, this.options.dragClass); + + this.elmStartPosition = [ + InkElement.elementLeft(this.element), + InkElement.elementTop( this.element) + ]; + + var pos = [ + parseInt(Css.getStyle(this.element, 'left'), 10), + parseInt(Css.getStyle(this.element, 'top'), 10) + ]; + + var dims = InkElement.elementDimensions(this.element); + + this.originalPosition = [ pos[x] ? pos[x]: null, pos[y] ? pos[y] : null ]; + this.delta = this._getCoords(e); // mouse coords at beginning of drag + + this.active = true; + this.position = Css.getStyle(this.element, 'position'); + this.zindex = Css.getStyle(this.element, 'zIndex'); + + var div = document.createElement('div'); + div.style.position = this.position; + div.style.width = dims[x] + 'px'; + div.style.height = dims[y] + 'px'; + div.style.marginTop = Css.getStyle(this.element, 'margin-top'); + div.style.marginBottom = Css.getStyle(this.element, 'margin-bottom'); + div.style.marginLeft = Css.getStyle(this.element, 'margin-left'); + div.style.marginRight = Css.getStyle(this.element, 'margin-right'); + div.style.borderWidth = '0'; + div.style.padding = '0'; + div.style.cssFloat = Css.getStyle(this.element, 'float'); + div.style.display = Css.getStyle(this.element, 'display'); + div.style.visibility = 'hidden'; + + this.delta2 = [ this.delta.x - this.elmStartPosition[x], this.delta.y - this.elmStartPosition[y] ]; // diff between top-left corner of obj and mouse + if (this.options.mouseAnchor) { + var parts = this.options.mouseAnchor.split(' '); + var ad = [dims[x], dims[y]]; // starts with 'right bottom' + if (parts[0] === 'left') { ad[x] = 0; } else if(parts[0] === 'center') { ad[x] = parseInt(ad[x]/2, 10); } + if (parts[1] === 'top') { ad[y] = 0; } else if(parts[1] === 'center') { ad[y] = parseInt(ad[y]/2, 10); } + this.applyDelta = [this.delta2[x] - ad[x], this.delta2[y] - ad[y]]; + } + + var dragHandlerName = this.options.fps ? 'dragFacade' : 'drag'; + + this.placeholder = div; + + if (this.options.onStart) { this.options.onStart(this.element, e); } + + if (this.options.droppableProxy) { // create new transparent div to optimize DOM traversal during drag + this.proxy = document.createElement('div'); + dims = [ + window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, + window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight + ]; + var fs = this.proxy.style; + fs.width = dims[x] + 'px'; + fs.height = dims[y] + 'px'; + fs.position = 'fixed'; + fs.left = '0'; + fs.top = '0'; + fs.zIndex = this.options.zindex + 1; + fs.backgroundColor = '#FF0000'; + Css.setOpacity(this.proxy, 0); + + var firstEl = document.body.firstChild; + while (firstEl && firstEl.nodeType !== 1) { firstEl = firstEl.nextSibling; } + document.body.insertBefore(this.proxy, firstEl); + + + InkEvent.observe(this.proxy, 'mousemove', this.handlers[dragHandlerName]); + InkEvent.observe(this.proxy, 'touchmove', this.handlers[dragHandlerName]); + } + else { + InkEvent.observe(document, 'mousemove', this.handlers[dragHandlerName]); + } + + this.element.style.position = 'absolute'; + this.element.style.zIndex = this.options.zindex; + this.element.parentNode.insertBefore(this.placeholder, this.element); + + this._onDrag(e); + + InkEvent.observe(document, 'mouseup', this.handlers.end); + InkEvent.observe(document, 'touchend', this.handlers.end); + + return false; + } + }, + + /** + * Function that gets the timestamp of the current run from time to time. (FPS) + * + * @method _onDragFacade + * @param {Object} window.event object. + * @private + */ + _onDragFacade: function(e) { + var now = +new Date(); + if (!this.lastRunAt || now > this.lastRunAt + this.deltaMs) { + this.lastRunAt = now; + this._onDrag(e); + } + }, + + /** + * Function that handles the dragging movement + * + * @method _onDrag + * @param {Object} window.event object. + * @private + */ + _onDrag: function(e) { + if (this.active) { + InkEvent.stop(e); + this.dragged = true; + var mouseCoords = this._getCoords(e), + mPosX = mouseCoords.x, + mPosY = mouseCoords.y, + o = this.options, + newX = false, + newY = false; + + if (this.prevCoords && mPosX !== this.prevCoords.x || mPosY !== this.prevCoords.y) { + if (o.onDrag) { o.onDrag(this.element, e); } + this.prevCoords = mouseCoords; + + newX = this.elmStartPosition[x] + mPosX - this.delta.x; + newY = this.elmStartPosition[y] + mPosY - this.delta.y; + + var draggableSize = InkElement.elementDimensions(this.element); + + if (this.constraintElm) { + var offset = InkElement.offset(this.constraintElm); + var size = InkElement.elementDimensions(this.constraintElm); + var constTop = offset[y] + (o.top || 0), + constBottom = offset[y] + size[y] - (o.bottom || 0), + constLeft = offset[x] + (o.left || 0), + constRight = offset[x] + size[x] - (o.right || 0); + + newY = between(newY, constTop, constBottom - draggableSize[y]); + newX = between(newX, constLeft, constRight - draggableSize[x]); + } else if (o.constraint) { + var right = o.right === false ? InkElement.pageWidth() - draggableSize[x] : o.right, + left = o.left === false ? 0 : o.left, + top = o.top === false ? 0 : o.top, + bottom = o.bottom === false ? InkElement.pageHeight() - draggableSize[y] : o.bottom; + if (o.constraint === 'horizontal' || o.constraint === 'both') { + newX = between(newX, left, right); + } + if (o.constraint === 'vertical' || o.constraint === 'both') { + newY = between(newY, top, bottom); + } + } + + var Droppable = Ink.getModule('Ink.UI.Droppable_1'); + if (this.firstDrag) { + if (Droppable) { Droppable.updateAll(); } + /*this.element.style.position = 'absolute'; + this.element.style.zIndex = this.options.zindex; + this.element.parentNode.insertBefore(this.placeholder, this.element);*/ + this.firstDrag = false; + } + + if (newX) { this.element.style.left = newX + 'px'; } + if (newY) { this.element.style.top = newY + 'px'; } + + if (Droppable) { + // apply applyDelta defined on drag init + var mouseCoords2 = this.options.mouseAnchor ? + {x: mPosX - this.applyDelta[x], y: mPosY - this.applyDelta[y]} : + mouseCoords; + Droppable.action(mouseCoords2, 'drag', e, this.element); + } + if (o.onChange) { o.onChange(this); } + } + } + }, + + /** + * Function that handles the end of the dragging process + * + * @method _onEnd + * @param {Object} window.event object. + * @private + */ + _onEnd: function(e) { + InkEvent.stopObserving(document, 'mousemove', this.handlers.drag); + InkEvent.stopObserving(document, 'touchmove', this.handlers.drag); + + if (this.options.fps) { + this._onDrag(e); + } + + Css.removeClassName(this.element, this.options.dragClass); + + if (this.active && this.dragged) { + + if (this.options.droppableProxy) { // remove transparent div... + document.body.removeChild(this.proxy); + } + + if (this.pt) { // remove debugging element... + InkElement.remove(this.pt); + this.pt = undefined; + } + + /*if (this.options.revert) { + this.placeholder.parentNode.removeChild(this.placeholder); + }*/ + + if(this.placeholder) { + InkElement.remove(this.placeholder); + } + + if (this.options.revert) { + this.element.style.position = this.position; + if (this.zindex !== null) { + this.element.style.zIndex = this.zindex; + } + else { + this.element.style.zIndex = 'auto'; + } // restore default zindex of it had none + + this.element.style.left = (this.originalPosition[x]) ? this.originalPosition[x] + 'px' : ''; + this.element.style.top = (this.originalPosition[y]) ? this.originalPosition[y] + 'px' : ''; + } + + if (this.options.onEnd) { + this.options.onEnd(this.element, e); + } + + var Droppable = Ink.getModule('Ink.UI.Droppable_1'); + if (Droppable) { + Droppable.action(this._getCoords(e), 'drop', e, this.element); + } + + this.position = false; + this.zindex = false; + this.firstDrag = true; + } + + this.active = false; + this.dragged = false; + } + }; + + return Draggable; + +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.draggable.min.js b/ajax/libs/ink/3.0.0/js/ink.draggable.min.js new file mode 100644 index 000000000..dbbf7b01b --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.draggable.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Draggable","1",["Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Browser_1","Ink.Dom.Selector_1","Ink.UI.Common_1"],function(t,e,s,i,n,o){"use strict";function h(t,e,s){return t=Math.min(t,s),t=Math.max(t,e)}var l=0,r=1,a=function(t,e){this.init(t,e)};return a.prototype={init:function(s,n){var h=Ink.extendObj({constraint:!1,constraintElm:!1,top:!1,right:!1,bottom:!1,left:!1,handle:n.handler||!1,revert:!1,cursor:"move",zindex:n.zindex||9999,dragClass:"drag",onStart:!1,onEnd:!1,onDrag:!1,onChange:!1,droppableProxy:!1,mouseAnchor:void 0,skipChildren:!0,fps:100,debug:!1},n||{},t.data(s));this.options=h,this.element=o.elOrSelector(s),this.constraintElm=h.constraintElm&&o.elOrSelector(h.constraintElm),this.handle=!1,this.elmStartPosition=!1,this.active=!1,this.dragged=!1,this.prevCoords=!1,this.placeholder=!1,this.position=!1,this.zindex=!1,this.firstDrag=!0,h.fps&&(this.deltaMs=1e3/h.fps,this.lastRunAt=0),this.handlers={},this.handlers.start=Ink.bindEvent(this._onStart,this),this.handlers.dragFacade=Ink.bindEvent(this._onDragFacade,this),this.handlers.drag=Ink.bindEvent(this._onDrag,this),this.handlers.end=Ink.bindEvent(this._onEnd,this),this.handlers.selectStart=function(t){return e.stop(t),!1},this.handle=this.options.handle?o.elOrSelector(this.options.handle):this.element,this.handle.style.cursor=h.cursor,e.observe(this.handle,"touchstart",this.handlers.start),e.observe(this.handle,"mousedown",this.handlers.start),i.IE&&e.observe(this.element,"selectstart",this.handlers.selectStart)},destroy:function(){e.stopObserving(this.handle,"touchstart",this.handlers.start),e.stopObserving(this.handle,"mousedown",this.handlers.start),i.IE&&e.stopObserving(this.element,"selectstart",this.handlers.selectStart)},_getCoords:function(e){var s=[t.scrollWidth(),t.scrollHeight()];return{x:(e.touches?e.touches[0].clientX:e.clientX)+s[l],y:(e.touches?e.touches[0].clientY:e.clientY)+s[r]}},_cloneStyle:function(e,i){i.className=e.className,i.style.borderWidth="0",i.style.padding="0",i.style.position="absolute",i.style.width=t.elementWidth(e)+"px",i.style.height=t.elementHeight(e)+"px",i.style.left=t.elementLeft(e)+"px",i.style.top=t.elementTop(e)+"px",i.style.cssFloat=s.getStyle(e,"float"),i.style.display=s.getStyle(e,"display")},_onStart:function(i){if(!this.active&&e.isLeftClick(i)||"undefined"==typeof i.button){var n=e.element(i);if(this.options.skipChildren&&n!==this.handle)return;e.stop(i),s.addClassName(this.element,this.options.dragClass),this.elmStartPosition=[t.elementLeft(this.element),t.elementTop(this.element)];var o=[parseInt(s.getStyle(this.element,"left"),10),parseInt(s.getStyle(this.element,"top"),10)],h=t.elementDimensions(this.element);this.originalPosition=[o[l]?o[l]:null,o[r]?o[r]:null],this.delta=this._getCoords(i),this.active=!0,this.position=s.getStyle(this.element,"position"),this.zindex=s.getStyle(this.element,"zIndex");var a=document.createElement("div");if(a.style.position=this.position,a.style.width=h[l]+"px",a.style.height=h[r]+"px",a.style.marginTop=s.getStyle(this.element,"margin-top"),a.style.marginBottom=s.getStyle(this.element,"margin-bottom"),a.style.marginLeft=s.getStyle(this.element,"margin-left"),a.style.marginRight=s.getStyle(this.element,"margin-right"),a.style.borderWidth="0",a.style.padding="0",a.style.cssFloat=s.getStyle(this.element,"float"),a.style.display=s.getStyle(this.element,"display"),a.style.visibility="hidden",this.delta2=[this.delta.x-this.elmStartPosition[l],this.delta.y-this.elmStartPosition[r]],this.options.mouseAnchor){var d=this.options.mouseAnchor.split(" "),p=[h[l],h[r]];"left"===d[0]?p[l]=0:"center"===d[0]&&(p[l]=parseInt(p[l]/2,10)),"top"===d[1]?p[r]=0:"center"===d[1]&&(p[r]=parseInt(p[r]/2,10)),this.applyDelta=[this.delta2[l]-p[l],this.delta2[r]-p[r]]}var m=this.options.fps?"dragFacade":"drag";if(this.placeholder=a,this.options.onStart&&this.options.onStart(this.element,i),this.options.droppableProxy){this.proxy=document.createElement("div"),h=[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight];var c=this.proxy.style;c.width=h[l]+"px",c.height=h[r]+"px",c.position="fixed",c.left="0",c.top="0",c.zIndex=this.options.zindex+1,c.backgroundColor="#FF0000",s.setOpacity(this.proxy,0);for(var g=document.body.firstChild;g&&1!==g.nodeType;)g=g.nextSibling;document.body.insertBefore(this.proxy,g),e.observe(this.proxy,"mousemove",this.handlers[m]),e.observe(this.proxy,"touchmove",this.handlers[m])}else e.observe(document,"mousemove",this.handlers[m]);return this.element.style.position="absolute",this.element.style.zIndex=this.options.zindex,this.element.parentNode.insertBefore(this.placeholder,this.element),this._onDrag(i),e.observe(document,"mouseup",this.handlers.end),e.observe(document,"touchend",this.handlers.end),!1}},_onDragFacade:function(t){var e=+new Date;(!this.lastRunAt||e>this.lastRunAt+this.deltaMs)&&(this.lastRunAt=e,this._onDrag(t))},_onDrag:function(s){if(this.active){e.stop(s),this.dragged=!0;var i=this._getCoords(s),n=i.x,o=i.y,a=this.options,d=!1,p=!1;if(this.prevCoords&&n!==this.prevCoords.x||o!==this.prevCoords.y){a.onDrag&&a.onDrag(this.element,s),this.prevCoords=i,d=this.elmStartPosition[l]+n-this.delta.x,p=this.elmStartPosition[r]+o-this.delta.y;var m=t.elementDimensions(this.element);if(this.constraintElm){var c=t.offset(this.constraintElm),g=t.elementDimensions(this.constraintElm),y=c[r]+(a.top||0),u=c[r]+g[r]-(a.bottom||0),v=c[l]+(a.left||0),f=c[l]+g[l]-(a.right||0);p=h(p,y,u-m[r]),d=h(d,v,f-m[l])}else if(a.constraint){var b=a.right===!1?t.pageWidth()-m[l]:a.right,x=a.left===!1?0:a.left,S=a.top===!1?0:a.top,I=a.bottom===!1?t.pageHeight()-m[r]:a.bottom;("horizontal"===a.constraint||"both"===a.constraint)&&(d=h(d,x,b)),("vertical"===a.constraint||"both"===a.constraint)&&(p=h(p,S,I))}var D=Ink.getModule("Ink.UI.Droppable_1");if(this.firstDrag&&(D&&D.updateAll(),this.firstDrag=!1),d&&(this.element.style.left=d+"px"),p&&(this.element.style.top=p+"px"),D){var C=this.options.mouseAnchor?{x:n-this.applyDelta[l],y:o-this.applyDelta[r]}:i;D.action(C,"drag",s,this.element)}a.onChange&&a.onChange(this)}}},_onEnd:function(i){if(e.stopObserving(document,"mousemove",this.handlers.drag),e.stopObserving(document,"touchmove",this.handlers.drag),this.options.fps&&this._onDrag(i),s.removeClassName(this.element,this.options.dragClass),this.active&&this.dragged){this.options.droppableProxy&&document.body.removeChild(this.proxy),this.pt&&(t.remove(this.pt),this.pt=void 0),this.placeholder&&t.remove(this.placeholder),this.options.revert&&(this.element.style.position=this.position,this.element.style.zIndex=null!==this.zindex?this.zindex:"auto",this.element.style.left=this.originalPosition[l]?this.originalPosition[l]+"px":"",this.element.style.top=this.originalPosition[r]?this.originalPosition[r]+"px":""),this.options.onEnd&&this.options.onEnd(this.element,i);var n=Ink.getModule("Ink.UI.Droppable_1");n&&n.action(this._getCoords(i),"drop",i,this.element),this.position=!1,this.zindex=!1,this.firstDrag=!0}this.active=!1,this.dragged=!1}},a}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.drawer.js b/ajax/libs/ink/3.0.0/js/ink.drawer.js new file mode 100644 index 000000000..498afbc08 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.drawer.js @@ -0,0 +1,227 @@ +/** + * @module Ink.UI.Drawer_1 + * Off-canvas menu + * @version 1 + */ + +Ink.createModule('Ink.UI.Drawer', '1', ['Ink.UI.Common_1', 'Ink.Dom.Loaded_1', 'Ink.Dom.Selector_1', 'Ink.Dom.Element_1', 'Ink.Dom.Event_1', 'Ink.Dom.Css_1'], function(Common, Loaded, Selector, Element, Event, Css) { + 'use strict'; + + function elNotFound(el) { + Ink.warn( 'Ink.UI.Drawer_1: Could not find the "' + + el + '" element on this page. Please make sure it exists.' ); + } + + function Drawer(options) { + this._init(options); + } + + Drawer.prototype = { + /** + * Displays off-canvas content which can be triggered by clicking elements with the 'left-drawer-trigger' and 'right-drawer-trigger', respectively. + * + * The left drawer has the 'left-drawer' class, and the right drawer has the 'right-drawer' class. + * + * The content drawer (EG your `
        `) must have the 'content-drawer' class. + * + * For more, see the example below, or try the sample. + * + * @class Ink.UI.Drawer_1 + * @constructor + * + * @xparam {Object} [options] Configuration options. + * @xparam {String} [options.parentSelector] The class you are using in your wrapper (in the example below, it's the `body` tag. + * @xparam {String} [options.leftDrawer] Selector for the left drawer element. This element is placed outside the screen and shown when you click the `leftTrigger` element. + * @xparam {String} [options.leftTrigger] Selector for the left drawer trigger(s). When you click this trigger, the `leftDrawer` is shown. + * @xparam {String} [options.rightDrawer] Right drawer selector. (see `options.leftDrawer`) + * @xparam {String} [options.rightTrigger] Right trigger selector (see `options.leftTrigger`) + * @xparam {String} [options.contentDrawer] Selector for the content drawer. + * @param {Boolean} [options.closeOnContentClick] Flag to close the drawer when someone clicks on the `.contentDrawer` + * @param {String} [options.mode] This can be 'push' or 'hide'. + * @param {String} [options.sides] Can be 'left', 'right', or 'both'. Controls from which sides the content + * + * @example + * + * + *
        + * Right drawer content... + *
        + *
        + * Left drawer content... + *
        + *
        + * Open left drawer + * Open right drawer + * Content... + *
        + * + * + * + */ + _init: function (options) { + this._options = Common.options({ + parentSelector: ['String', '.ink-drawer'], + leftDrawer: ['String', '.left-drawer'], + leftTrigger: ['String', '.left-drawer-trigger'], + rightDrawer: ['String', '.right-drawer'], + rightTrigger: ['String', '.right-drawer-trigger'], + contentDrawer: ['String', '.content-drawer'], + closeOnContentClick: ['Boolean', true], + closeOnLinkClick: ['Boolean', true], + mode: ['String', 'push'], + sides: ['String', 'both'] + }, options || {}); + + // make sure we have the required elements acording to the config options + + this._contentDrawers = Ink.ss(this._options.contentDrawer); + + this._leftDrawer = Ink.s(this._options.leftDrawer); + this._leftTriggers = Ink.ss(this._options.leftTrigger); + + this._rightDrawer = Ink.s(this._options.rightDrawer); + this._rightTriggers = Ink.ss(this._options.rightTrigger); + + // The body might not have it + Css.addClassName(document.body, 'ink-drawer'); + + if(this._contentDrawers.length === 0) { + Ink.warn( 'Ink.UI.Drawer_1: Could not find any "' + + this._options.contentDrawer + '" elements on this page. ' + + 'Please make sure you have at least one.' ); + } + + switch (this._options.sides) { + case 'both': + if( !this._leftDrawer ){ + elNotFound(this._options.leftDrawer); + } + + if(this._leftTriggers.length === 0){ + elNotFound(this._options.leftTrigger); + } + + if( !this._rightDrawer ){ + elNotFound(this._options.rightDrawer); + } + + if( this._rightTriggers.length === 0 ){ + elNotFound(this._options.rightTrigger); + } + this._triggers = this._options.leftTrigger + ', ' + this._options.rightTrigger + ', ' + this._options.contentDrawer; + break; + + case 'left': + if( !this._leftDrawer ){ + elNotFound(this._options.leftDrawer); + } + + if(this._leftTriggers.length === 0){ + elNotFound(this._options.leftTrigger); + } + this._triggers = this._options.leftTrigger + ', ' + this._options.contentDrawer; + break; + + case 'right': + if( !this._rightDrawer ){ + elNotFound(this._options.rightDrawer); + } + + if( this._rightTriggers.length === 0 ){ + elNotFound(this._options.rightTrigger); + } + this._triggers = this._options.rightTrigger + ', ' + this._options.contentDrawer; + break; + } + + + this._isOpen = false; + this._direction = undefined; + + this._handlers = { + click: Ink.bindEvent(this._onClick, this), + afterTransition: Ink.bindEvent(this._afterTransition, this) + }; + this._delay = 10; + this._addEvents(); + }, + + /** + * Click event handler. + * Listens to the body's click event + * + * @method _onClick + * @private + **/ + _onClick: function(ev){ + var triggerClicked = Ink.bind(function (side) { + // When clicking on the trigger, the corresponding side is toggled. + if (this._isOpen) { + this.close(); + } else { + this.open(side); + } + }, this); + + if(Selector.matchesSelector(ev.currentTarget,this._options.leftTrigger)){ + // Clicked on the left trigger + triggerClicked('left'); + } else if(Selector.matchesSelector(ev.currentTarget,this._options.rightTrigger)){ + triggerClicked('right'); + } else if(Selector.matchesSelector(ev.currentTarget,this._options.contentDrawer)){ + // Clicked on the rest of the body + if(this._options.closeOnContentClick) { + this.close(); + } + } + + // Clicked on a link + if (this._options.closeOnLinkClick && Element.isLink(ev.target)) { + this.close(); + } + }, + + _afterTransition: function(){ + if(!this._isOpen){ + if(this._direction === 'left') { + Css.removeClassName(this._leftDrawer, 'show'); + } else { + Css.removeClassName(this._rightDrawer, 'show'); + } + } + }, + + _addEvents: function(){ + Event.on(document.body, 'click', this._triggers + ', a[href*="#"]', this._handlers.click); + }, + + open: function(direction) { + this._isOpen = true; + this._direction = direction; + + var open = direction === 'left' ? + this._leftDrawer : + this._rightDrawer; + + Css.addClassName(open,'show'); + setTimeout(Ink.bind(function(){ + Css.addClassName(document.body, [this._options.mode, direction]); + },this), this._delay); + }, + + close: function() { + if (this._isOpen === false) { return; } + this._isOpen = false; + // TODO detect transitionEnd exists, otherwise don't rely on it + Event.one(document.body, 'transitionend oTransitionEnd transitionend webkitTransitionEnd', this._handlers.afterTransition); + Css.removeClassName(document.body, [this._options.mode, this._direction]); + } + + }; + + return Drawer; +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.drawer.min.js b/ajax/libs/ink/3.0.0/js/ink.drawer.min.js new file mode 100644 index 000000000..65306f5c7 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.drawer.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Drawer","1",["Ink.UI.Common_1","Ink.Dom.Loaded_1","Ink.Dom.Selector_1","Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Css_1"],function(t,i,e,r,s,n){"use strict";function o(t){Ink.warn('Ink.UI.Drawer_1: Could not find the "'+t+'" element on this page. Please make sure it exists.')}function h(t){this._init(t)}return h.prototype={_init:function(i){switch(this._options=t.options({parentSelector:["String",".ink-drawer"],leftDrawer:["String",".left-drawer"],leftTrigger:["String",".left-drawer-trigger"],rightDrawer:["String",".right-drawer"],rightTrigger:["String",".right-drawer-trigger"],contentDrawer:["String",".content-drawer"],closeOnContentClick:["Boolean",!0],closeOnLinkClick:["Boolean",!0],mode:["String","push"],sides:["String","both"]},i||{}),this._contentDrawers=Ink.ss(this._options.contentDrawer),this._leftDrawer=Ink.s(this._options.leftDrawer),this._leftTriggers=Ink.ss(this._options.leftTrigger),this._rightDrawer=Ink.s(this._options.rightDrawer),this._rightTriggers=Ink.ss(this._options.rightTrigger),n.addClassName(document.body,"ink-drawer"),0===this._contentDrawers.length&&Ink.warn('Ink.UI.Drawer_1: Could not find any "'+this._options.contentDrawer+'" elements on this page. Please make sure you have at least one.'),this._options.sides){case"both":this._leftDrawer||o(this._options.leftDrawer),0===this._leftTriggers.length&&o(this._options.leftTrigger),this._rightDrawer||o(this._options.rightDrawer),0===this._rightTriggers.length&&o(this._options.rightTrigger),this._triggers=this._options.leftTrigger+", "+this._options.rightTrigger+", "+this._options.contentDrawer;break;case"left":this._leftDrawer||o(this._options.leftDrawer),0===this._leftTriggers.length&&o(this._options.leftTrigger),this._triggers=this._options.leftTrigger+", "+this._options.contentDrawer;break;case"right":this._rightDrawer||o(this._options.rightDrawer),0===this._rightTriggers.length&&o(this._options.rightTrigger),this._triggers=this._options.rightTrigger+", "+this._options.contentDrawer}this._isOpen=!1,this._direction=void 0,this._handlers={click:Ink.bindEvent(this._onClick,this),afterTransition:Ink.bindEvent(this._afterTransition,this)},this._delay=10,this._addEvents()},_onClick:function(t){var i=Ink.bind(function(t){this._isOpen?this.close():this.open(t)},this);e.matchesSelector(t.currentTarget,this._options.leftTrigger)?i("left"):e.matchesSelector(t.currentTarget,this._options.rightTrigger)?i("right"):e.matchesSelector(t.currentTarget,this._options.contentDrawer)&&this._options.closeOnContentClick&&this.close(),this._options.closeOnLinkClick&&r.isLink(t.target)&&this.close()},_afterTransition:function(){this._isOpen||("left"===this._direction?n.removeClassName(this._leftDrawer,"show"):n.removeClassName(this._rightDrawer,"show"))},_addEvents:function(){s.on(document.body,"click",this._triggers+', a[href*="#"]',this._handlers.click)},open:function(t){this._isOpen=!0,this._direction=t;var i="left"===t?this._leftDrawer:this._rightDrawer;n.addClassName(i,"show"),setTimeout(Ink.bind(function(){n.addClassName(document.body,[this._options.mode,t])},this),this._delay)},close:function(){this._isOpen!==!1&&(this._isOpen=!1,s.one(document.body,"transitionend oTransitionEnd transitionend webkitTransitionEnd",this._handlers.afterTransition),n.removeClassName(document.body,[this._options.mode,this._direction]))}},h}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.dropdown.js b/ajax/libs/ink/3.0.0/js/ink.dropdown.js new file mode 100644 index 000000000..b9365c93a --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.dropdown.js @@ -0,0 +1,197 @@ +/** + * @module Ink.UI.Dropdown_1 + * Dropdown menus + * @version 1 + */ + +Ink.createModule('Ink.UI.Dropdown', '1', ['Ink.UI.Common_1', 'Ink.UI.Toggle_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1'], function(Common, Toggle, InkEvent, InkElement) { + 'use strict'; + + function Dropdown(trigger, options) { + this._init(trigger, options); + } + + Dropdown.prototype = { + /** + * Use this UI module to achieve a dropdown menu. + * + * @class Ink.UI.Dropdown + * + * @constructor + * @param {DOMElement|String} trigger Trigger Element + * @param {Object} options Options Object + * @param {DOMElement|String} options.target Target of the dropdown action. + * + * @sample Ink_UI_Dropdown_1.html + */ + _init: function(trigger, options) { + this._element = Common.elOrSelector(trigger); + this._options = Common.options('Ink.UI.Dropdown_1', { + 'target': ['Element'], + 'hoverOpen': ['Number', null], + 'dismissOnInsideClick': ['Boolean', false], + 'dismissOnOutsideClick': ['Boolean', true], + 'dismissAfter': ['Number', null], + 'onInsideClick': ['Function', null], + 'onOutsideClick': ['Function', null], + 'onOpen': ['Function', null], + 'onDismiss': ['Function', null] + }, options || {}, this._element); + + this._toggle = new Toggle(this._element, { + target: this._options.target, + closeOnInsideClick: null, + closeOnClick: false, + onChangeState: Ink.bind(function (newState) { + return this._openOrDismiss(newState, true, true); + }, this) + }); + + // Event where we set this._dismissTimeout and clear this._openTimeout + InkEvent.observeMulti([this._options.target, this._element], + 'mouseout', Ink.bindMethod(this, '_onMouseOut')); + + // Events to keep clearing this._dismissTimeout and set this._openTimeout + InkEvent.observeMulti([this._options.target, this._element], + 'mouseover', Ink.bindMethod(this, '_onMouseOver')); + + // to call dismissOnInsideClick and onInsideClick + InkEvent.observe(this._options.target, 'click', Ink.bindMethod(this, '_onInsideClick')); + // to call dismissOnOutsideClick and onOutsideClick + InkEvent.observe(document, 'click', Ink.bindMethod(this, '_onOutsideClick')); + }, + + /** + * Called when the mouse is over the toggler, or the dropdown. + * + * Deals with "hoverOpen" by setting the dropdown to open later. Also cancels "dismissAfter". + * @method _onMouseOver + * @private + **/ + _onMouseOver: function () { + if (typeof this._options.hoverOpen === 'number' && this._toggle.getState() === false) { + clearTimeout(this._openTimeout); + this._openTimeout = setTimeout( + Ink.bindMethod(this, 'open', true), + this._options.hoverOpen * 1000); + } + if (typeof this._options.dismissAfter === 'number') { + clearTimeout(this._dismissTimeout); + } + }, + + /** + * Called when the mouse leaves either the toggler, or the dropdown. + * + * Deals with "dismissAfter" by setting the dropdown to be dismissed later. Also cancels "hoverOpen". + * @method _onMouseOut + * @private + **/ + _onMouseOut: function () { + if (typeof this._options.dismissAfter === 'number' && this._toggle.getState() === true) { + clearTimeout(this._dismissTimeout); + this._dismissTimeout = setTimeout( + Ink.bindMethod(this, 'dismiss', true), + this._options.dismissAfter * 1000); + } + if (typeof this._options.hoverOpen === 'number') { + clearTimeout(this._openTimeout); + } + }, + + /** + * Handle clicks on the dropdown. + * @method _onInsideClick + * @private + */ + _onInsideClick: function (event) { + var ret = this._handlerCall('onInsideClick', InkEvent.element(event)); + if (ret === false) { return false; } + if (this._options.dismissOnInsideClick) { + this.dismiss(true); + } + InkEvent.stop(event); + }, + + /** + * Handle clicks outside the dropdown. + * @method _onInsideClick + * @private + */ + _onOutsideClick: function (event) { + var target = InkEvent.element(event); + var foundElem = InkElement.findUpwardsHaving(target, Ink.bind(function (needle) { + return needle === this._element; + }, this)); + var foundTarget = InkElement.findUpwardsHaving(target, Ink.bind(function (needle) { + return needle === this._options.target; + }, this)); + + if (!foundElem && !foundTarget) { + var ret = this._handlerCall('onOutsideClick', target); + if (ret === false) { return false; } + if (this._options.dismissOnOutsideClick) { + this.dismiss(true); + } + InkEvent.stop(event); + } + }, + + /** + * Closes the dropdown. + * + * @method dismiss + * @param [callHandler=false] call onDismiss handler + */ + dismiss: function (callHandler, doNotInformToggle) { + this._openOrDismiss(false, callHandler, doNotInformToggle); + }, + + /** + * Opens the dropdown + * + * @method open + * @param [callHandler=false] call onOpen handler + */ + open: function (callHandler, _doNotInformToggle) { + this._openOrDismiss(true, callHandler, _doNotInformToggle); + }, + + /** + * DRY'ing up open() and dismiss() + * + * @method _openOrDismiss + * @param [newState=false] + * @param [callHandler=false] + * @private + */ + _openOrDismiss: function (newState, callHandler, _doNotInformToggle) { + if (this._toggle && this._toggle.getState() === newState) { return; } + if (callHandler) { + if (this._handlerCall(newState ? 'onOpen' : 'onDismiss') === false) { + return false; // canceled by event handler + } + } + if (!_doNotInformToggle) { + this._toggle.setState(newState); + } + clearTimeout(this._dismissTimeout); + clearTimeout(this._openTimeout); + }, + + /** + * call a method given by the user through the options + * + * @method _handlerCall + * @param handler {String} The handler name in this._options + * @param [args*] Arguments to pass to function + */ + _handlerCall: function (handler/*, ... */) { + if (this._options[handler]) { + return this._options[handler].call(this, [].slice.call(arguments, 1)); + } + } + }; + + return Dropdown; +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.dropdown.min.js b/ajax/libs/ink/3.0.0/js/ink.dropdown.min.js new file mode 100644 index 000000000..a4f3c8a74 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.dropdown.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Dropdown","1",["Ink.UI.Common_1","Ink.UI.Toggle_1","Ink.Dom.Event_1","Ink.Dom.Element_1"],function(i,t,e,s){"use strict";function n(i,t){this._init(i,t)}return n.prototype={_init:function(s,n){this._element=i.elOrSelector(s),this._options=i.options("Ink.UI.Dropdown_1",{target:["Element"],hoverOpen:["Number",null],dismissOnInsideClick:["Boolean",!1],dismissOnOutsideClick:["Boolean",!0],dismissAfter:["Number",null],onInsideClick:["Function",null],onOutsideClick:["Function",null],onOpen:["Function",null],onDismiss:["Function",null]},n||{},this._element),this._toggle=new t(this._element,{target:this._options.target,closeOnInsideClick:null,closeOnClick:!1,onChangeState:Ink.bind(function(i){return this._openOrDismiss(i,!0,!0)},this)}),e.observeMulti([this._options.target,this._element],"mouseout",Ink.bindMethod(this,"_onMouseOut")),e.observeMulti([this._options.target,this._element],"mouseover",Ink.bindMethod(this,"_onMouseOver")),e.observe(this._options.target,"click",Ink.bindMethod(this,"_onInsideClick")),e.observe(document,"click",Ink.bindMethod(this,"_onOutsideClick"))},_onMouseOver:function(){"number"==typeof this._options.hoverOpen&&this._toggle.getState()===!1&&(clearTimeout(this._openTimeout),this._openTimeout=setTimeout(Ink.bindMethod(this,"open",!0),1e3*this._options.hoverOpen)),"number"==typeof this._options.dismissAfter&&clearTimeout(this._dismissTimeout)},_onMouseOut:function(){"number"==typeof this._options.dismissAfter&&this._toggle.getState()===!0&&(clearTimeout(this._dismissTimeout),this._dismissTimeout=setTimeout(Ink.bindMethod(this,"dismiss",!0),1e3*this._options.dismissAfter)),"number"==typeof this._options.hoverOpen&&clearTimeout(this._openTimeout)},_onInsideClick:function(i){var t=this._handlerCall("onInsideClick",e.element(i));return t===!1?!1:(this._options.dismissOnInsideClick&&this.dismiss(!0),void e.stop(i))},_onOutsideClick:function(i){var t=e.element(i),n=s.findUpwardsHaving(t,Ink.bind(function(i){return i===this._element},this)),o=s.findUpwardsHaving(t,Ink.bind(function(i){return i===this._options.target},this));if(!n&&!o){var l=this._handlerCall("onOutsideClick",t);if(l===!1)return!1;this._options.dismissOnOutsideClick&&this.dismiss(!0),e.stop(i)}},dismiss:function(i,t){this._openOrDismiss(!1,i,t)},open:function(i,t){this._openOrDismiss(!0,i,t)},_openOrDismiss:function(i,t,e){if(!this._toggle||this._toggle.getState()!==i){if(t&&this._handlerCall(i?"onOpen":"onDismiss")===!1)return!1;e||this._toggle.setState(i),clearTimeout(this._dismissTimeout),clearTimeout(this._openTimeout)}},_handlerCall:function(i){return this._options[i]?this._options[i].call(this,[].slice.call(arguments,1)):void 0}},n}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.droppable.js b/ajax/libs/ink/3.0.0/js/ink.droppable.js new file mode 100644 index 000000000..4dd10680d --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.droppable.js @@ -0,0 +1,286 @@ +/** + * @module Ink.UI.Droppable_1 + * Drop elements around + * @version 1 + */ + +Ink.createModule("Ink.UI.Droppable","1",["Ink.Dom.Element_1", "Ink.Dom.Event_1", "Ink.Dom.Css_1", "Ink.UI.Common_1", "Ink.Util.Array_1", "Ink.Dom.Selector_1"], function( InkElement, InkEvent, Css, Common, InkArray, Selector) { + 'use strict'; + + // Higher order functions + var hAddClassName = function (element) { + return function (className) {return Css.addClassName(element, className);}; + }; + var hRemoveClassName = function (element) { + return function (className) {return Css.removeClassName(element, className);}; + }; + + /** + * @namespace Ink.UI.Droppable + * @version 1 + * @static + */ + var Droppable = { + /** + * Flag to activate debug mode + * + * @property debug + * @type {Boolean} + * @private + */ + debug: false, + + /** + * Array with the data of each element (`{element: ..., data: ..., options: ...}`) + * + * @property _droppables + * @type {Array} + * @private + */ + _droppables: [], + + /** + * Array of data for each draggable. (`{element: ..., data: ...}`) + * + * @property _draggables + * @type {Array} + * @private + */ + _draggables: [], + + /** + * Makes an element droppable. + * This method adds it to the stack of droppable elements. + * Can consider it a constructor of droppable elements, but where no Droppable object is returned. + * + * In the following arguments, any events/callbacks you may pass, can be either functions or strings. If the 'move' or 'copy' strings are passed, the draggable gets moved into this droppable. If 'revert' is passed, an acceptable droppable is moved back to the element it came from. + + * + * @method add + * @param {String|DOMElement} element Target element + * @param {Object} [options] Options object + * @param {String} [options.hoverClass] Classname(s) applied when an acceptable draggable element is hovering the element + * @param {String} [options.accept] Selector for choosing draggables which can be dropped in this droppable. + * @param {Function} [options.onHover] Callback when an acceptable draggable element is hovering the droppable. Gets the draggable and the droppable element as parameters. + * @param {Function|String} [options.onDrop] Callback when an acceptable draggable element is dropped. Gets the draggable, the droppable and the event as parameters. + * @param {Function|String} [options.onDropOut] Callback when a droppable is dropped outside this droppable. Gets the draggable, the droppable and the event as parameters. (see above for string options). + * @public + * + * @sample Ink_UI_Droppable_1.html + * + */ + add: function(element, options) { + element = Common.elOrSelector(element, 'Droppable.add target element'); + + var opt = Ink.extendObj( { + hoverClass: options.hoverclass /* old name */ || false, + accept: false, + onHover: false, + onDrop: false, + onDropOut: false + }, options || {}, InkElement.data(element)); + + if (typeof opt.hoverClass === 'string') { + opt.hoverClass = opt.hoverClass.split(/\s+/); + } + + function cleanStyle(draggable) { + draggable.style.position = 'inherit'; + } + var that = this; + var namedEventHandlers = { + move: function (draggable, droppable/*, event*/) { + cleanStyle(draggable); + droppable.appendChild(draggable); + }, + copy: function (draggable, droppable/*, event*/) { + cleanStyle(draggable); + droppable.appendChild(draggable.cloneNode); + }, + revert: function (draggable/*, droppable, event*/) { + that._findDraggable(draggable).originalParent.appendChild(draggable); + cleanStyle(draggable); + } + }; + var name; + + if (typeof opt.onHover === 'string') { + name = opt.onHover; + opt.onHover = namedEventHandlers[name]; + if (opt.onHover === undefined) { + throw new Error('Unknown hover event handler: ' + name); + } + } + if (typeof opt.onDrop === 'string') { + name = opt.onDrop; + opt.onDrop = namedEventHandlers[name]; + if (opt.onDrop === undefined) { + throw new Error('Unknown drop event handler: ' + name); + } + } + if (typeof opt.onDropOut === 'string') { + name = opt.onDropOut; + opt.onDropOut = namedEventHandlers[name]; + if (opt.onDropOut === undefined) { + throw new Error('Unknown dropOut event handler: ' + name); + } + } + + var elementData = { + element: element, + data: {}, + options: opt + }; + this._droppables.push(elementData); + this._update(elementData); + }, + + /** + * Finds droppable data about `element`. this data is added in `.add` + * + * @method _findData + * @param {DOMElement} element Needle + * @return {object} Droppable data of the element + * @private + */ + _findData: function (element) { + var elms = this._droppables; + for (var i = 0, len = elms.length; i < len; i++) { + if (elms[i].element === element) { + return elms[i]; + } + } + }, + /** + * Finds draggable data about `element` + * + * @method _findDraggable + * @param {DOMElement} element Needle + * @return {Object} Draggable data queried + * @private + */ + _findDraggable: function (element) { + var elms = this._draggables; + for (var i = 0, len = elms.length; i < len; i++) { + if (elms[i].element === element) { + return elms[i]; + } + } + }, + + /** + * Invoke every time a drag starts + * + * @method updateAll + * @private + */ + updateAll: function() { + InkArray.each(this._droppables, Droppable._update); + }, + + /** + * Updates location and size of droppable element + * + * @method update + * @param {String|DOMElement} element Target element + * @public + */ + update: function(element) { + this._update(this._findData(element)); + }, + + _update: function(elementData) { + var data = elementData.data; + var element = elementData.element; + data.left = InkElement.offsetLeft(element); + data.top = InkElement.offsetTop( element); + data.right = data.left + InkElement.elementWidth( element); + data.bottom = data.top + InkElement.elementHeight(element); + }, + + /** + * Removes an element from the droppable stack and removes the droppable behavior + * + * @method remove + * @param {String|DOMElement} elOrSelector Droppable element to disable. + * @return {Boolean} Whether the object was found and deleted + * @public + */ + remove: function(el) { + el = Common.elOrSelector(el); + var len = this._droppables.length; + for (var i = 0; i < len; i++) { + if (this._droppables[i].element === el) { + this._droppables.splice(i, 1); + break; + } + } + return len !== this._droppables.length; + }, + + /** + * Executes an action on a droppable + * + * @method action + * @param {Object} coords Coordinates where the action happened + * @param {String} type Type of action. 'drag' or 'drop'. + * @param {Object} ev Event object + * @param {Object} draggable Draggable element + * @private + */ + action: function(coords, type, ev, draggable) { + // check all droppable elements + InkArray.each(this._droppables, Ink.bind(function(elementData) { + var data = elementData.data; + var opt = elementData.options; + var element = elementData.element; + + if (opt.accept && !Selector.matches(opt.accept, [draggable]).length) { + return; + } + + if (type === 'drag' && !this._findDraggable(draggable)) { + this._draggables.push({ + element: draggable, + originalParent: draggable.parentNode + }); + } + + // check if our draggable is over our droppable + if (coords.x >= data.left && coords.x <= data.right && + coords.y >= data.top && coords.y <= data.bottom) { + // INSIDE + if (type === 'drag') { + if (opt.hoverClass) { + InkArray.each(opt.hoverClass, + hAddClassName(element)); + } + if (opt.onHover) { + opt.onHover(draggable, element); + } + } else if (type === 'drop') { + if (opt.hoverClass) { + InkArray.each(opt.hoverClass, + hRemoveClassName(element)); + } + if (opt.onDrop) { + opt.onDrop(draggable, element, ev); + } + } + } else { + // OUTSIDE + + if (type === 'drag' && opt.hoverClass) { + InkArray.each(opt.hoverClass, hRemoveClassName(element)); + } else if (type === 'drop') { + if(opt.onDropOut){ + opt.onDropOut(draggable, element, ev); + } + } + } + }, this)); + } + }; + + return Droppable; +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.droppable.min.js b/ajax/libs/ink/3.0.0/js/ink.droppable.min.js new file mode 100644 index 000000000..6c815b146 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.droppable.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Droppable","1",["Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.UI.Common_1","Ink.Util.Array_1","Ink.Dom.Selector_1"],function(e,o,n,t,r,a){"use strict";var i=function(e){return function(o){return n.addClassName(e,o)}},s=function(e){return function(o){return n.removeClassName(e,o)}},p={debug:!1,_droppables:[],_draggables:[],add:function(o,n){function r(e){e.style.position="inherit"}o=t.elOrSelector(o,"Droppable.add target element");var a=Ink.extendObj({hoverClass:n.hoverclass||!1,accept:!1,onHover:!1,onDrop:!1,onDropOut:!1},n||{},e.data(o));"string"==typeof a.hoverClass&&(a.hoverClass=a.hoverClass.split(/\s+/));var i,s=this,p={move:function(e,o){r(e),o.appendChild(e)},copy:function(e,o){r(e),o.appendChild(e.cloneNode)},revert:function(e){s._findDraggable(e).originalParent.appendChild(e),r(e)}};if("string"==typeof a.onHover&&(i=a.onHover,a.onHover=p[i],void 0===a.onHover))throw new Error("Unknown hover event handler: "+i);if("string"==typeof a.onDrop&&(i=a.onDrop,a.onDrop=p[i],void 0===a.onDrop))throw new Error("Unknown drop event handler: "+i);if("string"==typeof a.onDropOut&&(i=a.onDropOut,a.onDropOut=p[i],void 0===a.onDropOut))throw new Error("Unknown dropOut event handler: "+i);var l={element:o,data:{},options:a};this._droppables.push(l),this._update(l)},_findData:function(e){for(var o=this._droppables,n=0,t=o.length;t>n;n++)if(o[n].element===e)return o[n]},_findDraggable:function(e){for(var o=this._draggables,n=0,t=o.length;t>n;n++)if(o[n].element===e)return o[n]},updateAll:function(){r.each(this._droppables,p._update)},update:function(e){this._update(this._findData(e))},_update:function(o){var n=o.data,t=o.element;n.left=e.offsetLeft(t),n.top=e.offsetTop(t),n.right=n.left+e.elementWidth(t),n.bottom=n.top+e.elementHeight(t)},remove:function(e){e=t.elOrSelector(e);for(var o=this._droppables.length,n=0;o>n;n++)if(this._droppables[n].element===e){this._droppables.splice(n,1);break}return o!==this._droppables.length},action:function(e,o,n,t){r.each(this._droppables,Ink.bind(function(p){var l=p.data,d=p.options,h=p.element;(!d.accept||a.matches(d.accept,[t]).length)&&("drag"!==o||this._findDraggable(t)||this._draggables.push({element:t,originalParent:t.parentNode}),e.x>=l.left&&e.x<=l.right&&e.y>=l.top&&e.y<=l.bottom?"drag"===o?(d.hoverClass&&r.each(d.hoverClass,i(h)),d.onHover&&d.onHover(t,h)):"drop"===o&&(d.hoverClass&&r.each(d.hoverClass,s(h)),d.onDrop&&d.onDrop(t,h,n)):"drag"===o&&d.hoverClass?r.each(d.hoverClass,s(h)):"drop"===o&&d.onDropOut&&d.onDropOut(t,h,n))},this))}};return p}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.formvalidator-2.js b/ajax/libs/ink/3.0.0/js/ink.formvalidator-2.js new file mode 100644 index 000000000..0f311549e --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.formvalidator-2.js @@ -0,0 +1,928 @@ +/** + * @module Ink.UI.FormValidator_2 + * Form Validation + * @version 2 + */ + +Ink.createModule('Ink.UI.FormValidator', '2', [ 'Ink.UI.Common_1','Ink.Dom.Element_1','Ink.Dom.Event_1','Ink.Dom.Selector_1','Ink.Dom.Css_1','Ink.Util.Array_1','Ink.Util.I18n_1','Ink.Util.Validator_1'], function( Common, Element, Event, Selector, Css, InkArray, I18n, InkValidator ) { + 'use strict'; + + /** + * Validation Functions to be used + * Some functions are a port from PHP, others are the 'best' solutions available + * + * @private + * @static + */ + var validationFunctions = { + + /** + * Checks if a value is defined and not empty + * @method required + * @param {String} value Value to be checked + * @return {Boolean} True case is defined, false if it's empty or not defined. + */ + 'required': function( value ){ + return ( (typeof value !== 'undefined') && ( !(/^\s*$/).test(value) ) ); + }, + + /** + * Checks if a value has a minimum length + * + * @method min_length + * @param {String} value Value to be checked. + * @param {String|Number} minSize Minimum number of characters. + * @return {Boolean} True if the length of value is equal or bigger than the minimum chars defined. False if not. + */ + 'min_length': function( value, minSize ){ + return ( (typeof value === 'string') && ( value.length >= parseInt(minSize,10) ) ); + }, + + /** + * Checks if a value has a maximum length + * + * @method max_length + * @param {String} value Value to be checked. + * @param {String|Number} maxSize Maximum number of characters. + * @return {Boolean} True if the length of value is equal or smaller than the maximum chars defined. False if not. + */ + 'max_length': function( value, maxSize ){ + return ( (typeof value === 'string') && ( value.length <= parseInt(maxSize,10) ) ); + }, + + /** + * Checks if a value has an exact length + * + * @method exact_length + * @param {String} value Value to be checked + * @param {String|Number} exactSize Exact number of characters. + * @return {Boolean} True if the length of value is equal to the size defined. False if not. + */ + 'exact_length': function( value, exactSize ){ + return ( (typeof value === 'string') && ( value.length === parseInt(exactSize,10) ) ); + }, + + /** + * Checks if a value is a valid email address + * + * @method email + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid email address. False if not. + */ + 'email': function( value ){ + return ( ( typeof value === 'string' ) && InkValidator.mail( value ) ); + }, + + /** + * Checks if a value has a valid URL + * + * @method url + * @param {String} value Value to be checked + * @param {Boolean} fullCheck Flag to validate a full url (with the protocol). + * @return {Boolean} True if the URL is considered valid. False if not. + */ + 'url': function( value, fullCheck ){ + fullCheck = fullCheck || false; + return ( (typeof value === 'string') && InkValidator.url( value, fullCheck ) ); + }, + + /** + * Checks if a value is a valid IP. Supports ipv4 and ipv6 + * + * @method ip + * @param {String} value Value to be checked + * @param {String} ipType Type of IP to be validated. The values are: ipv4, ipv6. By default is ipv4. + * @return {Boolean} True if the value is a valid IP address. False if not. + */ + 'ip': function( value, ipType ){ + if( typeof value !== 'string' ){ + return false; + } + + return InkValidator.isIP(value, ipType); + }, + + /** + * Checks if a value is a valid phone number. + * Supports several countries, based in the Ink.Util.Validator class. + * + * @method phone + * @param {String} value Value to be checked + * @param {String} phoneType Country's initials to specify the type of phone number to be validated. Ex: 'AO'. + * @return {Boolean} True if it's a valid phone number. False if not. + */ + 'phone': function( value, phoneType ){ + if( typeof value !== 'string' ){ + return false; + } + + var countryCode = phoneType ? phoneType.toUpperCase() : ''; + + return InkValidator['is' + countryCode + 'Phone'](value); + }, + + /** + * Checks if a value is a valid credit card. + * + * @method credit_card + * @param {String} value Value to be checked + * @param {String} cardType Type of credit card to be validated. The card types available are in the Ink.Util.Validator class. + * @return {Boolean} True if the value is a valid credit card number. False if not. + */ + 'credit_card': function( value, cardType ){ + if( typeof value !== 'string' ){ + return false; + } + + return InkValidator.isCreditCard( value, cardType || 'default' ); + }, + + /** + * Checks if a value is a valid date. + * + * @method date + * @param {String} value Value to be checked + * @param {String} format Specific format of the date. + * @return {Boolean} True if the value is a valid date. False if not. + */ + 'date': function( value, format ){ + return ( (typeof value === 'string' ) && InkValidator.isDate(format, value) ); + }, + + /** + * Checks if a value only contains alphabetical values. + * + * @method alpha + * @param {String} value Value to be checked + * @param {Boolean} supportSpaces Allow whitespace + * @return {Boolean} True if the value is alphabetical-only. False if not. + */ + 'alpha': function( value, supportSpaces ){ + return InkValidator.ascii(value, {singleLineWhitespace: supportSpaces}); + }, + + /* + * Checks if a value contains only printable BMP unicode characters + * Optionally allow punctuation and whitespace + * + * @method text + * @param {String} value Value to be checked + * @return {Boolean} Whether the value only contains printable text characters + **/ + 'text': function (value, whitespace, punctuation) { + return InkValidator.unicode(value, { + singleLineWhitespace: whitespace, + unicodePunctuation: punctuation}); + }, + + /* + * Checks if a value contains only printable latin-1 text characters. + * Optionally allow punctuation and whitespace. + * + * @method text + * @param {String} value Value to be checked + * @return {Boolean} Whether the value only contains printable text characters + **/ + 'latin': function (value, punctuation, whitespace) { + if ( typeof value !== 'string') { return false; } + return InkValidator.latin1(value, {latin1Punctuation: punctuation, singleLineWhitespace: whitespace}); + }, + + /** + * Checks if a value contains only alphabetical or numerical characters. + * + * @method alpha_numeric + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid alphanumerical. False if not. + */ + 'alpha_numeric': function( value ){ + return InkValidator.ascii(value, {numbers: true}); + }, + + /** + * Checks if a value contains only alphabetical, dash or underscore characteres. + * + * @method alpha_dashes + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid. False if not. + */ + 'alpha_dash': function( value ){ + return InkValidator.ascii(value, {dash: true, underscore: true}); + }, + + /** + * Checks if a value is a single digit. + * + * @method digit + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid digit. False if not. + */ + 'digit': function( value ){ + return ((typeof value === 'string') && /^[0-9]{1}$/.test(value)); + }, + + /** + * Checks if a value is a valid integer. + * + * @method integer + * @param {String} value Value to be checked + * @param {String} positive Flag that specifies if the integer is must be positive (unsigned). + * @return {Boolean} True if the value is a valid integer. False if not. + */ + 'integer': function( value, positive ){ + return InkValidator.number(value, { + negative: !positive, + decimalPlaces: 0 + }); + }, + + /** + * Checks if a value is a valid decimal number. + * + * @method decimal + * @param {String} value Value to be checked + * @param {String} decimalSeparator Character that splits the integer part from the decimal one. By default is '.'. + * @param {String} [decimalPlaces] Maximum number of digits that the decimal part must have. + * @param {String} [leftDigits] Maximum number of digits that the integer part must have, when provided. + * @return {Boolean} True if the value is a valid decimal number. False if not. + */ + 'decimal': function( value, decimalSeparator, decimalPlaces, leftDigits ){ + return InkValidator.number(value, { + decimalSep: decimalSeparator || '.', + decimalPlaces: +decimalPlaces || null, + maxDigits: +leftDigits + }); + }, + + /** + * Checks if a value is a numeric value. + * + * @method numeric + * @param {String} value Value to be checked + * @param {String} decimalSeparator Checks if it's a valid decimal. Otherwise checks if it's a valid integer. + * @param {String} [decimalPlaces] Maximum number of digits the decimal part must have. + * @param {String} [leftDigits] Maximum number of digits the integer part must have, when provided. + * @return {Boolean} True if the value is numeric. False if not. + */ + 'numeric': function( value, decimalSeparator, decimalPlaces, leftDigits ){ + decimalSeparator = decimalSeparator || '.'; + if( value.indexOf(decimalSeparator) !== -1 ){ + return validationFunctions.decimal( value, decimalSeparator, decimalPlaces, leftDigits ); + } else { + return validationFunctions.integer( value ); + } + }, + + /** + * Checks if a value is in a specific range of values. + * The parameters after the first one are used to specify the range, and are similar in function to python's range() function. + * + * @method range + * @param {String} value Value to be checked + * @param {String} minValue Left limit of the range. + * @param {String} maxValue Right limit of the range. + * @param {String} [multipleOf] In case you want numbers that are only multiples of another number. + * @return {Boolean} True if the value is within the range. False if not. + */ + 'range': function( value, minValue, maxValue, multipleOf ){ + value = +value; + minValue = +minValue; + maxValue = +maxValue; + + if (isNaN(value) || isNaN(minValue) || isNaN(maxValue)) { + return false; + } + + if( value < minValue || value > maxValue ){ + return false; + } + + if (multipleOf) { + return (value - minValue) % multipleOf === 0; + } else { + return true; + } + }, + + /** + * Checks if a value is a valid color. + * + * @method color + * @param {String} value Value to be checked + * @return {Boolean} True if the value is a valid color. False if not. + */ + 'color': function( value ){ + return InkValidator.isColor(value); + }, + + /** + * Checks if a value matches the value of a different field. + * + * @method matches + * @param {String} value Value to be checked + * @param {String} fieldToCompare Name or ID of the field to compare. + * @return {Boolean} True if the values match. False if not. + */ + 'matches': function( value, fieldToCompare ){ + return ( value === this.getFormElements()[fieldToCompare][0].getValue() ); + } + + }; + + /** + * Error messages for the validation functions above + * @private + * @static + */ + var validationMessages = new I18n({ + en_US: { + 'formvalidator.required' : 'The {field} filling is mandatory', + 'formvalidator.min_length': 'The {field} must have a minimum size of {param1} characters', + 'formvalidator.max_length': 'The {field} must have a maximum size of {param1} characters', + 'formvalidator.exact_length': 'The {field} must have an exact size of {param1} characters', + 'formvalidator.email': 'The {field} must have a valid e-mail address', + 'formvalidator.url': 'The {field} must have a valid URL', + 'formvalidator.ip': 'The {field} does not contain a valid {param1} IP address', + 'formvalidator.phone': 'The {field} does not contain a valid {param1} phone number', + 'formvalidator.credit_card': 'The {field} does not contain a valid {param1} credit card', + 'formvalidator.date': 'The {field} should contain a date in the {param1} format', + 'formvalidator.alpha': 'The {field} should only contain letters', + 'formvalidator.text': 'The {field} should only contain alphabetic characters', + 'formvalidator.latin': 'The {field} should only contain alphabetic characters', + 'formvalidator.alpha_numeric': 'The {field} should only contain letters or numbers', + 'formvalidator.alpha_dashes': 'The {field} should only contain letters or dashes', + 'formvalidator.digit': 'The {field} should only contain a digit', + 'formvalidator.integer': 'The {field} should only contain an integer', + 'formvalidator.decimal': 'The {field} should contain a valid decimal number', + 'formvalidator.numeric': 'The {field} should contain a number', + 'formvalidator.range': 'The {field} should contain a number between {param1} and {param2}', + 'formvalidator.color': 'The {field} should contain a valid color', + 'formvalidator.matches': 'The {field} should match the field {param1}', + 'formvalidator.validation_function_not_found': 'The rule {rule} has not been defined' + }, + pt_PT: { + 'formvalidator.required' : 'Preencher {field} é obrigatório', + 'formvalidator.min_length': '{field} deve ter no mínimo {param1} caracteres', + 'formvalidator.max_length': '{field} tem um tamanho máximo de {param1} caracteres', + 'formvalidator.exact_length': '{field} devia ter exactamente {param1} caracteres', + 'formvalidator.email': '{field} deve ser um e-mail válido', + 'formvalidator.url': 'O {field} deve ser um URL válido', + 'formvalidator.ip': '{field} não tem um endereço IP {param1} válido', + 'formvalidator.phone': '{field} deve ser preenchido com um número de telefone {param1} válido.', + 'formvalidator.credit_card': '{field} não tem um cartão de crédito {param1} válido', + 'formvalidator.date': '{field} deve conter uma data no formato {param1}', + 'formvalidator.alpha': 'O campo {field} deve conter apenas caracteres alfabéticos', + 'formvalidator.text': 'O campo {field} deve conter apenas caracteres alfabéticos', + 'formvalidator.latin': 'O campo {field} deve conter apenas caracteres alfabéticos', + 'formvalidator.alpha_numeric': '{field} deve conter apenas letras e números', + 'formvalidator.alpha_dashes': '{field} deve conter apenas letras e traços', + 'formvalidator.digit': '{field} destina-se a ser preenchido com apenas um dígito', + 'formvalidator.integer': '{field} deve conter um número inteiro', + 'formvalidator.decimal': '{field} deve conter um número válido', + 'formvalidator.numeric': '{field} deve conter um número válido', + 'formvalidator.range': '{field} deve conter um número entre {param1} e {param2}', + 'formvalidator.color': '{field} deve conter uma cor válida', + 'formvalidator.matches': '{field} deve corresponder ao campo {param1}', + 'formvalidator.validation_function_not_found': '[A regra {rule} não foi definida]' + } + }, 'en_US'); + + /** + * Constructor of a FormElement. + * This type of object has particular methods to parse rules and validate them in a specific DOM Element. + * + * @param {DOMElement} element DOM Element + * @param {Object} options Object with configuration options + * @return {FormElement} FormElement object + */ + var FormElement = function( element, options ){ + this._element = Common.elOrSelector( element, 'Invalid FormElement' ); + this._errors = {}; + this._rules = {}; + this._value = null; + + this._options = Ink.extendObj( { + label: this._getLabel() + }, Element.data(this._element) ); + + this._options = Ink.extendObj( this._options, options || {} ); + + }; + + /** + * FormElement's prototype + */ + FormElement.prototype = { + + /** + * Function to get the label that identifies the field. + * If it can't find one, it will use the name or the id + * (depending on what is defined) + * + * @method _getLabel + * @return {String} Label to be used in the error messages + * @private + */ + _getLabel: function(){ + + var controlGroup = Element.findUpwardsByClass(this._element,'control-group'); + var label = Ink.s('label',controlGroup); + if( label ){ + label = Element.textContent(label); + } else { + label = this._element.name || this._element.id || ''; + } + + return label; + }, + + /** + * Function to parse a rules' string. + * Ex: required|number|max_length[30] + * + * @method _parseRules + * @param {String} rules String with the rules + * @private + */ + _parseRules: function( rules ){ + this._rules = {}; + rules = rules.split("|"); + var i, rulesLength = rules.length, rule, params, paramStartPos ; + if( rulesLength > 0 ){ + for( i = 0; i < rulesLength; i++ ){ + rule = rules[i]; + if( !rule ){ + continue; + } + + if( ( paramStartPos = rule.indexOf('[') ) !== -1 ){ + params = rule.substr( paramStartPos+1 ); + params = params.split(']'); + params = params[0]; + params = params.split(','); + for (var p = 0, len = params.length; p < len; p++) { + params[p] = + params[p] === 'true' ? true : + params[p] === 'false' ? false : + params[p]; + } + params.splice(0,0,this.getValue()); + + rule = rule.substr(0,paramStartPos); + + this._rules[rule] = params; + } else { + this._rules[rule] = [this.getValue()]; + } + } + } + }, + + /** + * Function to add an error to the FormElement's 'errors' object. + * It basically receives the rule where the error occurred, the parameters passed to it (if any) + * and the error message. + * Then it replaces some tokens in the message for a more 'custom' reading + * + * @method _addError + * @param {String|null} rule Rule that failed, or null if no rule was found. + * @private + * @static + */ + _addError: function(rule){ + var params = this._rules[rule] || []; + + var paramObj = { + field: this._options.label, + value: this.getValue() + }; + + for( var i = 1; i < params.length; i++ ){ + paramObj['param' + i] = params[i]; + } + + var i18nKey = 'formvalidator.' + rule; + + this._errors[rule] = validationMessages.text(i18nKey, paramObj); + + if (this._errors[rule] === i18nKey) { + this._errors[rule] = 'Validation message not found'; + } + }, + + /** + * Gets an element's value + * + * @method getValue + * @return {mixed} The DOM Element's value + * @public + */ + getValue: function(){ + + switch(this._element.nodeName.toLowerCase()){ + case 'select': + return Ink.s('option:selected',this._element).value; + case 'textarea': + return this._element.innerHTML; + case 'input': + if( "type" in this._element ){ + if( (this._element.type === 'radio') && (this._element.type === 'checkbox') ){ + if( this._element.checked ){ + return this._element.value; + } + } else if( this._element.type !== 'file' ){ + return this._element.value; + } + } else { + return this._element.value; + } + return; + default: + return this._element.innerHTML; + } + }, + + /** + * Gets the constructed errors' object. + * + * @method getErrors + * @return {Object} Errors' object + * @public + */ + getErrors: function(){ + return this._errors; + }, + + /** + * Gets the DOM element related to the instance. + * + * @method getElement + * @return {Object} DOM Element + * @public + */ + getElement: function(){ + return this._element; + }, + + /** + * Gets other elements in the same form. + * + * @method getFormElements + * @return {Object} A mapping of keys to other elements in this form. + * @public + */ + getFormElements: function () { + return this._options.form._formElements; + }, + + /** + * Validates the element based on the rules defined. + * It parses the rules defined in the _options.rules property. + * + * @method validate + * @return {Boolean} True if every rule was valid. False if one fails. + * @public + */ + validate: function(){ + this._errors = {}; + + if( "rules" in this._options || 1){ + this._parseRules( this._options.rules ); + } + + if( ("required" in this._rules) || (this.getValue() !== '') ){ + for(var rule in this._rules) { + if (this._rules.hasOwnProperty(rule)) { + if( (typeof validationFunctions[rule] === 'function') ){ + if( validationFunctions[rule].apply(this, this._rules[rule] ) === false ){ + + this._addError( rule ); + return false; + + } + + } else { + + this._addError( null ); + return false; + } + } + } + } + + return true; + + } + }; + + + + /** + * @class Ink.UI.FormValidator_2 + * @version 2 + * @constructor + * @param {String|DOMElement} selector Either a CSS Selector string, or the form's DOMElement + * @param {String} [options.eventTrigger] Event that will trigger the validation. Defaults to 'submit'. + * @param {Boolean} [options.neverSubmit] Flag to cancel the submit event. Use this to avoid submitting the form. + * @param {Selector} [options.searchFor] Selector containing the validation data-attributes. Defaults to 'input, select, textarea, .control-group'. + * @param {Function} [options.beforeValidation] Callback to be executed before validating the form + * @param {Function} [options.onError] Validation error callback + * @param {Function} [options.onSuccess] Validation success callback + * + * @example + * Ink.requireModules( ['Ink.UI.FormValidator_2'], function( FormValidator ){ + * var myValidator = new FormValidator( '#my-form' ); + * }); + */ + var FormValidator = function( selector, options ){ + + /** + * DOMElement of the form being validated + * + * @property _rootElement + * @type {DOMElement} + */ + this._rootElement = Common.elOrSelector( selector ); + + /** + * Object that will gather the form elements by name + * + * @property _formElements + * @type {Object} + */ + this._formElements = {}; + + /** + * Error message DOMElements + * + * @property _errorMessages + */ + this._errorMessages = []; + + /** + * Array of elements marked with validation errors + * + * @property _markedErrorElements + */ + this._markedErrorElements = []; + + /** + * Configuration options. Fetches the data attributes first, then the ones passed when executing the constructor. + * By doing that, the latter will be the one with highest priority. + * + * @property _options + * @type {Object} + */ + this._options = Ink.extendObj({ + eventTrigger: 'submit', + neverSubmit: 'false', + searchFor: 'input, select, textarea, .control-group', + beforeValidation: undefined, + onError: undefined, + onSuccess: undefined + },Element.data(this._rootElement)); + + this._options = Ink.extendObj( this._options, options || {} ); + + // Sets an event listener for a specific event in the form, if defined. + // By default is the 'submit' event. + if( typeof this._options.eventTrigger === 'string' ){ + Event.observe( this._rootElement,this._options.eventTrigger, Ink.bindEvent(this.validate,this) ); + } + + this._init(); + }; + + /** + * Sets or modifies validation functions + * + * @method setRule + * @param {String} name Name of the function. E.g. 'required' + * @param {String} errorMessage Error message to be displayed in case of returning false. E.g. 'Oops, you passed {param1} as parameter1, lorem ipsum dolor...' + * @param {Function} cb Function to be executed when calling this rule + * @public + * @static + */ + FormValidator.setRule = function( name, errorMessage, cb ){ + validationFunctions[ name ] = cb; + if (validationMessages.getKey('formvalidator.' + name) !== errorMessage) { + var langObj = {}; langObj['formvalidator.' + name] = errorMessage; + var dictObj = {}; dictObj[validationMessages.lang()] = langObj; + validationMessages.append(dictObj); + } + }; + + /** + * Gets the i18n object in charge of the error messages + * + * @method getI18n + * @return {Ink.Util.I18n} The i18n object the FormValidator is using. + */ + FormValidator.getI18n = function () { + return validationMessages; + }; + + /** + * Sets the I18n object for validation error messages + * + * @method setI18n + * @param {Ink.Util.I18n} i18n The I18n object. + */ + FormValidator.setI18n = function (i18n) { + validationMessages = i18n; + }; + + /** + * Add to the I18n dictionary. + * See `Ink.Util.I18n.append()` documentation. + * + * @method AppendI18n + */ + FormValidator.appendI18n = function () { + validationMessages.append.apply(validationMessages, [].slice.call(arguments)); + }; + + /** + * Sets the language of the error messages. + * pt_PT and en_US are available, but you can add new languages by using append() + * + * See the `Ink.Util.I18n.lang()` setter + * + * @method setLanguage + * @param language The language to set i18n to. + */ + FormValidator.setLanguage = function (language) { + validationMessages.lang(language); + }; + + /** + * Method used to get the existing defined validation functions + * + * @method getRules + * @return {Object} Object with the rules defined + * @public + * @static + */ + FormValidator.getRules = function(){ + return validationFunctions; + }; + + FormValidator.prototype = { + _init: function(){ + + }, + + /** + * Searches for the elements in the form. + * This method is based in the this._options.searchFor configuration. + * + * @method getElements + * @return {Object} An object with the elements in the form, indexed by name/id + * @public + */ + getElements: function(){ + this._formElements = {}; + var formElements = Selector.select( this._options.searchFor, this._rootElement ); + if( formElements.length ){ + var i, element; + for( i=0; i'); + this._errorMessages.push(paragraph); + }, this)); + return false; + } + } + }; + + /** + * Returns the FormValidator's Object + */ + return FormValidator; + +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.formvalidator-2.min.js b/ajax/libs/ink/3.0.0/js/ink.formvalidator-2.min.js new file mode 100644 index 000000000..fa85b38e7 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.formvalidator-2.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.FormValidator","2",["Ink.UI.Common_1","Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Selector_1","Ink.Dom.Css_1","Ink.Util.Array_1","Ink.Util.I18n_1","Ink.Util.Validator_1"],function(e,t,r,n,i,a,o,l){"use strict";var s={required:function(e){return"undefined"!=typeof e&&!/^\s*$/.test(e)},min_length:function(e,t){return"string"==typeof e&&e.length>=parseInt(t,10)},max_length:function(e,t){return"string"==typeof e&&e.length<=parseInt(t,10)},exact_length:function(e,t){return"string"==typeof e&&e.length===parseInt(t,10)},email:function(e){return"string"==typeof e&&l.mail(e)},url:function(e,t){return t=t||!1,"string"==typeof e&&l.url(e,t)},ip:function(e,t){return"string"!=typeof e?!1:l.isIP(e,t)},phone:function(e,t){if("string"!=typeof e)return!1;var r=t?t.toUpperCase():"";return l["is"+r+"Phone"](e)},credit_card:function(e,t){return"string"!=typeof e?!1:l.isCreditCard(e,t||"default")},date:function(e,t){return"string"==typeof e&&l.isDate(t,e)},alpha:function(e,t){return l.ascii(e,{singleLineWhitespace:t})},text:function(e,t,r){return l.unicode(e,{singleLineWhitespace:t,unicodePunctuation:r})},latin:function(e,t,r){return"string"!=typeof e?!1:l.latin1(e,{latin1Punctuation:t,singleLineWhitespace:r})},alpha_numeric:function(e){return l.ascii(e,{numbers:!0})},alpha_dash:function(e){return l.ascii(e,{dash:!0,underscore:!0})},digit:function(e){return"string"==typeof e&&/^[0-9]{1}$/.test(e)},integer:function(e,t){return l.number(e,{negative:!t,decimalPlaces:0})},decimal:function(e,t,r,n){return l.number(e,{decimalSep:t||".",decimalPlaces:+r||null,maxDigits:+n})},numeric:function(e,t,r,n){return t=t||".",-1!==e.indexOf(t)?s.decimal(e,t,r,n):s.integer(e)},range:function(e,t,r,n){return e=+e,t=+t,r=+r,isNaN(e)||isNaN(t)||isNaN(r)?!1:t>e||e>r?!1:n?(e-t)%n===0:!0},color:function(e){return l.isColor(e)},matches:function(e,t){return e===this.getFormElements()[t][0].getValue()}},d=new o({en_US:{"formvalidator.required":"The {field} filling is mandatory","formvalidator.min_length":"The {field} must have a minimum size of {param1} characters","formvalidator.max_length":"The {field} must have a maximum size of {param1} characters","formvalidator.exact_length":"The {field} must have an exact size of {param1} characters","formvalidator.email":"The {field} must have a valid e-mail address","formvalidator.url":"The {field} must have a valid URL","formvalidator.ip":"The {field} does not contain a valid {param1} IP address","formvalidator.phone":"The {field} does not contain a valid {param1} phone number","formvalidator.credit_card":"The {field} does not contain a valid {param1} credit card","formvalidator.date":"The {field} should contain a date in the {param1} format","formvalidator.alpha":"The {field} should only contain letters","formvalidator.text":"The {field} should only contain alphabetic characters","formvalidator.latin":"The {field} should only contain alphabetic characters","formvalidator.alpha_numeric":"The {field} should only contain letters or numbers","formvalidator.alpha_dashes":"The {field} should only contain letters or dashes","formvalidator.digit":"The {field} should only contain a digit","formvalidator.integer":"The {field} should only contain an integer","formvalidator.decimal":"The {field} should contain a valid decimal number","formvalidator.numeric":"The {field} should contain a number","formvalidator.range":"The {field} should contain a number between {param1} and {param2}","formvalidator.color":"The {field} should contain a valid color","formvalidator.matches":"The {field} should match the field {param1}","formvalidator.validation_function_not_found":"The rule {rule} has not been defined"},pt_PT:{"formvalidator.required":"Preencher {field} é obrigatório","formvalidator.min_length":"{field} deve ter no mínimo {param1} caracteres","formvalidator.max_length":"{field} tem um tamanho máximo de {param1} caracteres","formvalidator.exact_length":"{field} devia ter exactamente {param1} caracteres","formvalidator.email":"{field} deve ser um e-mail válido","formvalidator.url":"O {field} deve ser um URL válido","formvalidator.ip":"{field} não tem um endereço IP {param1} válido","formvalidator.phone":"{field} deve ser preenchido com um número de telefone {param1} válido.","formvalidator.credit_card":"{field} não tem um cartão de crédito {param1} válido","formvalidator.date":"{field} deve conter uma data no formato {param1}","formvalidator.alpha":"O campo {field} deve conter apenas caracteres alfabéticos","formvalidator.text":"O campo {field} deve conter apenas caracteres alfabéticos","formvalidator.latin":"O campo {field} deve conter apenas caracteres alfabéticos","formvalidator.alpha_numeric":"{field} deve conter apenas letras e números","formvalidator.alpha_dashes":"{field} deve conter apenas letras e traços","formvalidator.digit":"{field} destina-se a ser preenchido com apenas um dígito","formvalidator.integer":"{field} deve conter um número inteiro","formvalidator.decimal":"{field} deve conter um número válido","formvalidator.numeric":"{field} deve conter um número válido","formvalidator.range":"{field} deve conter um número entre {param1} e {param2}","formvalidator.color":"{field} deve conter uma cor válida","formvalidator.matches":"{field} deve corresponder ao campo {param1}","formvalidator.validation_function_not_found":"[A regra {rule} não foi definida]"}},"en_US"),m=function(r,n){this._element=e.elOrSelector(r,"Invalid FormElement"),this._errors={},this._rules={},this._value=null,this._options=Ink.extendObj({label:this._getLabel()},t.data(this._element)),this._options=Ink.extendObj(this._options,n||{})};m.prototype={_getLabel:function(){var e=t.findUpwardsByClass(this._element,"control-group"),r=Ink.s("label",e);return r=r?t.textContent(r):this._element.name||this._element.id||""},_parseRules:function(e){this._rules={},e=e.split("|");var t,r,n,i,a=e.length;if(a>0)for(t=0;a>t;t++)if(r=e[t])if(-1!==(i=r.indexOf("["))){n=r.substr(i+1),n=n.split("]"),n=n[0],n=n.split(",");for(var o=0,l=n.length;l>o;o++)n[o]="true"===n[o]?!0:"false"===n[o]?!1:n[o];n.splice(0,0,this.getValue()),r=r.substr(0,i),this._rules[r]=n}else this._rules[r]=[this.getValue()]},_addError:function(e){for(var t=this._rules[e]||[],r={field:this._options.label,value:this.getValue()},n=1;n"),this._errorMessages.push(a)},this)),!1)}},f}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.formvalidator.js b/ajax/libs/ink/3.0.0/js/ink.formvalidator.js new file mode 100644 index 000000000..fdf70c4dd --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.formvalidator.js @@ -0,0 +1,650 @@ +/** + * @module Ink.UI.FormValidator_1 + * Form Validation + * @version 1 + **/ + +Ink.createModule('Ink.UI.FormValidator', '1', ['Ink.Dom.Element_1', 'Ink.Dom.Css_1','Ink.Util.Validator_1','Ink.Dom.Selector_1'], function( InkElement, Css, InkValidator , Selector) { + 'use strict'; + + function elementsWithSameName(elm) { + if (!elm.name) { return []; } + if (!elm.form) { + return Selector.select('name="' + elm.name + '"'); + } + var ret = elm.form[elm.name]; + if(typeof(ret.length) === 'undefined') { + ret = [ret]; + } + return ret; + } + /** + * @namespace Ink.UI.FormValidator + * @version 1 + */ + var FormValidator = { + + /** + * Specifies the version of the component + * + * @property version + * @type {String} + * @readOnly + * @public + */ + version: '1', + + /** + * Available flags to use in the validation process. + * The keys are the 'rules', and their values are objects with the key 'msg', determining + * what is the error message. + * + * @property _flagMap + * @type {Object} + * @readOnly + * @private + */ + _flagMap: { + //'ink-fv-required': {msg: 'Campo obrigatório'}, + 'ink-fv-required': {msg: 'Required field'}, + //'ink-fv-email': {msg: 'E-mail inválido'}, + 'ink-fv-email': {msg: 'Invalid e-mail address'}, + //'ink-fv-url': {msg: 'URL inválido'}, + 'ink-fv-url': {msg: 'Invalid URL'}, + //'ink-fv-number': {msg: 'Número inválido'}, + 'ink-fv-number': {msg: 'Invalid number'}, + //'ink-fv-phone_pt': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_pt': {msg: 'Invalid phone number'}, + //'ink-fv-phone_cv': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_cv': {msg: 'Invalid phone number'}, + //'ink-fv-phone_mz': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_mz': {msg: 'Invalid phone number'}, + //'ink-fv-phone_ao': {msg: 'Número de telefone inválido'}, + 'ink-fv-phone_ao': {msg: 'Invalid phone number'}, + //'ink-fv-date': {msg: 'Data inválida'}, + 'ink-fv-date': {msg: 'Invalid date'}, + //'ink-fv-confirm': {msg: 'Confirmação inválida'}, + 'ink-fv-confirm': {msg: 'Confirmation does not match'}, + 'ink-fv-custom': {msg: ''} + }, + + /** + * This property holds all form elements for later validation + * + * @property elements + * @type {Object} + * @public + */ + elements: {}, + + /** + * This property holds the objects needed to cross-check for the 'confirm' rule + * + * @property confirmElms + * @type {Object} + * @public + */ + confirmElms: {}, + + /** + * This property holds the previous elements in the confirmElms property, but with a + * true/false specifying if it has the class ink-fv-confirm. + * + * @property hasConfirm + * @type {Object} + */ + hasConfirm: {}, + + /** + * Defined class name to use in error messages label + * + * @property _errorClassName + * @type {String} + * @readOnly + * @private + */ + _errorClassName: 'tip error', + + /** + * @property _errorValidationClassName + * @type {String} + * @readOnly + * @private + */ + _errorValidationClassName: 'validaton', + + /** + * @property _errorTypeWarningClassName + * @type {String} + * @readOnly + * @private + */ + _errorTypeWarningClassName: 'warning', + + /** + * @property _errorTypeErrorClassName + * @type {String} + * @readOnly + * @private + */ + _errorTypeErrorClassName: 'error', + + /** + * Checks if a form is valid + * + * @method validate + * @param {DOMElement|String} elm DOM form element or form id + * @param {Object} options Configuration options + * @param {Function} [options.onSuccess] Callback to run when form is valid + * @param {Function} [options.onError] Callback to run when form is not valid + * @param {Array} [options.customFlag] Custom flags to use to validate form fields + * @public + * @return {Boolean} Whether the form is deemed valid or not. + * + * @sample Ink_UI_FormValidator_1.html + */ + validate: function(elm, options) { + this._free(); + + options = Ink.extendObj({ + onSuccess: false, + onError: false, + customFlag: false, + confirmGroup: [] + }, options || {}); + + if(typeof(elm) === 'string') { + elm = document.getElementById(elm); + } + if(elm === null){ + return false; + } + this.element = elm; + + if(typeof(this.element.id) === 'undefined' || this.element.id === null || this.element.id === '') { + // generate a random ID + // TODO ugly and potentially problematic, and you know Murphy's law. + this.element.id = 'ink-fv_randomid_'+(Math.round(Math.random() * 99999)); + } + + this.custom = options.customFlag; + + this.confirmGroup = options.confirmGroup; + + var fail = this._validateElements(); + + if(fail.length > 0) { + if(options.onError) { + options.onError(fail); + } else { + this._showError(elm, fail); + } + return false; + } else { + if(!options.onError) { + this._clearError(elm); + } + this._clearCache(); + if(options.onSuccess) { + options.onSuccess(); + } + return true; + } + + }, + + /** + * Resets previously generated validation errors + * + * @method reset + * @public + */ + reset: function() + { + this._clearError(); + this._clearCache(); + }, + + /** + * Cleans the object + * + * @method _free + * @private + */ + _free: function() + { + this.element = null; + //this.elements = []; + this.custom = false; + this.confirmGroup = false; + }, + + /** + * Cleans the properties responsible for caching + * + * @method _clearCache + * @private + */ + _clearCache: function() + { + this.element = null; + this.elements = []; + this.custom = false; + this.confirmGroup = false; + }, + + /** + * Gets the form elements and stores them in the caching properties + * + * @method _getElements + * @private + */ + _getElements: function() + { + //this.elements = []; + // if(typeof(this.elements[this.element.id]) !== 'undefined') { + // return; + // } + + var elements = this.elements[this.element.id] = []; + this.confirmElms[this.element.id] = []; + //console.log(this.element); + //console.log(this.element.elements); + var formElms = Selector.select(':input', this.element); + var curElm = false; + for(var i=0, totalElm = formElms.length; i < totalElm; i++) { + curElm = formElms[i]; + var type = (curElm.getAttribute('type') + '').toLowerCase(); + + if (type === 'radio' || type === 'checkbox') { + if(elements.length === 0 || + ( + curElm.getAttribute('type') !== elements[elements.length - 1].getAttribute('type') && + curElm.getAttribute('name') !== elements[elements.length - 1].getAttribute('name') + )) { + for(var flag in this._flagMap) { + if(Css.hasClassName(curElm, flag)) { + elements.push(curElm); + break; + } + } + } + } else { + for(var flag2 in this._flagMap) { + if(Css.hasClassName(curElm, flag2) && flag2 !== 'ink-fv-confirm') { + /*if(flag2 == 'ink-fv-confirm') { + this.confirmElms[this.element.id].push(curElm); + this.hasConfirm[this.element.id] = true; + }*/ + elements.push(curElm); + break; + } + } + + if(Css.hasClassName(curElm, 'ink-fv-confirm')) { + this.confirmElms[this.element.id].push(curElm); + this.hasConfirm[this.element.id] = true; + } + + } + } + }, + + /** + * Runs the validation for each element + * + * @method _validateElements + * @private + */ + _validateElements: function() { + var oGroups; + this._getElements(); + if(this.hasConfirm[this.element.id] === true) { + oGroups = this._makeConfirmGroups(); + } + + var errors = []; + + var curElm = false; + var customErrors = false; + var inArray; + for(var i=0, totalElm = this.elements[this.element.id].length; i < totalElm; i++) { + inArray = false; + curElm = this.elements[this.element.id][i]; + + if(!curElm.disabled) { + for(var flag in this._flagMap) { + if(Css.hasClassName(curElm, flag)) { + if(flag !== 'ink-fv-custom' && flag !== 'ink-fv-confirm') { + if(!this._isValid(curElm, flag)) { + if(!inArray) { + errors.push({elm: curElm, errors:[flag]}); + inArray = true; + } else { + errors[(errors.length - 1)].errors.push(flag); + } + } + } else if(flag !== 'ink-fv-confirm'){ + customErrors = this._isCustomValid(curElm); + if(customErrors.length > 0) { + errors.push({elm: curElm, errors:[flag], custom: customErrors}); + } + } else if(flag === 'ink-fv-confirm'){ + continue; + } + } + } + } + } + errors = this._validateConfirmGroups(oGroups, errors); + //console.log(InkDumper.returnDump(errors)); + return errors; + }, + + /** + * Runs the 'confirm' validation for each group of elements + * + * @method _validateConfirmGroups + * @param {Array} oGroups Array/Object that contains the group of confirm objects + * @param {Array} errors Array that will store the errors + * @private + * @return {Array} Array of errors that was passed as 2nd parameter (either changed, or not, depending if errors were found). + */ + _validateConfirmGroups: function(oGroups, errors) { + //console.log(oGroups); + var curGroup = false; + for(var i in oGroups) if (oGroups.hasOwnProperty(i)) { + curGroup = oGroups[i]; + if(curGroup.length === 2) { + if(curGroup[0].value !== curGroup[1].value) { + errors.push({elm:curGroup[1], errors:['ink-fv-confirm']}); + } + } + } + return errors; + }, + + /** + * Creates the groups of 'confirm' objects + * + * @method _makeConfirmGroups + * @private + * @return {Array|Boolean} Returns the array of confirm elements or false on error. + */ + _makeConfirmGroups: function() + { + var oGroups; + if(this.confirmGroup && this.confirmGroup.length > 0) { + oGroups = {}; + var curElm = false; + var curGroup = false; + //this.confirmElms[this.element.id]; + for(var i=0, total=this.confirmElms[this.element.id].length; i < total; i++) { + curElm = this.confirmElms[this.element.id][i]; + for(var j=0, totalG=this.confirmGroup.length; j < totalG; j++) { + curGroup = this.confirmGroup[j]; + if(Css.hasClassName(curElm, curGroup)) { + if(typeof(oGroups[curGroup]) === 'undefined') { + oGroups[curGroup] = [curElm]; + } else { + oGroups[curGroup].push(curElm); + } + } + } + } + return oGroups; + } else { + if(this.confirmElms[this.element.id].length === 2) { + oGroups = { + "ink-fv-confirm": [ + this.confirmElms[this.element.id][0], + this.confirmElms[this.element.id][1] + ] + }; + } + return oGroups; + } + return false; + }, + + /** + * Validates an element with a custom validation + * + * @method _isCustomValid + * @param {DOMElemenmt} elm Element to be validated + * @private + * @return {Array} Array of errors. If no errors are found, results in an empty array. + */ + _isCustomValid: function(elm) + { + var customErrors = []; + var curFlag = false; + for(var i=0, tCustom = this.custom.length; i < tCustom; i++) { + curFlag = this.custom[i]; + if(Css.hasClassName(elm, curFlag.flag)) { + if(!curFlag.callback(elm, curFlag.msg)) { + customErrors.push({flag: curFlag.flag, msg: curFlag.msg}); + } + } + } + return customErrors; + }, + + /** + * Runs the normal validation functions for a specific element + * + * @method _isValid + * @param {DOMElement} elm DOMElement that will be validated + * @param {String} fieldType Rule to be validated. This must be one of the keys present in the _flagMap property. + * @private + * @return {Boolean} The result of the validation. + */ + _isValid: function(elm, fieldType) { + var nodeName = elm.nodeName.toLowerCase(); + var inputType = (elm.getAttribute('type') || '').toLowerCase(); + var value = this._trim(elm.value); + + // When we're analyzing emails, telephones, etc, and the field is + // empty, we check if it is required. If not required, it's valid. + if (fieldType !== 'ink-fv-required' && + inputType !== 'checkbox' && inputType !== 'radio' && + value === '') { + return !Css.hasClassName(elm, 'ink-fv-required'); + } + + switch(fieldType) { + case 'ink-fv-required': + if(nodeName === 'select') { + if(elm.selectedIndex > 0) { + return true; + } else { + return false; + } + } + if(inputType !== 'checkbox' && inputType !== 'radio' && + value !== '') { + return true; // A input type=text,email,etc. + } else if(inputType === 'checkbox' || inputType === 'radio') { + var aFormRadios = elementsWithSameName(elm); + var isChecked = false; + // check if any input of the radio is checked + for(var i=0, totalRadio = aFormRadios.length; i < totalRadio; i++) { + if(aFormRadios[i].checked === true) { + isChecked = true; + break; + } + } + return isChecked; + } + return false; + + case 'ink-fv-email': + return InkValidator.mail(elm.value); + + case 'ink-fv-url': + return InkValidator.url(elm.value); + + case 'ink-fv-number': + return !isNaN(Number(elm.value)) && isFinite(Number(elm.value)); + + case 'ink-fv-phone_pt': + return InkValidator.isPTPhone(elm.value); + + case 'ink-fv-phone_cv': + return InkValidator.isCVPhone(elm.value); + + case 'ink-fv-phone_ao': + return InkValidator.isAOPhone(elm.value); + + case 'ink-fv-phone_mz': + return InkValidator.isMZPhone(elm.value); + + case 'ink-fv-date': + var Element = Ink.getModule('Ink.Dom.Element',1); + var dataset = Element.data( elm ); + var validFormat = 'yyyy-mm-dd'; + + if( Css.hasClassName(elm, 'ink-datepicker') && ('format' in dataset) ){ + validFormat = dataset.format; + } else if( ('validFormat' in dataset) ){ + validFormat = dataset.validFormat; + } + + if( !(validFormat in InkValidator._dateParsers ) ){ + var validValues = []; + for( var val in InkValidator._dateParsers ){ + if (InkValidator._dateParsers.hasOwnProperty(val)) { + validValues.push(val); + } + } + throw new Error( + 'The attribute data-valid-format must be one of ' + + 'the following values: ' + validValues.join(', ')); + } + + return InkValidator.isDate( validFormat, elm.value ); + case 'ink-fv-custom': + break; + } + + return false; + }, + + /** + * Makes the necessary changes to the markup to show the errors of a given element + * + * @method _showError + * @param {DOMElement} formElm The form element to be changed to show the errors + * @param {Array} aFail An array with the errors found. + * @private + */ + _showError: function(formElm, aFail) { + this._clearError(formElm); + + //ink-warning-field + + //console.log(aFail); + var curElm = false; + for(var i=0, tFail = aFail.length; i < tFail; i++) { + curElm = aFail[i].elm; + if (curElm) { + this._showAnErrorOnElement(curElm, aFail[i]); + } + } + }, + + _showAnErrorOnElement: function (curElm, error) { + /* jshint noempty:false */ + + var controlGroupElm = InkElement.findUpwardsByClass( + curElm, 'control-group'); + var controlElm = InkElement.findUpwardsByClass( + curElm, 'control'); + + var errorClasses = [ + this._errorClassName, + this._errorTypeClassName].join(' '); + + var errorMsg = InkElement.create('p', { + className: errorClasses + }); + + if(error.errors[0] !== 'ink-fv-custom') { + errorMsg.innerHTML = this._flagMap[error.errors[0]].msg; + } else { + errorMsg.innerHTML = error.custom[0].msg; + } + + var target = (controlElm || controlGroupElm); + if (target) { + target.appendChild(errorMsg); + } else { + InkElement.insertAfter(errorMsg, curElm); + } + + if (controlElm) { + if(error.errors[0] === 'ink-fv-required') { + Css.addClassName(controlGroupElm, 'validation error'); + } else { + Css.addClassName(controlGroupElm, 'validation warning'); + } + } + }, + + /** + * Clears the error of a given element. Normally executed before any validation, for all elements, as a reset. + * + * @method _clearErrors + * @param {DOMElement} formElm Form element to be cleared. + * @private + */ + _clearError: function(formElm) { + //return; + var aErrorLabel = formElm.getElementsByTagName('p'); + + var curElm; + var control; + + for(var i = (aErrorLabel.length - 1); i >= 0; i--) { + curElm = aErrorLabel[i]; + if(Css.hasClassName(curElm, this._errorClassName)) { + control = InkElement.findUpwardsBySelector(curElm, '.control-group'); + if (control) { + Css.removeClassName(control, ['validation', 'error', 'warning']); + } + + if(Css.hasClassName(curElm, this._errorClassName, true /*both*/)) { + InkElement.remove(curElm); + } + } + } + + var aErrorLabel2 = formElm.getElementsByTagName('ul'); + for(i = (aErrorLabel2.length - 1); i >= 0; i--) { + curElm = aErrorLabel2[i]; + if(Css.hasClassName(curElm, 'control-group')) { + Css.removeClassName(curElm, 'validation error'); + } + } + }, + + /** + * Removes unnecessary spaces to the left or right of a string + * + * @method _trim + * @param {String} stri String to be trimmed + * @private + * @return {String|undefined} String trimmed. + */ + _trim: function(str) + { + if(typeof(str) === 'string') + { + return str.replace(/^\s+|\s+$|\n+$/g, ''); + } + } + }; + + return FormValidator; + +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.formvalidator.min.js b/ajax/libs/ink/3.0.0/js/ink.formvalidator.min.js new file mode 100644 index 000000000..b8e51911d --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.formvalidator.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.FormValidator","1",["Ink.Dom.Element_1","Ink.Dom.Css_1","Ink.Util.Validator_1","Ink.Dom.Selector_1"],function(e,r,n,i){"use strict";function t(e){if(!e.name)return[];if(!e.form)return i.select('name="'+e.name+'"');var r=e.form[e.name];return"undefined"==typeof r.length&&(r=[r]),r}var s={version:"1",_flagMap:{"ink-fv-required":{msg:"Required field"},"ink-fv-email":{msg:"Invalid e-mail address"},"ink-fv-url":{msg:"Invalid URL"},"ink-fv-number":{msg:"Invalid number"},"ink-fv-phone_pt":{msg:"Invalid phone number"},"ink-fv-phone_cv":{msg:"Invalid phone number"},"ink-fv-phone_mz":{msg:"Invalid phone number"},"ink-fv-phone_ao":{msg:"Invalid phone number"},"ink-fv-date":{msg:"Invalid date"},"ink-fv-confirm":{msg:"Confirmation does not match"},"ink-fv-custom":{msg:""}},elements:{},confirmElms:{},hasConfirm:{},_errorClassName:"tip error",_errorValidationClassName:"validaton",_errorTypeWarningClassName:"warning",_errorTypeErrorClassName:"error",validate:function(e,r){if(this._free(),r=Ink.extendObj({onSuccess:!1,onError:!1,customFlag:!1,confirmGroup:[]},r||{}),"string"==typeof e&&(e=document.getElementById(e)),null===e)return!1;this.element=e,("undefined"==typeof this.element.id||null===this.element.id||""===this.element.id)&&(this.element.id="ink-fv_randomid_"+Math.round(99999*Math.random())),this.custom=r.customFlag,this.confirmGroup=r.confirmGroup;var n=this._validateElements();return n.length>0?(r.onError?r.onError(n):this._showError(e,n),!1):(r.onError||this._clearError(e),this._clearCache(),r.onSuccess&&r.onSuccess(),!0)},reset:function(){this._clearError(),this._clearCache()},_free:function(){this.element=null,this.custom=!1,this.confirmGroup=!1},_clearCache:function(){this.element=null,this.elements=[],this.custom=!1,this.confirmGroup=!1},_getElements:function(){var e=this.elements[this.element.id]=[];this.confirmElms[this.element.id]=[];for(var n=i.select(":input",this.element),t=!1,s=0,a=n.length;a>s;s++){t=n[s];var o=(t.getAttribute("type")+"").toLowerCase();if("radio"===o||"checkbox"===o){if(0===e.length||t.getAttribute("type")!==e[e.length-1].getAttribute("type")&&t.getAttribute("name")!==e[e.length-1].getAttribute("name"))for(var l in this._flagMap)if(r.hasClassName(t,l)){e.push(t);break}}else{for(var m in this._flagMap)if(r.hasClassName(t,m)&&"ink-fv-confirm"!==m){e.push(t);break}r.hasClassName(t,"ink-fv-confirm")&&(this.confirmElms[this.element.id].push(t),this.hasConfirm[this.element.id]=!0)}}},_validateElements:function(){var e;this._getElements(),this.hasConfirm[this.element.id]===!0&&(e=this._makeConfirmGroups());for(var n,i=[],t=!1,s=!1,a=0,o=this.elements[this.element.id].length;o>a;a++)if(n=!1,t=this.elements[this.element.id][a],!t.disabled)for(var l in this._flagMap)if(r.hasClassName(t,l))if("ink-fv-custom"!==l&&"ink-fv-confirm"!==l)this._isValid(t,l)||(n?i[i.length-1].errors.push(l):(i.push({elm:t,errors:[l]}),n=!0));else if("ink-fv-confirm"!==l)s=this._isCustomValid(t),s.length>0&&i.push({elm:t,errors:[l],custom:s});else if("ink-fv-confirm"===l)continue;return i=this._validateConfirmGroups(e,i)},_validateConfirmGroups:function(e,r){var n=!1;for(var i in e)e.hasOwnProperty(i)&&(n=e[i],2===n.length&&n[0].value!==n[1].value&&r.push({elm:n[1],errors:["ink-fv-confirm"]}));return r},_makeConfirmGroups:function(){var e;if(this.confirmGroup&&this.confirmGroup.length>0){e={};for(var n=!1,i=!1,t=0,s=this.confirmElms[this.element.id].length;s>t;t++){n=this.confirmElms[this.element.id][t];for(var a=0,o=this.confirmGroup.length;o>a;a++)i=this.confirmGroup[a],r.hasClassName(n,i)&&("undefined"==typeof e[i]?e[i]=[n]:e[i].push(n))}return e}return 2===this.confirmElms[this.element.id].length&&(e={"ink-fv-confirm":[this.confirmElms[this.element.id][0],this.confirmElms[this.element.id][1]]}),e},_isCustomValid:function(e){for(var n=[],i=!1,t=0,s=this.custom.length;s>t;t++)i=this.custom[t],r.hasClassName(e,i.flag)&&(i.callback(e,i.msg)||n.push({flag:i.flag,msg:i.msg}));return n},_isValid:function(e,i){var s=e.nodeName.toLowerCase(),a=(e.getAttribute("type")||"").toLowerCase(),o=this._trim(e.value);if("ink-fv-required"!==i&&"checkbox"!==a&&"radio"!==a&&""===o)return!r.hasClassName(e,"ink-fv-required");switch(i){case"ink-fv-required":if("select"===s)return e.selectedIndex>0?!0:!1;if("checkbox"!==a&&"radio"!==a&&""!==o)return!0;if("checkbox"===a||"radio"===a){for(var l=t(e),m=!1,h=0,f=l.length;f>h;h++)if(l[h].checked===!0){m=!0;break}return m}return!1;case"ink-fv-email":return n.mail(e.value);case"ink-fv-url":return n.url(e.value);case"ink-fv-number":return!isNaN(Number(e.value))&&isFinite(Number(e.value));case"ink-fv-phone_pt":return n.isPTPhone(e.value);case"ink-fv-phone_cv":return n.isCVPhone(e.value);case"ink-fv-phone_ao":return n.isAOPhone(e.value);case"ink-fv-phone_mz":return n.isMZPhone(e.value);case"ink-fv-date":var u=Ink.getModule("Ink.Dom.Element",1),c=u.data(e),d="yyyy-mm-dd";if(r.hasClassName(e,"ink-datepicker")&&"format"in c?d=c.format:"validFormat"in c&&(d=c.validFormat),!(d in n._dateParsers)){var v=[];for(var g in n._dateParsers)n._dateParsers.hasOwnProperty(g)&&v.push(g);throw new Error("The attribute data-valid-format must be one of the following values: "+v.join(", "))}return n.isDate(d,e.value);case"ink-fv-custom":}return!1},_showError:function(e,r){this._clearError(e);for(var n=!1,i=0,t=r.length;t>i;i++)n=r[i].elm,n&&this._showAnErrorOnElement(n,r[i])},_showAnErrorOnElement:function(n,i){var t=e.findUpwardsByClass(n,"control-group"),s=e.findUpwardsByClass(n,"control"),a=[this._errorClassName,this._errorTypeClassName].join(" "),o=e.create("p",{className:a});o.innerHTML="ink-fv-custom"!==i.errors[0]?this._flagMap[i.errors[0]].msg:i.custom[0].msg;var l=s||t;l?l.appendChild(o):e.insertAfter(o,n),s&&("ink-fv-required"===i.errors[0]?r.addClassName(t,"validation error"):r.addClassName(t,"validation warning"))},_clearError:function(n){for(var i,t,s=n.getElementsByTagName("p"),a=s.length-1;a>=0;a--)i=s[a],r.hasClassName(i,this._errorClassName)&&(t=e.findUpwardsBySelector(i,".control-group"),t&&r.removeClassName(t,["validation","error","warning"]),r.hasClassName(i,this._errorClassName,!0)&&e.remove(i));var o=n.getElementsByTagName("ul");for(a=o.length-1;a>=0;a--)i=o[a],r.hasClassName(i,"control-group")&&r.removeClassName(i,"validation error")},_trim:function(e){return"string"==typeof e?e.replace(/^\s+|\s+$|\n+$/g,""):void 0}};return s}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.imagequery.js b/ajax/libs/ink/3.0.0/js/ink.imagequery.js new file mode 100644 index 000000000..f044dea10 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.imagequery.js @@ -0,0 +1,210 @@ +/** + * @module Ink.UI.ImageQuery_1 + * Responsive image loading + * @version 1 + */ + +Ink.createModule('Ink.UI.ImageQuery', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Element_1','Ink.Util.Array_1'], function(Common, Event, Element, InkArray ) { + 'use strict'; + + /** + * @class Ink.UI.ImageQuery + * @constructor + * @version 1 + * + * @param {String|DOMElement} selector Selector or element + * @param {Object} [options] Options object + * @param {String|Function} [options.src] String or Callback function (that returns a string) with the path to be used to get the images. + * @param {String|Function} [options.retina] String or Callback function (that returns a string) with the path to be used to get RETINA specific images. + * @param {Array} [options.queries] Array of queries + * @param {String} [options.queries.label] Label of the query. Ex. 'small' + * @param {Number} [options.queries.width] Min-width to use this query + * @param {Function} [options.onLoad] Date format string + * + * @example + *
        + * + *
        + * + */ + var ImageQuery = function(selector, options){ + + /** + * Get elements, create more ImageQueries if selector finds more than one + * + * [improvement] This is a useful pattern. More UI modules could use it. + */ + this._element = Common.elsOrSelector(selector, 'Ink.UI.ImageQuery', /*required=*/true); + + // In case we have several elements + for (var i = 1 /* start from second element*/; i < this._element.length; i++) { + new ImageQuery(this._element[i], options); + } + + this._element = this._element[0]; + + /** + * Default options, overriden by data-attributes if any. + * The parameters are: + * @xparam {array} queries Array of objects that determine the label/name and its min-width to be applied. + * @xparam {boolean} allowFirstLoad Boolean flag to allow the loading of the first element. + */ + this._options = Ink.extendObj({ + queries:[], + onLoad: null + }, options || {}, Element.data(this._element)); + + /** + * Determining the original basename (with the querystring) of the file. + */ + var pos; + if( (pos=this._element.src.lastIndexOf('?')) !== -1 ){ + var search = this._element.src.substr(pos); + this._filename = this._element.src.replace(search,'').split('/').pop()+search; + } else { + this._filename = this._element.src.split('/').pop(); + } + + this._init(); + }; + + ImageQuery.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function(){ + // Sort queries by width, in descendant order. + this._options.queries = InkArray.sortMulti(this._options.queries, 'width').reverse(); + + if( typeof this._options.onLoad === 'function' ){ + Event.observe(this._element, 'onload', Ink.bindEvent(this._onLoad, this)); + } + + Event.observe(window, 'resize', Event.throttle(Ink.bindMethod(this, '_onResize'), 400)); + + // Imediate call to apply the right images based on the current viewport + this._onResize(); + }, + + /** + * Handles the resize event (as specified in the _init function) + * + * @method _onResize + * @private + */ + _onResize: function(){ + if( !this._options.queries.length ){ + return; + } + + var current = this._findCurrentQuery(); + + /** + * Choosing the right src. The rule is: + * + * "If there is specifically defined in the query object, use that. Otherwise uses the global src." + * + * The above rule applies to a retina src. + */ + var src = current.src || this._options.src; + if ( window.devicePixelRatio > 1 && ('retina' in this._options ) ) { + src = current.retina || this._options.retina; + } + + /** + * Injects the file variable for usage in the 'templating system' below + */ + current.file = this._filename; + + /** + * Since we allow the src to be a callback, let's run it and get the results. + * For the inside, we're passing the element (img) being processed and the object of the selected query. + */ + if( typeof src === 'function' ){ + src = src.apply(this,[this._element,current]); + if( typeof src !== 'string' ){ + throw '[ImageQuery] :: "src" callback does not return a string'; + } + } + + /** + * Replace the values of the existing properties on the query object (except src and retina) in the + * defined src and/or retina. + */ + src = src.replace(/{:(.*?)}/g, function(_, prop) { + return current[prop]; + }); + + this._element.src = src; + + // Removes the injected file property + delete current.file; + }, + + /** + * Queries are in a descendant order. We want to find the query with the highest width that fits the viewport, therefore the first one. + */ + _findCurrentQuery: function () { + /** + * Gets viewport width + */ + var viewportWidth = window.innerWidth || + document.documentElement.clientWidth || + document.body.clientWidth; + + var queries = this._options.queries; + var last = queries.length - 1; + + for( var query=0; query < last; query+=1 ){ + if (queries[query].width <= viewportWidth){ + return queries[query]; + } + } + + return queries[last]; + }, + + /** + * Handles the element loading (img onload) event + * + * @method _onLoad + * @private + */ + _onLoad: function(){ + + /** + * Since we allow a callback for this let's run it. + */ + this._options.onLoad.call(this); + } + + }; + + return ImageQuery; + +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.imagequery.min.js b/ajax/libs/ink/3.0.0/js/ink.imagequery.min.js new file mode 100644 index 000000000..01099f0af --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.imagequery.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.ImageQuery","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Util.Array_1"],function(e,t,n,i){"use strict";var s=function(t,i){this._element=e.elsOrSelector(t,"Ink.UI.ImageQuery",!0);for(var o=1;o1&&"retina"in this._options&&(t=e.retina||this._options.retina),e.file=this._filename,"function"==typeof t&&(t=t.apply(this,[this._element,e]),"string"!=typeof t))throw'[ImageQuery] :: "src" callback does not return a string';t=t.replace(/{:(.*?)}/g,function(t,n){return e[n]}),this._element.src=t,delete e.file}},_findCurrentQuery:function(){for(var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=this._options.queries,n=t.length-1,i=0;n>i;i+=1)if(t[i].width<=e)return t[i];return t[n]},_onLoad:function(){this._options.onLoad.call(this)}},s}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.js b/ajax/libs/ink/3.0.0/js/ink.js new file mode 100644 index 000000000..8d32adcc8 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.js @@ -0,0 +1,13148 @@ +/** + * @module Ink_1 + * Ink Core. + * This module provides the necessary methods to create and load the modules using Ink. + */ + +;(function(window, document) { + + 'use strict'; + + // skip redefinition of Ink core + if ('Ink' in window) { return; } + + + // internal data + + /* + * NOTE: + * invoke Ink.setPath('Ink', '/Ink/'); before requiring local modules + */ + var paths = {}; + var modules = {}; + var modulesLoadOrder = []; + var modulesRequested = {}; + var pendingRMs = []; + var modulesWaitingForDeps = {}; + + var apply = Function.prototype.apply; + + // auxiliary fns + var isEmptyObject = function(o) { + /*jshint unused:false */ + if (typeof o !== 'object') { return false; } + for (var k in o) { + if (o.hasOwnProperty(k)) { + return false; + } + } + return true; + }; + + /** + * @namespace Ink_1 + */ + + window.Ink = { + _checkPendingRequireModules: function() { + var I, F, o, dep, mod, cb, pRMs = []; + for (I = 0, F = pendingRMs.length; I < F; ++I) { + o = pendingRMs[I]; + + if (!o) { continue; } + + for (dep in o.left) { + if (o.left.hasOwnProperty(dep)) { + mod = modules[dep]; + if (mod) { + o.args[o.left[dep] ] = mod; + delete o.left[dep]; + --o.remaining; + } + } + } + + if (o.remaining > 0) { + pRMs.push(o); + } + else { + cb = o.cb; + if (!cb) { continue; } + delete o.cb; // to make sure I won't call this more than once! + cb.apply(false, o.args); + } + } + + pendingRMs = pRMs; + + if (pendingRMs.length > 0) { + setTimeout( function() { Ink._checkPendingRequireModules(); }, 0 ); + } + }, + + /** + * Get the full path of a module. + * This method looks up the paths given in setPath (and ultimately the default Ink's path). + * + * @method getPath + * @param {String} key Name of the module you want to get the path + * @param {Boolean} [noLib] Flag to skip appending 'lib.js' to the returned path. + */ + getPath: function(key, noLib) { + var split = key.split(/[._]/g); + var curKey; + var i; + var root; + var path; + // Look for Ink.Dom.Element.1, Ink.Dom.Element, Ink.Dom, Ink in this order. + for (i = split.length; i >= 0; i -= 1) { + curKey = split.slice(0, i + 1).join('.'); // See comment in setPath + if (paths[curKey]) { + root = curKey; + break; + } + } + path = paths[root || 'Ink']; + if (!/\/$/.test(path)) { + path += '/'; + } + if (i < split.length) { + path += split.slice(i + 1).join('/') + '/'; + } + if (!noLib) { + path += 'lib.js'; + } + return path; + }, + + /** + * Sets the URL path for a namespace. + * Use this to customize where requireModules and createModule will load dependencies from. + * This can be useful to set your own CDN for dynamic module loading or simply to change your module folder structure + * + * @method setPath + * + * @param {String} key Module or namespace + * @param {String} rootURI Base URL path and schema to be appended to the module or namespace + * + * @example + * Ink.setPath('Ink', 'http://my-cdn/Ink/'); + * Ink.setPath('Lol', 'http://my-cdn/Lol/'); + * + * // Loads from http://my-cdn/Ink/Dom/Whatever/lib.js + * Ink.requireModules(['Ink.Dom.Whatever'], function () { ... }); + * // Loads from http://my-cdn/Lol/Whatever/lib.js + * Ink.requireModules(['Lol.Whatever'], function () { ... }); + */ + setPath: function(key, rootURI) { + // Replacing version separator with dot because the difference + // between a submodule and a version doesn't matter here. + // It would also overcomplicate the implementation of getPath + paths[key.replace(/_/, '.')] = rootURI; + }, + + /** + * Loads a script URL. + * This creates a `script` tag in the `head` of the document. + * Reports errors by listening to 'error' and 'readystatechange' events. + * + * @method loadScript + * @param {String} uri Can be an external URL or a module name + * @param {String} [contentType]='text/javascript' The `type` attribute of the new script tag. + */ + loadScript: function(uri, contentType) { + /*jshint evil:true */ + + if (uri.indexOf('/') === -1) { + uri = this.getPath(uri); + } + + var scriptEl = document.createElement('script'); + scriptEl.setAttribute('type', contentType || 'text/javascript'); + scriptEl.setAttribute('src', uri); + + scriptEl.onerror = scriptEl.onreadystatechange = function (err) { + err = err || window.event; + if (err.type === 'readystatechange' && scriptEl.readyState !== 'loaded') { + // if not readyState == 'loaded' it's not an error. + return; + } + Ink.error(['Failed to load script ', uri, '. (', err || 'unspecified error', ')'].join('')); + }; + // CHECK ON ALL BROWSERS + /*if (document.readyState !== 'complete' && !document.body) { + document.write( scriptEl.outerHTML ); + } + else {*/ + var aHead = document.getElementsByTagName('head'); + if(aHead.length > 0) { + aHead[0].appendChild(scriptEl); + } + //} + }, + + _loadLater: function (dep) { + setTimeout(function () { + if (modules[dep] || modulesRequested[dep] || + modulesWaitingForDeps[dep]) { + return; + } + modulesRequested[dep] = true; + Ink.loadScript(dep); + }, 0); + }, + + /** + * Defines a module namespace. + * + * @method namespace + * @param {String} ns Namespace to define. + * @param {Boolean} [returnParentAndKey] Flag to change the return value to an array containing the namespace parent and the namespace key + * @return {Object|Array} Returns the created namespace object + */ + namespace: function(ns, returnParentAndKey) { + if (!ns || !ns.length) { return null; } + + var levels = ns.split('.'); + var nsobj = window; + var parent; + + for (var i = 0, f = levels.length; i < f; ++i) { + nsobj[ levels[i] ] = nsobj[ levels[i] ] || {}; + parent = nsobj; + nsobj = nsobj[ levels[i] ]; + } + + if (returnParentAndKey) { + return [ + parent, + levels[i-1] + ]; + } + + return nsobj; + }, + + /** + * Loads a module. + * A synchronous method to get the module from the registry. It assumes the module is defined and loaded already! + * + * @method getModule + * @param {String} mod Module name + * @param {Number} [version] Version number of the module + * @return {Object|Function} Module object or function, depending how the module is defined + */ + getModule: function(mod, version) { + var key = version ? [mod, '_', version].join('') : mod; + return modules[key]; + }, + + /** + * Creates a new module. + * Use this to wrap your code and benefit from the module loading used throughout the Ink library + * + * @method createModule + * @uses requireModules + * @param {String} mod Module name, separated by dots. Like Ink.Dom.Selector, Ink.UI.Modal + * @param {Number} version Version number + * @param {Array} deps Array of module names which are dependencies of the module being created. The order in which they are passed here will define the order they will be passed to the callback function. + * @param {Function} modFn The callback function to be executed when all the dependencies are resolved. The dependencies are passed as arguments, in the same order they were declared. The function itself should return the module. + * @sample Ink_1_createModule.html + * + */ + createModule: function(mod, ver, deps, modFn) { // define + if (typeof mod !== 'string') { + throw new Error('module name must be a string!'); + } + + // validate version correctness + if (!(typeof ver === 'number' || (typeof ver === 'string' && ver.length > 0))) { + throw new Error('version number missing!'); + } + + var modAll = [mod, '_', ver].join(''); + + modulesWaitingForDeps[modAll] = true; + + var cb = function() { + //console.log(['createModule(', mod, ', ', ver, ', [', deps.join(', '), '], ', !!modFn, ')'].join('')); + + // make sure module in not loaded twice + if (modules[modAll]) { + //console.warn(['Ink.createModule ', modAll, ': module has been defined already.'].join('')); + return; + } + + + // delete related pending tasks + delete modulesRequested[modAll]; + delete modulesRequested[mod]; + + + // run module's supplied factory + var args = Array.prototype.slice.call(arguments); + var moduleContent = modFn.apply(window, args); + modulesLoadOrder.push(modAll); + // console.log('** loaded module ' + modAll + '**'); + + + // set version + if (typeof moduleContent === 'object') { // Dom.Css Dom.Event + moduleContent._version = ver; + } + else if (typeof moduleContent === 'function') { + moduleContent.prototype._version = ver; // if constructor + moduleContent._version = ver; // if regular function + } + + + // add to global namespace... + var isInkModule = mod.indexOf('Ink.') === 0; + var t; + if (isInkModule) { + t = Ink.namespace(mod, true); // for mod 'Ink.Dom.Css', t[0] gets 'Ink.Dom' object and t[1] 'Css' + } + + + // versioned + modules[ modAll ] = moduleContent; // in modules + delete modulesWaitingForDeps[ modAll ]; + + if (isInkModule) { + t[0][ t[1] + '_' + ver ] = moduleContent; // in namespace + } + + + // unversioned + modules[ mod ] = moduleContent; // in modules + + if (isInkModule) { + if (isEmptyObject( t[0][ t[1] ] )) { + t[0][ t[1] ] = moduleContent; // in namespace + } + // else { + // console.warn(['Ink.createModule ', modAll, ': module has been defined already with a different version!'].join('')); + // } + } + + + if (this) { // there may be pending requires expecting this module, check... + Ink._checkPendingRequireModules(); + } + }; + + this.requireModules(deps, cb); + }, + + /** + * Requires modules asynchronously + * Use this to get modules, even if they're not loaded yet + * + * @method requireModules + * @param {Array} deps Array of module names. The order in which they are passed here will define the order they will be passed to the callback function. + * @param {Function} cbFn The callback function to be executed when all the dependencies are resolved. The dependencies are passed as arguments, in the same order they were declared. + * @sample Ink_1_requireModules.html + */ + requireModules: function(deps, cbFn) { // require + //console.log(['requireModules([', deps.join(', '), '], ', !!cbFn, ')'].join('')); + var i, f, o, dep, mod; + f = deps.length; + o = { + args: new Array(f), + left: {}, + remaining: f, + cb: cbFn + }; + + if (!(typeof deps === 'object' && deps.length !== undefined)) { + throw new Error('Dependency list should be an array!'); + } + if (typeof cbFn !== 'function') { + throw new Error('Callback should be a function!'); + } + + for (i = 0; i < f; ++i) { + if (Ink._moduleRenames[deps[i]]) { + Ink.warn(deps[i] + ' was renamed to ' + Ink._moduleRenames[deps[i]]); + dep = Ink._moduleRenames[deps[i]]; + } else { + dep = deps[i]; + } + mod = modules[dep]; + if (mod) { + o.args[i] = mod; + --o.remaining; + continue; + } + else if (!modulesRequested[dep]) { + Ink._loadLater(dep); + } + o.left[dep] = i; + } + + if (o.remaining > 0) { + pendingRMs.push(o); + } + else { + cbFn.apply(true, o.args); + } + }, + + _moduleRenames: { + 'Ink.UI.Aux_1': 'Ink.UI.Common_1' + }, + + /** + * Lists loaded module names. + * The list is ordered by loaded time (oldest module comes first) + * + * @method getModulesLoadOrder + * @return {Array} returns the order in which modules were resolved and correctly loaded + */ + getModulesLoadOrder: function() { + return modulesLoadOrder.slice(); + }, + + /** + * Builds the markup needed to load the modules. + * This method builds the script tags needed to load the currently used modules + * + * @method getModuleScripts + * @uses getModulesLoadOrder + * @return {String} The script markup + */ + getModuleScripts: function() { + var mlo = this.getModulesLoadOrder(); + mlo.unshift('Ink_1'); + mlo = mlo.map(function(m) { + return [''].join(''); + }); + + return mlo.join('\n'); + }, + + /** + * Creates an Ink.Ext module + * + * Does exactly the same as createModule but creates the module in the Ink.Ext namespace + * + * @method createExt + * @uses createModule + * @param {String} moduleName Extension name + * @param {String} version Extension version + * @param {Array} dependencies Extension dependencies + * @param {Function} modFn Function returning the extension + * @sample Ink_1_createExt.html + */ + createExt: function (moduleName, version, dependencies, modFn) { + return Ink.createModule('Ink.Ext.' + moduleName, version, dependencies, modFn); + }, + + /** + * Function.prototype.bind alternative. + * Creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called. + * + * @method bind + * @param {Function} fn The function + * @param {Object} context The value to be passed as the this parameter to the target function when the bound function is called. If used as false, it preserves the original context and just binds the arguments. + * @param {Any} [args*] Additional arguments will be sent to the original function as prefix arguments. + * @return {Function} + * @sample Ink_1_bind.html + */ + bind: function(fn, context) { + var args = Array.prototype.slice.call(arguments, 2); + return function() { + var innerArgs = Array.prototype.slice.call(arguments); + var finalArgs = args.concat(innerArgs); + return fn.apply(context === false ? this : context, finalArgs); + }; + }, + + /** + * Function.prototype.bind alternative for class methods + * Creates a new function that, when called, has this k + * @method bindMethod + * @uses bind + * @param {Object} object The object that contains the method to bind + * @param {String} methodName The name of the method that will be bound + * @param {Any} [args*] Additional arguments will be sent to the new method as prefix arguments. + * @return {Function} + * @sample Ink_1_bindMethod.html + * + * @example + * // Build a function which calls Ink.Dom.Element.remove on an element. + * var removeMyElem = Ink.bindMethod(Ink.Dom.Element, 'remove', someElement); + * + * removeMyElem(); // no arguments, nor Ink.Dom.Element, needed + * @example + * // (comparison with using Ink.bind to the same effect). + * // The following two calls are equivalent + * + * Ink.bind(this.remove, this, myElem); + * Ink.bindMethod(this, 'remove', myElem); + */ + bindMethod: function (object, methodName) { + return Ink.bind.apply(Ink, + [object[methodName], object].concat([].slice.call(arguments, 2))); + }, + + /** + * Function.prototype.bind alternative for event handlers. + * Same as bind but keeps first argument of the call the original event. + * Set "context" to `false` to preserve the original context of the function and just bind the arguments. + * + * @method bindEvent + * @param {Function} fn The function + * @param {Object} context The value to be passed as the this parameter to the target + * @param {Any} [args*] Additional arguments will be sent to the original function as prefix arguments + * @return {Function} + * @sample Ink_1_bindEvent.html + */ + bindEvent: function(fn, context) { + var args = Array.prototype.slice.call(arguments, 2); + return function(event) { + var finalArgs = args.slice(); + finalArgs.unshift(event || window.event); + return fn.apply(context === false ? this : context, finalArgs); + }; + }, + + /** + * Alias to document.getElementById + * + * @method i + * @param {String} id Element ID + * @return {DOMElement} + * @sample Ink_1_i.html + */ + i: function(id) { + if(!id) { + throw new Error('Ink.i => id or element must be passed'); + } + if(typeof(id) === 'string') { + return document.getElementById(id); + } + return id; + }, + + /** + * Alias for Ink.Dom.Selector + * + * @method ss + * @uses Ink.Dom.Selector.select + * @param {String} rule + * @param {DOMElement} [from] + * @return {Array} array of DOMElements + * @sample Ink_1_ss.html + */ + ss: function(rule, from) + { + if(typeof(Ink.Dom) === 'undefined' || typeof(Ink.Dom.Selector) === 'undefined') { + throw new Error('This method requires Ink.Dom.Selector'); + } + return Ink.Dom.Selector.select(rule, (from || document)); + }, + + /** + * Alias for Ink.Dom.Selector first result + * + * @method s + * @uses Ink.Dom.Selector.select + * @param {String} rule Selector string + * @param {DOMElement} [from] Context element. If set to a DOM element, the rule will only look for descendants of this DOM Element. + * @return {DOMElement} + * @sample Ink_1_s.html + */ + s: function(rule, from) + { + if(typeof(Ink.Dom) === 'undefined' || typeof(Ink.Dom.Selector) === 'undefined') { + throw new Error('This method requires Ink.Dom.Selector'); + } + return Ink.Dom.Selector.select(rule, (from || document))[0] || null; + }, + + /** + * Extends an object with another + * Copy all of the properties in one or more source objects over to the destination object, and return the destination object. It's in-order, so the last source will override properties of the same name in previous arguments. + * + * @method extendObj + * @param {Object} destination The object that will receive the new/updated properties + * @param {Object} source The object whose properties will be copied over to the destination object + * @param {Object} [args*] Additional source objects. The last source will override properties of the same name in the previous defined sources + * @return destination object, enriched with defaults from the sources + * @sample Ink_1_extendObj.html + */ + extendObj: function(destination, source) { + if (arguments.length > 2) { + source = Ink.extendObj.apply(this, [].slice.call(arguments, 1)); + } + if (source) { + for (var property in source) { + if(Object.prototype.hasOwnProperty.call(source, property)) { + destination[property] = source[property]; + } + } + } + return destination; + }, + + /** + * Calls native console.log if available. + * + * @method log + * @param {Any} [args*] Arguments to be evaluated + * @sample Ink_1_log.html + **/ + log: function () { + // IE does not have console.log.apply in IE10 emulated mode + var console = window.console; + if (console && console.log) { + apply.call(console.log, console, arguments); + } + }, + + /** + * Calls native console.warn if available. + * + * @method warn + * @param {Any} [args*] Arguments to be evaluated + * @sample Ink_1_warn.html + **/ + warn: function () { + // IE does not have console.log.apply in IE10 emulated mode + var console = window.console; + if (console && console.warn) { + apply.call(console.warn, console, arguments); + } + }, + + /** + * Calls native console.error if available. + * + * @method error + * @param {Any} [args*] Arguments to be evaluated + * @sample Ink_1_error.html + **/ + error: function () { + // IE does not have console.log.apply in IE10 emulated mode + var console = window.console; + if (console && console.error) { + apply.call(console.error, console, arguments); + } + } + }; + + Ink.setPath('Ink', + ('INK_PATH' in window) ? window.INK_PATH : window.location.protocol + '//js.ink.sapo.pt/Ink/'); + + + + // TODO for debug - to detect pending stuff + /* + var failCount = {}; // fail count per module name + var maxFails = 3; // times + var checkDelta = 0.5; //seconds + + var tmpTmr = setInterval(function() { + var mk = Object.keys(modulesRequested); + var l = mk.length; + + if (l > 0) { + // console.log('** waiting for modules: ' + mk.join(', ') + ' **'); + + for (var i = 0, f = mk.length, k, v; i < f; ++i) { + k = mk[i]; + v = failCount[k]; + failCount[k] = (v === undefined) ? 1 : ++v; + + if (v >= maxFails) { + console.error('** Loading of module ' + k + ' failed! **'); + delete modulesRequested[k]; + } + } + } + else { + // console.log('** Module loads complete. **'); + clearInterval(tmpTmr); + } + }, checkDelta*1000); + */ +}(window, document)); + +/** + * @module Ink.Net.Ajax_1 + * Cross Browser Ajax requests + * @version 1 + */ + +Ink.createModule('Ink.Net.Ajax', '1', [], function() { + + 'use strict'; + + /** + * Creates a new XMLHttpRequest object + * + * @class Ink.Net.Ajax + * @constructor + * + * @param {String} url Request URL + * @param {Object} options Request options + * @param {Boolean} [options.asynchronous]=true If false, the request synchronous. + * @param {Boolean} [options.cors] Flag to activate CORS. Set this to true if you're doing a cross-origin request + * @param {String} [options.method]='POST' HTTP request method. POST by default. + * @param {Object|String} [options.parameters] Request parameters to be sent with the request + * @param {Number} [options.timeout] Request timeout in seconds + * @param {Number} [options.delay] Artificial delay. If the request is completed faster than this delay, wait the remaining time before executing the callbacks + * @param {String} [options.postBody] POST request body. If not specified, it's filled with the contents from parameters + * @param {String} [options.contentType] Content-type header to be sent. Defaults to 'application/x-www-form-urlencoded' + * @param {Object} [options.requestHeaders] Key-value pairs for additional request headers + * @param {Function} [options.onComplete] Callback executed after the request is completed, regardless of what happened during the request. + * @param {Function} [options.onSuccess] Callback executed if the request is successful (requests with 2xx status codes) + * @param {Function} [options.onFailure] Callback executed if the request fails (requests with status codes different from 2xx) + * @param {Function} [options.onException] Callback executed if an exception occurs. Receives the exception as a parameter. + * @param {Function} [options.onCreate] Callback executed after object initialization but before the request is made + * @param {Function} [options.onInit] Callback executed before any initialization + * @param {Function} [options.onTimeout] Callback executed if the request times out + * @param {Boolean|String} [options.evalJS]=true If the request Content-type header is application/json, evaluates the response and populates responseJSON. Use 'force' if you want to force the response evaluation, no matter what Content-type it's using. + * @param {Boolean} [options.sanitizeJSON] Flag to sanitize the content of responseText before evaluation + * @param {String} [options.xhrProxy] URI for proxy service hosted on the same server as the web app, that can fetch documents from other domains. The service must pipe all input and output untouched (some input sanitization is allowed, like clearing cookies). e.g., requesting http://example.org/doc can become /proxy/http%3A%2F%2Fexample.org%2Fdoc The proxy service will be used for cross-domain requests, if set, else a network error is returned as exception. + * + * @example + * new Ajax('test.json', { + * method: 'get', + * onSuccess: function (ajx, responseJSON) { + * // Do stuff with responseJSON or ajx.responseText + * console.log(responseJSON.something.length); + * }, + * onFailure: function (ajx, errorResponse) { + * // Deal with it + * alert(ajx.status); // The HTTP response code + * } + * }); + */ + var Ajax = function(url, options){ + + // start of AjaxMock patch - uncomment to enable it + /*var AM = SAPO.Communication.AjaxMock; + if (AM && !options.inMock) { + if (AM.autoRecordThisUrl && AM.autoRecordThisUrl(url)) { + return new AM.Record(url, options); + } + if (AM.mockThisUrl && AM.mockThisUrl(url)) { + return new AM.Play(url, options, true); + } + }*/ + // end of AjaxMock patch + + this.init(url, options); + }; + + /** + * Options for all requests. These can then be overriden for individual ones. + */ + Ajax.globalOptions = { + parameters: {}, + requestHeaders: {} + }; + + + // IE10 does not need XDomainRequest + var xMLHttpRequestWithCredentials = 'XMLHttpRequest' in window && 'withCredentials' in (new XMLHttpRequest()); + + + + Ajax.prototype = { + + init: function(url, userOptions) { + if (!url) { + throw new Error("WRONG_ARGUMENTS_ERR"); + } + var options = Ink.extendObj({ + asynchronous: true, + method: 'POST', + parameters: null, + timeout: 0, + delay: 0, + postBody: '', + contentType: 'application/x-www-form-urlencoded', + requestHeaders: null, + onComplete: null, + onSuccess: null, + onFailure: null, + onException: null, + onHeaders: null, + onCreate: null, + onInit: null, + onTimeout: null, + sanitizeJSON: false, + evalJS: true, + xhrProxy: '', + cors: false, + debug: false, + useCredentials: false, + signRequest: false + }, Ajax.globalOptions); + + if (userOptions && typeof userOptions === 'object') { + options = Ink.extendObj(options, userOptions); + + + if (typeof userOptions.parameters === 'object') { + options.parameters = Ink.extendObj(Ink.extendObj({}, Ajax.globalOptions.parameters), userOptions.parameters); + } else if (userOptions.parameters !== null) { + var globalParameters = this.paramsObjToStr(Ajax.globalOptions.parameters); + if (globalParameters) { + options.parameters = userOptions.parameters + '&' + globalParameters; + } + } + + options.requestHeaders = Ink.extendObj({}, Ajax.globalOptions.requestHeaders); + options.requestHeaders = Ink.extendObj(options.requestHeaders, userOptions.requestHeaders); + } + + this.options = options; + + this.safeCall('onInit'); + + this.url = url; + + var urlLocation = this._locationFromURL(url); + this.isHTTP = this._locationIsHTTP(urlLocation); + this.isCrossDomain = this._locationIsCrossDomain(urlLocation, location); + + this.requestHasBody = options.method.search(/^get|head$/i) < 0; + + if(this.options.cors) { + this.isCrossDomain = false; + } + + this.transport = this.getTransport(); + + this.request(); + }, + + /** + * Returns a location object from an URL + * + * @method _locationFromUrl + * @param url + * @private + **/ + _locationFromURL: function (url) { + var urlLocation = document.createElementNS ? + document.createElementNS('http://www.w3.org/1999/xhtml', 'a') : + document.createElement('a'); + urlLocation.href = url; + return urlLocation; + }, + + /** + * Checks whether a location is HTTP or HTTPS + * + * @method locationIsHttp + * @param urlLocation + * @private + */ + _locationIsHTTP: function (urlLocation) { + return urlLocation.protocol.match(/^https?:/i) ? true : false; + }, + + /** + * Checks whether a location is cross-domain from another + * + * @method _locationIsCrossDomain + * @param urlLocation {Location} + * @param otherLocation {Location} + */ + _locationIsCrossDomain: function (urlLocation, location) { + location = location || window.location; + if (!Ajax.prototype._locationIsHTTP(urlLocation) || location.protocol === 'widget:' || typeof window.widget === 'object') { + return false; + } else { + return location.protocol !== urlLocation.protocol || + location.host.split(':')[0] !== urlLocation.host.split(':')[0]; + } + }, + + /** + * Creates the appropriate XMLHttpRequest object + * + * @method getTransport + * @return {Object} XMLHttpRequest object + */ + getTransport: function() + { + /*global XDomainRequest:false, ActiveXObject:false */ + if (!xMLHttpRequestWithCredentials && this.options.cors && 'XDomainRequest' in window) { + this.usingXDomainReq = true; + return new XDomainRequest(); + } + else if (typeof XMLHttpRequest !== 'undefined') { + return new XMLHttpRequest(); + } + else if (typeof ActiveXObject !== 'undefined') { + try { + return new ActiveXObject('Msxml2.XMLHTTP'); + } catch (e) { + return new ActiveXObject('Microsoft.XMLHTTP'); + } + } else { + return null; + } + }, + + /** + * Set the necessary headers for an ajax request + * + * @method setHeaders + * @param {String} url The url for the request + */ + setHeaders: function() + { + if (this.transport) { + try { + var headers = { + "Accept": "text/javascript,text/xml,application/xml,application/xhtml+xml,text/html,application/json;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1", + "Accept-Language": navigator.language, + "X-Requested-With": "XMLHttpRequest", + "X-Ink-Version": "2" + }; + if (this.options.cors) { + if (!this.options.signRequest) { + delete headers['X-Requested-With']; + } + delete headers['X-Ink-Version']; + } + + if (this.options.requestHeaders && typeof this.options.requestHeaders === 'object') { + for(var headerReqName in this.options.requestHeaders) { + if (this.options.requestHeaders.hasOwnProperty(headerReqName)) { + headers[headerReqName] = this.options.requestHeaders[headerReqName]; + } + } + } + + if (this.transport.overrideMimeType && (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) { + headers.Connection = 'close'; + } + + for (var headerName in headers) { + if(headers.hasOwnProperty(headerName)) { + this.transport.setRequestHeader(headerName, headers[headerName]); + } + } + } catch(e) {} + } + }, + + /** + * Converts an object with parameters to a querystring + * + * @method paramsObjToStr + * @param {Object|String} optParams parameters object + * @return {String} querystring + */ + paramsObjToStr: function(optParams) { + var k, m, p, a, params = []; + if (typeof optParams === 'object') { + for (p in optParams){ + if (optParams.hasOwnProperty(p)) { + a = optParams[p]; + if (Object.prototype.toString.call(a) === '[object Array]' && !isNaN(a.length)) { + for (k = 0, m = a.length; k < m; k++) { + params = params.concat([ + encodeURIComponent(p), '[]', '=', + encodeURIComponent(a[k]), '&' + ]); + } + } + else { + params = params.concat([ + encodeURIComponent(p), '=', + encodeURIComponent(a), '&' + ]); + } + } + } + if (params.length > 0) { + params.pop(); + } + } + else + { + return optParams; + } + return params.join(''); + }, + + /** + * Set the url parameters for a GET request + * + * @method setParams + */ + setParams: function() + { + var params = null, optParams = this.options.parameters; + + if(typeof optParams === "object"){ + params = this.paramsObjToStr(optParams); + } else { + params = '' + optParams; + } + + if(params){ + if(this.url.indexOf('?') > -1) { + this.url = this.url.split('#')[0] + '&' + params; + } else { + this.url = this.url.split('#')[0] + '?' + params; + } + } + }, + + /** + * Gets an HTTP header from the response + * + * @method getHeader + * @param {String} name Header name + * @return {String} header Content + */ + getHeader: function(name) + { + if (this.usingXDomainReq && name === 'Content-Type') { + return this.transport.contentType; + } + try{ + return this.transport.getResponseHeader(name); + } catch(e) { + return null; + } + }, + + /** + * Gets all the HTTP headers from the response + * + * @method getAllHeaders + * @return {String} The headers, each separated by a newline + */ + getAllHeaders: function() + { + try { + return this.transport.getAllResponseHeaders(); + } catch(e) { + return null; + } + }, + + /** + * Sets the response object + * + * @method getResponse + * @return {Object} the response object + */ + getResponse: function(){ + // setup our own stuff + var t = this.transport, + r = { + headerJSON: null, + responseJSON: null, + getHeader: this.getHeader, + getAllHeaders: this.getAllHeaders, + request: this, + transport: t, + timeTaken: new Date() - this.startTime, + requestedUrl: this.url + }; + + // setup things expected from the native object + r.readyState = t.readyState; + try { r.responseText = t.responseText; } catch(e) {} + try { r.responseXML = t.responseXML; } catch(e) {} + try { r.status = t.status; } catch(e) { r.status = 0; } + try { r.statusText = t.statusText; } catch(e) { r.statusText = ''; } + + return r; + }, + + /** + * Aborts the request if still running. No callbacks are called + * + * @method abort + */ + abort: function(){ + if (this.transport) { + clearTimeout(this.delayTimeout); + clearTimeout(this.stoTimeout); + try { this.transport.abort(); } catch(ex) {} + this.finish(); + } + }, + + /** + * Executes the state changing phase of an ajax request + * + * @method runStateChange + */ + runStateChange: function() + { + var rs = this.transport.readyState; + if (rs === 3) { + if (this.isHTTP) { + this.safeCall('onHeaders'); + } + } else if (rs === 4 || this.usingXDomainReq) { + + if (this.options.asynchronous && this.options.delay && (this.startTime + this.options.delay > new Date().getTime())) { + this.delayTimeout = setTimeout(Ink.bind(this.runStateChange, this), this.options.delay + this.startTime - new Date().getTime()); + return; + } + + var responseJSON, + responseContent = this.transport.responseText, + response = this.getResponse(), + curStatus = this.transport.status; + + if (this.isHTTP && !this.options.asynchronous) { + this.safeCall('onHeaders'); + } + + clearTimeout(this.stoTimeout); + + if (curStatus === 0) { + // Status 0 indicates network error for http requests. + // For http less requests, 0 is always returned. + if (this.isHTTP) { + this.safeCall('onException', this.makeError(18, 'NETWORK_ERR')); + } else { + curStatus = responseContent ? 200 : 404; + } + } + else if (curStatus === 304) { + curStatus = 200; + } + var isSuccess = this.usingXDomainReq || 200 <= curStatus && curStatus < 300; + + var headerContentType = this.getHeader('Content-Type') || ''; + if (this.options.evalJS && + (headerContentType.indexOf("application/json") >= 0 || this.options.evalJS === 'force')){ + try { + responseJSON = this.evalJSON(responseContent, this.sanitizeJSON); + if(responseJSON){ + responseContent = response.responseJSON = responseJSON; + } + } catch(e){ + if (isSuccess) { + // If the request failed, then this is perhaps an error page + // so don't notify error. + this.safeCall('onException', e); + } + } + } + + if (this.usingXDomainReq && headerContentType.indexOf('xml') !== -1 && 'DOMParser' in window) { + // http://msdn.microsoft.com/en-us/library/ie/ff975278(v=vs.85).aspx + var mimeType; + switch (headerContentType) { + case 'application/xml': + case 'application/xhtml+xml': + case 'image/svg+xml': + mimeType = headerContentType; + break; + default: + mimeType = 'text/xml'; + } + var xmlDoc = (new DOMParser()).parseFromString( this.transport.responseText, mimeType); + this.transport.responseXML = xmlDoc; + response.responseXML = xmlDoc; + } + + if (this.transport.responseXML !== null && response.responseJSON === null && this.transport.responseXML.xml !== ""){ + responseContent = this.transport.responseXML; + } + + if (curStatus || this.usingXDomainReq) { + if (isSuccess) { + this.safeCall('onSuccess', response, responseContent); + } else { + this.safeCall('onFailure', response, responseContent); + } + this.safeCall('on'+curStatus, response, responseContent); + } + this.finish(response, responseContent); + } + }, + + /** + * Last step after XHR is complete. Call onComplete and cleanup object + * + * @method finish + * @param {Any} response + * @param {Any} responseContent + */ + finish: function(response, responseContent){ + if (response) { + this.safeCall('onComplete', response, responseContent); + } + clearTimeout(this.stoTimeout); + + if (this.transport) { + // IE6 sometimes barfs on this one + try{ this.transport.onreadystatechange = null; } catch(e){} + + if (typeof this.transport.destroy === 'function') { + // Stuff for Samsung. + this.transport.destroy(); + } + + // Let XHR be collected. + this.transport = null; + } + }, + + /** + * Safely calls a callback function. + * Verifies that the callback is well defined and traps errors + * + * @method safeCall + * @param {Function} listener + */ + safeCall: function(listener, first/*, second*/) { + function rethrow(exception){ + setTimeout(function() { + // Rethrow exception so it'll land in + // the error console, firebug, whatever. + if (exception.message) { + exception.message += '\n'+(exception.stacktrace || exception.stack || ''); + } + throw exception; + }, 1); + } + if (typeof this.options[listener] === 'function') { + //SAPO.safeCall(this, this.options[listener], first, second); + //return object[listener].apply(object, [].slice.call(arguments, 2)); + try { + this.options[listener].apply(this, [].slice.call(arguments, 1)); + } catch(ex) { + rethrow(ex); + } + } else if (first && window.Error && (first instanceof Error)) { + rethrow(first); + } + }, + + /** + * Sets a new request header for the next http request + * + * @method setRequestHeader + * @param {String} name + * @param {String} value + */ + setRequestHeader: function(name, value){ + if (!this.options.requestHeaders) { + this.options.requestHeaders = {}; + } + this.options.requestHeaders[name] = value; + }, + + /** + * Executes the request + * + * @method request + */ + request: function() + { + if(this.transport) { + var params = null; + if(this.requestHasBody) { + if(this.options.postBody !== null && this.options.postBody !== '') { + params = this.options.postBody; + this.setParams(); + } else if (this.options.parameters !== null && this.options.parameters !== ''){ + params = this.options.parameters; + } + + if (typeof params === "object" && !params.nodeType) { + params = this.paramsObjToStr(params); + } else if (typeof params !== "object" && params !== null){ + params = '' + params; + } + + if(this.options.contentType) { + this.setRequestHeader('Content-Type', this.options.contentType); + } + } else { + this.setParams(); + } + + var url = this.url; + var method = this.options.method; + var crossDomain = this.isCrossDomain; + + if (crossDomain && this.options.xhrProxy) { + this.setRequestHeader('X-Url', url); + url = this.options.xhrProxy + encodeURIComponent(url); + crossDomain = false; + } + + try { + this.transport.open(method, url, this.options.asynchronous); + } catch(e) { + this.safeCall('onException', e); + return this.finish(this.getResponse(), null); + } + + this.setHeaders(); + + this.safeCall('onCreate'); + + if(this.options.timeout && !isNaN(this.options.timeout)) { + this.stoTimeout = setTimeout(Ink.bind(function() { + if(this.options.onTimeout) { + this.safeCall('onTimeout'); + this.abort(); + } + }, this), (this.options.timeout * 1000)); + } + + if(this.options.useCredentials && !this.usingXDomainReq) { + this.transport.withCredentials = true; + } + + if(this.options.asynchronous && !this.usingXDomainReq) { + this.transport.onreadystatechange = Ink.bind(this.runStateChange, this); + } + else if (this.usingXDomainReq) { + this.transport.onload = Ink.bind(this.runStateChange, this); + } + + try { + if (crossDomain) { + // Need explicit handling because Mozila aborts + // the script and Chrome fails silently.per the spec + throw this.makeError(18, 'NETWORK_ERR'); + } else { + this.startTime = new Date().getTime(); + this.transport.send(params); + } + } catch(e) { + this.safeCall('onException', e); + return this.finish(this.getResponse(), null); + } + + if(!this.options.asynchronous) { + this.runStateChange(); + } + } + }, + + /** + * Returns a new exception object that can be thrown + * + * @method makeError + * @param code Error Code + * @param message Message + * @returns {Object} + */ + makeError: function(code, message){ + if (typeof Error !== 'function') { + return {code: code, message: message}; + } + var e = new Error(message); + e.code = code; + return e; + }, + + /** + * Checks if a given string is valid JSON + * + * @method isJSON + * @param {String} str String to be evaluated + * @return {Boolean} True if the string is valid JSON + */ + isJSON: function(str) + { + if (typeof str !== "string" || !str){ return false; } + str = str.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); + return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); + }, + + /** + * Evaluates a given string as JSON + * + * @method evalJSON + * @param {String} str String to be evaluated + * @param {Boolean} sanitize Flag to sanitize the content + * @return {Object} JSON content as an object + */ + evalJSON: function(strJSON, sanitize) + { + if (strJSON && (!sanitize || this.isJSON(strJSON))) { + try { + if (typeof JSON !== "undefined" && typeof JSON.parse !== 'undefined'){ + return JSON.parse(strJSON); + } + /*jshint evil:true */ + return eval('(' + strJSON + ')'); + } catch(e) { + throw new Error('ERROR: Bad JSON string...'); + } + } + return null; + } + }; + + /** + * Loads content from a given url through an XMLHttpRequest. + * + * Shortcut function for simple AJAX use cases. Works with JSON, XML and plain text. + * + * @method load + * @param {String} url Request URL + * @param {Function} callback Callback to be executed if the request is successful + * @return {Object} XMLHttpRequest object + * + * @example + * Ajax.load('some/text/file', function (responseText) { + * doSomething(responseText); + * }); + * Ajax.load('some/xml/file', function (responseXML) { + * doSomething(responseXML); + * }); + * Ajax.load('some/json/file', function (responseJSON) { + * doSomething(responseJSON); + * }); + * + */ + Ajax.load = function(url, callback){ + return new Ajax(url, { + method: 'GET', + onSuccess: function(response){ + callback(response.responseJSON || response.responseText, response); + } + }); + }; + + /** + * Loads content from a given url through an XMLHttpRequest. + * Shortcut function for simple AJAX use cases. + * + * @method ping + * @param {String} url Request url + * @param {Function} callback Callback to be executed if the request is successful + * @return {Object} XMLHttpRequest object + */ + Ajax.ping = function(url, callback){ + return new Ajax(url, { + method: 'HEAD', + onSuccess: function(response){ + if (typeof callback === 'function'){ + callback(response); + } + } + }); + }; + + + return Ajax; +}); + +/** + * @module Ink.Net.JsonP_1 + * Cross Browser Ajax requests + * @version 1 + */ + +Ink.createModule('Ink.Net.JsonP', '1', [], function() { + + 'use strict'; + + /** + * Executes a JSONP request + * + * @class Ink.Net.JsonP + * @constructor + * + * @param {String} uri Request URL + * @param {Object} options Request options + * @param {Function} options.onSuccess Success callback + * @param {Function} [options.onFailure] Failure callback + * @param {Object} [options.failureObj] Object to be passed as argument to failure callback + * @param {Number} [options.timeout] Timeout for request fail, in seconds. defaults to 10 + * @param {Object} [options.params] Object with the parameters and respective values to unfold + * @param {String} [options.callbackParam] Parameter to use as callback. defaults to 'jsoncallback' + * @param {String} [options.internalCallback] Name of the callback function stored in the Ink.Net.JsonP object. + * + * @example + * Ink.requireModules(['Ink.Net.JsonP_1'], function (JsonP) { + * var jsonp = new JsonP('http://path.to.jsonp/endpoint', { + * // When the JSONP response arrives, this callback is called: + * onSuccess: function (gameData) { + * game.startGame(gameData); + * }, + * // after options.timeout seconds, this callback gets called: + * onFailure: function () { + * game.error('Could not load game data!'); + * }, + * timeout: 5 + * }); + * }); + */ + var JsonP = function(uri, options) { + this.init(uri, options); + }; + + JsonP.prototype = { + + init: function(uri, options) { + this.options = Ink.extendObj( { + onSuccess: undefined, + onFailure: undefined, + failureObj: {}, + timeout: 10, + params: {}, + callbackParam: 'jsoncallback', + internalCallback: '_cb', + randVar: false + }, options || {}); + + if(this.options.randVar !== false) { + this.randVar = this.options.randVar; + } else { + this.randVar = parseInt(Math.random() * 100000, 10); + } + + this.options.internalCallback += this.randVar; + + this.uri = uri; + + // prevent SAPO legacy onComplete - make it onSuccess + if(typeof(this.options.onComplete) === 'function') { + this.options.onSuccess = this.options.onComplete; + } + + if (typeof this.uri !== 'string') { + throw 'Please define an URI'; + } + + if (typeof this.options.onSuccess !== 'function') { + throw 'please define a callback function on option onSuccess!'; + } + + Ink.Net.JsonP[this.options.internalCallback] = Ink.bind(function() { + window.clearTimeout(this.timeout); + delete window.Ink.Net.JsonP[this.options.internalCallback]; + this._removeScriptTag(); + this.options.onSuccess(arguments[0]); + }, this); + + this._addScriptTag(); + }, + + _addParamsToGet: function(uri, params) { + var hasQuestionMark = uri.indexOf('?') !== -1; + var sep, pKey, pValue, parts = [uri]; + + for (pKey in params) { + if (params.hasOwnProperty(pKey)) { + if (!hasQuestionMark) { sep = '?'; hasQuestionMark = true; } + else { sep = '&'; } + pValue = params[pKey]; + if (typeof pValue !== 'number' && !pValue) { pValue = ''; } + parts = parts.concat([sep, pKey, '=', encodeURIComponent(pValue)]); + } + } + + return parts.join(''); + }, + + _getScriptContainer: function() { + var headEls = document.getElementsByTagName('head'); + if (headEls.length === 0) { + var scriptEls = document.getElementsByTagName('script'); + return scriptEls[0]; + } + return headEls[0]; + }, + + _addScriptTag: function() { + // enrich options will callback and random seed + this.options.params[this.options.callbackParam] = 'Ink.Net.JsonP.' + this.options.internalCallback; + this.options.params.rnd_seed = this.randVar; + this.uri = this._addParamsToGet(this.uri, this.options.params); + // create script tag + var scriptEl = document.createElement('script'); + scriptEl.type = 'text/javascript'; + scriptEl.src = this.uri; + var scriptCtn = this._getScriptContainer(); + scriptCtn.appendChild(scriptEl); + this.timeout = setTimeout(Ink.bind(this._requestFailed, this), (this.options.timeout * 1000)); + }, + + _requestFailed : function () { + delete Ink.Net.JsonP[this.options.internalCallback]; + this._removeScriptTag(); + if(typeof this.options.onFailure === 'function'){ + this.options.onFailure(this.options.failureObj); + } + }, + + _removeScriptTag: function() { + var scriptEl; + var scriptEls = document.getElementsByTagName('script'); + var scriptUri; + for (var i = 0, f = scriptEls.length; i < f; ++i) { + scriptEl = scriptEls[i]; + scriptUri = scriptEl.getAttribute('src') || scriptEl.src; + if (scriptUri !== null && scriptUri === this.uri) { + scriptEl.parentNode.removeChild(scriptEl); + return; + } + } + } + + }; + + return JsonP; + +}); +/** + * @module Ink.Dom.Browser_1 + * @version 1 + * Browser Detection and User Agent sniffing + */ +Ink.createModule('Ink.Dom.Browser', '1', [], function() { + 'use strict'; + + /** + * @namespace Ink.Dom.Browser + * @version 1 + * @static + * @example + * + */ + var Browser = { + /** + * True if the browser is Internet Explorer + * + * @property IE + * @type {Boolean} + * @public + * @static + */ + IE: false, + + /** + * True if the browser is Gecko based + * + * @property GECKO + * @type {Boolean} + * @public + * @static + */ + GECKO: false, + + /** + * True if the browser is Opera + * + * @property OPERA + * @type {Boolean} + * @public + * @static + */ + OPERA: false, + + /** + * True if the browser is Safari + * + * @property SAFARI + * @type {Boolean} + * @public + * @static + */ + SAFARI: false, + + /** + * True if the browser is Konqueror + * + * @property KONQUEROR + * @type {Boolean} + * @public + * @static + */ + KONQUEROR: false, + + /** + * True if browser is Chrome + * + * @property CHROME + * @type {Boolean} + * @public + * @static + */ + CHROME: false, + + /** + * The specific browser model. + * False if it is unavailable. + * + * @property model + * @type {Boolean|String} + * @public + * @static + */ + model: false, + + /** + * The browser version. + * False if it is unavailable. + * + * @property version + * @type {Boolean|String} + * @public + * @static + */ + version: false, + + /** + * The user agent string. + * False if it is unavailable. + * + * @property userAgent + * @type {Boolean|String} + * @public + * @static + */ + userAgent: false, + + /** + * Initialization function for the Browser object. + * + * Is called automatically when this module is loaded, and calls setDimensions, setBrowser and setReferrer. + * + * @method init + * @public + */ + init: function() { + this.detectBrowser(); + this.setDimensions(); + this.setReferrer(); + }, + + /** + * Retrieves and stores window dimensions in this object. Called automatically when this module is loaded. + * + * @method setDimensions + * @public + */ + setDimensions: function() { + //this.windowWidth=window.innerWidth !== null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body !== null ? document.body.clientWidth : null; + //this.windowHeight=window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null; + var myWidth = 0, myHeight = 0; + if ( typeof window.innerWidth=== 'number' ) { + myWidth = window.innerWidth; + myHeight = window.innerHeight; + } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { + myWidth = document.documentElement.clientWidth; + myHeight = document.documentElement.clientHeight; + } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { + myWidth = document.body.clientWidth; + myHeight = document.body.clientHeight; + } + this.windowWidth = myWidth; + this.windowHeight = myHeight; + }, + + /** + * Stores the referrer. Called automatically when this module is loaded. + * + * @method setReferrer + * @public + */ + setReferrer: function() { + if (document.referrer && document.referrer.length) { + this.referrer = window.escape(document.referrer); + } else { + this.referrer = false; + } + }, + + /** + * Detects the browser and stores the found properties. Called automatically when this module is loaded. + * + * @method detectBrowser + * @public + */ + detectBrowser: function() { + this._sniffUserAgent(navigator.userAgent); + }, + + _sniffUserAgent: function (sAgent) { + this.userAgent = sAgent; + + sAgent = sAgent.toLowerCase(); + + if (/applewebkit\//.test(sAgent)) { + this.cssPrefix = '-webkit-'; + this.domPrefix = 'Webkit'; + if(/(chrome|crios)\//.test(sAgent)) { + // Chrome + this.CHROME = true; + this.model = 'chrome'; + this.version = sAgent.replace(/(.*)chrome\/([^\s]+)(.*)/, "$2"); + } else { + // Safari + this.SAFARI = true; + this.model = 'safari'; + var rVersion = /version\/([^) ]+)/; + if (rVersion.test(sAgent)) { + this.version = sAgent.match(rVersion)[1]; + } else { + this.version = sAgent.replace(/(.*)applewebkit\/([^\s]+)(.*)/, "$2"); + } + } + } else if (/opera/.test(sAgent)) { + // Opera + this.OPERA = true; + this.model = 'opera'; + this.version = sAgent.replace(/(.*)opera.([^\s$]+)(.*)/, "$2"); + this.cssPrefix = '-o-'; + this.domPrefix = 'O'; + } else if (/konqueror/.test(sAgent)) { + // Konqueroh + this.KONQUEROR = true; + this.model = 'konqueror'; + this.version = sAgent.replace(/(.*)konqueror\/([^;]+);(.*)/, "$2"); + this.cssPrefix = '-khtml-'; + this.domPrefix = 'Khtml'; + } else if (/(msie|trident)/i.test(sAgent)) { + // MSIE + this.IE = true; + this.model = 'ie'; + if (/rv:((?:\d|\.)+)/.test(sAgent)) { // IE 11 + this.version = sAgent.match(/rv:((?:\d|\.)+)/)[1]; + } else { + this.version = sAgent.replace(/(.*)\smsie\s([^;]+);(.*)/, "$2"); + } + this.cssPrefix = '-ms-'; + this.domPrefix = 'ms'; + } else if (/gecko/.test(sAgent)) { + // GECKO + // Supports only: + // Camino, Chimera, Epiphany, Minefield (firefox 3), Firefox, Firebird, Phoenix, Galeon, + // Iceweasel, K-Meleon, SeaMonkey, Netscape, Songbird, Sylera, + this.cssPrefix = '-moz-'; + this.domPrefix = 'Moz'; + + this.GECKO = true; + + var re = /(camino|chimera|epiphany|minefield|firefox|firebird|phoenix|galeon|iceweasel|k\-meleon|seamonkey|netscape|songbird|sylera)/; + if(re.test(sAgent)) { + this.model = sAgent.match(re)[1]; + this.version = sAgent.replace(new RegExp("(.*)"+this.model+"\/([^;\\s$]+)(.*)"), "$2"); + } else { + // probably is mozilla + this.model = 'mozilla'; + var reVersion = /(.*)rv:([^)]+)(.*)/; + if(reVersion.test(sAgent)) { + this.version = sAgent.replace(reVersion, "$2"); + } + } + } + }, + + /** + * Debug function which displays browser (and Ink.Dom.Browser) information as an alert message. + * + * @method debug + * @public + * + * @example + * + * The following code + * + * Ink.requireModules(['Ink.Dom.Browser_1'], function (Browser) { + * Browser.debug(); + * }); + * + * Alerts (On Firefox 22): + * + * known browsers: (ie, gecko, opera, safari, konqueror) + * false,true,false,false,false + * model -> firefox + * version -> 22.0 + * + * original UA -> Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0 + */ + debug: function() { + /*global alert:false */ + var str = "known browsers: (ie, gecko, opera, safari, konqueror) \n"; + str += [this.IE, this.GECKO, this.OPERA, this.SAFARI, this.KONQUEROR] +"\n"; + str += "model -> "+this.model+"\n"; + str += "version -> "+this.version+"\n"; + str += "\n"; + str += "original UA -> "+this.userAgent; + + alert(str); + } + }; + + Browser.init(); + + return Browser; +}); + +/** + * @module Ink.Dom.Css_1 + * @version 1 + * CSS Utilities and toolbox + */ + +Ink.createModule( 'Ink.Dom.Css', 1, [], function() { + + 'use strict'; + + // getComputedStyle feature detection. + var getCs = ("defaultView" in document) && ("getComputedStyle" in document.defaultView) ? document.defaultView.getComputedStyle : window.getComputedStyle; + + /** + * @namespace Ink.Dom.Css + * @static + */ + + var Css = { + /** + * Adds of removes a class. + * Depending on addRemState, this method either adds a class if it's true or removes if if false. + * + * @method addRemoveClassName + * @param {DOMElement|string} elm DOM element or element id + * @param {string} className class name to add or remove. + * @param {boolean} addRemState Whether to add or remove. `true` to add, `false` to remove. + * + * @example + * Ink.requireModules(['Ink.Dom.Css_1'], function (Css) { + * Css.addRemoveClassName(myElm, 'classss', true); // Adds the `classss` class. + * Css.addRemoveClassName(myElm, 'classss', false); // Removes the `classss` class. + * }); + */ + addRemoveClassName: function(elm, className, addRemState) { + if (addRemState) { + return this.addClassName(elm, className); + } + this.removeClassName(elm, className); + }, + + /** + * Adds a class to a given element + * + * @method addClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String|Array} className Classes + */ + addClassName: function(elm, className) { + elm = Ink.i(elm); + if (!elm || !className) { return null; } + className = ('' + className).split(/[, ]+/); + var i = 0; + var len = className.length; + + for (; i < len; i++) { + if (typeof elm.classList !== "undefined") { + elm.classList.add(className[i]); + } else if (!Css.hasClassName(elm, className[i])) { + elm.className += (elm.className ? ' ' : '') + className[i]; + } + } + }, + + /** + * Removes a class from a given element + * + * @method removeClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String|Array} className Class names to remove. You can either use a space separated string of classnames, comma-separated list or an array + */ + removeClassName: function(elm, className) { + elm = Ink.i(elm); + if (!elm || !className) { return null; } + + className = ('' + className).split(/[, ]+/); + var i = 0; + var len = className.length; + + if (typeof elm.classList !== "undefined"){ + for (; i < len; i++) { + elm.classList.remove(className[i]); + } + } else { + var elmClassName = elm.className || ''; + var re; + for (; i < len; i++) { + re = new RegExp("(^|\\s+)" + className[i] + "(\\s+|$)"); + elmClassName = elmClassName.replace(re, ' '); + } + elm.className = (elmClassName + .replace(/^\s+/, '') + .replace(/\s+$/, '')); + } + }, + + /** + * Alias to addRemoveClassName. + * Utility function, saves many if/elses. + * + * @method setClassName + * @uses addRemoveClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String|Array} className Class names to add\remove. Comma separated, space separated or simply an Array + * @param {Boolean} [add]=false Flag to switch behavior from removal to addition. true to add, false to remove + */ + setClassName: function(elm, className, add) { + this.addRemoveClassName(elm, className, add || false); + }, + + /** + * Checks if an element has a class. + * This method verifies if an element has ONE of a list of classes. If the last argument is flagged as true, instead checks if the element has ALL the classes + * + * @method hasClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String|Array} className Class names to test + * @param {Boolean} [all]=false If flagged as true, it will check if the element contains ALL the CSS classes + * @return {Boolean} true if a given class is applied to a given element + */ + hasClassName: function(elm, className, all) { + elm = Ink.i(elm); + if (!elm || !className) { return false; } + + className = ('' + className).split(/[, ]+/); + var i = 0; + var len = className.length; + var has; + var re; + + for ( ; i < len; i++) { + if (typeof elm.classList !== "undefined"){ + has = elm.classList.contains(className[i]); + } else { + var elmClassName = elm.className; + if (elmClassName === className[i]) { + has = true; + } else { + re = new RegExp("(^|\\s)" + className[i] + "(\\s|$)"); + has = re.test(elmClassName); + } + } + if (has && !all) { return true; } // return if looking for any class + if (!has && all) { return false; } // return if looking for all classes + } + + if (all) { + // if we got here, all classes were found so far + return true; + } else { + // if we got here with all == false, no class was found + return false; + } + }, + + /** + * Blinks a class from an element + * Add and removes the class from the element with a timeout, so it blinks + * + * @method blinkClass + * @uses addRemoveClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String|Array} className Class name(s) to blink + * @param {Boolean} timeout timeout in ms between adding and removing, default 100 ms + * @param {Boolean} negate is true, class is removed then added + */ + blinkClass: function(element, className, timeout, negate){ + element = Ink.i(element); + Css.addRemoveClassName(element, className, !negate); + setTimeout(function() { + Css.addRemoveClassName(element, className, negate); + }, Number(timeout) || 100); + }, + + /** + * Toggles a class name from a given element + * + * @method toggleClassName + * @param {DOMElement|String} elm DOM element or element id + * @param {String} className Class name + * @param {Boolean} [forceAdd] Flag to force adding the the classe names if they don't exist yet. + */ + toggleClassName: function(elm, className, forceAdd) { + if (elm && className){ + if (typeof elm.classList !== "undefined" && !/[, ]/.test(className)){ + elm = Ink.i(elm); + if (elm !== null){ + elm.classList.toggle(className); + } + return true; + } + } + + if (typeof forceAdd !== 'undefined') { + if (forceAdd === true) { + Css.addClassName(elm, className); + } + else if (forceAdd === false) { + Css.removeClassName(elm, className); + } + } else { + if (Css.hasClassName(elm, className)) { + Css.removeClassName(elm, className); + } else { + Css.addClassName(elm, className); + } + } + }, + + /** + * Sets the opacity of given element + * + * @method setOpacity + * @param {DOMElement|String} elm DOM element or element id + * @param {Number} value allows 0 to 1(default mode decimal) or percentage (warning using 0 or 1 will reset to default mode) + */ + setOpacity: function(elm, value) { + elm = Ink.i(elm); + if (elm !== null){ + var val = 1; + + if (!isNaN(Number(value))){ + if (value <= 0) { val = 0; } + else if (value <= 1) { val = value; } + else if (value <= 100) { val = value / 100; } + else { val = 1; } + } + + if (typeof elm.style.opacity !== 'undefined') { + elm.style.opacity = val; + } + else { + elm.style.filter = "alpha(opacity:"+(val*100|0)+")"; + } + } + }, + + /** + * Converts a css property name to a string in camelcase to be used with CSSStyleDeclaration. + * @method _camelCase + * @private + * @param {String} str String to convert + * @return {String} Converted string + */ + _camelCase: function(str) { + return str ? str.replace(/-(\w)/g, function (_, $1) { + return $1.toUpperCase(); + }) : str; + }, + + + /** + * Gets the value for an element's style attribute + * + * @method getStyle + * @param {DOMElement|String} elm DOM element or element id + * @param {String} style Which css attribute to fetch + * @return Style value + */ + getStyle: function(elm, style) { + elm = Ink.i(elm); + if (elm !== null) { + style = style === 'float' ? 'cssFloat': this._camelCase(style); + + var value = elm.style[style]; + + if (getCs && (!value || value === 'auto')) { + var css = getCs(elm, null); + value = css ? css[style] : null; + } + else if (!value && elm.currentStyle) { + value = elm.currentStyle[style]; + if (value === 'auto' && (style === 'width' || style === 'height')) { + value = elm["offset" + style.charAt(0).toUpperCase() + style.slice(1)] + "px"; + } + } + + if (style === 'opacity') { + return value ? parseFloat(value, 10) : 1.0; + } + else if (style === 'borderTopWidth' || style === 'borderBottomWidth' || + style === 'borderRightWidth' || style === 'borderLeftWidth' ) { + if (value === 'thin') { return '1px'; } + else if (value === 'medium') { return '3px'; } + else if (value === 'thick') { return '5px'; } + } + + return value === 'auto' ? null : value; + } + }, + + + /** + * Adds CSS rules to an element's style attribute. + * + * @method setStyle + * @param {DOMElement|String} elm DOM element or element id + * @param {String} style Which css attribute to set + * + * @example + * Change his color + *

        "He" is me

        + * + * + */ + setStyle: function(elm, style) { + elm = Ink.i(elm); + if (elm === null) { return; } + if (typeof style === 'string') { + elm.style.cssText += '; '+style; + + if (style.indexOf('opacity') !== -1) { + this.setOpacity(elm, style.match(/opacity:\s*(\d?\.?\d*)/)[1]); + } + } + else { + for (var prop in style) { + if (style.hasOwnProperty(prop)){ + if (prop === 'opacity') { + this.setOpacity(elm, style[prop]); + } + else if (prop === 'float' || prop === 'cssFloat') { + if (typeof elm.style.styleFloat === 'undefined') { + elm.style.cssFloat = style[prop]; + } + else { + elm.style.styleFloat = style[prop]; + } + } else { + elm.style[prop] = style[prop]; + } + } + } + } + }, + + + /** + * Shows an element. + * Internally it unsets the display property of an element. You can force a specific display property using forceDisplayProperty + * + * @method show + * @param {DOMElement|String} elm DOM element or element id + * @param {String} [forceDisplayProperty] Css display property to apply on show + */ + show: function(elm, forceDisplayProperty) { + elm = Ink.i(elm); + if (elm !== null) { + elm.style.display = (forceDisplayProperty) ? forceDisplayProperty : ''; + } + }, + + /** + * Hides an element. + * + * @method hide + * @param {DOMElement|String} elm DOM element or element id + */ + hide: function(elm) { + elm = Ink.i(elm); + if (elm !== null) { + elm.style.display = 'none'; + } + }, + + /** + * Shows or hides an element. + * If the show parameter is true, it shows the element. Otherwise, hides it. + * + * @method showHide + * @param {DOMElement|String} elm DOM element or element id + * @param {boolean} [show]=false Whether to show or hide `elm`. + */ + showHide: function(elm, show) { + elm = Ink.i(elm); + if (elm) { + elm.style.display = show ? '' : 'none'; + } + }, + + /** + * Toggles an element visibility. + * + * @method toggle + * @param {DOMElement|String} elm DOM element or element id + * @param {Boolean} forceShow Forces showing if element is hidden + */ + toggle: function(elm, forceShow) { + elm = Ink.i(elm); + if (elm !== null) { + if (typeof forceShow !== 'undefined') { + if (forceShow === true) { + this.show(elm); + } else { + this.hide(elm); + } + } else { + if (this.getStyle(elm,'display').toLowerCase() === 'none') { + this.show(elm); + } + else { + this.hide(elm); + } + } + } + }, + + _getRefTag: function(head){ + if (head.firstElementChild) { + return head.firstElementChild; + } + + for (var child = head.firstChild; child; child = child.nextSibling){ + if (child.nodeType === 1){ + return child; + } + } + return null; + }, + + /** + * Injects style tags with rules to the page. + * + * @method appendStyleTag + * @param {String} selector The css selector for the rule + * @param {String} style The content of the style rule + * @param {Object} options Options for the tag + * @param {String} [options.type]='text/css' File type + * @param {Boolean} [options.force]=false If true, the style tag will be appended to end of head + */ + appendStyleTag: function(selector, style, options){ + options = Ink.extendObj({ + type: 'text/css', + force: false + }, options || {}); + + var styles = document.getElementsByTagName("style"), + oldStyle = false, setStyle = true, i, l; + + for (i=0, l=styles.length; i= 0) { + setStyle = false; + } + } + + if (setStyle) { + var defStyle = document.createElement("style"), + head = document.getElementsByTagName("head")[0], + refTag = false, styleStr = ''; + + defStyle.type = options.type; + + styleStr += selector +" {"; + styleStr += style; + styleStr += "} "; + + if (typeof defStyle.styleSheet !== "undefined") { + defStyle.styleSheet.cssText = styleStr; + } else { + defStyle.appendChild(document.createTextNode(styleStr)); + } + + if (options.force){ + head.appendChild(defStyle); + } else { + refTag = this._getRefTag(head); + if (refTag){ + head.insertBefore(defStyle, refTag); + } + } + } + }, + + /** + * Injects an external link tag. + * This method add a stylesheet to the head of a page + * + * @method appendStylesheet + * @param {String} path File path + * @param {Object} options Options for the tag + * @param {String} [options.media]='screen' Media type + * @param {String} [options.type]='text/css' File type + * @param {Boolean} [options.force]=false If true, tag will be appended to end of head + */ + appendStylesheet: function(path, options){ + options = Ink.extendObj({ + media: 'screen', + type: 'text/css', + force: false + }, options || {}); + + var refTag, + style = document.createElement("link"), + head = document.getElementsByTagName("head")[0]; + + style.media = options.media; + style.type = options.type; + style.href = path; + style.rel = "Stylesheet"; + + if (options.force){ + head.appendChild(style); + } + else { + refTag = this._getRefTag(head); + if (refTag){ + head.insertBefore(style, refTag); + } + } + }, + + /** + * Injects an external link tag. + * Loads CSS via LINK element inclusion in HEAD (skips append if already there) + * + * Works similarly to appendStylesheet but: + * a) supports all browsers; + * b) supports optional callback which gets invoked once the CSS has been applied + * + * @method appendStylesheetCb + * @param {String} cssURI URI of the CSS to load, if empty ignores and just calls back directly + * @param {Function(cssURI)} [callback] optional callback which will be called once the CSS is loaded + */ + _loadingCSSFiles: {}, + _loadedCSSFiles: {}, + appendStylesheetCb: function(url, callback) { + if (!url) { + return callback(url); + } + + if (this._loadedCSSFiles[url]) { + return callback(url); + } + + var cbs = this._loadingCSSFiles[url]; + if (cbs) { + return cbs.push(callback); + } + + this._loadingCSSFiles[url] = [callback]; + + var linkEl = document.createElement('link'); + linkEl.type = 'text/css'; + linkEl.rel = 'stylesheet'; + linkEl.href = url; + + var headEl = document.getElementsByTagName('head')[0]; + headEl.appendChild(linkEl); + + var imgEl = document.createElement('img'); + /* + var _self = this; + (function(_url) { + imgEl.onerror = function() { + //var url = this; + var url = _url; + _self._loadedCSSFiles[url] = true; + var callbacks = _self._loadingCSSFiles[url]; + for (var i = 0, f = callbacks.length; i < f; ++i) { + callbacks[i](url); + } + delete _self._loadingCSSFiles[url]; + }; + })(url); + */ + imgEl.onerror = Ink.bindEvent(function(event, _url) { + //var url = this; + var url = _url; + this._loadedCSSFiles[url] = true; + var callbacks = this._loadingCSSFiles[url]; + for (var i = 0, f = callbacks.length; i < f; ++i) { + callbacks[i](url); + } + delete this._loadingCSSFiles[url]; + }, this, url); + imgEl.src = url; + }, + + /** + * Converts decimal to hexadecimal values + * Useful to convert colors to their hexadecimal representation. + * + * @method decToHex + * @param {String} dec Either a single decimal value, an rgb(r, g, b) string or an Object with r, g and b properties + * @return Hexadecimal value + */ + decToHex: function(dec) { + var normalizeTo2 = function(val) { + if (val.length === 1) { + val = '0' + val; + } + val = val.toUpperCase(); + return val; + }; + + if (typeof dec === 'object') { + var rDec = normalizeTo2(parseInt(dec.r, 10).toString(16)); + var gDec = normalizeTo2(parseInt(dec.g, 10).toString(16)); + var bDec = normalizeTo2(parseInt(dec.b, 10).toString(16)); + return rDec+gDec+bDec; + } + else { + dec += ''; + var rgb = dec.match(/\((\d+),\s?(\d+),\s?(\d+)\)/); + if (rgb !== null) { + return normalizeTo2(parseInt(rgb[1], 10).toString(16)) + + normalizeTo2(parseInt(rgb[2], 10).toString(16)) + + normalizeTo2(parseInt(rgb[3], 10).toString(16)); + } + else { + return normalizeTo2(parseInt(dec, 10).toString(16)); + } + } + }, + + /** + * Converts hexadecimal values to decimal + * Useful to use with CSS colors + * + * @method hexToDec + * @param {String} hex hexadecimal Value with 6, 3, 2 or 1 characters + * @return {Number} Object with properties r, g, b if length of number is >= 3 or decimal value instead. + */ + hexToDec: function(hex){ + if (hex.indexOf('#') === 0) { + hex = hex.substr(1); + } + if (hex.length === 6) { // will return object RGB + return { + r: parseInt(hex.substr(0,2), 16), + g: parseInt(hex.substr(2,2), 16), + b: parseInt(hex.substr(4,2), 16) + }; + } + else if (hex.length === 3) { // will return object RGB + return { + r: parseInt(hex.charAt(0) + hex.charAt(0), 16), + g: parseInt(hex.charAt(1) + hex.charAt(1), 16), + b: parseInt(hex.charAt(2) + hex.charAt(2), 16) + }; + } + else if (hex.length <= 2) { // will return int + return parseInt(hex, 16); + } + }, + + /** + * Get a single property from a stylesheet. + * Use this to obtain the value of a CSS property (searched from loaded CSS documents) + * + * @method getPropertyFromStylesheet + * @param {String} selector a CSS rule. must be an exact match + * @param {String} property a CSS property + * @return {String} value of the found property, or null if it wasn't matched + */ + getPropertyFromStylesheet: function(selector, property) { + var rule = this.getRuleFromStylesheet(selector); + if (rule) { + return rule.style[property]; + } + return null; + }, + + getPropertyFromStylesheet2: function(selector, property) { + var rules = this.getRulesFromStylesheet(selector); + /* + rules.forEach(function(rule) { + var x = rule.style[property]; + if (x !== null && x !== undefined) { + return x; + } + }); + */ + var x; + for(var i=0, t=rules.length; i < t; i++) { + x = rules[i].style[property]; + if (x !== null && x !== undefined) { + return x; + } + } + return null; + }, + + getRuleFromStylesheet: function(selector) { + var sheet, rules, ri, rf, rule; + var s = document.styleSheets; + if (!s) { + return null; + } + + for (var si = 0, sf = document.styleSheets.length; si < sf; ++si) { + sheet = document.styleSheets[si]; + rules = sheet.rules ? sheet.rules : sheet.cssRules; + if (!rules) { return null; } + + for (ri = 0, rf = rules.length; ri < rf; ++ri) { + rule = rules[ri]; + if (!rule.selectorText) { continue; } + if (rule.selectorText === selector) { + return rule; + } + } + } + + return null; + }, + + getRulesFromStylesheet: function(selector) { + var res = []; + var sheet, rules, ri, rf, rule; + var s = document.styleSheets; + if (!s) { return res; } + + for (var si = 0, sf = document.styleSheets.length; si < sf; ++si) { + sheet = document.styleSheets[si]; + rules = sheet.rules ? sheet.rules : sheet.cssRules; + if (!rules) { + return null; + } + + for (ri = 0, rf = rules.length; ri < rf; ++ri) { + rule = rules[ri]; + if (!rule.selectorText) { continue; } + if (rule.selectorText === selector) { + res.push(rule); + } + } + } + + return res; + }, + + getPropertiesFromRule: function(selector) { + var rule = this.getRuleFromStylesheet(selector); + var props = {}; + var prop, i, f; + + /*if (typeof rule.style.length === 'snumber') { + for (i = 0, f = rule.style.length; i < f; ++i) { + prop = this._camelCase( rule.style[i] ); + props[prop] = rule.style[prop]; + } + } + else { // HANDLES IE 8, FIREFOX RULE JOINING... */ + rule = rule.style.cssText; + var parts = rule.split(';'); + var steps, val, pre, pos; + for (i = 0, f = parts.length; i < f; ++i) { + if (parts[i].charAt(0) === ' ') { + parts[i] = parts[i].substring(1); + } + steps = parts[i].split(':'); + prop = this._camelCase( steps[0].toLowerCase() ); + val = steps[1]; + if (val) { + val = val.substring(1); + + if (prop === 'padding' || prop === 'margin' || prop === 'borderWidth') { + + if (prop === 'borderWidth') { pre = 'border'; pos = 'Width'; } + else { pre = prop; pos = ''; } + + if (val.indexOf(' ') !== -1) { + val = val.split(' '); + props[pre + 'Top' + pos] = val[0]; + props[pre + 'Bottom'+ pos] = val[0]; + props[pre + 'Left' + pos] = val[1]; + props[pre + 'Right' + pos] = val[1]; + } + else { + props[pre + 'Top' + pos] = val; + props[pre + 'Bottom'+ pos] = val; + props[pre + 'Left' + pos] = val; + props[pre + 'Right' + pos] = val; + } + } + else if (prop === 'borderRadius') { + if (val.indexOf(' ') !== -1) { + val = val.split(' '); + props.borderTopLeftRadius = val[0]; + props.borderBottomRightRadius = val[0]; + props.borderTopRightRadius = val[1]; + props.borderBottomLeftRadius = val[1]; + } + else { + props.borderTopLeftRadius = val; + props.borderTopRightRadius = val; + props.borderBottomLeftRadius = val; + props.borderBottomRightRadius = val; + } + } + else { + props[prop] = val; + } + } + } + //} + //console.log(props); + + return props; + }, + + /** + * Change the font size of elements. + * Changes the font size of the elements which match the given CSS rule + * For this function to work, the CSS file must be in the same domain than the host page, otherwise JS can't access it. + * + * @method changeFontSize + * @param {String} selector CSS selector rule + * @param {Number} delta Number of pixels to change on font-size + * @param {String} [op] Supported operations are '+' and '*'. defaults to '+' + * @param {Number} [minVal] If result gets smaller than minVal, change does not occurr + * @param {Number} [maxVal] If result gets bigger than maxVal, change does not occurr + */ + changeFontSize: function(selector, delta, op, minVal, maxVal) { + var that = this; + Ink.requireModules(['Ink.Dom.Selector_1'], function(Selector) { + var e; + if (typeof selector !== 'string') { e = '1st argument must be a CSS selector rule.'; } + else if (typeof delta !== 'number') { e = '2nd argument must be a number.'; } + else if (op !== undefined && op !== '+' && op !== '*') { e = '3rd argument must be one of "+", "*".'; } + else if (minVal !== undefined && (typeof minVal !== 'number' || minVal <= 0)) { e = '4th argument must be a positive number.'; } + else if (maxVal !== undefined && (typeof maxVal !== 'number' || maxVal < maxVal)) { e = '5th argument must be a positive number greater than minValue.'; } + if (e) { throw new TypeError(e); } + + var val, el, els = Selector.select(selector); + if (minVal === undefined) { minVal = 1; } + op = (op === '*') ? function(a,b){return a*b;} : function(a,b){return a+b;}; + for (var i = 0, f = els.length; i < f; ++i) { + el = els[i]; + val = parseFloat( that.getStyle(el, 'fontSize')); + val = op(val, delta); + if (val < minVal) { continue; } + if (typeof maxVal === 'number' && val > maxVal) { continue; } + el.style.fontSize = val + 'px'; + } + }); + } + + }; + + return Css; + +}); + +/** + * @module Ink.Dom.Element_1 + * @version 1 + * DOM Traversal and manipulation + */ + +Ink.createModule('Ink.Dom.Element', 1, [], function() { + + 'use strict'; + + var createContextualFragmentSupport = ( + typeof document.createRange === 'function' && + typeof window.Range.prototype.createContextualFragment === 'function'); + + var deleteThisTbodyToken = 'Ink.Dom.Element tbody: ' + Math.random(); + var browserCreatesTbodies = (function () { + var div = document.createElement('div'); + div.innerHTML = ''; + return div.getElementsByTagName('tbody').length !== 0; + }()); + + function rect(elem){ + var dimensions = {}; + try { + dimensions = elem.getBoundingClientRect(); + } catch(e){ + dimensions = { top: elem.offsetTop, left: elem.offsetLeft }; + } + return dimensions; + } + + /** + * @namespace Ink.Dom.Element_1 + */ + + var InkElement = { + + /** + * Shortcut for `document.getElementById` + * + * @method get + * @param {String|DOMElement} elm Either an ID of an element, or an element. + * @return {DOMElement|null} The DOM element with the given id or null when it was not found + * @sample Ink_Dom_Element_1_get.html + */ + get: function(elm) { + if(typeof elm !== 'undefined') { + if(typeof elm === 'string') { + return document.getElementById(elm); + } + return elm; + } + return null; + }, + + /** + * Creates a DOM element + * + * @method create + * @param {String} tag tag name + * @param {Object} properties object with properties to be set on the element. You can also call other functions in Ink.Dom.Element like this + * @sample Ink_Dom_Element_1_create.html + */ + create: function(tag, properties) { + var el = document.createElement(tag); + //Ink.extendObj(el, properties); + for(var property in properties) { + if(properties.hasOwnProperty(property)) { + if (property in InkElement) { + InkElement[property](el, properties[property]); + } else { + if(property === 'className' || property === 'class') { + el.className = properties.className || properties['class']; + } else { + el.setAttribute(property, properties[property]); + } + } + } + } + return el; + }, + + /** + * Removes a DOM Element + * + * @method remove + * @param {DOMElement} elm The element to remove + * @sample Ink_Dom_Element_1_remove.html + */ + remove: function(el) { + el = Ink.i(el); + var parEl; + if (el && (parEl = el.parentNode)) { + parEl.removeChild(el); + } + }, + + /** + * Scrolls the window to an element + * + * @method scrollTo + * @param {DOMElement|String} elm Element where to scroll + * @sample Ink_Dom_Element_1_scrollTo.html + */ + scrollTo: function(elm) { + elm = InkElement.get(elm); + if(elm) { + if (elm.scrollIntoView) { + return elm.scrollIntoView(); + } + + var elmOffset = {}, + elmTop = 0, elmLeft = 0; + + do { + elmTop += elm.offsetTop || 0; + elmLeft += elm.offsetLeft || 0; + + elm = elm.offsetParent; + } while(elm); + + elmOffset = {x: elmLeft, y: elmTop}; + + window.scrollTo(elmOffset.x, elmOffset.y); + } + }, + + /** + * Gets the top offset of an element + * + * @method offsetTop + * @uses Ink.Dom.Browser + * + * @param {DOMElement|String} elm Target element + * @return {Number} Offset from the target element to the top of the document + * @sample Ink_Dom_Element_1_offsetTop.html + */ + offsetTop: function(elm) { + return InkElement.offset(elm)[1]; + }, + + /** + * Gets the left offset of an element + * + * @method offsetLeft + * @uses Ink.Dom.Browser + * + * @param {DOMElement|String} elm Target element + * @return {Number} Offset from the target element to the left of the document + * @sample Ink_Dom_Element_1_offsetLeft.html + */ + offsetLeft: function(elm) { + return InkElement.offset(elm)[0]; + }, + + /** + * Gets the relative offset of an element + * + * @method positionedOffset + * @param {DOMElement|String} elm Target element + * @return {Array} Array with the element offsetleft and offsettop relative to the closest positioned ancestor + * @sample Ink_Dom_Element_1_positionedOffset.html + */ + positionedOffset: function(element) { + var valueTop = 0, valueLeft = 0; + element = InkElement.get(element); + do { + valueTop += element.offsetTop || 0; + valueLeft += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + if (element.tagName.toLowerCase() === 'body') { break; } + + var value = element.style.position; + if (!value && element.currentStyle) { + value = element.currentStyle.position; + } + if ((!value || value === 'auto') && typeof getComputedStyle !== 'undefined') { + var css = getComputedStyle(element, null); + value = css ? css.position : null; + } + if (value === 'relative' || value === 'absolute') { break; } + } + } while (element); + return [valueLeft, valueTop]; + }, + + /** + * Gets the cumulative offset for an element + * + * Returns the top left position of the element on the page + * + * @method offset + * @uses Ink.Dom.Browser + * + * @method offset + * @param {DOMElement|String} elm Target element + * @return {[Number, Number]} Array with pixel distance from the target element to the top left corner of the document + * @sample Ink_Dom_Element_1_offset.html + */ + offset: function(el) { + /*jshint boss:true */ + el = Ink.i(el); + var res = [0, 0]; + var doc = el.ownerDocument, + docElem = doc.documentElement, + box = rect(el), + body = doc.body, + clientTop = docElem.clientTop || body.clientTop || 0, + clientLeft = docElem.clientLeft || body.clientLeft || 0, + scrollTop = doc.pageYOffset || docElem.scrollTop || body.scrollTop, + scrollLeft = doc.pageXOffset || docElem.scrollLeft || body.scrollLeft, + top = box.top + scrollTop - clientTop, + left = box.left + scrollLeft - clientLeft; + res = [left, top]; + return res; + }, + + /** + * Gets the scroll of the element + * + * @method scroll + * @param {DOMElement|String} [elm] Target element or document.body + * @returns {Array} offset values for x and y scroll + * @sample Ink_Dom_Element_1_scroll.html + */ + scroll: function(elm) { + elm = elm ? Ink.i(elm) : document.body; + return [ + ( ( !window.pageXOffset ) ? elm.scrollLeft : window.pageXOffset ), + ( ( !window.pageYOffset ) ? elm.scrollTop : window.pageYOffset ) + ]; + }, + + _getPropPx: function(cs, prop) { + var n, c; + var val = cs.getPropertyValue ? cs.getPropertyValue(prop) : cs[prop]; + if (!val) { n = 0; } + else { + c = val.indexOf('px'); + if (c === -1) { n = 0; } + else { + n = parseFloat(val, 10); + } + } + + //console.log([prop, ' "', val, '" ', n].join('')); + + return n; + }, + + /** + * Alias for offset() + * + * @method offset2 + * @deprecated Kept for historic reasons. Use offset() instead. + */ + offset2: function(el) { + return InkElement.offset(el); + }, + + /** + * Checks if an element has an attribute + * + * @method hasAttribute + * @param {Object} elm Target element + * @param {String} attr Attribute name + * @return {Boolean} Boolean based on existance of attribute + * @sample Ink_Dom_Element_1_hasAttribute.html + */ + hasAttribute: function(elm, attr){ + elm = Ink.i(elm); + return elm.hasAttribute ? elm.hasAttribute(attr) : !!elm.getAttribute(attr); + }, + /** + * Inserts an element right after another + * + * @method insertAfter + * @param {DOMElement} newElm Element to be inserted + * @param {DOMElement|String} targetElm Key element + * @sample Ink_Dom_Element_1_insertAfter.html + */ + insertAfter: function(newElm, targetElm) { + /*jshint boss:true */ + if (targetElm = InkElement.get(targetElm)) { + if (targetElm.nextSibling !== null) { + targetElm.parentNode.insertBefore(newElm, targetElm.nextSibling); + } else { + targetElm.parentNode.appendChild(newElm); + } + } + }, + + /** + * Inserts an element before another + * + * @method insertBefore + * @param {DOMElement} newElm Element to be inserted + * @param {DOMElement|String} targetElm Key element + * @sample Ink_Dom_Element_1_insertBefore.html + */ + insertBefore: function (newElm, targetElm) { + /*jshint boss:true */ + if ( (targetElm = InkElement.get(targetElm)) ) { + targetElm.parentNode.insertBefore(newElm, targetElm); + } + }, + + /** + * Inserts an element as the first child of another + * + * @method insertTop + * @param {DOMElement} newElm Element to be inserted + * @param {DOMElement|String} targetElm Key element + * @sample Ink_Dom_Element_1_insertTop.html + */ + insertTop: function(newElm,targetElm) { + /*jshint boss:true */ + if (targetElm = InkElement.get(targetElm)) { + if (targetElm.firstChild) { + targetElm.insertBefore(newElm, targetElm.firstChild); + } else { + targetElm.appendChild(newElm); + } + } + }, + + /** + * Inserts an element as the last child of another + * + * @method insertBottom + * @param {DOMElement} newElm Element to be inserted + * @param {DOMElement|String} targetElm Key element + * @sample Ink_Dom_Element_1_insertBottom.html + */ + insertBottom: function(newElm, targetElm) { + /*jshint boss:true */ + targetElm = Ink.i(targetElm); + targetElm.appendChild(newElm); + }, + + /** + * Retrieves textContent from node + * + * @method textContent + * @param {DOMNode} node Where to retreive text from. Can be any node type. + * @return {String} the text + * @sample Ink_Dom_Element_1_textContent.html + */ + textContent: function(node){ + node = Ink.i(node); + var text, k, cs, m; + + switch(node && node.nodeType) { + case 9: /*DOCUMENT_NODE*/ + // IE quirks mode does not have documentElement + return InkElement.textContent(node.documentElement || node.body && node.body.parentNode || node.body); + + case 1: /*ELEMENT_NODE*/ + text = node.innerText; + if (typeof text !== 'undefined') { + return text; + } + /* falls through */ + case 11: /*DOCUMENT_FRAGMENT_NODE*/ + text = node.textContent; + if (typeof text !== 'undefined') { + return text; + } + + if (node.firstChild === node.lastChild) { + // Common case: 0 or 1 children + return InkElement.textContent(node.firstChild); + } + + text = []; + cs = node.childNodes; + for (k = 0, m = cs.length; k < m; ++k) { + text.push( InkElement.textContent( cs[k] ) ); + } + return text.join(''); + + case 3: /*TEXT_NODE*/ + case 4: /*CDATA_SECTION_NODE*/ + return node.nodeValue; + } + return ''; + }, + + /** + * Replaces text content of a DOM Node + * This method removes any child node previously present + * + * @method setTextContent + * @param {DOMNode} node node Target node where the text will be added. + * @param {String} text text Text to be added on the node. + * @sample Ink_Dom_Element_1_setTextContent.html + */ + setTextContent: function(node, text){ + node = Ink.i(node); + switch(node && node.nodeType) + { + case 1: /*ELEMENT_NODE*/ + if ('innerText' in node) { + node.innerText = text; + break; + } + /* falls through */ + case 11: /*DOCUMENT_FRAGMENT_NODE*/ + if ('textContent' in node) { + node.textContent = text; + break; + } + /* falls through */ + case 9: /*DOCUMENT_NODE*/ + while(node.firstChild) { + node.removeChild(node.firstChild); + } + if (text !== '') { + var doc = node.ownerDocument || node; + node.appendChild(doc.createTextNode(text)); + } + break; + + case 3: /*TEXT_NODE*/ + case 4: /*CDATA_SECTION_NODE*/ + node.nodeValue = text; + break; + } + }, + + /** + * Checks if an element is a link + * + * @method isLink + * @param {DOMNode} node Node to check if it's link + * @return {Boolean} + * @sample Ink_Dom_Element_1_isLink.html + */ + isLink: function(element){ + var b = element && element.nodeType === 1 && ((/^a|area$/i).test(element.tagName) || + element.hasAttributeNS && element.hasAttributeNS('http://www.w3.org/1999/xlink','href')); + return !!b; + }, + + /** + * Checks if a node is an ancestor of another + * + * @method isAncestorOf + * @param {DOMNode} ancestor Ancestor node + * @param {DOMNode} node Descendant node + * @return {Boolean} + * @sample Ink_Dom_Element_1_isAncestorOf.html + */ + isAncestorOf: function(ancestor, node){ + /*jshint boss:true */ + if (!node || !ancestor) { + return false; + } + if (node.compareDocumentPosition) { + return (ancestor.compareDocumentPosition(node) & 0x10) !== 0;/*Node.DOCUMENT_POSITION_CONTAINED_BY*/ + } + while (node = node.parentNode){ + if (node === ancestor){ + return true; + } + } + return false; + }, + + /** + * Checks if a node is descendant of another + * + * @method descendantOf + * @param {DOMNode} node The ancestor + * @param {DOMNode} descendant The descendant + * @return {Boolean} true if 'descendant' is descendant of 'node' + * @sample Ink_Dom_Element_1_descendantOf.html + */ + descendantOf: function(node, descendant){ + return node !== descendant && InkElement.isAncestorOf(node, descendant); + }, + + /** + * Get first child element of another + * @method firstElementChild + * @param {DOMElement} elm Parent node + * @return {DOMElement} the Element child + * @sample Ink_Dom_Element_1_firstElementChild.html + */ + firstElementChild: function(elm){ + if(!elm) { + return null; + } + if ('firstElementChild' in elm) { + return elm.firstElementChild; + } + var child = elm.firstChild; + while(child && child.nodeType !== 1) { + child = child.nextSibling; + } + return child; + }, + + /** + * Get the last child element of another + * @method lastElementChild + * @param {DOMElement} elm Parent node + * @return {DOMElement} the Element child + * @sample Ink_Dom_Element_1_lastElementChild.html + */ + lastElementChild: function(elm){ + if(!elm) { + return null; + } + if ('lastElementChild' in elm) { + return elm.lastElementChild; + } + var child = elm.lastChild; + while(child && child.nodeType !== 1) { + child = child.previousSibling; + } + return child; + }, + + /** + * Get the first sibling element after the node + * + * @method nextElementSibling + * @param {DOMNode} node The current node + * @return {DOMElement|Null} The first sibling element after node or null if none is found + * @sample Ink_Dom_Element_1_nextElementSibling.html + */ + nextElementSibling: function(node){ + var sibling = null; + + if(!node){ return sibling; } + + if("nextElementSibling" in node){ + return node.nextElementSibling; + } else { + sibling = node.nextSibling; + + // 1 === Node.ELEMENT_NODE + while(sibling && sibling.nodeType !== 1){ + sibling = sibling.nextSibling; + } + + return sibling; + } + }, + + /** + * Get the first sibling element before the node + * + * @method previousElementSibling + * @param {DOMNode} node The current node + * @return {DOMElement|Null} The first element sibling before node or null if none is found + * @sample Ink_Dom_Element_1_previousElementSibling.html + */ + previousElementSibling: function(node){ + var sibling = null; + + if(!node){ return sibling; } + + if("previousElementSibling" in node){ + return node.previousElementSibling; + } else { + sibling = node.previousSibling; + + // 1 === Node.ELEMENT_NODE + while(sibling && sibling.nodeType !== 1){ + sibling = sibling.previousSibling; + } + + return sibling; + } + }, + + /** + * Get an element's width in pixels. + * + * @method elementWidth + * @param {DOMElement|String} element Target DOM element or target ID + * @return {Number} The element's width + * @sample Ink_Dom_Element_1_elementWidth.html + */ + elementWidth: function(element) { + if(typeof element === "string") { + element = document.getElementById(element); + } + return element.offsetWidth; + }, + + /** + * Get an element's height in pixels. + * + * @method elementHeight + * @param {DOMElement|String} element DOM element or target ID + * @return {Number} The element's height + * @sample Ink_Dom_Element_1_elementHeight.html + */ + elementHeight: function(element) { + if(typeof element === "string") { + element = document.getElementById(element); + } + return element.offsetHeight; + }, + + /** + * Deprecated. Alias for offsetLeft() + * + * @method elementLeft + * @param {DOMElement|String} element DOM element or target ID + * @return {Number} Element's left position + */ + elementLeft: function(element) { + return InkElement.offsetLeft(element); + }, + + /** + * Deprecated. Alias for offsetTop() + * + * @method elementTop + * @param {DOMElement|string} element Target DOM element or target ID + * @return {Number} element's top position + */ + elementTop: function(element) { + return InkElement.offsetTop(element); + }, + + /** + * Get an element's dimensions in pixels. + * + * @method elementDimensions + * @param {DOMElement|string} element DOM element or target ID + * @return {Array} Array with element's width and height + * @sample Ink_Dom_Element_1_elementDimensions.html + */ + elementDimensions: function(element) { + element = Ink.i(element); + return [element.offsetWidth, element.offsetHeight]; + }, + + /** + * Get the outer dimensions of an element in pixels. + * + * @method outerDimensions + * @uses Ink.Dom.Css + * + * @param {DOMElement} element Target element + * @return {Array} Array with element width and height. + * @sample Ink_Dom_Element_1_outerDimensions.html + */ + outerDimensions: function (element) { + var bbox = rect(element); + + var Css = Ink.getModule('Ink.Dom.Css_1'); + var getStyle = Ink.bindMethod(Css, 'getStyle', element); + + return [ + bbox.right - bbox.left + parseFloat(getStyle('marginLeft') || 0) + parseFloat(getStyle('marginRight') || 0), // w + bbox.bottom - bbox.top + parseFloat(getStyle('marginTop') || 0) + parseFloat(getStyle('marginBottom') || 0) // h + ]; + }, + + /** + * Check if an element is inside the viewport + * + * @method inViewport + * @param {DOMElement} element DOM Element + * @param {Object} [options] Options object. If you pass a Boolean value here, it is interpreted as `options.partial` + * @param {Boolean} [options.partial]=false Return `true` even if it is only partially visible. + * @param {Number} [options.margin]=0 Consider a margin all around the viewport with `opts.margin` width a dead zone. + * @return {Boolean} + * @sample Ink_Dom_Element_1_inViewport.html + */ + inViewport: function (element, opts) { + var dims = rect(Ink.i(element)); + if (typeof opts === 'boolean') { + opts = {partial: opts, margin: 0}; + } + opts = Ink.extendObj({ partial: false, margin: 0}, opts || {}); + if (opts.partial) { + return dims.bottom + opts.margin > 0 && // from the top + dims.left - opts.margin < InkElement.viewportWidth() && // from the right + dims.top - opts.margin < InkElement.viewportHeight() && // from the bottom + dims.right + opts.margin > 0; // from the left + } else { + return dims.top + opts.margin > 0 && // from the top + dims.right - opts.margin < InkElement.viewportWidth() && // from the right + dims.bottom - opts.margin < InkElement.viewportHeight() && // from the bottom + dims.left + opts.margin > 0; // from the left + } + }, + + /** + * Check if an element is hidden. + * Taken from Mootools Element extras ( https://gist.github.com/cheeaun/73342 ) + * Does not take into account visibility:hidden + * @method isHidden + * @param {DOMElement} element Element to check + * @return {Boolean} + * @sample Ink_Dom_Element_1_isHidden.html + */ + + isHidden: function (element) { + var w = element.offsetWidth, + h = element.offsetHeight, + force = (element.tagName.toLowerCase() === 'tr'); + + var Css = Ink.getModule('Ink.Dom.Css_1'); + + return (w===0 && h===0 && !force) ? true : + (w!==0 && h!==0 && !force) ? false : + Css.getStyle(element, 'display').toLowerCase() === 'none'; + }, + + /** + * Check if an element is visible + * + * @method isVisible + * @uses isHidden + * @param {DOMElement} element Element to check + * @return {Boolean} + * @sample Ink_Dom_Element_1_isVisible.html + */ + + isVisible: function (element) { + return !this.isHidden(element); + }, + + /** + * Clones an element's position to another + * + * @method clonePosition + * @param {DOMElement} cloneTo element to be position cloned + * @param {DOMElement} cloneFrom element to get the cloned position + * @return {DOMElement} The element with positionClone + * @sample Ink_Dom_Element_1_clonePosition.html + */ + clonePosition: function(cloneTo, cloneFrom){ + var pos = InkElement.offset(cloneFrom); + cloneTo.style.left = pos[0]+'px'; + cloneTo.style.top = pos[1]+'px'; + + return cloneTo; + }, + + /** + * Text-overflow: ellipsis emulation + * Slices off a piece of text at the end of the element and adds the ellipsis so all text fits inside. + * + * @method ellipsizeText + * @param {DOMElement} element Element to modify text content + * @param {String} [ellipsis]='\u2026' String to append to the chopped text + */ + ellipsizeText: function(element/*, ellipsis*/){ + if ((element = Ink.i(element))) { + element.style.overflow = 'hidden'; + element.style.whiteSpace = 'nowrap'; + element.style.textOverflow = 'ellipsis'; + } + }, + + /** + * Finds the closest ancestor element matching your test function + * + * + * @method findUpwardsHaving + * @param {DOMElement} element Element to base the search from + * @param {Function} boolTest Testing function + * @return {DOMElement|false} The matched element or false if did not match + * @sample Ink_Dom_Element_1_findUpwardsHaving.html + */ + findUpwardsHaving: function(element, boolTest) { + while (element && element.nodeType === 1) { + if (boolTest(element)) { + return element; + } + element = element.parentNode; + } + return false; + }, + + /** + * Finds the closest ancestor by class name + * + * @method findUpwardsByClass + * @uses findUpwardsHaving + * @param {DOMElement} element Element to base the search from + * @param {String} className Class name to search + * @returns {DOMElement|false} The matched element or false if did not match + * @sample Ink_Dom_Element_1_findUpwardsByClass.html + */ + findUpwardsByClass: function(element, className) { + var re = new RegExp("(^|\\s)" + className + "(\\s|$)"); + var tst = function(el) { + var cls = el.className; + return cls && re.test(cls); + }; + return InkElement.findUpwardsHaving(element, tst); + }, + + /** + * Finds the closest ancestor by tag name + * + * @method findUpwardsByTag + * @param {DOMElement} element Element to base the search from + * @param {String} tag Tag to search + * @returns {DOMElement|false} the matched element or false if did not match + * @sample Ink_Dom_Element_1_findUpwardsByTag.html + */ + findUpwardsByTag: function(element, tag) { + tag = tag.toUpperCase(); + var tst = function(el) { + return el.nodeName && el.nodeName.toUpperCase() === tag; + }; + return InkElement.findUpwardsHaving(element, tst); + }, + + /** + * Finds the closest ancestor by id + * + * @method findUpwardsById + * @param {HtmlElement} element Element to base the search from + * @param {String} id ID to search + * @returns {HtmlElement|false} The matched element or false if did not match + * @sample Ink_Dom_Element_1_findUpwardsById.html + */ + findUpwardsById: function(element, id) { + var tst = function(el) { + return el.id === id; + }; + return InkElement.findUpwardsHaving(element, tst); + }, + + /** + * Finds the closest ancestor by CSS selector + * + * @method findUpwardsBySelector + * @param {HtmlElement} element Element to base the search from + * @param {String} sel CSS selector + * @returns {HtmlElement|false} The matched element or false if did not match + * @sample Ink_Dom_Element_1_findUpwardsBySelector.html + */ + findUpwardsBySelector: function(element, sel) { + var Selector = Ink.getModule('Ink.Dom.Selector', '1'); + if (!Selector) { + throw new Error('This method requires Ink.Dom.Selector'); + } + var tst = function(el) { + return Selector.matchesSelector(el, sel); + }; + return InkElement.findUpwardsHaving(element, tst); + }, + + /** + * Gets the trimmed text of an element + * + * @method getChildrenText + * @param {DOMElement} el Element to base the search from + * @param {Boolean} [removeIt] Flag to remove the text from the element + * @return {String} Text found + * @sample Ink_Dom_Element_1_getChildrenText.html + */ + getChildrenText: function(el, removeIt) { + var node, + j, + part, + nodes = el.childNodes, + jLen = nodes.length, + text = ''; + + if (!el) { + return text; + } + + for (j = 0; j < jLen; ++j) { + node = nodes[j]; + if (!node) { continue; } + if (node.nodeType === 3) { // TEXT NODE + part = InkElement._trimString( String(node.data) ); + if (part.length > 0) { + text += part; + if (removeIt) { el.removeChild(node); } + } + else { el.removeChild(node); } + } + } + + return text; + }, + + /** + * String trim implementation + * Used by getChildrenText + * + * function _trimString + * param {String} text + * return {String} trimmed text + */ + _trimString: function(text) { + return (String.prototype.trim) ? text.trim() : text.replace(/^\s*/, '').replace(/\s*$/, ''); + }, + + /** + * Gets value of a select element + * + * @method getSelectValues + * @param {DOMElement|String} select element + * @return {Array} The selected values + * @sample Ink_Dom_Element_1_getSelectValues.html + */ + getSelectValues: function (select) { + var selectEl = Ink.i(select); + var values = []; + for (var i = 0; i < selectEl.options.length; ++i) { + values.push( selectEl.options[i].value ); + } + return values; + }, + + + /* used by fills */ + _normalizeData: function(data) { + var d, data2 = []; + for (var i = 0, f = data.length; i < f; ++i) { + d = data[i]; + + if (!(d instanceof Array)) { // if not array, wraps primitive twice: val -> [val, val] + d = [d, d]; + } + else if (d.length === 1) { // if 1 element array: [val] -> [val, val] + d.push(d[0]); + } + data2.push(d); + } + return data2; + }, + + + /** + * Fills a select element with options + * + * @method fillSelect + * @param {DOMElement|String} container Select element which will get filled + * @param {Array} data Data to populate the component + * @param {Boolean} [skipEmpty] Flag to skip empty option + * @param {String|Number} [defaultValue] Initial selected value + * + * @sample Ink_Dom_Element_1_fillSelect.html + */ + fillSelect: function(container, data, skipEmpty, defaultValue) { + var containerEl = Ink.i(container); + if (!containerEl) { return; } + + containerEl.innerHTML = ''; + var d, optionEl; + + if (!skipEmpty) { + // add initial empty option + optionEl = document.createElement('option'); + optionEl.setAttribute('value', ''); + containerEl.appendChild(optionEl); + } + + data = InkElement._normalizeData(data); + + for (var i = 0, f = data.length; i < f; ++i) { + d = data[i]; + + optionEl = document.createElement('option'); + optionEl.setAttribute('value', d[0]); + if (d.length > 2) { + optionEl.setAttribute('extra', d[2]); + } + optionEl.appendChild( document.createTextNode(d[1]) ); + + if (d[0] === defaultValue) { + optionEl.setAttribute('selected', 'selected'); + } + + containerEl.appendChild(optionEl); + } + }, + + + /** + * Creates a set of radio buttons from an array of data + * + * @method fillRadios + * @param {DOMElement|String} insertAfterEl Element after which the input elements will be created + * @param {String} name Name for the form field ([] is added if not present as a suffix) + * @param {Array} data Data to populate the component + * @param {Boolean} [skipEmpty] Flag to skip creation of empty options + * @param {String|Number} [defaultValue] Initial selected value + * @param {String} [splitEl] Name of element to add after each input element (example: 'br') + * @return {DOMElement} Wrapper element around the radio buttons + */ + fillRadios: function(insertAfterEl, name, data, skipEmpty, defaultValue, splitEl) { + insertAfterEl = Ink.i(insertAfterEl); + var containerEl = document.createElement('span'); + InkElement.insertAfter(containerEl, insertAfterEl); + + data = InkElement._normalizeData(data); + + /* + if (name.substring(name.length - 1) !== ']') { + name += '[]'; + } + */ + + var d, inputEl; + + if (!skipEmpty) { + // add initial empty option + inputEl = document.createElement('input'); + inputEl.setAttribute('type', 'radio'); + inputEl.setAttribute('name', name); + inputEl.setAttribute('value', ''); + containerEl.appendChild(inputEl); + if (splitEl) { containerEl.appendChild( document.createElement(splitEl) ); } + } + + for (var i = 0; i < data.length; ++i) { + d = data[i]; + + inputEl = document.createElement('input'); + inputEl.setAttribute('type', 'radio'); + inputEl.setAttribute('name', name); + inputEl.setAttribute('value', d[0]); + containerEl.appendChild(inputEl); + containerEl.appendChild( document.createTextNode(d[1]) ); + if (splitEl) { containerEl.appendChild( document.createElement(splitEl) ); } + + if (d[0] === defaultValue) { + inputEl.checked = true; + } + } + + return containerEl; + }, + + + /** + * Creates set of checkbox buttons + * + * @method fillChecks + * @param {DOMElement|String} insertAfterEl Element after which the input elements will be created + * @param {String} name Name for the form field ([] is added if not present as a suffix) + * @param {Array} data Data to populate the component + * @param {Boolean} [skipEmpty] Flag to skip creation of empty options + * @param {String|Number} [defaultValue] Initial selected value + * @param {String} [splitEl] Name of element to add after each input element (example: 'br') + * @return {DOMElement} Wrapper element around the checkboxes + */ + fillChecks: function(insertAfterEl, name, data, defaultValue, splitEl) { + insertAfterEl = Ink.i(insertAfterEl); + var containerEl = document.createElement('span'); + InkElement.insertAfter(containerEl, insertAfterEl); + + data = InkElement._normalizeData(data); + + if (name.substring(name.length - 1) !== ']') { + name += '[]'; + } + + var d, inputEl; + + for (var i = 0; i < data.length; ++i) { + d = data[i]; + + inputEl = document.createElement('input'); + inputEl.setAttribute('type', 'checkbox'); + inputEl.setAttribute('name', name); + inputEl.setAttribute('value', d[0]); + containerEl.appendChild(inputEl); + containerEl.appendChild( document.createTextNode(d[1]) ); + if (splitEl) { containerEl.appendChild( document.createElement(splitEl) ); } + + if (d[0] === defaultValue) { + inputEl.checked = true; + } + } + + return containerEl; + }, + + + /** + * Gets the index of an element relative to a parent + * + * @method parentIndexOf + * @param {DOMElement} parentEl Element to parse + * @param {DOMElement} childEl Child Element to look for + * @return {Number} The index of the childEl inside parentEl. Returns -1 if it's not a direct child + * @sample Ink_Dom_Element_1_parentIndexOf.html + */ + parentIndexOf: function(parentEl, childEl) { + var node, idx = 0; + for (var i = 0, f = parentEl.childNodes.length; i < f; ++i) { + node = parentEl.childNodes[i]; + if (node.nodeType === 1) { // ELEMENT + if (node === childEl) { return idx; } + ++idx; + } + } + return -1; + }, + + + /** + * Gets the next siblings of an element + * + * @method nextSiblings + * @param {String|DOMElement} elm Element + * @return {Array} Array of next sibling elements + * @sample Ink_Dom_Element_1_nextSiblings.html + */ + nextSiblings: function(elm) { + elm = Ink.i(elm); + if(typeof(elm) === 'object' && elm !== null && elm.nodeType && elm.nodeType === 1) { + var elements = [], + siblings = elm.parentNode.children, + index = InkElement.parentIndexOf(elm.parentNode, elm); + + for(var i = ++index, len = siblings.length; i
        " + deleteThisTbodyToken + "
        "; + } else { + div.innerHTML = "" + html + "
        "; + } + return div.firstChild; + }, + TBODY: function (div, html) { + div.innerHTML = '' + html + '
        '; + return div.firstChild.getElementsByTagName('tbody')[0]; + }, + THEAD: function (div, html) { + div.innerHTML = '' + html + '
        '; + return div.firstChild.getElementsByTagName('thead')[0]; + }, + TFOOT: function (div, html) { + div.innerHTML = '' + html + '
        '; + return div.firstChild.getElementsByTagName('tfoot')[0]; + }, + TR: function (div, html) { + div.innerHTML = '' + html + '
        '; + return div.firstChild.firstChild.firstChild; + } + }, + + /** + * Gets a wrapper DIV with a certain HTML content to be inserted inside another element. + * This is necessary for appendHTML,prependHTML functions, because they need a container element to copy the children from. + * + * Works around IE table quirks + * @method _getWrapper + * @private + * @param elm + * @param html + */ + _getWrapper: function (elm, html) { + var nodeName = elm.nodeName && elm.nodeName.toUpperCase(); + var wrapper = document.createElement('div'); + var wrapFunc = InkElement._wrapElements[nodeName]; + + if ( !wrapFunc ) { + wrapper.innerHTML = html; + return wrapper; + } + // special cases + wrapper = wrapFunc(wrapper, html); + // worst case: tbody auto-creation even when our HTML has a tbody. + if (browserCreatesTbodies && nodeName === 'TABLE') { + // terrible case. Deal with tbody creation too. + var tds = wrapper.getElementsByTagName('td'); + for (var i = 0, len = tds.length; i < len; i++) { + if (tds[i].innerHTML === deleteThisTbodyToken) { + var tbody = tds[i].parentNode.parentNode; + tbody.parentNode.removeChild(tbody); + } + } + } + return wrapper; + }, + + /** + * Appends HTML to an element. + * This method parses the html string and doesn't modify its contents + * + * @method appendHTML + * @param {String|DOMElement} elm Element + * @param {String} html Markup string + * @sample Ink_Dom_Element_1_appendHTML.html + */ + appendHTML: function(elm, html){ + elm = Ink.i(elm); + if(elm !== null) { + var wrapper = InkElement._getWrapper(elm, html); + while (wrapper.firstChild) { + elm.appendChild(wrapper.firstChild); + } + } + }, + + /** + * Prepends HTML to an element. + * This method parses the html string and doesn't modify its contents + * + * @method prependHTML + * @param {String|DOMElement} elm Element + * @param {String} html Markup string + * @sample Ink_Dom_Element_1_prependHTML.html + */ + prependHTML: function(elm, html){ + elm = Ink.i(elm); + if(elm !== null) { + var wrapper = InkElement._getWrapper(elm, html); + while (wrapper.lastChild) { + elm.insertBefore(wrapper.lastChild, elm.firstChild); + } + } + }, + + /** + * Sets the inner HTML of an element. + * + * @method setHTML + * @param {String|DOMElement} elm Element + * @param {String} html Markup string + * @sample Ink_Dom_Element_1_setHTML.html + */ + setHTML: function (elm, html) { + elm = Ink.i(elm); + if(elm !== null) { + try { + elm.innerHTML = html; + } catch (e) { + // Tables in IE7 + while (elm.firstChild) { + elm.removeChild(elm.firstChild); + } + InkElement.appendHTML(elm, html); + } + } + }, + + /** + * Wraps an element inside a container. + * + * The container may or may not be in the document yet. + * + * @method wrap + * @param {String|DOMElement} target Element to be wrapped + * @param {String|DOMElement} container Element to wrap the target + * @return Container element + * @sample Ink_Dom_Element_1_wrap.html + * + * @example + * before: + * + *
        + * + * call this function to wrap #target with a wrapper div. + * + * InkElement.wrap('target', InkElement.create('div', {id: 'container'}); + * + * after: + * + *
        + */ + wrap: function (target, container) { + target = Ink.i(target); + container = Ink.i(container); + + var nextNode = target.nextSibling; + var parent = target.parentNode; + + container.appendChild(target); + + if (nextNode !== null) { + parent.insertBefore(container, nextNode); + } else { + parent.appendChild(container); + } + + return container; + }, + + /** + * Places an element outside a wrapper. + * + * @method unwrap + * @param {DOMElement} elem The element you're trying to unwrap. This should be an ancestor of the wrapper. + * @param {String} [wrapperSelector] CSS Selector for the ancestor. Use this if your wrapper is not the direct parent of elem. + * @sample Ink_Dom_Element_1_unwrap.html + * + * @example + * + * When you have this: + * + *
        + *
        + *
        + * + * If you do this: + * + * InkElement.unwrap('unwrapMe'); + * + * You get this: + * + *
        + *
        + * + **/ + unwrap: function (elem, wrapperSelector) { + elem = Ink.i(elem); + var wrapper; + if (typeof wrapperSelector === 'string') { + wrapper = InkElement.findUpwardsBySelector(elem, wrapperSelector); + } else if (typeof wrapperSelector === 'object' && wrapperSelector.tagName) { + wrapper = InkElement.findUpwardsHaving(elem, function (ancestor) { + return ancestor === wrapperSelector; + }); + } else { + wrapper = elem.parentNode; + } + if (!wrapper || !wrapper.parentNode) { return; } + + InkElement.insertBefore(elem, wrapper); + }, + + /** + * Replaces an element with another. + * + * @method replace + * @param element The element to be replaced. + * @param replacement The new element. + * @sample Ink_Dom_Element_1_replace.html + * + * @example + * var newelement1 = InkElement.create('div'); + * // ... + * replace(Ink.i('element1'), newelement1); + */ + replace: function (element, replacement) { + element = Ink.i(element); + if(element !== null) { + element.parentNode.replaceChild(replacement, element); + } + }, + + /** + * Removes direct text children. + * Useful to remove nasty layout gaps generated by whitespace on the markup. + * + * @method removeTextNodeChildren + * @param {DOMElement} el Element to remove text from + * @sample Ink_Dom_Element_1_removeTextNodeChildren.html + */ + removeTextNodeChildren: function(el) { + el = Ink.i(el); + if(el !== null) { + var prevEl, toRemove, parent = el; + el = el.firstChild; + while (el) { + toRemove = (el.nodeType === 3); + prevEl = el; + el = el.nextSibling; + if (toRemove) { + parent.removeChild(prevEl); + } + } + } + }, + + /** + * Creates a documentFragment from an HTML string. + * + * @method htmlToFragment + * @param {String} html HTML string + * @return {DocumentFragment} DocumentFragment containing all of the elements from the html string + * @sample Ink_Dom_Element_1_htmlToFragment.html + */ + htmlToFragment: (createContextualFragmentSupport ? + function(html){ + var range; + + if(typeof html !== 'string'){ return document.createDocumentFragment(); } + + range = document.createRange(); + + // set the context to document.body (firefox does this already, webkit doesn't) + range.selectNode(document.body); + + return range.createContextualFragment(html); + } : function (html) { + var fragment = document.createDocumentFragment(), + tempElement, + current; + + if(typeof html !== 'string'){ return fragment; } + + tempElement = document.createElement('div'); + tempElement.innerHTML = html; + + // append child removes elements from the original parent + while( (current = tempElement.firstChild) ){ // intentional assignment + fragment.appendChild(current); + } + + return fragment; + }), + + _camelCase: function(str) + { + return str ? str.replace(/-(\w)/g, function (_, $1){ + return $1.toUpperCase(); + }) : str; + }, + + /** + * Gets data attributes from an element + * + * @method data + * @param {String|DOMElement} selector Element or CSS selector + * @return {Object} Object with the data-* properties. If no data-attributes are present, an empty object is returned. + * @sample Ink_Dom_Element_1_data.html + */ + data: function(selector) { + var el; + if (typeof selector !== 'object' && typeof selector !== 'string') { + throw '[Ink.Dom.Element.data] :: Invalid selector defined'; + } + + if (typeof selector === 'object') { + el = selector; + } + else { + var InkDomSelector = Ink.getModule('Ink.Dom.Selector', 1); + if (!InkDomSelector) { + throw "[Ink.Dom.Element.data] :: this method requires Ink.Dom.Selector - v1"; + } + el = InkDomSelector.select(selector); + if (el.length <= 0) { + throw "[Ink.Dom.Element.data] :: Can't find any element with the specified selector"; + } + el = el[0]; + } + + var dataset = {}; + var attrs = el.attributes || []; + + var curAttr, curAttrName, curAttrValue; + if (attrs) { + for (var i = 0, total = attrs.length; i < total; ++i) { + curAttr = attrs[i]; + curAttrName = curAttr.name; + curAttrValue = curAttr.value; + if (curAttrName && curAttrName.indexOf('data-') === 0) { + dataset[InkElement._camelCase(curAttrName.replace('data-', ''))] = curAttrValue; + } + } + } + + return dataset; + }, + + /** + * Move the cursor on an input or textarea element. + * @method moveCursorTo + * @param {DOMElement} el Input or Textarea element + * @param {Number} t Index of the character to move the cursor to + * @sample Ink_Dom_Element_1_moveCursorTo.html + */ + moveCursorTo: function(el, t) { + el = Ink.i(el); + if(el !== null) { + if (el.setSelectionRange) { + el.setSelectionRange(t, t); + //el.focus(); + } + else { + var range = el.createTextRange(); + range.collapse(true); + range.moveEnd( 'character', t); + range.moveStart('character', t); + range.select(); + } + } + }, + + /** + * Get the page's width. + * @method pageWidth + * @return {Number} Page width in pixels + * @sample Ink_Dom_Element_1_pageWidth.html + */ + pageWidth: function() { + var xScroll; + + if (window.innerWidth && window.scrollMaxX) { + xScroll = window.innerWidth + window.scrollMaxX; + } else if (document.body.scrollWidth > document.body.offsetWidth){ + xScroll = document.body.scrollWidth; + } else { + xScroll = document.body.offsetWidth; + } + + var windowWidth; + + if (window.self.innerWidth) { + if(document.documentElement.clientWidth){ + windowWidth = document.documentElement.clientWidth; + } else { + windowWidth = window.self.innerWidth; + } + } else if (document.documentElement && document.documentElement.clientWidth) { + windowWidth = document.documentElement.clientWidth; + } else if (document.body) { + windowWidth = document.body.clientWidth; + } + + if(xScroll < windowWidth){ + return xScroll; + } else { + return windowWidth; + } + }, + + /** + * Get the page's height. + * @method pageHeight + * @return {Number} Page height in pixels + * @sample Ink_Dom_Element_1_pageHeight.html + */ + pageHeight: function() { + var yScroll; + + if (window.innerHeight && window.scrollMaxY) { + yScroll = window.innerHeight + window.scrollMaxY; + } else if (document.body.scrollHeight > document.body.offsetHeight){ + yScroll = document.body.scrollHeight; + } else { + yScroll = document.body.offsetHeight; + } + + var windowHeight; + + if (window.self.innerHeight) { + windowHeight = window.self.innerHeight; + } else if (document.documentElement && document.documentElement.clientHeight) { + windowHeight = document.documentElement.clientHeight; + } else if (document.body) { + windowHeight = document.body.clientHeight; + } + + if(yScroll < windowHeight){ + return windowHeight; + } else { + return yScroll; + } + }, + + /** + * Get the viewport's width. + * @method viewportWidth + * @return {Number} Viewport width in pixels + * @sample Ink_Dom_Element_1_viewportWidth.html + */ + viewportWidth: function() { + if(typeof window.innerWidth !== "undefined") { + return window.innerWidth; + } + if (document.documentElement && typeof document.documentElement.offsetWidth !== "undefined") { + return document.documentElement.offsetWidth; + } + }, + + /** + * Get the viewport's height. + * @method viewportHeight + * @return {Number} Viewport height in pixels + * @sample Ink_Dom_Element_1_viewportHeight.html + */ + viewportHeight: function() { + if (typeof window.innerHeight !== "undefined") { + return window.innerHeight; + } + if (document.documentElement && typeof document.documentElement.offsetHeight !== "undefined") { + return document.documentElement.offsetHeight; + } + }, + + /** + * Get the scroll's width. + * @method scrollWidth + * @return {Number} Scroll width + */ + scrollWidth: function() { + if (typeof window.self.pageXOffset !== 'undefined') { + return window.self.pageXOffset; + } + if (typeof document.documentElement !== 'undefined' && typeof document.documentElement.scrollLeft !== 'undefined') { + return document.documentElement.scrollLeft; + } + return document.body.scrollLeft; + }, + + /** + * Get the scroll's height. + * @method scrollHeight + * @return {Number} Scroll height + */ + scrollHeight: function() { + if (typeof window.self.pageYOffset !== 'undefined') { + return window.self.pageYOffset; + } + if (typeof document.documentElement !== 'undefined' && typeof document.documentElement.scrollTop !== 'undefined') { + return document.documentElement.scrollTop; + } + return document.body.scrollTop; + } + }; + + return InkElement; + +}); + +/** + * @module Ink.Dom.Event_1 + * @version 1 + * Event management + */ + +Ink.createModule('Ink.Dom.Event', 1, [], function() { + /* jshint + asi:true, + strict:false, + laxcomma:true, + eqeqeq:false, + laxbreak:true, + boss:true, + curly:false, + expr:true + */ + + /** + * @namespace Ink.Dom.Event_1 + * @static + */ + + /*! + * Bean - copyright (c) Jacob Thornton 2011-2012 + * https://github.com/fat/bean + * MIT license + */ + var bean = (function (name, context, definition) { + return definition() + })('bean', this, function (name, context) { + name = name || 'bean' + context = context || this + + var win = window + , old = context[name] + , namespaceRegex = /[^\.]*(?=\..*)\.|.*/ + , nameRegex = /\..*/ + , addEvent = 'addEventListener' + , removeEvent = 'removeEventListener' + , doc = document || {} + , root = doc.documentElement || {} + , W3C_MODEL = root[addEvent] + , eventSupport = W3C_MODEL ? addEvent : 'attachEvent' + , ONE = {} // singleton for quick matching making add() do one() + + , slice = Array.prototype.slice + , str2arr = function (s, d) { return s.split(d || ' ') } + , isString = function (o) { return typeof o == 'string' } + , isFunction = function (o) { return typeof o == 'function' } + + // events that we consider to be 'native', anything not in this list will + // be treated as a custom event + , standardNativeEvents = + 'click dblclick mouseup mousedown contextmenu ' + // mouse buttons + 'mousewheel mousemultiwheel DOMMouseScroll ' + // mouse wheel + 'mouseover mouseout mousemove selectstart selectend ' + // mouse movement + 'keydown keypress keyup ' + // keyboard + 'orientationchange ' + // mobile + 'focus blur change reset select submit ' + // form elements + 'load unload beforeunload resize move DOMContentLoaded ' + // window + 'readystatechange message ' + // window + 'error abort scroll ' // misc + // element.fireEvent('onXYZ'... is not forgiving if we try to fire an event + // that doesn't actually exist, so make sure we only do these on newer browsers + , w3cNativeEvents = + 'show ' + // mouse buttons + 'input invalid ' + // form elements + 'touchstart touchmove touchend touchcancel ' + // touch + 'gesturestart gesturechange gestureend ' + // gesture + 'textinput' + // TextEvent + 'readystatechange pageshow pagehide popstate ' + // window + 'hashchange offline online ' + // window + 'afterprint beforeprint ' + // printing + 'dragstart dragenter dragover dragleave drag drop dragend ' + // dnd + 'loadstart progress suspend emptied stalled loadmetadata ' + // media + 'loadeddata canplay canplaythrough playing waiting seeking ' + // media + 'seeked ended durationchange timeupdate play pause ratechange ' + // media + 'volumechange cuechange ' + // media + 'checking noupdate downloading cached updateready obsolete ' // appcache + + // convert to a hash for quick lookups + , nativeEvents = (function (hash, events, i) { + for (i = 0; i < events.length; i++) events[i] && (hash[events[i]] = 1) + return hash + }({}, str2arr(standardNativeEvents + (W3C_MODEL ? w3cNativeEvents : '')))) + + // custom events are events that we *fake*, they are not provided natively but + // we can use native events to generate them + , customEvents = (function () { + var isAncestor = 'compareDocumentPosition' in root + ? function (element, container) { + return container.compareDocumentPosition && (container.compareDocumentPosition(element) & 16) === 16 + } + : 'contains' in root + ? function (element, container) { + container = container.nodeType === 9 || container === window ? root : container + return container !== element && container.contains(element) + } + : function (element, container) { + while (element = element.parentNode) if (element === container) return 1 + return 0 + } + , check = function (event) { + var related = event.relatedTarget + return !related + ? related == null + : (related !== this && related.prefix !== 'xul' && !/document/.test(this.toString()) + && !isAncestor(related, this)) + } + + return { + mouseenter: { base: 'mouseover', condition: check } + , mouseleave: { base: 'mouseout', condition: check } + , mousewheel: { base: /Firefox/.test(navigator.userAgent) ? 'DOMMouseScroll' : 'mousewheel' } + } + }()) + + // we provide a consistent Event object across browsers by taking the actual DOM + // event object and generating a new one from its properties. + , Event = (function () { + // a whitelist of properties (for different event types) tells us what to check for and copy + var commonProps = str2arr('altKey attrChange attrName bubbles cancelable ctrlKey currentTarget ' + + 'detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey ' + + 'srcElement target timeStamp type view which propertyName') + , mouseProps = commonProps.concat(str2arr('button buttons clientX clientY dataTransfer ' + + 'fromElement offsetX offsetY pageX pageY screenX screenY toElement')) + , mouseWheelProps = mouseProps.concat(str2arr('wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ ' + + 'axis')) // 'axis' is FF specific + , keyProps = commonProps.concat(str2arr('char charCode key keyCode keyIdentifier ' + + 'keyLocation location')) + , textProps = commonProps.concat(str2arr('data')) + , touchProps = commonProps.concat(str2arr('touches targetTouches changedTouches scale rotation')) + , messageProps = commonProps.concat(str2arr('data origin source')) + , stateProps = commonProps.concat(str2arr('state')) + , overOutRegex = /over|out/ + // some event types need special handling and some need special properties, do that all here + , typeFixers = [ + { // key events + reg: /key/i + , fix: function (event, newEvent) { + newEvent.keyCode = event.keyCode || event.which + return keyProps + } + } + , { // mouse events + reg: /click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i + , fix: function (event, newEvent, type) { + newEvent.rightClick = event.which === 3 || event.button === 2 + newEvent.pos = { x: 0, y: 0 } + if (event.pageX || event.pageY) { + newEvent.clientX = event.pageX + newEvent.clientY = event.pageY + } else if (event.clientX || event.clientY) { + newEvent.clientX = event.clientX + doc.body.scrollLeft + root.scrollLeft + newEvent.clientY = event.clientY + doc.body.scrollTop + root.scrollTop + } + if (overOutRegex.test(type)) { + newEvent.relatedTarget = event.relatedTarget + || event[(type == 'mouseover' ? 'from' : 'to') + 'Element'] + } + return mouseProps + } + } + , { // mouse wheel events + reg: /mouse.*(wheel|scroll)/i + , fix: function () { return mouseWheelProps } + } + , { // TextEvent + reg: /^text/i + , fix: function () { return textProps } + } + , { // touch and gesture events + reg: /^touch|^gesture/i + , fix: function () { return touchProps } + } + , { // message events + reg: /^message$/i + , fix: function () { return messageProps } + } + , { // popstate events + reg: /^popstate$/i + , fix: function () { return stateProps } + } + , { // everything else + reg: /.*/ + , fix: function () { return commonProps } + } + ] + , typeFixerMap = {} // used to map event types to fixer functions (above), a basic cache mechanism + + , Event = function (event, element, isNative) { + if (!arguments.length) return + event = event || ((element.ownerDocument || element.document || element).parentWindow || win).event + this.originalEvent = event + this.isNative = isNative + this.isBean = true + + if (!event) return + + var type = event.type + , target = event.target || event.srcElement + , i, l, p, props, fixer + + this.target = target && target.nodeType === 3 ? target.parentNode : target + + if (isNative) { // we only need basic augmentation on custom events, the rest expensive & pointless + fixer = typeFixerMap[type] + if (!fixer) { // haven't encountered this event type before, map a fixer function for it + for (i = 0, l = typeFixers.length; i < l; i++) { + if (typeFixers[i].reg.test(type)) { // guaranteed to match at least one, last is .* + typeFixerMap[type] = fixer = typeFixers[i].fix + break + } + } + } + + props = fixer(event, this, type) + for (i = props.length; i--;) { + if (!((p = props[i]) in this) && p in event) this[p] = event[p] + } + } + } + + // preventDefault() and stopPropagation() are a consistent interface to those functions + // on the DOM, stop() is an alias for both of them together + Event.prototype.preventDefault = function () { + if (this.originalEvent.preventDefault) this.originalEvent.preventDefault() + else this.originalEvent.returnValue = false + } + Event.prototype.stopPropagation = function () { + if (this.originalEvent.stopPropagation) this.originalEvent.stopPropagation() + else this.originalEvent.cancelBubble = true + } + Event.prototype.stop = function () { + this.preventDefault() + this.stopPropagation() + this.stopped = true + } + // stopImmediatePropagation() has to be handled internally because we manage the event list for + // each element + // note that originalElement may be a Bean#Event object in some situations + Event.prototype.stopImmediatePropagation = function () { + if (this.originalEvent.stopImmediatePropagation) this.originalEvent.stopImmediatePropagation() + this.isImmediatePropagationStopped = function () { return true } + } + Event.prototype.isImmediatePropagationStopped = function () { + return this.originalEvent.isImmediatePropagationStopped && this.originalEvent.isImmediatePropagationStopped() + } + Event.prototype.clone = function (currentTarget) { + //TODO: this is ripe for optimisation, new events are *expensive* + // improving this will speed up delegated events + var ne = new Event(this, this.element, this.isNative) + ne.currentTarget = currentTarget + return ne + } + + return Event + }()) + + // if we're in old IE we can't do onpropertychange on doc or win so we use doc.documentElement for both + , targetElement = function (element, isNative) { + return !W3C_MODEL && !isNative && (element === doc || element === win) ? root : element + } + + /** + * Bean maintains an internal registry for event listeners. We don't touch elements, objects + * or functions to identify them, instead we store everything in the registry. + * Each event listener has a RegEntry object, we have one 'registry' for the whole instance. + */ + , RegEntry = (function () { + // each handler is wrapped so we can handle delegation and custom events + var wrappedHandler = function (element, fn, condition, args) { + var call = function (event, eargs) { + return fn.apply(element, args ? slice.call(eargs, event ? 0 : 1).concat(args) : eargs) + } + , findTarget = function (event, eventElement) { + return fn.__beanDel ? fn.__beanDel.ft(event.target, element) : eventElement + } + , handler = condition + ? function (event) { + var target = findTarget(event, this) // deleated event + if (condition.apply(target, arguments)) { + if (event) event.currentTarget = target + return call(event, arguments) + } + } + : function (event) { + if (fn.__beanDel) event = event.clone(findTarget(event)) // delegated event, fix the fix + return call(event, arguments) + } + handler.__beanDel = fn.__beanDel + return handler + } + + , RegEntry = function (element, type, handler, original, namespaces, args, root) { + var customType = customEvents[type] + , isNative + + if (type == 'unload') { + // self clean-up + handler = once(removeListener, element, type, handler, original) + } + + if (customType) { + if (customType.condition) { + handler = wrappedHandler(element, handler, customType.condition, args) + } + type = customType.base || type + } + + this.isNative = isNative = nativeEvents[type] && !!element[eventSupport] + this.customType = !W3C_MODEL && !isNative && type + this.element = element + this.type = type + this.original = original + this.namespaces = namespaces + this.eventType = W3C_MODEL || isNative ? type : 'propertychange' + this.target = targetElement(element, isNative) + this[eventSupport] = !!this.target[eventSupport] + this.root = root + this.handler = wrappedHandler(element, handler, null, args) + } + + // given a list of namespaces, is our entry in any of them? + RegEntry.prototype.inNamespaces = function (checkNamespaces) { + var i, j, c = 0 + if (!checkNamespaces) return true + if (!this.namespaces) return false + for (i = checkNamespaces.length; i--;) { + for (j = this.namespaces.length; j--;) { + if (checkNamespaces[i] == this.namespaces[j]) c++ + } + } + return checkNamespaces.length === c + } + + // match by element, original fn (opt), handler fn (opt) + RegEntry.prototype.matches = function (checkElement, checkOriginal, checkHandler) { + return this.element === checkElement && + (!checkOriginal || this.original === checkOriginal) && + (!checkHandler || this.handler === checkHandler) + } + + return RegEntry + }()) + + , registry = (function () { + // our map stores arrays by event type, just because it's better than storing + // everything in a single array. + // uses '$' as a prefix for the keys for safety and 'r' as a special prefix for + // rootListeners so we can look them up fast + var map = {} + + // generic functional search of our registry for matching listeners, + // `fn` returns false to break out of the loop + , forAll = function (element, type, original, handler, root, fn) { + var pfx = root ? 'r' : '$' + if (!type || type == '*') { + // search the whole registry + for (var t in map) { + if (t.charAt(0) == pfx) { + forAll(element, t.substr(1), original, handler, root, fn) + } + } + } else { + var i = 0, l, list = map[pfx + type], all = element == '*' + if (!list) return + for (l = list.length; i < l; i++) { + if ((all || list[i].matches(element, original, handler)) && !fn(list[i], list, i, type)) return + } + } + } + + , has = function (element, type, original, root) { + // we're not using forAll here simply because it's a bit slower and this + // needs to be fast + var i, list = map[(root ? 'r' : '$') + type] + if (list) { + for (i = list.length; i--;) { + if (!list[i].root && list[i].matches(element, original, null)) return true + } + } + return false + } + + , get = function (element, type, original, root) { + var entries = [] + forAll(element, type, original, null, root, function (entry) { + return entries.push(entry) + }) + return entries + } + + , put = function (entry) { + var has = !entry.root && !this.has(entry.element, entry.type, null, false) + , key = (entry.root ? 'r' : '$') + entry.type + ;(map[key] || (map[key] = [])).push(entry) + return has + } + + , del = function (entry) { + forAll(entry.element, entry.type, null, entry.handler, entry.root, function (entry, list, i) { + list.splice(i, 1) + entry.removed = true + if (list.length === 0) delete map[(entry.root ? 'r' : '$') + entry.type] + return false + }) + } + + // dump all entries, used for onunload + , entries = function () { + var t, entries = [] + for (t in map) { + if (t.charAt(0) == '$') entries = entries.concat(map[t]) + } + return entries + } + + return { has: has, get: get, put: put, del: del, entries: entries } + }()) + + // we need a selector engine for delegated events, use querySelectorAll if it exists + // but for older browsers we need Qwery, Sizzle or similar + , selectorEngine + , setSelectorEngine = function (e) { + if (!arguments.length) { + selectorEngine = doc.querySelectorAll + ? function (s, r) { + return r.querySelectorAll(s) + } + : function () { + throw new Error('Bean: No selector engine installed') // eeek + } + } else { + selectorEngine = e + } + } + + // we attach this listener to each DOM event that we need to listen to, only once + // per event type per DOM element + , rootListener = function (event, type) { + if (!W3C_MODEL && type && event && event.propertyName != '_on' + type) return + + var listeners = registry.get(this, type || event.type, null, false) + , l = listeners.length + , i = 0 + + event = new Event(event, this, true) + if (type) event.type = type + + // iterate through all handlers registered for this type, calling them unless they have + // been removed by a previous handler or stopImmediatePropagation() has been called + for (; i < l && !event.isImmediatePropagationStopped(); i++) { + if (!listeners[i].removed) listeners[i].handler.call(this, event) + } + } + + // add and remove listeners to DOM elements + , listener = W3C_MODEL + ? function (element, type, add) { + // new browsers + element[add ? addEvent : removeEvent](type, rootListener, false) + } + : function (element, type, add, custom) { + // IE8 and below, use attachEvent/detachEvent and we have to piggy-back propertychange events + // to simulate event bubbling etc. + var entry + if (add) { + registry.put(entry = new RegEntry( + element + , custom || type + , function (event) { // handler + rootListener.call(element, event, custom) + } + , rootListener + , null + , null + , true // is root + )) + if (custom && element['_on' + custom] == null) element['_on' + custom] = 0 + entry.target.attachEvent('on' + entry.eventType, entry.handler) + } else { + entry = registry.get(element, custom || type, rootListener, true)[0] + if (entry) { + entry.target.detachEvent('on' + entry.eventType, entry.handler) + registry.del(entry) + } + } + } + + , once = function (rm, element, type, fn, originalFn) { + // wrap the handler in a handler that does a remove as well + return function () { + fn.apply(this, arguments) + rm(element, type, originalFn) + } + } + + , removeListener = function (element, orgType, handler, namespaces) { + var type = orgType && orgType.replace(nameRegex, '') + , handlers = registry.get(element, type, null, false) + , removed = {} + , i, l + + for (i = 0, l = handlers.length; i < l; i++) { + if ((!handler || handlers[i].original === handler) && handlers[i].inNamespaces(namespaces)) { + // TODO: this is problematic, we have a registry.get() and registry.del() that + // both do registry searches so we waste cycles doing this. Needs to be rolled into + // a single registry.forAll(fn) that removes while finding, but the catch is that + // we'll be splicing the arrays that we're iterating over. Needs extra tests to + // make sure we don't screw it up. @rvagg + registry.del(handlers[i]) + if (!removed[handlers[i].eventType] && handlers[i][eventSupport]) + removed[handlers[i].eventType] = { t: handlers[i].eventType, c: handlers[i].type } + } + } + // check each type/element for removed listeners and remove the rootListener where it's no longer needed + for (i in removed) { + if (!registry.has(element, removed[i].t, null, false)) { + // last listener of this type, remove the rootListener + listener(element, removed[i].t, false, removed[i].c) + } + } + } + + // set up a delegate helper using the given selector, wrap the handler function + , delegate = function (selector, fn) { + //TODO: findTarget (therefore $) is called twice, once for match and once for + // setting e.currentTarget, fix this so it's only needed once + var findTarget = function (target, root) { + var i, array = isString(selector) ? selectorEngine(selector, root) : selector + for (; target && target !== root; target = target.parentNode) { + for (i = array.length; i--;) { + if (array[i] === target) return target + } + } + } + , handler = function (e) { + var match = findTarget(e.target, this) + if (match) fn.apply(match, arguments) + } + + // __beanDel isn't pleasant but it's a private function, not exposed outside of Bean + handler.__beanDel = { + ft : findTarget // attach it here for customEvents to use too + , selector : selector + } + return handler + } + + , fireListener = W3C_MODEL ? function (isNative, type, element) { + // modern browsers, do a proper dispatchEvent() + var evt = doc.createEvent(isNative ? 'HTMLEvents' : 'UIEvents') + evt[isNative ? 'initEvent' : 'initUIEvent'](type, true, true, win, 1) + element.dispatchEvent(evt) + } : function (isNative, type, element) { + // old browser use onpropertychange, just increment a custom property to trigger the event + element = targetElement(element, isNative) + isNative ? element.fireEvent('on' + type, doc.createEventObject()) : element['_on' + type]++ + } + + /** + * Public API: off(), on(), add(), (remove()), one(), fire(), clone() + */ + + /** + * off(element[, eventType(s)[, handler ]]) + */ + , off = function (element, typeSpec, fn) { + var isTypeStr = isString(typeSpec) + , k, type, namespaces, i + + if (isTypeStr && typeSpec.indexOf(' ') > 0) { + // off(el, 't1 t2 t3', fn) or off(el, 't1 t2 t3') + typeSpec = str2arr(typeSpec) + for (i = typeSpec.length; i--;) + off(element, typeSpec[i], fn) + return element + } + + type = isTypeStr && typeSpec.replace(nameRegex, '') + if (type && customEvents[type]) type = customEvents[type].base + + if (!typeSpec || isTypeStr) { + // off(el) or off(el, t1.ns) or off(el, .ns) or off(el, .ns1.ns2.ns3) + if (namespaces = isTypeStr && typeSpec.replace(namespaceRegex, '')) namespaces = str2arr(namespaces, '.') + removeListener(element, type, fn, namespaces) + } else if (isFunction(typeSpec)) { + // off(el, fn) + removeListener(element, null, typeSpec) + } else { + // off(el, { t1: fn1, t2, fn2 }) + for (k in typeSpec) { + if (typeSpec.hasOwnProperty(k)) off(element, k, typeSpec[k]) + } + } + + return element + } + + /** + * on(element, eventType(s)[, selector], handler[, args ]) + */ + , on = function(element, events, selector, fn) { + var originalFn, type, types, i, args, entry, first + + //TODO: the undefined check means you can't pass an 'args' argument, fix this perhaps? + if (selector === undefined && typeof events == 'object') { + //TODO: this can't handle delegated events + for (type in events) { + if (events.hasOwnProperty(type)) { + on.call(this, element, type, events[type]) + } + } + return + } + + if (!isFunction(selector)) { + // delegated event + originalFn = fn + args = slice.call(arguments, 4) + fn = delegate(selector, originalFn, selectorEngine) + } else { + args = slice.call(arguments, 3) + fn = originalFn = selector + } + + types = str2arr(events) + + // special case for one(), wrap in a self-removing handler + if (this === ONE) { + fn = once(off, element, events, fn, originalFn) + } + + for (i = types.length; i--;) { + // add new handler to the registry and check if it's the first for this element/type + first = registry.put(entry = new RegEntry( + element + , types[i].replace(nameRegex, '') // event type + , fn + , originalFn + , str2arr(types[i].replace(namespaceRegex, ''), '.') // namespaces + , args + , false // not root + )) + if (entry[eventSupport] && first) { + // first event of this type on this element, add root listener + listener(element, entry.eventType, true, entry.customType) + } + } + + return element + } + + /** + * add(element[, selector], eventType(s), handler[, args ]) + * + * Deprecated: kept (for now) for backward-compatibility + */ + , add = function (element, events, fn, delfn) { + return on.apply( + null + , !isString(fn) + ? slice.call(arguments) + : [ element, fn, events, delfn ].concat(arguments.length > 3 ? slice.call(arguments, 5) : []) + ) + } + + /** + * one(element, eventType(s)[, selector], handler[, args ]) + */ + , one = function () { + return on.apply(ONE, arguments) + } + + /** + * fire(element, eventType(s)[, args ]) + * + * The optional 'args' argument must be an array, if no 'args' argument is provided + * then we can use the browser's DOM event system, otherwise we trigger handlers manually + */ + , fire = function (element, type, args) { + var types = str2arr(type) + , i, j, l, names, handlers + + for (i = types.length; i--;) { + type = types[i].replace(nameRegex, '') + if (names = types[i].replace(namespaceRegex, '')) names = str2arr(names, '.') + if (!names && !args && element[eventSupport]) { + fireListener(nativeEvents[type], type, element) + } else { + // non-native event, either because of a namespace, arguments or a non DOM element + // iterate over all listeners and manually 'fire' + handlers = registry.get(element, type, null, false) + args = [false].concat(args) + for (j = 0, l = handlers.length; j < l; j++) { + if (handlers[j].inNamespaces(names)) { + handlers[j].handler.apply(element, args) + } + } + } + } + return element + } + + /** + * clone(dstElement, srcElement[, eventType ]) + * + * TODO: perhaps for consistency we should allow the same flexibility in type specifiers? + */ + , clone = function (element, from, type) { + var handlers = registry.get(from, type, null, false) + , l = handlers.length + , i = 0 + , args, beanDel + + for (; i < l; i++) { + if (handlers[i].original) { + args = [ element, handlers[i].type ] + if (beanDel = handlers[i].handler.__beanDel) args.push(beanDel.selector) + args.push(handlers[i].original) + on.apply(null, args) + } + } + return element + } + + , bean = { + 'on' : on + , 'add' : add + , 'one' : one + , 'off' : off + , 'remove' : off + , 'clone' : clone + , 'fire' : fire + , 'Event' : Event + , 'setSelectorEngine' : setSelectorEngine + , 'noConflict' : function () { + context[name] = old + return this + } + } + + // for IE, clean up on unload to avoid leaks + if (win.attachEvent) { + var cleanup = function () { + var i, entries = registry.entries() + for (i in entries) { + if (entries[i].type && entries[i].type !== 'unload') off(entries[i].element, entries[i].type) + } + win.detachEvent('onunload', cleanup) + win.CollectGarbage && win.CollectGarbage() + } + win.attachEvent('onunload', cleanup) + } + + // initialize selector engine to internal default (qSA or throw Error) + setSelectorEngine(Ink.ss) + + return bean + }); + + /** + * Keep this declaration here and off Bean as it extends the Event + * object and some properties are readonly in strict mode + */ + 'use strict'; + + var InkEvent = { + + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + KEY_HOME: 36, + KEY_END: 35, + KEY_PAGEUP: 33, + KEY_PAGEDOWN: 34, + KEY_INSERT: 45, + + /** + * Creates a debounced version of a function. + * Returns a function which calls `func`, waiting at least `wait` milliseconds between calls. This is useful for events such as `scroll` or `resize`, which can be triggered too many times per second, slowing down the browser with needless function calls. + * + * *note:* This does not delay the first function call to the function. + * + * @method throttle + * @param {Function} func Function to call. Arguments and context are both passed. + * @param {Number} [wait]=0 Milliseconds to wait between calls. + * + * @example + * + * Suppose you are observing the `scroll` event, but your application is lagging because `scroll` is triggered too many times. + * + * // BEFORE + * InkEvent.observe(window, 'scroll', function () { + * ... + * }); // When scrolling on mobile devices or on firefox's smooth scroll + * // this is expensive because onscroll is called many times + * + * // AFTER + * InkEvent.observe(window, 'scroll', InkEvent.throttle(function () { + * ... + * }, 100)); // The event handler is called only every 100ms. Problem solved. + * + * @example + * var handler = InkEvent.throttle(function () { + * ... + * }, 100); + * + * InkEvent.observe(window, 'scroll', handler); + * InkEvent.observe(window, 'resize', handler); + * + * // on resize, both the "scroll" and the "resize" events are triggered + * // a LOT of times. This prevents both of them being called a lot of + * // times when the window is being resized by a user. + * + **/ + throttle: function (func, wait) { + wait = wait || 0; + var lastCall = 0; // Warning: This breaks on Jan 1st 1970 0:00 + var timeout; + var throttled = function () { + var now = +new Date(); + var timeDiff = now - lastCall; + if (timeDiff >= wait) { + lastCall = now; + return func.apply(this, [].slice.call(arguments)); + } else { + var that = this; + var args = [].slice.call(arguments); + if (!timeout) { + timeout = setTimeout(function () { + timeout = null; + return throttled.apply(that, args); + }, wait - timeDiff); + } + } + }; + return throttled; + }, + + /** + * Gets the event's target element. + * + * @method element + * @param {Object} ev Event object + * @return {DOMNode} The target + */ + element: function(ev) { + var node = ev.delegationTarget || + ev.target || + // IE stuff + (ev.type === 'mouseout' && ev.fromElement) || + (ev.type === 'mouseleave' && ev.fromElement) || + (ev.type === 'mouseover' && ev.toElement) || + (ev.type === 'mouseenter' && ev.toElement) || + ev.srcElement || + null; + return node && (node.nodeType === 3 || node.nodeType === 4) ? node.parentNode : node; + }, + + /** + * Gets the event's related target element. + * + * @method relatedTarget + * @param {Object} ev event object + * @return {DOMNode} The related target + */ + relatedTarget: function(ev){ + var node = ev.relatedTarget || + // IE stuff + (ev.type === 'mouseout' && ev.toElement) || + (ev.type === 'mouseleave' && ev.toElement) || + (ev.type === 'mouseover' && ev.fromElement) || + (ev.type === 'mouseenter' && ev.fromElement) || + null; + return node && (node.nodeType === 3 || node.nodeType === 4) ? node.parentNode : node; + }, + + /** + * Find closest ancestor element by tag name related to the event target. + * Navigate up the DOM tree, looking for a tag with the name `elmTagName`. + * + * If such tag is not found, `document` is returned. + * + * @method findElement + * @param {Object} ev Event object + * @param {String} elmTagName Tag name to find + * @param {Boolean} [force]=false Flag to skip returning `document` and to return `false` instead. + * @return {DOMElement} the first element which matches given tag name or the document element if the wanted tag is not found + */ + findElement: function(ev, elmTagName, force) + { + var node = this.element(ev); + while(true) { + if(node.nodeName.toLowerCase() === elmTagName.toLowerCase()) { + return node; + } else { + node = node.parentNode; + if(!node) { + if(force) { + return false; + } + return document; + } + if(!node.parentNode){ + if(force){ return false; } + return document; + } + } + } + }, + + /** + * Attaches an event to element + * + * @method observe + * @param {DOMElement|String} element Element id or element + * @param {String} eventName Event name + * @param {Function} callBack Receives the event object as a parameter. If you're manually firing custom events, check it's eventName property to make sure you're handling the right event. + * @param {Boolean} [useCapture] Flag to change event listening from bubbling to capture. + * @return {Function} The event handler used. Hang on to this if you want to `stopObserving` later. + */ + observe: function(element, eventName, callBack, useCapture) { + element = Ink.i(element); + if(element) { + if(element.addEventListener) { + element.addEventListener(eventName, callBack, !!useCapture); + } else { + element.attachEvent('on' + eventName, (callBack = Ink.bind(callBack, element))); + } + return callBack; + } + }, + + /** + * Like observe, but listen to the event only once. + * + * @method observeOnce + * @param {DOMElement|String} element Element id or element + * @param {String} eventName Event name + * @param {Function} callBack Receives the event object as a parameter. If you're manually firing custom events, check it's eventName property to make sure you're handling the right event. + * @param {Boolean} [useCapture] Flag to change event listening from bubbling to capture. + * @return {Function} The event handler used. Hang on to this if you want to `stopObserving` later. + */ + observeOnce: function (element, eventName, callBack, useCapture) { + var onceBack = function () { + InkEvent.stopObserving(element, eventName, onceBack); + return callBack(); + }; + return InkEvent.observe(element, eventName, onceBack, useCapture); + }, + + /** + * Attaches an event to a selector or array of elements. + * + * @method observeMulti + * @param {Array|String} elements + * @param {String} eventName Event name + * @param {Function} callBack Receives the event object as a parameter. If you're manually firing custom events, check it's eventName property to make sure you're handling the right event. + * @param {Boolean} [useCapture] Flag change event listening from bubbling to capture. + * @return {Function} The used callback. + */ + observeMulti: function (elements, eventName, callBack, useCapture) { + if (typeof elements === 'string') { + elements = Ink.ss(elements); + } else if ( /* is an element */ elements && elements.nodeType === 1) { + elements = [elements]; + } + if (!elements[0]) { return false; } + + for (var i = 0, len = elements.length; i < len; i++) { + this.observe(elements[i], eventName, callBack, useCapture); + } + return callBack; + }, + + /** + * Observes an event on an element and its descendants matching the selector. + * + * Requires Ink.Dom.Selector if you need to use a selector. + * + * @method observeDelegated + * @param {DOMElement|String} element Element to observe. + * @param {String} eventName Event name to observe. + * @param {String} selector Child element selector. When null, finds any element. + * @param {Function} callback Callback to be called when the event is fired + * @return {Function} The used callback, for ceasing to listen to the event later. + **/ + observeDelegated: function (element, eventName, selector, callback) { + return InkEvent.observe(element, eventName, function (event) { + var fromElement = InkEvent.element(event); + if (!fromElement || fromElement === element) { return; } + + var cursor = fromElement; + + // Go up the document tree until we hit the element itself. + while (cursor !== element && cursor !== document && cursor) { + if (Ink.Dom.Selector_1.matchesSelector(cursor, selector)) { + event.delegationTarget = cursor; + return callback(event); + } + cursor = cursor.parentNode; + } + }); + }, + + /** + * Removes an event attached to an element. + * + * @method stopObserving + * @param {DOMElement|String} element Element id or element + * @param {String} eventName Event name + * @param {Function} callBack Callback function + * @param {Boolean} [useCapture] Set to true if the event was being observed with useCapture set to true as well. + */ + stopObserving: function(element, eventName, callBack, useCapture) { + element = Ink.i(element); + + if(element) { + if(element.removeEventListener) { + element.removeEventListener(eventName, callBack, !!useCapture); + } else { + element.detachEvent('on' + eventName, callBack); + } + } + }, + + /** + * Stops event propagation and bubbling. + * + * @method stop + * @param {Object} event Event handle + */ + stop: function(event) + { + if(event.cancelBubble !== null) { + event.cancelBubble = true; + } + if(event.stopPropagation) { + event.stopPropagation(); + } + if(event.preventDefault) { + event.preventDefault(); + } + if(window.attachEvent) { + event.returnValue = false; + } + if(event.cancel !== null) { + event.cancel = true; + } + }, + + /** + * Stops event propagation. + * + * @method stopPropagation + * @param {Object} event Event handle + */ + stopPropagation: function(event) { + if(event.cancelBubble !== null) { + event.cancelBubble = true; + } + if(event.stopPropagation) { + event.stopPropagation(); + } + }, + + /** + * Stops event default behaviour. + * + * @method stopDefault + * @param {Object} event Event handle + */ + stopDefault: function(event) + { + if(event.preventDefault) { + event.preventDefault(); + } + if(window.attachEvent) { + event.returnValue = false; + } + if(event.cancel !== null) { + event.cancel = true; + } + }, + + /** + * Gets the pointer's coordinates from the event object. + * + * @method pointer + * @param {Object} ev Event object + * @return {Object} An object with the mouse X and Y position + */ + pointer: function(ev) + { + return { + x: this.pointerX(ev), + y: this.pointerY(ev) + }; + }, + + /** + * Gets the pointer's X coordinate. + * + * @method pointerX + * @param {Object} ev Event object + * @return {Number} Mouse X position + */ + pointerX: function(ev) + { + return (ev.touches && ev.touches[0] && ev.touches[0].pageX) || + (ev.pageX) || + (ev.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)); + }, + + /** + * Gets the pointer's Y coordinate. + * + * @method pointerY + * @param {Object} ev Event object + * @return {Number} Mouse Y position + */ + pointerY: function(ev) + { + return (ev.touches && ev.touches[0] && ev.touches[0].pageY) || + (ev.pageY) || + (ev.clientY + (document.documentElement.scrollTop || document.body.scrollTop)); + }, + + /** + * Checks if an event is a left click. + * + * @method isLeftClick + * @param {Object} ev Event object + * @return {Boolean} True if the event is a left click + */ + isLeftClick: function(ev) { + if (window.addEventListener) { + if(ev.button === 0){ + return true; + } else if(ev.type === 'touchend' && ev.button === null){ + // [todo] do the above check for pointerEvents too + return true; + } + } + else { + if(ev.button === 1){ return true; } + } + return false; + }, + + /** + * Checks if an event is a right click. + * + * @method isRightClick + * @param {Object} ev Event object + * @return {Boolean} True if the event is a right click + */ + isRightClick: function(ev) { + return (ev.button === 2); + }, + + /** + * Checks if an event is a middle click. + * + * @method isMiddleClick + * @param {Object} ev Event object + * @return {Boolean} True if the event is a middle click + */ + isMiddleClick: function(ev) { + if (window.addEventListener) { + return (ev.button === 1); + } + else { + return (ev.button === 4); + } + return false; + }, + + /** + * Gets character from an event. + * Used in SAPO.Component.MaskedInput + * + * @method getCharFromKeyboardEvent + * @param {Object} event Keyboard event + * @param {Boolean} [changeCasing] If true uppercases, if false lowercases, otherwise keeps casing + * @return {String} Character representation of pressed key combination + */ + getCharFromKeyboardEvent: function(event, changeCasing) { + var k = event.keyCode; + var c = String.fromCharCode(k); + + var shiftOn = event.shiftKey; + if (k >= 65 && k <= 90) { // A-Z + if (typeof changeCasing === 'boolean') { + shiftOn = changeCasing; + } + return (shiftOn) ? c : c.toLowerCase(); + } + else if (k >= 96 && k <= 105) { // numpad digits + return String.fromCharCode( 48 + (k-96) ); + } + switch (k) { + case 109: case 189: return '-'; + case 107: case 187: return '+'; + } + return c; + }, + + debug: function(){} +}; + +/** + * Lets you attach event listeners to both elements and objects. + * http://github.com/fat/bean#on + * + * @method on + * @param {DOMElement|Object} element An HTML DOM element or any JavaScript Object + * @param {String} eventType An Event (or multiple events, space separated) to listen to + * @param {String} [selector] A CSS DOM Element selector string to bind the listener to child elements matching the selector + * @param {Function} [handler] The callback function + * @param {Object} [args...] Additional arguments to pass to the callback function when triggered + * + * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object + */ + +/** + * Alias for `on` but will only be executed once. + * bean.one() is an alias for bean.on() except that the handler will only be executed once and then removed for the event type(s). + * http://github.com/fat/bean#one + * + * @method one + * @param {DOMElement|Object} element An HTML DOM element or any JavaScript Object + * @param {String} eventType An Event (or multiple events, space separated) to listen to + * @param {String} [selector] A CSS DOM Element selector string to bind the listener to child elements matching the selector + * @param {Function} [handler] The callback function + * @param [args...] Additional arguments to pass to the callback function when triggered + * + * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object + */ + +/** + * Removes event handlers. + * bean.off() is how you get rid of handlers once you no longer want them active. It's also a good idea to call off on elements before you remove them from your DOM; this gives Bean a chance to clean up some things and prevents memory leaks. + * http://github.com/fat/bean#off + * + * @method off + * @param {DOMElement|Object} element An HTML DOM element or any JavaScript Object + * @param {String} eventType An Event (or multiple events, space separated) to remove + * @param {Function} [handler] The specific callback function to remove + * + * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object + */ + +/** + * Clones events from one object to another + * bean.clone() is a method for cloning events from one DOM element or object to another. + * http://github.com/fat/bean#clone + * + * @method clone + * @param {DOMElement|Object} destElement An HTML DOM element or any JavaScript Object to copy events to + * @param {String} srcElement An HTML DOM element or any JavaScript Object to copy events from + * @param {String} [eventType] An Event (or multiple events, space separated) to clone + * + * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object + */ + +/** + * Triggers events. + * http://github.com/fat/bean#fire + * + * @method fire + * @param {DOMElement|Object} destElement An HTML DOM element or any JavaScript Object fire the event on + * @param {String} eventType An Event (or multiple events, space separated) to fire + * @param [args...] Additional arguments to pass to the callback function when triggered + * + * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object + */ + +return Ink.extendObj(InkEvent, bean); + +}); + +/** + * @module Ink.Dom.FormSerialize_1 + * Two way serialization of form data and javascript objects. + * Valid applications are ad hoc AJAX/syndicated submission of forms, restoring form values from server side state, etc. + */ + +Ink.createModule('Ink.Dom.FormSerialize', 1, [], function () { + 'use strict'; + + /** + * @namespace Ink.Dom.FormSerialize + * @static + **/ + var FormSerialize = { + + /** + * Serializes a form element into a JS object + * It turns field names into keys and field values into values. + * + * note: Multi-select and checkboxes with multiple values will result in arrays + * + * @method serialize + * @param {DOMElement|String} form Form element to extract data + * @return {Object} Map of fieldName -> String|String[]|Boolean + * + * @example + *
        + * + * + *
        + * + */ + serialize: function(form) { + form = Ink.i(form); + var map = this._getFieldNameInputsMap(form); + + var map2 = {}; + for (var k in map) if (map.hasOwnProperty(k)) { + if(k !== null) { + var tmpK = k.replace(/\[\]$/, ''); + map2[tmpK] = this._getValuesOfField( map[k] ); + } else { + map2[k] = this._getValuesOfField( map[k] ); + } + } + + delete map2['null']; // this can occur. if so, delete it... + return map2; + }, + + + + + /** + * Sets form elements' values with values from an object + * + * Note: You can't set the values of an input with `type="file"` (browser prohibits it) + * + * @method fillIn + * @param {DOMElement|String} form Form element to be populated + * @param {Object} map2 Map of fieldName -> String|String[]|Boolean + * @example + *
        + * + * + *
        + * + */ + fillIn: function(form, map2) { + form = Ink.i(form); + var map = this._getFieldNameInputsMap(form); + delete map['null']; // this can occur. if so, delete it... + + for (var k in map2) if (map2.hasOwnProperty(k)) { + this._setValuesOfField( map[k], map2[k] ); + } + }, + + + + _getFieldNameInputsMap: function(formEl) { + var name, nodeName, el, map = {}; + for (var i = 0, f = formEl.elements.length; i < f; ++i) { + el = formEl.elements[i]; + name = el.getAttribute('name'); + nodeName = el.nodeName.toLowerCase(); + if (nodeName === 'fieldset') { + continue; + } else if (map[name] === undefined) { + map[name] = [el]; + } else { + map[name].push(el); + } + } + return map; + }, + + + + _getValuesOfField: function(fieldInputs) { + var nodeName = fieldInputs[0].nodeName.toLowerCase(); + var type = fieldInputs[0].getAttribute('type'); + var value = fieldInputs[0].value; + var i, f, j, o, el, m, res = []; + + switch(nodeName) { + case 'select': + for (i = 0, f = fieldInputs.length; i < f; ++i) { + res[i] = []; + m = fieldInputs[i].getAttribute('multiple'); + for (j = 0, o = fieldInputs[i].options.length; j < o; ++j) { + el = fieldInputs[i].options[j]; + if (el.selected) { + if (m) { + res[i].push(el.value); + } else { + res[i] = el.value; + break; + } + } + } + } + return ((fieldInputs.length > 0 && /\[[^\]]*\]$/.test(fieldInputs[0].getAttribute('name'))) ? res : res[0]); + + case 'textarea': + case 'input': + if (type === 'checkbox' || type === 'radio') { + for (i = 0, f = fieldInputs.length; i < f; ++i) { + el = fieldInputs[i]; + if (el.checked) { + res.push( el.value ); + } + } + if (type === 'checkbox') { + return (fieldInputs.length > 1) ? res : !!(res.length); + } + return (fieldInputs.length > 1) ? res[0] : !!(res.length); // on radios only 1 option is selected at most + } + else { + //if (fieldInputs.length > 1) { throw 'Got multiple input elements with same name!'; } + if(fieldInputs.length > 0 && /\[[^\]]*\]$/.test(fieldInputs[0].getAttribute('name'))) { + var tmpValues = []; + for(i=0, f = fieldInputs.length; i < f; ++i) { + tmpValues.push(fieldInputs[i].value); + } + return tmpValues; + } else { + return value; + } + } + break; // to keep JSHint happy... (reply to this comment by gamboa: - ROTFL) + + default: + //throw 'Unsupported element: "' + nodeName + '"!'; + return undefined; + } + }, + + + + _valInArray: function(val, arr) { + for (var i = 0, f = arr.length; i < f; ++i) { + if (arr[i] === val) { return true; } + } + return false; + }, + + + + _setValuesOfField: function(fieldInputs, fieldValues) { + if (!fieldInputs) { return; } + var nodeName = fieldInputs[0].nodeName.toLowerCase(); + var type = fieldInputs[0].getAttribute('type'); + var i, f, el; + + switch(nodeName) { + case 'select': + if (fieldInputs.length > 1) { throw 'Got multiple select elements with same name!'; } + for (i = 0, f = fieldInputs[0].options.length; i < f; ++i) { + el = fieldInputs[0].options[i]; + el.selected = (fieldValues instanceof Array) ? this._valInArray(el.value, fieldValues) : el.value === fieldValues; + } + break; + case 'textarea': + case 'input': + if (type === 'checkbox' || type === 'radio') { + for (i = 0, f = fieldInputs.length; i < f; ++i) { + el = fieldInputs[i]; + //el.checked = (fieldValues instanceof Array) ? this._valInArray(el.value, fieldValues) : el.value === fieldValues; + el.checked = (fieldValues instanceof Array) ? this._valInArray(el.value, fieldValues) : (fieldInputs.length > 1 ? el.value === fieldValues : !!fieldValues); + } + } + else { + if (fieldInputs.length > 1) { throw 'Got multiple input elements with same name!'; } + if (type !== 'file') { + fieldInputs[0].value = fieldValues; + } + } + break; + + default: + throw 'Unsupported element: "' + nodeName + '"!'; + } + } + }; + + return FormSerialize; +}); +/** + * @module Ink.Dom.Loaded_1 + * Execute code only when the DOM is loaded. + * @version 1 + */ + +Ink.createModule('Ink.Dom.Loaded', 1, [], function() { + + 'use strict'; + + /** + * @namespace Ink.Dom.Loaded_1 + **/ + var Loaded = { + + /** + * Callbacks and their contexts. Array of 2-arrays. + * + * [] + * + * @attribute _contexts Array + * @private + * + */ + _contexts: [], // Callbacks' queue + + /** + * Specify a function to execute when the DOM is fully loaded. + * + * @method run + * @param {Object} [win]=window Window object to attach/add the event + * @param {Function} fn Callback function to be executed after the DOM is ready + * @public + * @example + * Ink.requireModules(['Ink.Dom.Loaded_1'], function(Loaded){ + * Loaded.run(function(){ + * console.log('This will run when the page/document is ready/loaded'); + * }); + * }); + */ + run: function(win, fn) { + if (!fn) { + fn = win; + win = window; + } + + var context; + + for (var i = 0, len = this._contexts.length; i < len; i++) { + if (this._contexts[i][0] === win) { + context = this._contexts[i][1]; + break; + } + } + if (!context) { + context = { + cbQueue: [], + win: win, + doc: win.document, + root: win.document.documentElement, + done: false, + top: true + }; + context.handlers = { + checkState: Ink.bindEvent(this._checkState, this, context), + poll: Ink.bind(this._poll, this, context) + }; + this._contexts.push( + [win, context] // Javascript Objects cannot map different windows to + // different values. + ); + } + + var ael = context.doc.addEventListener; + context.add = ael ? 'addEventListener' : 'attachEvent'; + context.rem = ael ? 'removeEventListener' : 'detachEvent'; + context.pre = ael ? '' : 'on'; + context.det = ael ? 'DOMContentLoaded' : 'onreadystatechange'; + context.wet = context.pre + 'load'; + + var csf = context.handlers.checkState; + var alreadyLoaded = ( + context.doc.readyState === 'complete' && + context.win.location.toString() !== 'about:blank'); // https://code.google.com/p/chromium/issues/detail?id=32357 + + if (alreadyLoaded){ + setTimeout(Ink.bind(function () { + fn.call(context.win, 'lazy'); + }, this), 0); + } else { + context.cbQueue.push(fn); + + context.doc[context.add]( context.det , csf ); + context.win[context.add]( context.wet , csf ); + + var frameElement = 1; + try{ + frameElement = context.win.frameElement; + } catch(e) {} + if ( !ael && context.root && context.root.doScroll ) { // IE HACK + try { + context.top = !frameElement; + } catch(e) { } + if (context.top) { + this._poll(context); + } + } + } + }, + + /** + * Function that will be running the callbacks after the page is loaded + * + * @method _checkState + * @param {Event} event Triggered event + * @private + */ + _checkState: function(event, context) { + if ( !event || (event.type === 'readystatechange' && context.doc.readyState !== 'complete')) { + return; + } + var where = (event.type === 'load') ? context.win : context.doc; + where[context.rem](context.pre+event.type, context.handlers.checkState, false); + this._ready(context); + }, + + /** + * Polls the load progress of the page to see if it has already loaded or not + * + * @method _poll + * @private + */ + + /** + * + * function _poll + */ + _poll: function(context) { + try { + context.root.doScroll('left'); + } catch(e) { + return setTimeout(context.handlers.poll, 50); + } + this._ready(context); + }, + + /** + * Function that runs the callbacks from the queue when the document is ready. + * + * @method _ready + * @private + */ + _ready: function(context) { + if (!context.done) { + context.done = true; + for (var i = 0; i < context.cbQueue.length; ++i) { + context.cbQueue[i].call(context.win); + } + context.cbQueue = []; + } + } + }; + + return Loaded; + +}); + +/** + * @module Ink.Dom.Selector_1 + * CSS selector engine + * @version 1 + */ + +Ink.createModule('Ink.Dom.Selector', 1, [], function() { + /*jshint forin:false, eqnull:true, noempty:false, expr:true, boss:true, maxdepth:false*/ + 'use strict'; + +/*! + * Sizzle CSS Selector Engine + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license + * http://sizzlejs.com/ + */ + +var i, + cachedruns, + Expr, + getText, + isXML, + compile, + outermostContext, + recompare, + sortInput, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + support = {}, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + hasDuplicate = false, + sortOrder = function() { return 0; }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Array methods + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + operators = "([*^$|!~]?=)", + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rsibling = /[\x20\t\r\n\f]*[+~]/, + + rnative = /^[^{]+\{\s*\[native code/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, + funescape = function( _, escaped ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + return high !== high ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +/* + * For feature detection + * @param {Function} fn The function to test for native support + */ +function isNative( fn ) { + return rnative.test( fn + "" ); +} + +/* + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var cache, + keys = []; + + return (cache = function( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + }); +} + +/* + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/* + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // release memory in IE + div = null; + } +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && !rbuggyQSA.test(selector) ) { + old = true; + nid = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/* + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/* + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if attributes should be retrieved by attribute nodes + support.attributes = assert(function( div ) { + div.innerHTML = ""; + var type = typeof div.lastChild.getAttribute("multiple"); + // IE8 returns a string for some attributes even when not present + return type !== "boolean" && type !== "string"; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = assert(function( div ) { + // Opera can't find a second classname (in 9.6) + div.innerHTML = ""; + if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { + return false; + } + + // Safari 3.2 caches class attributes and doesn't catch changes + div.lastChild.className = "e"; + return div.getElementsByClassName("e").length === 2; + }); + + // Check if getElementsByName privileges form controls or returns elements by ID + // If so, assume (for broader support) that getElementById returns elements by name + support.getByName = assert(function( div ) { + // Inject content + div.id = expando + 0; + // Support: Windows 8 Native Apps + // Assigning innerHTML with "name" attributes throws uncatchable exceptions + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx + div.appendChild( document.createElement("a") ).setAttribute( "name", expando ); + div.appendChild( document.createElement("i") ).setAttribute( "name", expando ); + docElem.appendChild( div ); + + // Test + var pass = doc.getElementsByName && + // buggy browsers will return fewer than the correct 2 + doc.getElementsByName( expando ).length === 2 + + // buggy browsers will return more than the correct 0 + doc.getElementsByName( expando + 0 ).length; + + // Cleanup + docElem.removeChild( div ); + + return pass; + }); + + // Support: Webkit<537.32 + // Detached nodes confoundingly follow *each other* + support.sortDetached = assert(function( div1 ) { + return div1.compareDocumentPosition && + // Should return 1, but Webkit returns 4 (following) + (div1.compareDocumentPosition( document.createElement("div") ) & 1); + }); + + // IE6/7 return modified attributes + Expr.attrHandle = assert(function( div ) { + div.innerHTML = ""; + return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && + div.firstChild.getAttribute("href") === "#"; + }) ? + {} : + { + "href": function( elem ) { + return elem.getAttribute( "href", 2 ); + }, + "type": function( elem ) { + return elem.getAttribute("type"); + } + }; + + // ID find and filter + if ( support.getByName ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + + return m ? + m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? + [m] : + undefined : + []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Name + Expr.find["NAME"] = support.getByName && function( tag, context ) { + if ( typeof context.getElementsByName !== strundefined ) { + return context.getElementsByName( name ); + } + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21), + // no need to also add to buggyMatches since matches checks buggyQSA + // A support test would require too much code (would include document ready) + rbuggyQSA = [ ":focus" ]; + + if ( (support.qsa = isNative(doc.querySelectorAll)) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // IE8 - Some boolean attributes are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Opera 10-12/IE8 - ^= $= *= and empty values + // Should not select anything + div.innerHTML = ""; + if ( div.querySelectorAll("[i^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || + docElem.mozMatchesSelector || + docElem.webkitMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); + + if ( compare ) { + // Disconnected nodes + if ( compare & 1 || + (recompare && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + // rbuggyQSA always contains :focus, so no need for an existence check + if ( support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + var val; + + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + if ( documentIsHTML ) { + name = name.toLowerCase(); + } + if ( (val = Expr.attrHandle[ name ]) ) { + return val( elem ); + } + if ( !documentIsHTML || support.attributes ) { + return elem.getAttribute( name ); + } + return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? + name : + val && val.specified ? val.value : null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +// Document sorting and removing duplicates +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + // Compensate for sort limitations + recompare = !support.sortDetached; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +/* + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns Returns -1 if a precedes b, 1 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +// Returns a function to use in pseudos for input types +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +// Returns a function to use in pseudos for buttons +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +// Returns a function to use in pseudos for positionals +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/* + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[4] ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeName ) { + if ( nodeName === "*" ) { + return function() { return true; }; + } + + nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push( { + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) + ); + return results; +} + +// Deprecated +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +// Check sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Initialize with the default document +setDocument(); + +// Always assume the presence of duplicates if sort doesn't +// pass them to our comparison function (as in Google Chrome). +[0, 0].sort( sortOrder ); +support.detectDuplicates = hasDuplicate; + +// EXPOSE +/*if ( typeof define === "function" && define.amd ) { + define(function() { return Sizzle; }); +} else { + window.Sizzle = Sizzle; +}*/ +// EXPOSE + +/** + * @namespace Ink.Dom.Selector + * @static + */ + +/** + * Alias for the Sizzle selector engine + * + * @method select + * @param {String} selector CSS selector to search for elements + * @param {DOMElement} [context] By default the search is done in the document element. However, you can specify an element as search context + * @param {Array} [results] By default this is considered an empty array. But if you want to merge it with other searches you did, pass their result array through here. + * @return {Array} Array of resulting DOM Elements + */ + +/** + * Filters elements that match a CSS selector. + * + * @method matches + * @param {String} selector CSS selector to search for elements + * @param {Array} matches Elements to be 'matched' with + * @return {Array} Elements that matched + */ + +/** + * Checks if an element matches a given selector + * + * @method matchesSelector + * @param {DOMElement} element Element to test + * @param {String} selector CSS selector to test the element with + * @return {Boolean} True if element matches the CSS selector + */ + +return { + select: Sizzle, + matches: Sizzle.matches, + matchesSelector: Sizzle.matchesSelector +}; + + +}); //( window ); +/** + * @module Ink.Util.Array_1 + * Array Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.Array', '1', [], function() { + + 'use strict'; + + var arrayProto = Array.prototype; + + var InkArray = { + + /** + * Checks if a value exists in array + * + * @method inArray + * @public + * @static + * @param {Mixed} value Value to check + * @param {Array} arr Array to search in + * @return {Boolean} True if value exists in the array + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray = [ 'value1', 'value2', 'value3' ]; + * if( InkArray.inArray( 'value2', testArray ) === true ){ + * console.log( "Yep it's in the array." ); + * } else { + * console.log( "No it's NOT in the array." ); + * } + * }); + */ + inArray: function(value, arr) { + if (typeof arr === 'object') { + for (var i = 0, f = arr.length; i < f; ++i) { + if (arr[i] === value) { + return true; + } + } + } + return false; + }, + + /** + * Sorts an array of objects by an object property + * + * @method sortMulti + * @param {Array} arr Array of objects to sort + * @param {String} key Property to sort by + * @return {Array|Boolean} False if it's not an array, returns a sorted array if it's an array. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray = [ + * { 'myKey': 'value1' }, + * { 'myKey': 'value2' }, + * { 'myKey': 'value3' } + * ]; + * + * InkArray.sortMulti( testArray, 'myKey' ); + * }); + */ + sortMulti: function(arr, key) { + if (typeof arr === 'undefined' || arr.constructor !== Array) { return false; } + if (typeof key !== 'string') { return arr.sort(); } + if (arr.length > 0) { + if (typeof(arr[0][key]) === 'undefined') { return false; } + arr.sort(function(a, b){ + var x = a[key]; + var y = b[key]; + return ((x < y) ? -1 : ((x > y) ? 1 : 0)); + }); + } + return arr; + }, + + /** + * Gets the indexes of a value in an array + * + * @method keyValue + * @param {String} value Value to search for. + * @param {Array} arr Array to run the search in. + * @param {Boolean} [first] Flag to stop the search at the first match. It also returns an index number instead of an array of indexes. + * @return {Boolean|Number|Array} False for no matches. Array of matches or first match index. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray = [ 'value1', 'value2', 'value3', 'value2' ]; + * console.log( InkArray.keyValue( 'value2', testArray, true ) ); // Result: 1 + * console.log( InkArray.keyValue( 'value2', testArray ) ); // Result: [1, 3] + * }); + */ + keyValue: function(value, arr, first) { + if (typeof value !== 'undefined' && typeof arr === 'object' && this.inArray(value, arr)) { + var aKeys = []; + for (var i = 0, f = arr.length; i < f; ++i) { + if (arr[i] === value) { + if (typeof first !== 'undefined' && first === true) { + return i; + } else { + aKeys.push(i); + } + } + } + return aKeys; + } + return false; + }, + + /** + * Shuffles an array. + * + * @method shuffle + * @param {Array} arr Array to shuffle + * @return {Array|Boolean} Shuffled Array or false if not an array. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray = [ 'value1', 'value2', 'value3', 'value2' ]; + * console.log( InkArray.shuffle( testArray ) ); // Result example: [ 'value3', 'value2', 'value2', 'value1' ] + * }); + */ + shuffle: function(arr) { + if (typeof(arr) !== 'undefined' && arr.constructor !== Array) { return false; } + var total = arr.length, + tmp1 = false, + rnd = false; + + while (total--) { + rnd = Math.floor(Math.random() * (total + 1)); + tmp1 = arr[total]; + arr[total] = arr[rnd]; + arr[rnd] = tmp1; + } + return arr; + }, + + /** + * Runs a function through each of the elements of an array + * + * @method forEach + * @param {Array} arr The array to be cycled/iterated + * @param {Function} cb The function receives as arguments the value, index and array. + * @return {Array} Iterated array. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray = [ 'value1', 'value2', 'value3', 'value2' ]; + * InkArray.forEach( testArray, function( value, index, arr ){ + * console.log( 'The value is: ' + value + ' | The index is: ' + index ); + * }); + * }); + */ + forEach: function(array, callback, context) { + if (arrayProto.forEach) { + return arrayProto.forEach.call(array, callback, context); + } + for (var i = 0, len = array.length >>> 0; i < len; i++) { + callback.call(context, array[i], i, array); + } + }, + + /** + * Alias for backwards compatibility. See forEach + * + * @method each + */ + each: function () { + InkArray.forEach.apply(InkArray, [].slice.call(arguments)); + }, + + /** + * Runs a function for each item in the array. + * That function will receive each item as an argument and its return value will change the corresponding array item. + * @method map + * @param {Array} array The array to map over + * @param {Function} map The map function. Will take `(item, index, array)` as arguments and `this` will be the `context` argument. + * @param {Object} [context] Object to be `this` in the map function. + * + * @example + * InkArray.map([1, 2, 3, 4], function (item) { + * return item + 1; + * }); // -> [2, 3, 4, 5] + */ + map: function (array, callback, context) { + if (arrayProto.map) { + return arrayProto.map.call(array, callback, context); + } + var mapped = new Array(len); + for (var i = 0, len = array.length >>> 0; i < len; i++) { + mapped[i] = callback.call(context, array[i], i, array); + } + return mapped; + }, + + /** + * Filters an array based on a truth test. + * This method runs a test function on all the array values and returns a new array with all the values that pass the test. + * @param {Array} array The array to filter + * @param {Function} test A test function taking `(item, index, array)` + * @param {Object} [context] Object to be `this` in the test function. + * @return {Array} Returns the filtered array + * + * @example + * InkArray.filter([1, 2, 3, 4, 5], function (val) { + * return val > 2; + * }) // -> [3, 4, 5] + */ + filter: function (array, test, context) { + if (arrayProto.filter) { + return arrayProto.filter.call(array, test, context); + } + var filtered = [], + val = null; + for (var i = 0, len = array.length; i < len; i++) { + val = array[i]; // it might be mutated + if (test.call(context, val, i, array)) { + filtered.push(val); + } + } + return filtered; + }, + + /** + * Checks if some element in the array passes a truth test + * + * @method some + * @param {Array} arr The array to iterate through + * @param {Function} cb The callback to be called on the array's elements. It receives the value, the index and the array as arguments. + * @param {Object} context Object of the callback function + * @return {Boolean} True if the callback returns true at any point, false otherwise + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray1 = [ 10, 20, 50, 100, 30 ]; + * var testArray2 = [ 1, 2, 3, 4, 5 ]; + * + * function myTestFunction( value, index, arr ){ + * if( value > 90 ){ + * return true; + * } + * return false; + * } + * console.log( InkArray.some( testArray1, myTestFunction, null ) ); // Result: true + * console.log( InkArray.some( testArray2, myTestFunction, null ) ); // Result: false + * }); + */ + some: function(arr, cb, context){ + + if (arr === null){ + throw new TypeError('First argument is invalid.'); + } + + var t = Object(arr); + var len = t.length >>> 0; + if (typeof cb !== "function"){ throw new TypeError('Second argument must be a function.'); } + + for (var i = 0; i < len; i++) { + if (i in t && cb.call(context, t[i], i, t)){ return true; } + } + + return false; + }, + + /** + * Compares the values of two arrays and return the matches + * + * @method intersect + * @param {Array} arr1 First array + * @param {Array} arr2 Second array + * @return {Array} Empty array if one of the arrays is false (or do not intersect) | Array with the intersected values + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Array_1'], function( InkArray ){ + * var testArray1 = [ 'value1', 'value2', 'value3' ]; + * var testArray2 = [ 'value2', 'value3', 'value4', 'value5', 'value6' ]; + * console.log( InkArray.intersect( testArray1,testArray2 ) ); // Result: [ 'value2', 'value3' ] + * }); + */ + intersect: function(arr1, arr2) { + if (!arr1 || !arr2 || arr1 instanceof Array === false || arr2 instanceof Array === false) { + return []; + } + + var shared = []; + for (var i = 0, I = arr1.length; i= from && i < from + rLen){ + continue; + } + + output.push(arr[i]); + } + + return output; + } + }; + + return InkArray; + +}); +/** + * @module Ink.Util.BinPack_1 + * Binary Packing algorithm implementation + * @version 1 + */ + +Ink.createModule('Ink.Util.BinPack', '1', [], function() { + + 'use strict'; + + /*jshint boss:true */ + + // https://github.com/jakesgordon/bin-packing/ + + /* + Copyright (c) 2011, 2012, 2013 Jake Gordon and contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + */ + + + + var Packer = function(w, h) { + this.init(w, h); + }; + + Packer.prototype = { + + init: function(w, h) { + this.root = { x: 0, y: 0, w: w, h: h }; + }, + + fit: function(blocks) { + var n, node, block; + for (n = 0; n < blocks.length; ++n) { + block = blocks[n]; + if (node = this.findNode(this.root, block.w, block.h)) { + block.fit = this.splitNode(node, block.w, block.h); + } + } + }, + + findNode: function(root, w, h) { + if (root.used) { + return this.findNode(root.right, w, h) || this.findNode(root.down, w, h); + } + else if ((w <= root.w) && (h <= root.h)) { + return root; + } + else { + return null; + } + }, + + splitNode: function(node, w, h) { + node.used = true; + node.down = { x: node.x, y: node.y + h, w: node.w, h: node.h - h }; + node.right = { x: node.x + w, y: node.y, w: node.w - w, h: h }; + return node; + } + + }; + + + + var GrowingPacker = function() {}; + + GrowingPacker.prototype = { + + fit: function(blocks) { + var n, node, block, len = blocks.length; + var w = len > 0 ? blocks[0].w : 0; + var h = len > 0 ? blocks[0].h : 0; + this.root = { x: 0, y: 0, w: w, h: h }; + for (n = 0; n < len ; n++) { + block = blocks[n]; + if (node = this.findNode(this.root, block.w, block.h)) { + block.fit = this.splitNode(node, block.w, block.h); + } + else { + block.fit = this.growNode(block.w, block.h); + } + } + }, + + findNode: function(root, w, h) { + if (root.used) { + return this.findNode(root.right, w, h) || this.findNode(root.down, w, h); + } + else if ((w <= root.w) && (h <= root.h)) { + return root; + } + else { + return null; + } + }, + + splitNode: function(node, w, h) { + node.used = true; + node.down = { x: node.x, y: node.y + h, w: node.w, h: node.h - h }; + node.right = { x: node.x + w, y: node.y, w: node.w - w, h: h }; + return node; + }, + + growNode: function(w, h) { + var canGrowDown = (w <= this.root.w); + var canGrowRight = (h <= this.root.h); + + var shouldGrowRight = canGrowRight && (this.root.h >= (this.root.w + w)); // attempt to keep square-ish by growing right when height is much greater than width + var shouldGrowDown = canGrowDown && (this.root.w >= (this.root.h + h)); // attempt to keep square-ish by growing down when width is much greater than height + + if (shouldGrowRight) { + return this.growRight(w, h); + } + else if (shouldGrowDown) { + return this.growDown(w, h); + } + else if (canGrowRight) { + return this.growRight(w, h); + } + else if (canGrowDown) { + return this.growDown(w, h); + } + else { + return null; // need to ensure sensible root starting size to avoid this happening + } + }, + + growRight: function(w, h) { + this.root = { + used: true, + x: 0, + y: 0, + w: this.root.w + w, + h: this.root.h, + down: this.root, + right: { x: this.root.w, y: 0, w: w, h: this.root.h } + }; + var node; + if (node = this.findNode(this.root, w, h)) { + return this.splitNode(node, w, h); + } + else { + return null; + } + }, + + growDown: function(w, h) { + this.root = { + used: true, + x: 0, + y: 0, + w: this.root.w, + h: this.root.h + h, + down: { x: 0, y: this.root.h, w: this.root.w, h: h }, + right: this.root + }; + var node; + if (node = this.findNode(this.root, w, h)) { + return this.splitNode(node, w, h); + } + else { + return null; + } + } + + }; + + + + var sorts = { + random: function() { return Math.random() - 0.5; }, + w: function(a, b) { return b.w - a.w; }, + h: function(a, b) { return b.h - a.h; }, + a: function(a, b) { return b.area - a.area; }, + max: function(a, b) { return Math.max(b.w, b.h) - Math.max(a.w, a.h); }, + min: function(a, b) { return Math.min(b.w, b.h) - Math.min(a.w, a.h); }, + height: function(a, b) { return sorts.msort(a, b, ['h', 'w']); }, + width: function(a, b) { return sorts.msort(a, b, ['w', 'h']); }, + area: function(a, b) { return sorts.msort(a, b, ['a', 'h', 'w']); }, + maxside: function(a, b) { return sorts.msort(a, b, ['max', 'min', 'h', 'w']); }, + msort: function(a, b, criteria) { /* sort by multiple criteria */ + var diff, n; + for (n = 0; n < criteria.length; ++n) { + diff = sorts[ criteria[n] ](a, b); + if (diff !== 0) { + return diff; + } + } + return 0; + } + }; + + + + // end of Jake's code + + + + // aux, used to display blocks in unfitted property + var toString = function() { + return [this.w, ' x ', this.h].join(''); + }; + + + + /** + * Binary Packing algorithm implementation + * + * Based on the work of Jake Gordon + * + * see https://github.com/jakesgordon/bin-packing/ + * + * @namespace Ink.Util.BinPack + * @version 1 + * @static + */ + var BinPack = { + + /** + * @method binPack + * @param {Object} o Options + * @param {Array} o.blocks Array of items with width and height integer attributes. + * @param {Array} [o.dimensions] Flag to fix container dimensions + * @param {String} [o.sorter] Sorting function. One of: random, height, width, area, maxside + * @return {Object} Returns an object containing container dimensions, filled ratio, fitted blocks, unfitted blocks and all blocks + * @static + */ + binPack: function(o) { + var i, f, bl; + + + + // calculate area if not there already + for (i = 0, f = o.blocks.length; i < f; ++i) { + bl = o.blocks[i]; + if (! ('area' in bl) ) { + bl.area = bl.w * bl.h; + } + } + + + + // apply algorithm + var packer = o.dimensions ? new Packer(o.dimensions[0], o.dimensions[1]) : new GrowingPacker(); + + if (!o.sorter) { o.sorter = 'maxside'; } + + o.blocks.sort( sorts[ o.sorter ] ); + + packer.fit(o.blocks); + + var dims2 = [packer.root.w, packer.root.h]; + + + + // layout is done here, generating report data... + var fitted = []; + var unfitted = []; + + for (i = 0, f = o.blocks.length; i < f; ++i) { + bl = o.blocks[i]; + if (bl.fit) { + fitted.push(bl); + } + else { + bl.toString = toString; // TO AID SERIALIZATION + unfitted.push(bl); + } + } + + var area = dims2[0] * dims2[1]; + var fit = 0; + for (i = 0, f = fitted.length; i < f; ++i) { + bl = fitted[i]; + fit += bl.area; + } + + return { + dimensions: dims2, + filled: fit / area, + blocks: o.blocks, + fitted: fitted, + unfitted: unfitted + }; + } + }; + + + + return BinPack; + +}); +/** + * @module Ink.Util.Cookie_1 + * Cookie Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.Cookie', '1', [], function() { + + 'use strict'; + + var Cookie = { + + /** + * Gets an object with the current page cookies. + * + * @method get + * @param {String} name The cookie name. + * @return {String|Object} If the name is specified, it returns the value of that key. Otherwise it returns the full cookie object + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Cookie_1'], function( InkCookie ){ + * var myCookieValue = InkCookie.get('someVarThere'); + * console.log( myCookieValue ); // This will output the value of the cookie 'someVarThere', from the cookie object. + * }); + */ + get: function(name) + { + var cookie = document.cookie || false; + + var _Cookie = {}; + if(cookie) { + cookie = cookie.replace(new RegExp("; ", "g"), ';'); + var aCookie = cookie.split(';'); + var aItem = []; + if(aCookie.length > 0) { + for(var i=0; i < aCookie.length; i++) { + aItem = aCookie[i].split('='); + if(aItem.length === 2) { + _Cookie[aItem[0]] = decodeURIComponent(aItem[1]); + } + aItem = []; + } + } + } + if(name) { + if(typeof(_Cookie[name]) !== 'undefined') { + return _Cookie[name]; + } else { + return null; + } + } + return _Cookie; + }, + + /** + * Sets a cookie. + * + * @method set + * @param {String} name Cookie name. + * @param {String} value Cookie value. + * @param {Number} [expires] Number of seconds the cookie will be valid for. + * @param {String} [path] Path for the cookie. Defaults to '/'. + * @param {String} [domain] Domain for the cookie. Defaults to current hostname. + * @param {Boolean} [secure] Flag for secure. Default 'false'. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Cookie_1'], function( InkCookie ){ + * var expireDate = new Date( 2014,00,01, 0,0,0); + * InkCookie.set( 'someVarThere', 'anyValueHere', expireDate.getTime() ); + * }); + */ + set: function(name, value, expires, path, domain, secure) + { + var sName; + if(!name || value===false || typeof(name) === 'undefined' || typeof(value) === 'undefined') { + return false; + } else { + sName = name+'='+encodeURIComponent(value); + } + var sExpires = false; + var sPath = false; + var sDomain = false; + var sSecure = false; + + if(expires && typeof(expires) !== 'undefined' && !isNaN(expires)) { + var oDate = new Date(); + var sDate = (parseInt(Number(oDate.valueOf()), 10) + (Number(parseInt(expires, 10)) * 1000)); + + var nDate = new Date(sDate); + var expiresString = nDate.toGMTString(); + + var re = new RegExp("([^\\s]+)(\\s\\d\\d)\\s(\\w\\w\\w)\\s(.*)"); + expiresString = expiresString.replace(re, "$1$2-$3-$4"); + + sExpires = 'expires='+expiresString; + } else { + if(typeof(expires) !== 'undefined' && !isNaN(expires) && Number(parseInt(expires, 10))===0) { + sExpires = ''; + } else { + sExpires = 'expires=Thu, 01-Jan-2037 00:00:01 GMT'; + } + } + + if(path && typeof(path) !== 'undefined') { + sPath = 'path='+path; + } else { + sPath = 'path=/'; + } + + if(domain && typeof(domain) !== 'undefined') { + sDomain = 'domain='+domain; + } else { + var portClean = new RegExp(":(.*)"); + sDomain = 'domain='+window.location.host; + sDomain = sDomain.replace(portClean,""); + } + + if(secure && typeof(secure) !== 'undefined') { + sSecure = secure; + } else { + sSecure = false; + } + + document.cookie = sName+'; '+sExpires+'; '+sPath+'; '+sDomain+'; '+sSecure; + }, + + /** + * Deletes a cookie. + * + * @method remove + * @param {String} cookieName Cookie name. + * @param {String} [path] Path of the cookie. Defaults to '/'. + * @param {String} [domain] Domain of the cookie. Defaults to current hostname. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Cookie_1'], function( InkCookie ){ + * InkCookie.remove( 'someVarThere' ); + * }); + */ + remove: function(cookieName, path, domain) + { + //var expiresDate = 'Thu, 01-Jan-1970 00:00:01 GMT'; + var sPath = false; + var sDomain = false; + var expiresDate = -999999999; + + if(path && typeof(path) !== 'undefined') { + sPath = path; + } else { + sPath = '/'; + } + + if(domain && typeof(domain) !== 'undefined') { + sDomain = domain; + } else { + sDomain = window.location.host; + } + + this.set(cookieName, 'deleted', expiresDate, sPath, sDomain); + } + }; + + return Cookie; + +}); + +/** + * @module Ink.Util.Date_1 + * Date utility functions + * @version 1 + */ + +Ink.createModule('Ink.Util.Date', '1', [], function() { + + 'use strict'; + + var InkDate = { + + /** + * Function that returns the string representation of the month [PT only] + * + * @method _months + * @param {Number} index Month javascript (0 to 11) + * @return {String} The month's name + * @private + * @static + * @example + * console.log( InkDate._months(0) ); // Result: Janeiro + */ + _months: function(index){ + var _m = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro']; + return _m[index]; + }, + + /** + * Function that returns the month [PT only] ( 0 to 11 ) + * + * @method _iMonth + * @param {String} month Month javascript (0 to 11) + * @return {Number} The month's number + * @private + * @static + * @example + * console.log( InkDate._iMonth('maio') ); // Result: 4 + */ + _iMonth : function( month ) + { + if ( Number( month ) ) { return +month - 1; } + return { + 'janeiro' : 0 , + 'jan' : 0 , + 'fevereiro' : 1 , + 'fev' : 1 , + 'março' : 2 , + 'mar' : 2 , + 'abril' : 3 , + 'abr' : 3 , + 'maio' : 4 , + 'mai' : 4 , + 'junho' : 5 , + 'jun' : 5 , + 'julho' : 6 , + 'jul' : 6 , + 'agosto' : 7 , + 'ago' : 7 , + 'setembro' : 8 , + 'set' : 8 , + 'outubro' : 9 , + 'out' : 9 , + 'novembro' : 10 , + 'nov' : 10 , + 'dezembro' : 11 , + 'dez' : 11 + }[ month.toLowerCase( ) ]; + } , + + /** + * Function that returns the representation the day of the week [PT Only] + * + * @method _wDays + * @param {Number} index Week's day index + * @return {String} The week's day name + * @private + * @static + * @example + * console.log( InkDate._wDays(0) ); // Result: Domingo + */ + _wDays: function(index){ + var _d = ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado']; + return _d[index]; + }, + + /** + * Function that returns day of the week in javascript 1 to 7 + * + * @method _iWeek + * @param {String} week Week's day name + * @return {Number} The week's day index + * @private + * @static + * @example + * console.log( InkDate._iWeek('quarta') ); // Result: 3 + */ + _iWeek: function( week ) + { + if ( Number( week ) ) { return +week || 7; } + return { + 'segunda' : 1 , + 'seg' : 1 , + 'terça' : 2 , + 'ter' : 2 , + 'quarta' : 3 , + 'qua' : 3 , + 'quinta' : 4 , + 'qui' : 4 , + 'sexta' : 5 , + 'sex' : 5 , + 'sábado' : 6 , + 'sáb' : 6 , + 'domingo' : 7 , + 'dom' : 7 + }[ week.toLowerCase( ) ]; + }, + + /** + * Function that returns the number of days of a given month (m) on a given year (y) + * + * @method _daysInMonth + * @param {Number} _m Month + * @param {Number} _y Year + * @return {Number} Number of days of a give month on a given year + * @private + * @static + * @example + * console.log( InkDate._daysInMonth(2,2013) ); // Result: 28 + */ + _daysInMonth: function(_m,_y){ + var nDays; + + if(_m===1 || _m===3 || _m===5 || _m===7 || _m===8 || _m===10 || _m===12) + { + nDays= 31; + } + else if ( _m===4 || _m===6 || _m===9 || _m===11) + { + nDays = 30; + } + else + { + if((_y%400===0) || (_y%4===0 && _y%100!==0)) + { + nDays = 29; + } + else + { + nDays = 28; + } + } + return nDays; + }, + + /** + * Formats a date object. + * This works exactly as php date() function. http://php.net/manual/en/function.date.php + * + * @method get + * @param {String} format The format in which the date it will be formatted. + * @param {Date} [_date] The date to format. Can receive unix timestamp or a date object. Defaults to current time. + * @return {String} Formatted date + * @public + * @static + * @example + * + */ + get: function(format, _date){ + /*jshint maxcomplexity:65 */ + if(typeof(format) === 'undefined' || format === ''){ + format = "Y-m-d"; + } + + + var iFormat = format.split(""); + var result = new Array(iFormat.length); + var escapeChar = "\\"; + var jsDate; + + if (typeof(_date) === 'undefined'){ + jsDate = new Date(); + } else if (typeof(_date)==='number'){ + jsDate = new Date(_date*1000); + } else { + jsDate = new Date(_date); + } + + var jsFirstDay, jsThisDay, jsHour; + /* This switch is presented in the same order as in php date function (PHP 5.2.2) */ + for (var i = 0; i < iFormat.length; i++) { + switch(iFormat[i]) { + case escapeChar: + result[i] = iFormat[i+1]; + i++; + break; + + + /* DAY */ + case "d": /* Day of the month, 2 digits with leading zeros; ex: 01 to 31 */ + var jsDay = jsDate.getDate(); + result[i] = (String(jsDay).length > 1) ? jsDay : "0" + jsDay; + break; + + case "D": /* A textual representation of a day, three letters; Seg to Dom */ + result[i] = this._wDays(jsDate.getDay()).substring(0, 3); + break; + + case "j": /* Day of the month without leading zeros; ex: 1 to 31 */ + result[i] = jsDate.getDate(); + break; + + case "l": /* A full textual representation of the day of the week; Domingo to Sabado */ + result[i] = this._wDays(jsDate.getDay()); + break; + + case "N": /* ISO-8601 numeric representation of the day of the week; 1 (Segunda) to 7 (Domingo) */ + result[i] = jsDate.getDay() || 7; + break; + + case "S": /* English ordinal suffix for the day of the month, 2 characters; st, nd, rd or th. Works well with j */ + var temp = jsDate.getDate(); + var suffixes = ["st", "nd", "rd"]; + var suffix = ""; + + if (temp >= 11 && temp <= 13) { + result[i] = "th"; + } else { + result[i] = (suffix = suffixes[String(temp).substr(-1) - 1]) ? (suffix) : ("th"); + } + break; + + case "w": /* Numeric representation of the day of the week; 0 (for Sunday) through 6 (for Saturday) */ + result[i] = jsDate.getDay(); + break; + + case "z": /* The day of the year (starting from 0); 0 to 365 */ + jsFirstDay = Date.UTC(jsDate.getFullYear(), 0, 0); + jsThisDay = Date.UTC(jsDate.getFullYear(), jsDate.getMonth(), jsDate.getDate()); + result[i] = Math.floor((jsThisDay - jsFirstDay) / (1000 * 60 * 60 * 24)); + break; + + /* WEEK */ + case "W": /* ISO-8601 week number of year, weeks starting on Monday; ex: 42 (the 42nd week in the year) */ + var jsYearStart = new Date( jsDate.getFullYear( ) , 0 , 1 ); + jsFirstDay = jsYearStart.getDay() || 7; + + var days = Math.floor( ( jsDate - jsYearStart ) / ( 24 * 60 * 60 * 1000 ) + 1 ); + + result[ i ] = Math.ceil( ( days - ( 8 - jsFirstDay ) ) / 7 ) + 1; + break; + + + /* MONTH */ + case "F": /* A full textual representation of a month, such as Janeiro or Marco; Janeiro a Dezembro */ + result[i] = this._months(jsDate.getMonth()); + break; + + case "m": /* Numeric representation of a month, with leading zeros; 01 to 12 */ + var jsMonth = String(jsDate.getMonth() + 1); + result[i] = (jsMonth.length > 1) ? jsMonth : "0" + jsMonth; + break; + + case "M": /* A short textual representation of a month, three letters; Jan a Dez */ + result[i] = this._months(jsDate.getMonth()).substring(0,3); + break; + + case "n": /* Numeric representation of a month, without leading zeros; 1 a 12 */ + result[i] = jsDate.getMonth() + 1; + break; + + case "t": /* Number of days in the given month; ex: 28 */ + result[i] = this._daysInMonth(jsDate.getMonth()+1,jsDate.getYear()); + break; + + /* YEAR */ + case "L": /* Whether it's a leap year; 1 if it is a leap year, 0 otherwise. */ + var jsYear = jsDate.getFullYear(); + result[i] = (jsYear % 4) ? false : ( (jsYear % 100) ? true : ( (jsYear % 400) ? false : true ) ); + break; + + case "o": /* ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. */ + throw '"o" not implemented!'; + + case "Y": /* A full numeric representation of a year, 4 digits; 1999 */ + result[i] = jsDate.getFullYear(); + break; + + case "y": /* A two digit representation of a year; 99 */ + result[i] = String(jsDate.getFullYear()).substring(2); + break; + + /* TIME */ + case "a": /* Lowercase Ante meridiem and Post meridiem; am or pm */ + result[i] = (jsDate.getHours() < 12) ? "am" : "pm"; + break; + + case "A": /* Uppercase Ante meridiem and Post meridiem; AM or PM */ + result[i] = (jsDate.getHours < 12) ? "AM" : "PM"; + break; + + case "B": /* Swatch Internet time; 000 through 999 */ + throw '"B" not implemented!'; + + case "g": /* 12-hour format of an hour without leading zeros; 1 to 12 */ + jsHour = jsDate.getHours(); + result[i] = (jsHour <= 12) ? jsHour : (jsHour - 12); + break; + + case "G": /* 24-hour format of an hour without leading zeros; 1 to 23 */ + result[i] = String(jsDate.getHours()); + break; + + case "h": /* 12-hour format of an hour with leading zeros; 01 to 12 */ + jsHour = String(jsDate.getHours()); + jsHour = (jsHour <= 12) ? jsHour : (jsHour - 12); + result[i] = (jsHour.length > 1) ? jsHour : "0" + jsHour; + break; + + case "H": /* 24-hour format of an hour with leading zeros; 01 to 24 */ + jsHour = String(jsDate.getHours()); + result[i] = (jsHour.length > 1) ? jsHour : "0" + jsHour; + break; + + case "i": /* Minutes with leading zeros; 00 to 59 */ + var jsMinute = String(jsDate.getMinutes()); + result[i] = (jsMinute.length > 1) ? jsMinute : "0" + jsMinute; + break; + + case "s": /* Seconds with leading zeros; 00 to 59; */ + var jsSecond = String(jsDate.getSeconds()); + result[i] = (jsSecond.length > 1) ? jsSecond : "0" + jsSecond; + break; + + case "u": /* Microseconds */ + throw '"u" not implemented!'; + + + /* TIMEZONE */ + + case "e": /* Timezone identifier */ + throw '"e" not implemented!'; + + case "I": /* "1" if Daylight Savings Time, "0" otherwise. Works only on the northern hemisphere */ + jsFirstDay = new Date(jsDate.getFullYear(), 0, 1); + result[i] = (jsDate.getTimezoneOffset() !== jsFirstDay.getTimezoneOffset()) ? (1) : (0); + break; + + case "O": /* Difference to Greenwich time (GMT) in hours */ + var jsMinZone = jsDate.getTimezoneOffset(); + var jsMinutes = jsMinZone % 60; + jsHour = String(((jsMinZone - jsMinutes) / 60) * -1); + + if (jsHour.charAt(0) !== "-") { + jsHour = "+" + jsHour; + } + + jsHour = (jsHour.length === 3) ? (jsHour) : (jsHour.replace(/([+\-])(\d)/, "$1" + 0 + "$2")); + result[i] = jsHour + jsMinutes + "0"; + break; + + case "P": /* Difference to Greenwich time (GMT) with colon between hours and minutes */ + throw '"P" not implemented!'; + + case "T": /* Timezone abbreviation */ + throw '"T" not implemented!'; + + case "Z": /* Timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive. */ + result[i] = jsDate.getTimezoneOffset() * 60; + break; + + + /* FULL DATE/TIME */ + + case "c": /* ISO 8601 date */ + throw '"c" not implemented!'; + + case "r": /* RFC 2822 formatted date */ + var jsDayName = this._wDays(jsDate.getDay()).substr(0, 3); + var jsMonthName = this._months(jsDate.getMonth()).substr(0, 3); + result[i] = jsDayName + ", " + jsDate.getDate() + " " + jsMonthName + this.get(" Y H:i:s O",jsDate); + break; + + case "U": /* Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) */ + result[i] = Math.floor(jsDate.getTime() / 1000); + break; + + default: + result[i] = iFormat[i]; + } + } + + return result.join(''); + + }, + + /** + * Creates a date object based on a format string. + * This works exactly as php date() function. http://php.net/manual/en/function.date.php + * + * @method set + * @param {String} [format] The format in which the date will be formatted. Defaults to 'Y-m-d' + * @param {String} str_date The date formatted. + * @return {Date} Date object based on the formatted date and format + * @public + * @static + */ + set : function( format , str_date ) { + if ( typeof str_date === 'undefined' ) { return ; } + if ( typeof format === 'undefined' || format === '' ) { format = "Y-m-d"; } + + var iFormat = format.split(""); + var result = new Array( iFormat.length ); + var escapeChar = "\\"; + var mList; + + var objIndex = { + year : undefined , + month : undefined , + day : undefined , + dayY : undefined , + dayW : undefined , + week : undefined , + hour : undefined , + hourD : undefined , + min : undefined , + sec : undefined , + msec : undefined , + ampm : undefined , + diffM : undefined , + diffH : undefined , + date : undefined + }; + + var matches = 0; + + /* This switch is presented in the same order as in php date function (PHP 5.2.2) */ + for ( var i = 0; i < iFormat.length; i++) { + switch( iFormat[ i ] ) { + case escapeChar: + result[i] = iFormat[ i + 1 ]; + i++; + break; + + /* DAY */ + case "d": /* Day of the month, 2 digits with leading zeros; ex: 01 to 31 */ + result[ i ] = '(\\d{2})'; + objIndex.day = { original : i , match : matches++ }; + break; + + case "j": /* Day of the month without leading zeros; ex: 1 to 31 */ + result[ i ] = '(\\d{1,2})'; + objIndex.day = { original : i , match : matches++ }; + break; + + case "D": /* A textual representation of a day, three letters; Seg to Dom */ + result[ i ] = '([\\wá]{3})'; + objIndex.dayW = { original : i , match : matches++ }; + break; + + case "l": /* A full textual representation of the day of the week; Domingo to Sabado */ + result[i] = '([\\wá]{5,7})'; + objIndex.dayW = { original : i , match : matches++ }; + break; + + case "N": /* ISO-8601 numeric representation of the day of the week; 1 (Segunda) to 7 (Domingo) */ + result[ i ] = '(\\d)'; + objIndex.dayW = { original : i , match : matches++ }; + break; + + case "w": /* Numeric representation of the day of the week; 0 (for Sunday) through 6 (for Saturday) */ + result[ i ] = '(\\d)'; + objIndex.dayW = { original : i , match : matches++ }; + break; + + case "S": /* English ordinal suffix for the day of the month, 2 characters; st, nd, rd or th. Works well with j */ + result[ i ] = '\\w{2}'; + break; + + case "z": /* The day of the year (starting from 0); 0 to 365 */ + result[ i ] = '(\\d{1,3})'; + objIndex.dayY = { original : i , match : matches++ }; + break; + + /* WEEK */ + case "W": /* ISO-8601 week number of year, weeks starting on Monday; ex: 42 (the 42nd week in the year) */ + result[ i ] = '(\\d{1,2})'; + objIndex.week = { original : i , match : matches++ }; + break; + + /* MONTH */ + case "F": /* A full textual representation of a month, such as Janeiro or Marco; Janeiro a Dezembro */ + result[ i ] = '([\\wç]{4,9})'; + objIndex.month = { original : i , match : matches++ }; + break; + + case "M": /* A short textual representation of a month, three letters; Jan a Dez */ + result[ i ] = '(\\w{3})'; + objIndex.month = { original : i , match : matches++ }; + break; + + case "m": /* Numeric representation of a month, with leading zeros; 01 to 12 */ + result[ i ] = '(\\d{2})'; + objIndex.month = { original : i , match : matches++ }; + break; + + case "n": /* Numeric representation of a month, without leading zeros; 1 a 12 */ + result[ i ] = '(\\d{1,2})'; + objIndex.month = { original : i , match : matches++ }; + break; + + case "t": /* Number of days in the given month; ex: 28 */ + result[ i ] = '\\d{2}'; + break; + + /* YEAR */ + case "L": /* Whether it's a leap year; 1 if it is a leap year, 0 otherwise. */ + result[ i ] = '\\w{4,5}'; + break; + + case "o": /* ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. */ + throw '"o" not implemented!'; + + case "Y": /* A full numeric representation of a year, 4 digits; 1999 */ + result[ i ] = '(\\d{4})'; + objIndex.year = { original : i , match : matches++ }; + break; + + case "y": /* A two digit representation of a year; 99 */ + result[ i ] = '(\\d{2})'; + if ( typeof objIndex.year === 'undefined' || iFormat[ objIndex.year.original ] !== 'Y' ) { + objIndex.year = { original : i , match : matches++ }; + } + break; + + /* TIME */ + case "a": /* Lowercase Ante meridiem and Post meridiem; am or pm */ + result[ i ] = '(am|pm)'; + objIndex.ampm = { original : i , match : matches++ }; + break; + + case "A": /* Uppercase Ante meridiem and Post meridiem; AM or PM */ + result[ i ] = '(AM|PM)'; + objIndex.ampm = { original : i , match : matches++ }; + break; + + case "B": /* Swatch Internet time; 000 through 999 */ + throw '"B" not implemented!'; + + case "g": /* 12-hour format of an hour without leading zeros; 1 to 12 */ + result[ i ] = '(\\d{1,2})'; + objIndex.hourD = { original : i , match : matches++ }; + break; + + case "G": /* 24-hour format of an hour without leading zeros; 1 to 23 */ + result[ i ] = '(\\d{1,2})'; + objIndex.hour = { original : i , match : matches++ }; + break; + + case "h": /* 12-hour format of an hour with leading zeros; 01 to 12 */ + result[ i ] = '(\\d{2})'; + objIndex.hourD = { original : i , match : matches++ }; + break; + + case "H": /* 24-hour format of an hour with leading zeros; 01 to 24 */ + result[ i ] = '(\\d{2})'; + objIndex.hour = { original : i , match : matches++ }; + break; + + case "i": /* Minutes with leading zeros; 00 to 59 */ + result[ i ] = '(\\d{2})'; + objIndex.min = { original : i , match : matches++ }; + break; + + case "s": /* Seconds with leading zeros; 00 to 59; */ + result[ i ] = '(\\d{2})'; + objIndex.sec = { original : i , match : matches++ }; + break; + + case "u": /* Microseconds */ + throw '"u" not implemented!'; + + /* TIMEZONE */ + case "e": /* Timezone identifier */ + throw '"e" not implemented!'; + + case "I": /* "1" if Daylight Savings Time, "0" otherwise. Works only on the northern hemisphere */ + result[i] = '\\d'; + break; + + case "O": /* Difference to Greenwich time (GMT) in hours */ + result[ i ] = '([-+]\\d{4})'; + objIndex.diffH = { original : i , match : matches++ }; + break; + + case "P": /* Difference to Greenwich time (GMT) with colon between hours and minutes */ + throw '"P" not implemented!'; + + case "T": /* Timezone abbreviation */ + throw '"T" not implemented!'; + + case "Z": /* Timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive. */ + result[ i ] = '(\\-?\\d{1,5})'; + objIndex.diffM = { original : i , match : matches++ }; + break; + + /* FULL DATE/TIME */ + case "c": /* ISO 8601 date */ + throw '"c" not implemented!'; + + case "r": /* RFC 2822 formatted date */ + result[ i ] = '([\\wá]{3}, \\d{1,2} \\w{3} \\d{4} \\d{2}:\\d{2}:\\d{2} [+\\-]\\d{4})'; + objIndex.date = { original : i , match : matches++ }; + break; + + case "U": /* Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) */ + result[ i ] = '(\\d{1,13})'; + objIndex.date = { original : i , match : matches++ }; + break; + + default: + result[ i ] = iFormat[ i ]; + } + } + + var pattr = new RegExp( result.join('') ); + + try { + mList = str_date.match( pattr ); + if ( !mList ) { return; } + } + catch ( e ) { return ; } + + var _haveDatetime = typeof objIndex.date !== 'undefined'; + + var _haveYear = typeof objIndex.year !== 'undefined'; + + var _haveYDay = typeof objIndex.dayY !== 'undefined'; + + var _haveDay = typeof objIndex.day !== 'undefined'; + var _haveMonth = typeof objIndex.month !== 'undefined'; + var _haveMonthDay = _haveMonth && _haveDay; + var _haveOnlyDay = !_haveMonth && _haveDay; + + var _haveWDay = typeof objIndex.dayW !== 'undefined'; + var _haveWeek = typeof objIndex.week !== 'undefined'; + var _haveWeekWDay = _haveWeek && _haveWDay; + var _haveOnlyWDay = !_haveWeek && _haveWDay; + + var _validDate = _haveYDay || _haveMonthDay || !_haveYear && _haveOnlyDay || _haveWeekWDay || !_haveYear && _haveOnlyWDay; + var _noDate = !_haveYear && !_haveYDay && !_haveDay && !_haveMonth && !_haveWDay && !_haveWeek; + + var _haveHour12 = typeof objIndex.hourD !== 'undefined' && typeof objIndex.ampm !== 'undefined'; + var _haveHour24 = typeof objIndex.hour !== 'undefined'; + var _haveHour = _haveHour12 || _haveHour24; + + var _haveMin = typeof objIndex.min !== 'undefined'; + var _haveSec = typeof objIndex.sec !== 'undefined'; + var _haveMSec = typeof objIndex.msec !== 'undefined'; + + var _haveMoreM = !_noDate || _haveHour; + var _haveMoreS = _haveMoreM || _haveMin; + + var _haveDiffM = typeof objIndex.diffM !== 'undefined'; + var _haveDiffH = typeof objIndex.diffH !== 'undefined'; + //var _haveGMT = _haveDiffM || _haveDiffH; + var hour; + var min; + + if ( _haveDatetime ) { + if ( iFormat[ objIndex.date.original ] === 'U' ) { + return new Date( +mList[ objIndex.date.match + 1 ] * 1000 ); + } + + var dList = mList[ objIndex.date.match + 1 ].match( /\w{3}, (\d{1,2}) (\w{3}) (\d{4}) (\d{2}):(\d{2}):(\d{2}) ([+\-]\d{4})/ ); + hour = +dList[ 4 ] + ( +dList[ 7 ].slice( 0 , 3 ) ); + min = +dList[ 5 ] + ( dList[ 7 ].slice( 0 , 1 ) + dList[ 7 ].slice( 3 ) ) / 100 * 60; + + return new Date( dList[ 3 ] , this._iMonth( dList[ 2 ] ) , dList[ 1 ] , hour , min , dList[ 6 ] ); + } + + var _d = new Date( ); + var year; + var month; + var day; + var sec; + var msec; + var gmt; + + if ( !_validDate && !_noDate ) { return ; } + + if ( _validDate ) { + if ( _haveYear ) { + var _y = _d.getFullYear( ) - 50 + ''; + year = mList[ objIndex.year.match + 1 ]; + if ( iFormat[ objIndex.year.original ] === 'y' ) { + year = +_y.slice( 0 , 2 ) + ( year >= ( _y ).slice( 2 ) ? 0 : 1 ) + year; + } + } else { + year = _d.getFullYear(); + } + + if ( _haveYDay ) { + month = 0; + day = mList[ objIndex.dayY.match + 1 ]; + } else if ( _haveDay ) { + if ( _haveMonth ) { + month = this._iMonth( mList[ objIndex.month.match + 1 ] ); + } else { + month = _d.getMonth( ); + } + + day = mList[ objIndex.day.match + 1 ]; + } else { + month = 0; + + var week; + if ( _haveWeek ) { + week = mList[ objIndex.week.match + 1 ]; + } else { + week = this.get( 'W' , _d ); + } + + day = ( week - 2 ) * 7 + ( 8 - ( ( new Date( year , 0 , 1 ) ).getDay( ) || 7 ) ) + this._iWeek( mList[ objIndex.week.match + 1 ] ); + } + + if ( month === 0 && day > 31 ) { + var aux = new Date( year , month , day ); + month = aux.getMonth( ); + day = aux.getDate( ); + } + } + else { + year = _d.getFullYear( ); + month = _d.getMonth( ); + day = _d.getDate( ); + } + + if ( _haveHour12 ) { hour = +mList[ objIndex.hourD.match + 1 ] + ( mList[ objIndex.ampm.match + 1 ] === 'pm' ? 12 : 0 ); } + else if ( _haveHour24 ) { hour = mList[ objIndex.hour.match + 1 ]; } + else if ( _noDate ) { hour = _d.getHours( ); } + else { hour = '00'; } + + if ( _haveMin ) { min = mList[ objIndex.min.match + 1 ]; } + else if ( !_haveMoreM ) { min = _d.getMinutes( ); } + else { min = '00'; } + + if ( _haveSec ) { sec = mList[ objIndex.sec.match + 1 ]; } + else if ( !_haveMoreS ) { sec = _d.getSeconds( ); } + else { sec = '00'; } + + if ( _haveMSec ) { msec = mList[ objIndex.msec.match + 1 ]; } + else { msec = '000'; } + + if ( _haveDiffH ) { gmt = mList[ objIndex.diffH.match + 1 ]; } + else if ( _haveDiffM ) { gmt = String( -1 * mList[ objIndex.diffM.match + 1 ] / 60 * 100 ).replace( /^(\d)/ , '+$1' ).replace( /(^[\-+])(\d{3}$)/ , '$10$2' ); } + else { gmt = '+0000'; } + + return new Date( year, month, day, hour, min, sec ); + } + }; + + + return InkDate; + +}); + +/** + * @module Ink.Util.Dumper_1 + * Dump/Profiling Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.Dumper', '1', [], function() { + + 'use strict'; + + var Dumper = { + + /** + * Hex code for the 'tab' + * + * @property _tab + * @type {String} + * @private + * @readOnly + * @static + * + */ + _tab: '\xA0\xA0\xA0\xA0', + + /** + * Function that returns the argument passed formatted + * + * @method _formatParam + * @param {Mixed} param + * @return {String} The argument passed formatted + * @private + * @static + */ + _formatParam: function(param) + { + var formated = ''; + + switch(typeof(param)) { + case 'string': + formated = '(string) '+param; + break; + case 'number': + formated = '(number) '+param; + break; + case 'boolean': + formated = '(boolean) '+param; + break; + case 'object': + if(param !== null) { + if(param.constructor === Array) { + formated = 'Array \n{\n' + this._outputFormat(param, 0) + '\n}'; + } else { + formated = 'Object \n{\n' + this._outputFormat(param, 0) + '\n}'; + } + } else { + formated = 'null'; + } + break; + default: + formated = false; + } + + return formated; + }, + + /** + * Function that returns the tabs concatenated + * + * @method _getTabs + * @param {Number} numberOfTabs Number of Tabs + * @return {String} Tabs concatenated + * @private + * @static + */ + _getTabs: function(numberOfTabs) + { + var tabs = ''; + for(var _i = 0; _i < numberOfTabs; _i++) { + tabs += this._tab; + } + return tabs; + }, + + /** + * Function that formats the parameter to display. + * + * @method _outputFormat + * @param {Any} param + * @param {Number} dim + * @return {String} The parameter passed formatted to displat + * @private + * @static + */ + _outputFormat: function(param, dim) + { + var formated = ''; + //var _strVal = false; + var _typeof = false; + for(var key in param) { + if(param[key] !== null) { + if(typeof(param[key]) === 'object' && (param[key].constructor === Array || param[key].constructor === Object)) { + if(param[key].constructor === Array) { + _typeof = 'Array'; + } else if(param[key].constructor === Object) { + _typeof = 'Object'; + } + formated += this._tab + this._getTabs(dim) + '[' + key + '] => '+_typeof+'\n'; + formated += this._tab + this._getTabs(dim) + '{\n'; + formated += this._outputFormat(param[key], dim + 1) + this._tab + this._getTabs(dim) + '}\n'; + } else if(param[key].constructor === Function) { + continue; + } else { + formated = formated + this._tab + this._getTabs(dim) + '[' + key + '] => ' + param[key] + '\n'; + } + } else { + formated = formated + this._tab + this._getTabs(dim) + '[' + key + '] => null \n'; + } + } + return formated; + }, + + /** + * Prints variable structure. + * + * @method printDump + * @param {Any} param Variable to be dumped. + * @param {DOMElement|String} [target] Element to print the dump on. + * @public + * @static + */ + printDump: function(param, target) + { + /*jshint evil:true */ + if(!target || typeof(target) === 'undefined') { + document.write('
        '+this._formatParam(param)+'
        '); + } else { + if(typeof(target) === 'string') { + document.getElementById(target).innerHTML = '
        ' + this._formatParam(param) + '
        '; + } else if(typeof(target) === 'object') { + target.innerHTML = '
        '+this._formatParam(param)+'
        '; + } else { + throw "TARGET must be an element or an element ID"; + } + } + }, + + /** + * Get a variable's structure. + * + * @method returnDump + * @param {Any} param Variable to get the structure. + * @return {String} The variable's structure. + * @public + * @static + */ + returnDump: function(param) + { + return this._formatParam(param); + }, + + /** + * Alert a variable's structure. + * + * @method alertDump + * @param {Any} param Variable to be dumped. + * @public + * @static + */ + alertDump: function(param) + { + window.alert(this._formatParam(param).replace(/()(Array|Object)(<\/b>)/g, "$2")); + }, + + /** + * Prints the variable structure to a new window. + * + * @method windowDump + * @param {Any} param Variable to be dumped. + * @public + * @static + */ + windowDump: function(param) + { + var dumperwindow = 'dumperwindow_'+(Math.random() * 10000); + var win = window.open('', + dumperwindow, + 'width=400,height=300,left=50,top=50,status,menubar,scrollbars,resizable' + ); + win.document.open(); + win.document.write('
        '+this._formatParam(param)+'
        '); + win.document.close(); + win.focus(); + } + + }; + + return Dumper; + +}); +/** + * @module Ink.Util.I18n_1 + * Internationalization Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.I18n', '1', [], function () { + 'use strict'; + + var pattrText = /\{(?:(\{.*?})|(?:%s:)?(\d+)|(?:%s)?|([\w-]+))}/g; + + var funcOrVal = function( ret , args ) { + if ( typeof ret === 'function' ) { + return ret.apply(this, args); + } else if (typeof ret !== undefined) { + return ret; + } else { + return ''; + } + }; + + /** + * Creates a new I18n helper object + * + * @class Ink.Util.I18n + * @constructor + * + * @param {Object} dict Object mapping language codes (in the form of `pt_PT`, `pt_BR`, `fr`, `en_US`, etc.) to their Object dictionaries. + * @param {String} [lang]='pt_PT's language code of the target language + * + * @example + * var dictionaries = { // This could come from a JSONP request from your server + * 'pt_PT': { + * 'hello': 'olá', + * 'me': 'eu', + * 'i have a {} for you': 'tenho um {} para ti' // Old syntax using `{%s}` tokens still available + * }, + * 'pt_BR': { + * 'hello': 'oi', + * 'me': 'eu', + * 'i have a {} for you': 'tenho um {} para você' + * } + * }; + * Ink.requireModules(['Ink.Util.I18n_1'], function (I18n) { + * var i18n = new I18n(dictionaries, 'pt_PT'); + * i18n.text('hello'); // returns 'olá' + * i18n.text('i have a {} for you', 'IRON SWORD'); // returns 'tenho um IRON SWORD' para ti + * + * i18n.lang('pt_BR'); // Changes language. pt_BR dictionary is loaded + * i18n.text('hello'); // returns 'oi' + * + * i18n.lang('en_US'); // Missing language. + * i18n.text('hello'); // returns 'hello'. If testMode is on, returns '[hello]' + * }); + * + * @example + * // The old {%s} syntax from libsapo's i18n is still supported + * i18n.text('hello, {%s}!', 'someone'); // -> 'olá, someone!' + */ + var I18n = function( dict , lang , testMode ) { + if ( !( this instanceof I18n ) ) { return new I18n( dict , lang , testMode ); } + + this.reset( ) + .lang( lang ) + .testMode( testMode ) + .append( dict || { } , lang ); + }; + + I18n.prototype = { + reset: function( ) { + this._dicts = [ ]; + this._dict = { }; + this._testMode = false; + this._lang = this._gLang; + + return this; + }, + /** + * Adds translation strings for the helper to use. + * + * @method append + * @param {Object} dict Object containing language objects identified by their language code + * @example + * var i18n = new I18n({}, 'pt_PT'); + * i18n.append({'pt_PT': { + * 'sfraggles': 'braggles' + * }}); + * i18n.text('sfraggles') // -> 'braggles' + */ + append: function( dict ) { + this._dicts.push( dict ); + + this._dict = Ink.extendObj(this._dict , dict[ this._lang ] ); + + return this; + }, + /** + * Gets or sets the language. + * If there are more dictionaries available in cache, they will be loaded. + * + * @method lang + * @param {String} lang Language code to set this instance to. + */ + lang: function( lang ) { + if ( !arguments.length ) { return this._lang; } + + if ( lang && this._lang !== lang ) { + this._lang = lang; + + this._dict = { }; + + for ( var i = 0, l = this._dicts.length; i < l; i++ ) { + this._dict = Ink.extendObj( this._dict , this._dicts[ i ][ lang ] || { } ); + } + } + + return this; + }, + /** + * Sets or unsets test mode. + * In test mode, unknown strings are wrapped in `[ ... ]`. This is useful for debugging your application and to make sure all your translation keys are in place. + * + * @method testMode + * @param {Boolean} bool Flag to set the test mode state + */ + testMode: function( bool ) { + if ( !arguments.length ) { return !!this._testMode; } + + if ( bool !== undefined ) { this._testMode = !!bool; } + + return this; + }, + + /** + * Gest a key from the current dictionary + * + * @method getKey + * @param {String} key + * @return {Any} The object which happened to be in the current language dictionary on the given key. + * + * @example + * _.getKey('astring'); // -> 'a translated string' + * _.getKey('anobject'); // -> {'a': 'translated object'} + * _.getKey('afunction'); // -> function () { return 'this is a localized function' } + */ + getKey: function( key ) { + var ret; + var gLang = this._gLang; + var lang = this._lang; + + if ( key in this._dict ) { + ret = this._dict[ key ]; + } else { + I18n.lang( lang ); + + ret = this._gDict[ key ]; + + I18n.lang( gLang ); + } + + return ret; + }, + + /** + * Translates a string. + * Given a translation key, return a translated string, with replaced parameters. + * When a translated string is not available, the original string is returned unchanged. + * + * @method text + * @param {String} str Key to look for in i18n dictionary (which is returned verbatim if unknown) + * @param {Object} [namedParms] Named replacements. Replaces {named} with values in this object. + * @param {String} [args] Replacement #1 (replaces first {} and all {1}) + * @param {String} [arg2] Replacement #2 (replaces second {} and all {2}) + * @param {String} [argn*] Replacement #n (replaces nth {} and all {n}) + * + * @example + * _('Gosto muito de {} e o céu é {}.', 'carros', 'azul'); + * // returns 'Gosto muito de carros e o céu é azul.' + * + * @example + * _('O {1} é {2} como {2} é a cor do {3}.', 'carro', 'azul', 'FCP'); + * // returns 'O carro é azul como azul é o FCP.' + * + * @example + * _('O {person1} dava-se com a {person2}', {person1: 'coisinho', person2: 'coisinha'}); + * // -> 'O coisinho dava-se com a coisinha' + * + * @example + * // This is a bit more complex + * var i18n = make().lang('pt_PT').append({ + * pt_PT: { + * array: [1, 2], + * object: {'a': '-a-', 'b': '-b-'}, + * func: function (a, b) {return '[[' + a + ',' + b + ']]';} + * } + * }); + * i18n.text('array', 0); // -> '1' + * i18n.text('object', 'a'); // -> '-a-' + * i18n.text('func', 'a', 'b'); // -> '[[a,b]]' + */ + text: function( str /*, replacements...*/ ) { + if ( typeof str !== 'string' ) { return; } // Backwards-compat + + var pars = Array.prototype.slice.call( arguments , 1 ); + var idx = 0; + var isObj = typeof pars[ 0 ] === 'object'; + + var original = this.getKey( str ); + if ( original === undefined ) { original = this._testMode ? '[' + str + ']' : str; } + if ( typeof original === 'number' ) { original += ''; } + + if (typeof original === 'string') { + original = original.replace( pattrText , function( m , $1 , $2 , $3 ) { + var ret = + $1 ? $1 : + $2 ? pars[ $2 - ( isObj ? 0 : 1 ) ] : + $3 ? pars[ 0 ][ $3 ] || '' : + pars[ (idx++) + ( isObj ? 1 : 0 ) ]; + return funcOrVal( ret , [idx].concat(pars) ); + }); + return original; + } + + return ( + typeof original === 'function' ? original.apply( this , pars ) : + original instanceof Array ? funcOrVal( original[ pars[ 0 ] ] , pars ) : + typeof original === 'object' ? funcOrVal( original[ pars[ 0 ] ] , pars ) : + ''); + }, + + /** + * Translates and pluralizes text. + * Given a singular string, a plural string and a number, translates either the singular or plural string. + * + * @method ntext + * @return {String} + * + * @param {String} strSin Word to use when count is 1 + * @param {String} strPlur Word to use otherwise + * @param {Number} count Number which defines which word to use + * @param [args*] Extra arguments, to be passed to `text()` + * + * @example + * i18n.ntext('platypus', 'platypuses', 1); // returns 'ornitorrinco' + * i18n.ntext('platypus', 'platypuses', 2); // returns 'ornitorrincos' + * + * @example + * // The "count" argument is passed to text() + * i18n.ntext('{} platypus', '{} platypuses', 1); // returns '1 ornitorrinco' + * i18n.ntext('{} platypus', '{} platypuses', 2); // returns '2 ornitorrincos' + */ + ntext: function( strSin , strPlur , count ) { + var pars = Array.prototype.slice.apply( arguments ); + var original; + + if ( pars.length === 2 && typeof strPlur === 'number' ) { + original = this.getKey( strSin ); + if ( !( original instanceof Array ) ) { return ''; } + + pars.splice( 0 , 1 ); + original = original[ strPlur === 1 ? 0 : 1 ]; + } else { + pars.splice( 0 , 2 ); + original = count === 1 ? strSin : strPlur; + } + + return this.text.apply( this , [ original ].concat( pars ) ); + }, + + /** + * Gets the ordinal suffix of a number. + * + * This works by using transforms (in the form of Objects or Functions) passed into the function or found in the special key `_ordinals` in the active language dictionary. + * + * @method ordinal + * + * @param {Number} num Input number + * @param {Object|Function} [options]={} Maps for translating. Each of these options' fallback is found in the current language's dictionary. The lookup order is the following: `exceptions`, `byLastDigit`, `default`. Each of these may be either an `Object` or a `Function`. If it's a function, it is called (with `number` and `digit` for any function except for byLastDigit, which is called with the `lastDigit` of the number in question), and if the function returns a string, that is used. If it's an object, the property is looked up using `[...]`. If what is found is a string, it is used. + * @param {Object|Function} [options.byLastDigit]={} If the language requires the last digit to be considered, mappings of last digits to ordinal suffixes can be created here. + * @param {Object|Function} [options.exceptions]={} Map unique, special cases to their ordinal suffixes. + * + * @returns {String} Ordinal suffix for `num`. + * + * @example + * var i18n = new I18n({ + * pt_PT: { // 1º, 2º, 3º, 4º, ... + * _ordinal: { // The _ordinals key each translation dictionary is special. + * 'default': "º" // Usually the suffix is "º" in portuguese... + * } + * }, + * fr: { // 1er, 2e, 3e, 4e, ... + * _ordinal: { // The _ordinals key is special. + * 'default': "e", // Usually the suffix is "e" in french... + * exceptions: { + * 1: "er" // ... Except for the number one. + * } + * } + * }, + * en_US: { // 1st, 2nd, 3rd, 4th, ..., 11th, 12th, ... 21st, 22nd... + * _ordinal: { + * 'default': "th",// Usually the digit is "th" in english... + * byLastDigit: { + * 1: "st", // When the last digit is 1, use "th"... + * 2: "nd", // When the last digit is 2, use "nd"... + * 3: "rd" // When the last digit is 3, use "rd"... + * }, + * exceptions: { // But these numbers are special + * 0: "", + * 11: "th", + * 12: "th", + * 13: "th" + * } + * } + * } + * }, 'pt_PT'); + * + * i18n.ordinal(1); // returns 'º' + * i18n.ordinal(2); // returns 'º' + * i18n.ordinal(11); // returns 'º' + * + * i18n.lang('fr'); + * i18n.ordinal(1); // returns 'er' + * i18n.ordinal(2); // returns 'e' + * i18n.ordinal(11); // returns 'e' + * + * i18n.lang('en_US'); + * i18n.ordinal(1); // returns 'st' + * i18n.ordinal(2); // returns 'nd' + * i18n.ordinal(12); // returns 'th' + * i18n.ordinal(22); // returns 'nd' + * i18n.ordinal(3); // returns 'rd' + * i18n.ordinal(4); // returns 'th' + * i18n.ordinal(5); // returns 'th' + * + **/ + ordinal: function( num ) { + if ( num === undefined ) { return ''; } + + var lastDig = +num.toString( ).slice( -1 ); + + var ordDict = this.getKey( '_ordinals' ); + if ( ordDict === undefined ) { return ''; } + + if ( typeof ordDict === 'string' ) { return ordDict; } + + var ret; + + if ( typeof ordDict === 'function' ) { + ret = ordDict( num , lastDig ); + + if ( typeof ret === 'string' ) { return ret; } + } + + if ( 'exceptions' in ordDict ) { + ret = typeof ordDict.exceptions === 'function' ? ordDict.exceptions( num , lastDig ) : + num in ordDict.exceptions ? funcOrVal( ordDict.exceptions[ num ] , [num , lastDig] ) : + undefined; + + if ( typeof ret === 'string' ) { return ret; } + } + + if ( 'byLastDigit' in ordDict ) { + ret = typeof ordDict.byLastDigit === 'function' ? ordDict.byLastDigit( lastDig , num ) : + lastDig in ordDict.byLastDigit ? funcOrVal( ordDict.byLastDigit[ lastDig ] , [lastDig , num] ) : + undefined; + + if ( typeof ret === 'string' ) { return ret; } + } + + if ( 'default' in ordDict ) { + ret = funcOrVal( ordDict['default'] , [ num , lastDig ] ); + + if ( typeof ret === 'string' ) { return ret; } + } + + return ''; + }, + + /** + * Alias for the text method. + * Returns an alias to `text()`, for convenience. The resulting function is traditionally assigned to "_". + * + * @method alias + * @returns {Function} an alias to `text()`. You can also access the rest of the translation API through this alias. + * + * @example + * var i18n = new I18n({ + * 'pt_PT': { + * 'hi': 'olá', + * '{} day': '{} dia', + * '{} days': '{} dias', + * '_ordinals': { + * 'default': 'º' + * } + * } + * }, 'pt_PT'); + * var _ = i18n.alias(); + * _('hi'); // -> 'olá' + * _('{} days', 3); // -> '3 dias' + * _.ntext('{} day', '{} days', 2); // -> '2 dias' + * _.ntext('{} day', '{} days', 1); // -> '1 dia' + * _.ordinal(3); // -> 'º' + */ + alias: function( ) { + var ret = Ink.bind( I18n.prototype.text , this ); + ret.ntext = Ink.bind( I18n.prototype.ntext , this ); + ret.append = Ink.bind( I18n.prototype.append , this ); + ret.ordinal = Ink.bind( I18n.prototype.ordinal , this ); + ret.testMode = Ink.bind( I18n.prototype.testMode , this ); + + return ret; + } + }; + + /** + * Resets I18n global state (global dictionaries, and default language for instances) + * + * @method reset + * @static + * + **/ + I18n.reset = function( ) { + I18n.prototype._gDicts = [ ]; + I18n.prototype._gDict = { }; + I18n.prototype._gLang = 'pt_PT'; + }; + I18n.reset( ); + + /** + * Adds a dictionary to be used in all I18n instances for the corresponding language. + * + * @method append + * @static + * + * @param dict {Object} Dictionary to be added + * @param lang {String} Language fo the dictionary being added + * + */ + I18n.append = function( dict , lang ) { + if ( lang ) { + if ( !( lang in dict ) ) { + var obj = { }; + + obj[ lang ] = dict; + + dict = obj; + } + + if ( lang !== I18n.prototype._gLang ) { I18n.lang( lang ); } + } + + I18n.prototype._gDicts.push( dict ); + + Ink.extendObj( I18n.prototype._gDict , dict[ I18n.prototype._gLang ] ); + }; + + /** + * Gets or sets the current default language of I18n instances. + * + * @method lang + * @static + * + * @return {String} language code + */ + I18n.lang = function( lang ) { + if ( !arguments.length ) { return I18n.prototype._gLang; } + + if ( lang && I18n.prototype._gLang !== lang ) { + I18n.prototype._gLang = lang; + + I18n.prototype._gDict = { }; + + for ( var i = 0, l = I18n.prototype._gDicts.length; i < l; i++ ) { + Ink.extendObj( I18n.prototype._gDict , I18n.prototype._gDicts[ i ][ lang ] || { } ); + } + } + }; + + return I18n; +}); +/** + * @module Ink.Util.Json_1 + * JSON Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.Json', '1', [], function() { + 'use strict'; + + var function_call = Function.prototype.call; + var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; + + function twoDigits(n) { + var r = '' + n; + if (r.length === 1) { + return '0' + r; + } else { + return r; + } + } + + var dateToISOString = Date.prototype.toISOString ? + Ink.bind(function_call, Date.prototype.toISOString) : + function(date) { + // Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString + return date.getUTCFullYear() + + '-' + twoDigits( date.getUTCMonth() + 1 ) + + '-' + twoDigits( date.getUTCDate() ) + + 'T' + twoDigits( date.getUTCHours() ) + + ':' + twoDigits( date.getUTCMinutes() ) + + ':' + twoDigits( date.getUTCSeconds() ) + + '.' + String( (date.getUTCMilliseconds()/1000).toFixed(3) ).slice( 2, 5 ) + + 'Z'; + }; + + /** + * Use this class to convert JSON strings to JavaScript objects + * `(Json.parse)` and also to do the opposite operation `(Json.stringify)`. + * Internally, the standard JSON implementation is used if available + * Otherwise, the functions mimic the standard implementation. + * + * Here's how to produce JSON from an existing object: + * + * Ink.requireModules(['Ink.Util.Json_1'], function (Json) { + * var obj = { + * key1: 'value1', + * key2: 'value2', + * keyArray: ['arrayValue1', 'arrayValue2', 'arrayValue3'] + * }; + * Json.stringify(obj); // The above object as a JSON string + * }); + * + * And here is how to parse JSON: + * + * Ink.requireModules(['Ink.Util.Json_1'], function (Json) { + * var source = '{"key": "value", "array": [true, null, false]}'; + * Json.parse(source); // The above JSON string as an object + * }); + * @namespace Ink.Util.Json + * @static + * + */ + var InkJson = { + _nativeJSON: window.JSON || null, + + _convertToUnicode: false, + + // Escape characters so as to embed them in JSON strings + _escape: function (theString) { + var _m = { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"': '\\"', '\\': '\\\\' }; + + if (/["\\\x00-\x1f]/.test(theString)) { + theString = theString.replace(/([\x00-\x1f\\"])/g, function(a, b) { + var c = _m[b]; + if (c) { + return c; + } + c = b.charCodeAt(); + return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16); + }); + } + + return theString; + }, + + // A character conversion map + _toUnicode: function (theString) + { + if(!this._convertToUnicode) { + return this._escape(theString); + } else { + var unicodeString = ''; + var inInt = false; + var theUnicode = false; + var i = 0; + var total = theString.length; + while(i < total) { + inInt = theString.charCodeAt(i); + if( (inInt >= 32 && inInt <= 126) || + //(inInt >= 48 && inInt <= 57) || + //(inInt >= 65 && inInt <= 90) || + //(inInt >= 97 && inInt <= 122) || + inInt === 8 || + inInt === 9 || + inInt === 10 || + inInt === 12 || + inInt === 13 || + inInt === 32 || + inInt === 34 || + inInt === 47 || + inInt === 58 || + inInt === 92) { + + if(inInt === 34 || inInt === 92 || inInt === 47) { + theUnicode = '\\'+theString.charAt(i); + } else if(inInt === 8) { + theUnicode = '\\b'; + } else if(inInt === 9) { + theUnicode = '\\t'; + } else if(inInt === 10) { + theUnicode = '\\n'; + } else if(inInt === 12) { + theUnicode = '\\f'; + } else if(inInt === 13) { + theUnicode = '\\r'; + } else { + theUnicode = theString.charAt(i); + } + } else { + if(this._convertToUnicode) { + theUnicode = theString.charCodeAt(i).toString(16)+''.toUpperCase(); + while (theUnicode.length < 4) { + theUnicode = '0' + theUnicode; + } + theUnicode = '\\u' + theUnicode; + } else { + theUnicode = theString.charAt(i); + } + } + unicodeString += theUnicode; + + i++; + } + + return unicodeString; + } + + }, + + _stringifyValue: function(param) { + if (typeof param === 'string') { + return '"' + this._toUnicode(param) + '"'; + } else if (typeof param === 'number' && (isNaN(param) || !isFinite(param))) { // Unusable numbers go null + return 'null'; + } else if (typeof param === 'undefined' || param === null) { // And so does undefined + return 'null'; + } else if (typeof param.toJSON === 'function') { + var t = param.toJSON(); + if (typeof t === 'string') { + return '"' + this._escape(t) + '"'; + } else { + return this._escape(t.toString()); + } + } else if (typeof param === 'number' || typeof param === 'boolean') { // These ones' toString methods return valid JSON. + return '' + param; + } else if (typeof param === 'function') { + return 'null'; // match JSON.stringify + } else if (param.constructor === Date) { + return '"' + this._escape(dateToISOString(param)) + '"'; + } else if (param.constructor === Array) { + var arrayString = ''; + for (var i = 0, len = param.length; i < len; i++) { + if (i > 0) { + arrayString += ','; + } + arrayString += this._stringifyValue(param[i]); + } + return '[' + arrayString + ']'; + } else { // Object + var objectString = ''; + for (var k in param) { + if ({}.hasOwnProperty.call(param, k)) { + if (objectString !== '') { + objectString += ','; + } + objectString += '"' + this._escape(k) + '": ' + this._stringifyValue(param[k]); + } + } + return '{' + objectString + '}'; + } + }, + + /** + * Serializes a JSON object into a string. + * + * @method stringify + * @param {Object} input Data to be serialized into JSON + * @param {Boolean} convertToUnicode When `true`, converts string contents to unicode \uXXXX + * @return {String} Serialized string + * + * @example + * Json.stringify({a:1.23}); // -> string: '{"a": 1.23}' + */ + stringify: function(input, convertToUnicode) { + this._convertToUnicode = !!convertToUnicode; + if(!this._convertToUnicode && this._nativeJSON) { + return this._nativeJSON.stringify(input); + } + return this._stringifyValue(input); // And recurse. + }, + + /** + * Parses a JSON text through a function + * + * @method parse + * @param text {String} Input string + * @param reviver {Function} Function receiving `(key, value)`, and `this`=(containing object), used to walk objects. + * + * @return {Object} JSON object + * @example + * Simple example: + * + * Json.parse('{"a": "3","numbers":false}', + * function (key, value) { + * if (!this.numbers && key === 'a') { + * return "NO NUMBERS"; + * } else { + * return value; + * } + * }); // -> object: {a: 'NO NUMBERS', numbers: false} + */ + /* From https://github.com/douglascrockford/JSON-js/blob/master/json.js */ + parse: function (text, reviver) { + /*jshint evil:true*/ + +// The parse method takes a text and an optional reviver function, and returns +// a JavaScript value if the text is a valid JSON text. + + var j; + + function walk(holder, key) { + +// The walk method is used to recursively walk the resulting structure so +// that modifications can be made. + + var k, v, value = holder[key]; + if (value && typeof value === 'object') { + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + } + } + } + return reviver.call(holder, key, value); + } + + +// Parsing happens in four stages. In the first stage, we replace certain +// Unicode characters with escape sequences. JavaScript handles many characters +// incorrectly, either silently deleting them, or treating them as line endings. + + text = String(text); + cx.lastIndex = 0; + if (cx.test(text)) { + text = text.replace(cx, function (a) { + return '\\u' + + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }); + } + +// In the second stage, we run the text against regular expressions that look +// for non-JSON patterns. We are especially concerned with '()' and 'new' +// because they can cause invocation, and '=' because it can cause mutation. +// But just to be safe, we want to reject all unexpected forms. + +// We split the second stage into 4 regexp operations in order to work around +// crippling inefficiencies in IE's and Safari's regexp engines. First we +// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we +// replace all simple value tokens with ']' characters. Third, we delete all +// open brackets that follow a colon or comma or that begin the text. Finally, +// we look to see that the remaining characters are only whitespace or ']' or +// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. + + if (/^[\],:{}\s]*$/ + .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') + .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') + .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { + +// In the third stage we use the eval function to compile the text into a +// JavaScript structure. The '{' operator is subject to a syntactic ambiguity +// in JavaScript: it can begin a block or an object literal. We wrap the text +// in parens to eliminate the ambiguity. + + j = eval('(' + text + ')'); + +// In the optional fourth stage, we recursively walk the new structure, passing +// each name/value pair to a reviver function for possible transformation. + + return typeof reviver === 'function' ? + walk({'': j}, '') : + j; + } + +// If the text is not JSON parseable, then a SyntaxError is thrown. + + throw new SyntaxError('JSON.parse'); + } + }; + + return InkJson; +}); +/** + * @module Ink.Util.String_1 + * String Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.String', '1', [], function() { + + 'use strict'; + + var InkUtilString = { + + /** + * List of special chars + * + * @property _chars + * @type {Array} + * @private + * @readOnly + * @static + */ + _chars: ['&','à','á','â','ã','ä','å','æ','ç','è','é', + 'ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô', + 'õ','ö','ø','ù','ú','û','ü','ý','þ','ÿ','À', + 'Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë', + 'Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö', + 'Ø','Ù','Ú','Û','Ü','Ý','Þ','€','\"','ß','<', + '>','¢','£','¤','¥','¦','§','¨','©','ª','«', + '¬','\xad','®','¯','°','±','²','³','´','µ','¶', + '·','¸','¹','º','»','¼','½','¾'], + + /** + * List of the special characters' html entities + * + * @property _entities + * @type {Array} + * @private + * @readOnly + * @static + */ + _entities: ['amp','agrave','aacute','acirc','atilde','auml','aring', + 'aelig','ccedil','egrave','eacute','ecirc','euml','igrave', + 'iacute','icirc','iuml','eth','ntilde','ograve','oacute', + 'ocirc','otilde','ouml','oslash','ugrave','uacute','ucirc', + 'uuml','yacute','thorn','yuml','Agrave','Aacute','Acirc', + 'Atilde','Auml','Aring','AElig','Ccedil','Egrave','Eacute', + 'Ecirc','Euml','Igrave','Iacute','Icirc','Iuml','ETH','Ntilde', + 'Ograve','Oacute','Ocirc','Otilde','Ouml','Oslash','Ugrave', + 'Uacute','Ucirc','Uuml','Yacute','THORN','euro','quot','szlig', + 'lt','gt','cent','pound','curren','yen','brvbar','sect','uml', + 'copy','ordf','laquo','not','shy','reg','macr','deg','plusmn', + 'sup2','sup3','acute','micro','para','middot','cedil','sup1', + 'ordm','raquo','frac14','frac12','frac34'], + + /** + * List of accented chars + * + * @property _accentedChars + * @type {Array} + * @private + * @readOnly + * @static + */ + _accentedChars:['à','á','â','ã','ä','å', + 'è','é','ê','ë', + 'ì','í','î','ï', + 'ò','ó','ô','õ','ö', + 'ù','ú','û','ü', + 'ç','ñ', + 'À','Á','Â','Ã','Ä','Å', + 'È','É','Ê','Ë', + 'Ì','Í','Î','Ï', + 'Ò','Ó','Ô','Õ','Ö', + 'Ù','Ú','Û','Ü', + 'Ç','Ñ'], + + /** + * List of the accented chars (above), but without the accents + * + * @property _accentedRemovedChars + * @type {Array} + * @private + * @readOnly + * @static + */ + _accentedRemovedChars:['a','a','a','a','a','a', + 'e','e','e','e', + 'i','i','i','i', + 'o','o','o','o','o', + 'u','u','u','u', + 'c','n', + 'A','A','A','A','A','A', + 'E','E','E','E', + 'I','I','I','I', + 'O','O','O','O','O', + 'U','U','U','U', + 'C','N'], + /** + * Object that contains the basic HTML unsafe chars, as keys, and their HTML entities as values + * + * @property _htmlUnsafeChars + * @type {Object} + * @private + * @readOnly + * @static + */ + _htmlUnsafeChars:{'<':'<','>':'>','&':'&','"':'"',"'":'''}, + + /** + * Capitalizes a word. + * If param as more than one word, it converts first letter of all words that have more than 2 letters + * + * @method ucFirst + * @param {String} string String to capitalize. + * @param {Boolean} [firstWordOnly]=false Flag to capitalize only the first word. + * @return {String} Camel cased string. + * @public + * @static + * + * @example + * InkString.ucFirst('hello world'); // -> 'Hello World' + * InkString.ucFirst('hello world', true); // -> 'Hello world' + */ + ucFirst: function(string, firstWordOnly) { + var replacer = firstWordOnly ? /(^|\s)(\w)(\S{2,})/ : /(^|\s)(\w)(\S{2,})/g; + return string ? String(string).replace(replacer, function(_, $1, $2, $3){ + return $1 + $2.toUpperCase() + $3.toLowerCase(); + }) : string; + }, + + /** + * Trims whitespace from strings + * + * @method trim + * @param {String} string String to be trimmed + * @return {String} Trimmed string + * @public + * @static + */ + trim: function(string) + { + if (typeof string === 'string') { + return string.replace(/^\s+|\s+$|\n+$/g, ''); + } + return string; + }, + + /** + * Strips HTML tags from strings + * + * @method stripTags + * @param {String} string String to strip tags from. + * @param {String} allowed Comma separated list of allowed tags. + * @return {String} Stripped string + * @public + * @static + * @example + * + */ + stripTags: function(string, allowed) + { + if (allowed && typeof allowed === 'string') { + var aAllowed = InkUtilString.trim(allowed).split(','); + var aNewAllowed = []; + var cleanedTag = false; + for(var i=0; i < aAllowed.length; i++) { + if(InkUtilString.trim(aAllowed[i]) !== '') { + cleanedTag = InkUtilString.trim(aAllowed[i].replace(/(<|\>)/g, '').replace(/\s/, '')); + aNewAllowed.push('(<'+cleanedTag+'\\s[^>]+>|<(\\s|\\/)?(\\s|\\/)?'+cleanedTag+'>)'); + } + } + var strAllowed = aNewAllowed.join('|'); + var reAllowed = new RegExp(strAllowed, "i"); + + var aFoundTags = string.match(new RegExp("<[^>]*>", "g")); + + for(var j=0; j < aFoundTags.length; j++) { + if(!aFoundTags[j].match(reAllowed)) { + string = string.replace((new RegExp(aFoundTags[j], "gm")), ''); + } + } + return string; + } else { + return string.replace(/<[^\>]+\>/g, ''); + } + }, + + /** + * Encodes string into HTML entities. + * + * @method htmlEntitiesEncode + * @param {String} string + * @return {String} string encoded + * @public + * @static + */ + htmlEntitiesEncode: function(string) + { + if (string && string.replace) { + var re = false; + for (var i = 0; i < InkUtilString._chars.length; i++) { + re = new RegExp(InkUtilString._chars[i], "gm"); + string = string.replace(re, '&' + InkUtilString._entities[i] + ';'); + } + } + return string; + }, + + /** + * Decodes string from HTML entities. + * + * @method htmlEntitiesDecode + * @param {String} string String to be decoded + * @return {String} Decoded string + * @public + * @static + */ + htmlEntitiesDecode: function(string) + { + if (string && string.replace) { + var re = false; + for (var i = 0; i < InkUtilString._entities.length; i++) { + re = new RegExp("&"+InkUtilString._entities[i]+";", "gm"); + string = string.replace(re, InkUtilString._chars[i]); + } + string = string.replace(/&#[^;]+;?/g, function($0){ + if ($0.charAt(2) === 'x') { + return String.fromCharCode(parseInt($0.substring(3), 16)); + } + else { + return String.fromCharCode(parseInt($0.substring(2), 10)); + } + }); + } + return string; + }, + + /** + * Encode a string to UTF-8. + * + * @method utf8Encode + * @param {String} string String to be encoded + * @return {String} string UTF-8 encoded string + * @public + * @static + */ + utf8Encode: function(string) { + /*jshint bitwise:false*/ + string = string.replace(/\r\n/g,"\n"); + var utfstring = ""; + + for (var n = 0; n < string.length; n++) { + + var c = string.charCodeAt(n); + + if (c < 128) { + utfstring += String.fromCharCode(c); + } + else if((c > 127) && (c < 2048)) { + utfstring += String.fromCharCode((c >> 6) | 192); + utfstring += String.fromCharCode((c & 63) | 128); + } + else { + utfstring += String.fromCharCode((c >> 12) | 224); + utfstring += String.fromCharCode(((c >> 6) & 63) | 128); + utfstring += String.fromCharCode((c & 63) | 128); + } + + } + return utfstring; + }, + + /** + * Truncates a string without breaking words. + * + * @method shortString + * @param {String} str String to truncate + * @param {Number} n Number of chars of the short string + * @return {String} + * @public + * @static + */ + shortString: function(str,n) { + var words = str.split(' '); + var resultstr = ''; + for(var i = 0; i < words.length; i++ ){ + if((resultstr + words[i] + ' ').length>=n){ + resultstr += '…'; + break; + } + resultstr += words[i] + ' '; + } + return resultstr; + }, + + /** + * Truncates a string, breaking words and adding ... at the end. + * + * @method truncateString + * @param {String} str String to truncate + * @param {Number} length Limit for the returned string, ellipsis included. + * @return {String} Truncated String + * @public + * @static + */ + truncateString: function(str, length) { + if(str.length - 1 > length) { + return str.substr(0, length - 1) + "\u2026"; + } else { + return str; + } + }, + + /** + * Decodes a string from UTF-8. + * + * @method utf8Decode + * @param {String} string String to be decoded + * @return {String} Decoded string + * @public + * @static + */ + utf8Decode: function(utfstring) { + /*jshint bitwise:false*/ + var string = ""; + var i = 0, c = 0, c2 = 0, c3 = 0; + + while ( i < utfstring.length ) { + + c = utfstring.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utfstring.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utfstring.charCodeAt(i+1); + c3 = utfstring.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + return string; + }, + + /** + * Removes all accented characters from a string. + * + * @method removeAccentedChars + * @param {String} string String to remove accents from + * @return {String} String without accented chars + * @public + * @static + */ + removeAccentedChars: function(string) + { + var newString = string; + var re = false; + for (var i = 0; i < InkUtilString._accentedChars.length; i++) { + re = new RegExp(InkUtilString._accentedChars[i], "gm"); + newString = newString.replace(re, '' + InkUtilString._accentedRemovedChars[i] + ''); + } + return newString; + }, + + /** + * Count the number of occurrences of a specific needle in a haystack + * + * @method substrCount + * @param {String} haystack String to search in + * @param {String} needle String to search for + * @return {Number} Number of occurrences + * @public + * @static + */ + substrCount: function(haystack,needle) + { + return haystack ? haystack.split(needle).length - 1 : 0; + }, + + /** + * Eval a JSON string to a JS object + * + * @method evalJSON + * @param {String} strJSON JSON string to eval + * @param {Boolean} sanitize Flag to sanitize input + * @return {Object} JS Object + * @public + * @static + */ + evalJSON: function(strJSON, sanitize) { + /* jshint evil:true */ + if( (typeof sanitize === 'undefined' || sanitize === null) || InkUtilString.isJSON(strJSON)) { + try { + if(typeof(JSON) !== "undefined" && typeof(JSON.parse) !== 'undefined'){ + return JSON.parse(strJSON); + } + return eval('('+strJSON+')'); + } catch(e) { + throw new Error('ERROR: Bad JSON string...'); + } + } + }, + + /** + * Checks if a string is a valid JSON object (string encoded) + * + * @method isJSON + * @param {String} str String to check + * @return {Boolean} + * @public + * @static + */ + isJSON: function(str) + { + str = str.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); + return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); + }, + + /** + * Escapes unsafe html chars as HTML entities + * + * @method htmlEscapeUnsafe + * @param {String} str String to escape + * @return {String} Escaped string + * @public + * @static + */ + htmlEscapeUnsafe: function(str){ + var chars = InkUtilString._htmlUnsafeChars; + return str !== null ? String(str).replace(/[<>&'"]/g,function(c){return chars[c];}) : str; + }, + + /** + * Normalizes whitespace in string. + * String is trimmed and sequences of whitespaces are collapsed. + * + * @method normalizeWhitespace + * @param {String} str String to normalize + * @return {String} Normalized string + * @public + * @static + */ + normalizeWhitespace: function(str){ + return str !== null ? InkUtilString.trim(String(str).replace(/\s+/g,' ')) : str; + }, + + /** + * Converts string to unicode. + * + * @method toUnicode + * @param {String} str String to convert + * @return {String} Unicoded String + * @public + * @static + */ + toUnicode: function(str) { + if (typeof str === 'string') { + var unicodeString = ''; + var inInt = false; + var theUnicode = false; + var total = str.length; + var i=0; + + while(i < total) + { + inInt = str.charCodeAt(i); + if( (inInt >= 32 && inInt <= 126) || + inInt === 8 || + inInt === 9 || + inInt === 10 || + inInt === 12 || + inInt === 13 || + inInt === 32 || + inInt === 34 || + inInt === 47 || + inInt === 58 || + inInt === 92) { + + /* + if(inInt == 34 || inInt == 92 || inInt == 47) { + theUnicode = '\\'+str.charAt(i); + } else { + } + */ + if(inInt === 8) { + theUnicode = '\\b'; + } else if(inInt === 9) { + theUnicode = '\\t'; + } else if(inInt === 10) { + theUnicode = '\\n'; + } else if(inInt === 12) { + theUnicode = '\\f'; + } else if(inInt === 13) { + theUnicode = '\\r'; + } else { + theUnicode = str.charAt(i); + } + } else { + theUnicode = str.charCodeAt(i).toString(16)+''.toUpperCase(); + while (theUnicode.length < 4) { + theUnicode = '0' + theUnicode; + } + theUnicode = '\\u' + theUnicode; + } + unicodeString += theUnicode; + + i++; + } + return unicodeString; + } + }, + + /** + * Escapes a unicode character. + * + * @method escape + * @param {String} c Character to escape + * @return {String} Escaped character. Returns \xXX if hex smaller than 0x100, otherwise \uXXXX + * @public + * @static + */ + + /** + * @param {String} c char + */ + escape: function(c) { + var hex = (c).charCodeAt(0).toString(16).split(''); + if (hex.length < 3) { + while (hex.length < 2) { hex.unshift('0'); } + hex.unshift('x'); + } + else { + while (hex.length < 4) { hex.unshift('0'); } + hex.unshift('u'); + } + + hex.unshift('\\'); + return hex.join(''); + }, + + /** + * Unescapes a unicode character escape sequence + * + * @method unescape + * @param {String} es Escape sequence + * @return {String} String un-unicoded + * @public + * @static + */ + unescape: function(es) { + var idx = es.lastIndexOf('0'); + idx = idx === -1 ? 2 : Math.min(idx, 2); + //console.log(idx); + var hexNum = es.substring(idx); + //console.log(hexNum); + var num = parseInt(hexNum, 16); + return String.fromCharCode(num); + }, + + /** + * Escapes a string to unicode characters + * + * @method escapeText + * @param {String} txt + * @param {Array} [whiteList] Whitelist of characters + * @return {String} String escaped to Unicode + * @public + * @static + */ + escapeText: function(txt, whiteList) { + if (whiteList === undefined) { + whiteList = ['[', ']', '\'', ',']; + } + var txt2 = []; + var c, C; + for (var i = 0, f = txt.length; i < f; ++i) { + c = txt[i]; + C = c.charCodeAt(0); + if (C < 32 || C > 126 && whiteList.indexOf(c) === -1) { + c = InkUtilString.escape(c); + } + txt2.push(c); + } + return txt2.join(''); + }, + + /** + * Regex to check escaped strings + * + * @property escapedCharRegex + * @type {Regex} + * @public + * @readOnly + * @static + */ + escapedCharRegex: /(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4})/g, + + /** + * Unescapes a string + * + * @method unescapeText + * @param {String} txt + * @return {String} Unescaped string + * @public + * @static + */ + unescapeText: function(txt) { + /*jshint boss:true */ + var m; + while (m = InkUtilString.escapedCharRegex.exec(txt)) { + m = m[0]; + txt = txt.replace(m, InkUtilString.unescape(m)); + InkUtilString.escapedCharRegex.lastIndex = 0; + } + return txt; + }, + + /** + * Compares two strings. + * + * @method strcmp + * @param {String} str1 First String + * @param {String} str2 Second String + * @return {Number} + * @public + * @static + */ + strcmp: function(str1, str2) { + return ((str1 === str2) ? 0 : ((str1 > str2) ? 1 : -1)); + }, + + /** + * Splits a string into smaller chunks + * + * @method packetize + * @param {String} str String to divide + * @param {Number} maxLen Maximum chunk size (in characters) + * @return {Array} Chunks of the original string + * @public + * @static + */ + packetize: function(str, maxLen) { + var len = str.length; + var parts = new Array( Math.ceil(len / maxLen) ); + var chars = str.split(''); + var sz, i = 0; + while (len) { + sz = Math.min(maxLen, len); + parts[i++] = chars.splice(0, sz).join(''); + len -= sz; + } + return parts; + } + }; + + return InkUtilString; + +}); + +/** + * @module Ink.Util.Url_1 + * URL Utilities + * @version 1 + */ + +Ink.createModule('Ink.Util.Url', '1', [], function() { + + 'use strict'; + + var Url = { + + /** + * Auxiliary string for encoding + * + * @property _keyStr + * @type {String} + * @readOnly + * @private + */ + _keyStr : 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + + + /** + * Gets URL of current page + * + * @method getUrl + * @return Current URL + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * console.log( InkUrl.getUrl() ); // Will return it's window URL + * }); + */ + getUrl: function() + { + return window.location.href; + }, + + /** + * Generates an URL string. + * + * @method genQueryString + * @param {String} uri Base URL + * @param {Object} params Object to transform to query string + * @return {String} URI with query string set + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * var queryString = InkUrl.genQueryString( 'http://www.sapo.pt/', { + * 'param1': 'valueParam1', + * 'param2': 'valueParam2' + * }); + * + * console.log( queryString ); // Result: http://www.sapo.pt/?param1=valueParam1¶m2=valueParam2 + * }); + */ + genQueryString: function(uri, params) { + var hasQuestionMark = uri.indexOf('?') !== -1; + var sep, pKey, pValue, parts = [uri]; + + for (pKey in params) { + if (params.hasOwnProperty(pKey)) { + if (!hasQuestionMark) { + sep = '?'; + hasQuestionMark = true; + } else { + sep = '&'; + } + pValue = params[pKey]; + if (typeof pValue !== 'number' && !pValue) { + pValue = ''; + } + parts = parts.concat([sep, encodeURIComponent(pKey), '=', encodeURIComponent(pValue)]); + } + } + + return parts.join(''); + }, + + /** + * Gets an object from an URL encoded string. + * + * @method getQueryString + * @param {String} [str] URL String. When not specified it uses the current URL. + * @return {Object} Key-Value pair object + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * var queryStringParams = InkUrl.getQueryString( 'http://www.sapo.pt/?var1=valueVar1&var2=valueVar2' ); + * console.log( queryStringParams ); + * // Result: + * // { + * // var1: 'valueVar1', + * // var2: 'valueVar2' + * // } + * }); + */ + getQueryString: function(str) + { + var url; + if(str && typeof(str) !== 'undefined') { + url = str; + } else { + url = this.getUrl(); + } + var aParams = {}; + if(url.match(/\?(.+)/i)) { + var queryStr = url.replace(/^(.*)\?([^\#]+)(\#(.*))?/g, "$2"); + if(queryStr.length > 0) { + var aQueryStr = queryStr.split(/[;&]/); + for(var i=0; i < aQueryStr.length; i++) { + var pairVar = aQueryStr[i].split('='); + aParams[decodeURIComponent(pairVar[0])] = (typeof(pairVar[1]) !== 'undefined' && pairVar[1]) ? decodeURIComponent(pairVar[1]) : false; + } + } + } + return aParams; + }, + + /** + * Gets the URL hash value + * + * @method getAnchor + * @param {String} [str] URL String. Defaults to current page URL. + * @return {String|Boolean} Hash in the URL. If there's no hash, returns false. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * var anchor = InkUrl.getAnchor( 'http://www.sapo.pt/page.php#TEST' ); + * console.log( anchor ); // Result: TEST + * }); + */ + getAnchor: function(str) + { + var url; + if(str && typeof(str) !== 'undefined') { + url = str; + } else { + url = this.getUrl(); + } + var anchor = false; + if(url.match(/#(.+)/)) { + anchor = url.replace(/([^#]+)#(.*)/, "$2"); + } + return anchor; + }, + + /** + * Gets the anchor string of an URL + * + * @method getAnchorString + * @param {String} [string] URL to parse. Defaults to current URL. + * @return {Object} Key-value pair object of the URL's hashtag 'variables' + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * var hashParams = InkUrl.getAnchorString( 'http://www.sapo.pt/#var1=valueVar1&var2=valueVar2' ); + * console.log( hashParams ); + * // Result: + * // { + * // var1: 'valueVar1', + * // var2: 'valueVar2' + * // } + * }); + */ + getAnchorString: function(string) + { + var url; + if(string && typeof(string) !== 'undefined') { + url = string; + } else { + url = this.getUrl(); + } + var aParams = {}; + if(url.match(/#(.+)/i)) { + var anchorStr = url.replace(/^([^#]+)#(.*)?/g, "$2"); + if(anchorStr.length > 0) { + var aAnchorStr = anchorStr.split(/[;&]/); + for(var i=0; i < aAnchorStr.length; i++) { + var pairVar = aAnchorStr[i].split('='); + aParams[decodeURIComponent(pairVar[0])] = (typeof(pairVar[1]) !== 'undefined' && pairVar[1]) ? decodeURIComponent(pairVar[1]) : false; + } + } + } + return aParams; + }, + + + /** + * Parses URL string into URL parts + * + * @method parseUrl + * @param {String} url URL to be parsed + * @return {Object} Parsed URL as a key-value object. + * @public + * @static + * @example + * Ink.requireModules(['Ink.Util.Url_1'], function( InkUrl ){ + * var parsedURL = InkUrl.parseUrl( 'http://www.sapo.pt/index.html?var1=value1#anchor' ) + * console.log( parsedURL ); + * // Result: + * // { + * // 'scheme' => 'http', + * // 'host' => 'www.sapo.pt', + * // 'path' => '/index.html', + * // 'query' => 'var1=value1', + * // 'fragment' => 'anchor' + * // } + * }); + * + */ + parseUrl: function(url) { + var aURL = {}; + if(url && typeof url === 'string') { + if(url.match(/^([^:]+):\/\//i)) { + var re = /^([^:]+):\/\/([^\/]*)\/?([^\?#]*)\??([^#]*)#?(.*)/i; + if(url.match(re)) { + aURL.scheme = url.replace(re, "$1"); + aURL.host = url.replace(re, "$2"); + aURL.path = '/'+url.replace(re, "$3"); + aURL.query = url.replace(re, "$4") || false; + aURL.fragment = url.replace(re, "$5") || false; + } + } else { + var re1 = new RegExp("^([^\\?]+)\\?([^#]+)#(.*)", "i"); + var re2 = new RegExp("^([^\\?]+)\\?([^#]+)#?", "i"); + var re3 = new RegExp("^([^\\?]+)\\??", "i"); + if(url.match(re1)) { + aURL.scheme = false; + aURL.host = false; + aURL.path = url.replace(re1, "$1"); + aURL.query = url.replace(re1, "$2"); + aURL.fragment = url.replace(re1, "$3"); + } else if(url.match(re2)) { + aURL.scheme = false; + aURL.host = false; + aURL.path = url.replace(re2, "$1"); + aURL.query = url.replace(re2, "$2"); + aURL.fragment = false; + } else if(url.match(re3)) { + aURL.scheme = false; + aURL.host = false; + aURL.path = url.replace(re3, "$1"); + aURL.query = false; + aURL.fragment = false; + } + } + if(aURL.host) { + var regPort = /^(.*?)\\:(\\d+)$/i; + // check for port + if(aURL.host.match(regPort)) { + var tmpHost1 = aURL.host; + aURL.host = tmpHost1.replace(regPort, "$1"); + aURL.port = tmpHost1.replace(regPort, "$2"); + } else { + aURL.port = false; + } + // check for user and pass + if(aURL.host.match(/@/i)) { + var tmpHost2 = aURL.host; + aURL.host = tmpHost2.split('@')[1]; + var tmpUserPass = tmpHost2.split('@')[0]; + if(tmpUserPass.match(/\:/)) { + aURL.user = tmpUserPass.split(':')[0]; + aURL.pass = tmpUserPass.split(':')[1]; + } else { + aURL.user = tmpUserPass; + aURL.pass = false; + } + } + } + } + return aURL; + }, + + /** + * Formats an URL object into an URL string. + * + * @method format + * @param urlObj Window.location, a.href, or parseUrl object to format + * @return {String} Full URL. + */ + format: function (urlObj) { + var protocol = ''; + var host = ''; + var path = ''; + var frag = ''; + var query = ''; + + if (typeof urlObj.protocol === 'string') { + protocol = urlObj.protocol + '//'; // here it comes with the colon + } else if (typeof urlObj.scheme === 'string') { + protocol = urlObj.scheme + '://'; + } + + host = urlObj.host || urlObj.hostname || ''; + path = urlObj.path || ''; + + if (typeof urlObj.query === 'string') { + query = urlObj.query; + } else if (typeof urlObj.search === 'string') { + query = urlObj.search.replace(/^\?/, ''); + } + if (typeof urlObj.fragment === 'string') { + frag = urlObj.fragment; + } else if (typeof urlObj.hash === 'string') { + frag = urlObj.hash.replace(/#$/, ''); + } + + return [ + protocol, + host, + path, + query && '?' + query, + frag && '#' + frag + ].join(''); + }, + + /** + * Gets the last loaded script element + * + * @method currentScriptElement + * @param {String} [match] String to match against the script src attribute + * @return {DOMElement|Boolean} Returns the + */ + var SmoothScroller = { + + /** + * Sets the speed of the scrolling + * + * @property speed + * @type {Number} + * @readOnly + * @static + */ + speed: 10, + + /** + * Returns the Y position of an element, relative to the document + * + * @method getTop + * @param {DOMElement} d DOMElement to get the Y position from + * @return {Number} Y position of div 'd' + * @public + * @static + */ + getTop: function(d) { + return Math.round( + SmoothScroller.scrollTop() + d.getBoundingClientRect().top); + }, + + + /** + * Returns the current scroll position + * + * @method scrollTop + * @return {Number} Current scroll position + * @public + * @static + */ + scrollTop: function() { + var body = document.body, + d = document.documentElement; + if (body && body.scrollTop){ + return body.scrollTop; + } + if (d && d.scrollTop){ + return d.scrollTop; + } + if (window.pageYOffset){ + return window.pageYOffset; + } + return 0; + }, + + /** + * Attaches an event for an element + * + * @method add + * @param {DOMElement} el DOMElement to make the listening of the event + * @param {String} event Event name to be listened + * @param {DOMElement} fn Callback function to run when the event is triggered. + * @public + * @static + */ + add: function(el, event, fn) { + Event.observe(el,event,fn); + }, + + + /** + * Kill an event of an element + * + * @method end + * @param {String} e Event to be killed/stopped + * @public + * @static + */ + // kill an event of an element + end: function(e) { + Event.stopDefault(e); + }, + + + /** + * Moves the scrollbar to the target element. This is the function + * which animates the scroll position bit by bit. It calls itself in + * the end through requestAnimationFrame + * + * @method scroll + * @param {Number} d Y coordinate value to stop + * @public + * @static + */ + scroll: function(d, options) { + var a = SmoothScroller.scrollTop(); + var margin = options.margin || 0; + + var endPos = d - margin; + + if (endPos > a) { + a += Math.ceil((endPos - a) / SmoothScroller.speed); + } else { + a = a + (endPos - a) / SmoothScroller.speed; + } + + cancelAnimationFrame(SmoothScroller.interval); + + if (!((a) === endPos || SmoothScroller.offsetTop === a)) { + SmoothScroller.interval = requestAnimationFrame( + Ink.bindMethod(SmoothScroller, 'scroll', d, options), document.body); + } else { + SmoothScroller.onDone(); + } + + window.scrollTo(0, a); + SmoothScroller.offsetTop = a; + }, + + + /** + * Has smooth scrolling applied to relevant elements upon page load. + * + * @method init + * @param [selector='a.scrollableLink,a.ink-smooth-scroll'] Selector string for finding links with smooth scrolling enabled. + * @public + * @static + */ + init: function(selector) { + Loaded.run(Ink.bindMethod(SmoothScroller, 'render', selector)); + }, + + /** + * This method extracts all the anchors and validates them as # and attaches the events + * + * @method render + * @public + * @static + */ + render: function(selector) { + var a = Selector.select(selector || 'a.scrollableLink,a.ink-smooth-scroll'); + + for (var i = 0; i < a.length; i++) { + var _elm = a[i]; + if (_elm.href && _elm.href.indexOf('#') !== -1 && ((_elm.pathname === location.pathname) || ('/' + _elm.pathname === location.pathname))) { + Event.observe(_elm,'click', Ink.bindEvent(SmoothScroller.onClick, this, _elm)); + } + } + }, + + + /** + * Click handler + * + * @method onClick + * @public + * @static + */ + onClick: function(event, _elm) { + SmoothScroller.end(event); + if(_elm != null && _elm.getAttribute('href') !== null) { + var hashIndex = _elm.href.indexOf('#'); + if (hashIndex === -1) { + return; + } + + var data = InkElement.data(_elm); + var hash = _elm.href.substr((hashIndex + 1)); + var activeLiSelector = 'ul > li.active > ' + selector; + + var selector = 'a[name="' + hash + '"],#' + hash; + var elm = Selector.select(selector)[0]; + var activeLi = Selector.select(activeLiSelector)[0]; + activeLi = activeLi && activeLi.parentNode; + + if (typeof(elm) !== 'undefined') { + if (_elm.parentNode.className.indexOf('active') === -1) { + if (activeLi) { + activeLi.className = activeLi.className.replace(/(^|\s+)active($|\s+)/g, ''); + } + _elm.parentNode.className += " active"; + } + SmoothScroller.hash = hash; + var options = {}; + if (parseFloat(data.margin)) { + options.margin = parseFloat(data.margin); + } + SmoothScroller.scroll(SmoothScroller.getTop(elm), options); + } + } + }, + + /** + * Called when the scroll movement is done. Updates browser address. + */ + onDone: function () { + window.location.hash = SmoothScroller.hash; + } + }; + + return SmoothScroller; + +}); diff --git a/ajax/libs/ink/3.0.0/js/ink.smoothscroller.min.js b/ajax/libs/ink/3.0.0/js/ink.smoothscroller.min.js new file mode 100644 index 000000000..3326e403c --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.smoothscroller.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.SmoothScroller","1",["Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Dom.Loaded_1"],function(e,n,o,t){"use strict";var a=window.requestAnimationFrame||function(e){return setTimeout(e,10)},r=window.cancelAnimationFrame||function(e){clearTimeout(e)},l={speed:10,getTop:function(e){return Math.round(l.scrollTop()+e.getBoundingClientRect().top)},scrollTop:function(){var e=document.body,n=document.documentElement;return e&&e.scrollTop?e.scrollTop:n&&n.scrollTop?n.scrollTop:window.pageYOffset?window.pageYOffset:0},add:function(n,o,t){e.observe(n,o,t)},end:function(n){e.stopDefault(n)},scroll:function(e,n){var o=l.scrollTop(),t=n.margin||0,i=e-t;o+=i>o?Math.ceil((i-o)/l.speed):(i-o)/l.speed,r(l.interval),o!==i&&l.offsetTop!==o?l.interval=a(Ink.bindMethod(l,"scroll",e,n),document.body):l.onDone(),window.scrollTo(0,o),l.offsetTop=o},init:function(e){t.run(Ink.bindMethod(l,"render",e))},render:function(n){for(var t=o.select(n||"a.scrollableLink,a.ink-smooth-scroll"),a=0;a li.active > "+s,s='a[name="'+i+'"],#'+i,d=o.select(s)[0],u=o.select(c)[0];if(u=u&&u.parentNode,"undefined"!=typeof d){-1===t.parentNode.className.indexOf("active")&&(u&&(u.className=u.className.replace(/(^|\s+)active($|\s+)/g,"")),t.parentNode.className+=" active"),l.hash=i;var f={};parseFloat(r.margin)&&(f.margin=parseFloat(r.margin)),l.scroll(l.getTop(d),f)}}},onDone:function(){window.location.hash=l.hash}};return l}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.sortablelist.js b/ajax/libs/ink/3.0.0/js/ink.sortablelist.js new file mode 100644 index 000000000..8839fc265 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.sortablelist.js @@ -0,0 +1,249 @@ +/** + * @module Ink.UI.SortableList_1 + * Sortable lists + * @version 1 + */ + +Ink.createModule('Ink.UI.SortableList', '1', ['Ink.UI.Common_1','Ink.Dom.Css_1','Ink.Dom.Event_1','Ink.Dom.Element_1','Ink.Dom.Selector_1'], function( Common, Css, Events, Element, Selector ) { + 'use strict'; + var hasTouch = (('ontouchstart' in window) || // html5 browsers + (navigator.maxTouchPoints > 0) || // future IE + (navigator.msMaxTouchPoints > 0)); + + /** + * Adds sortable behaviour to any list. + * + * @class Ink.UI.SortableList + * @constructor + * @version 1 + * @param {String|DOMElement} selector + * @param {String} [options.placeholderClass] CSS class added to the "ghost" element being dragged around. Defaults to 'placeholder'. + * @param {String} [options.draggedClass] CSS class added to the original element being dragged around. Defaults to 'hide-all'. + * @param {String} [options.draggingClass] CSS class added to the html element when the user is dragging. Defaults to 'dragging'. + * @param {String} [options.dragSelector] CSS selector for the drag enabled nodes. Defaults to 'li'. + * @param {String} [options.handleSelector] CSS selector for the drag handle. If present, you can only drag nodes by this selector. + * @param {String} [options.moveSelector] CSS selector to validate a node move. If present, you can only move nodes inside this selector. + * @param {Boolean} [options.swap] Flag to swap dragged element and target element instead of reordering it. + * @param {Boolean} [options.cancelMouseOut] Flag to cancel draggin if mouse leaves the container element. + * + * @sample Ink_UI_SortableList_1.html + */ + var SortableList = function(selector, options) { + + this._element = Common.elOrSelector(selector, 'Ink.UI.SortableList'); + + this._options = Common.options('Sortable', { + 'placeholderClass': ['String', 'placeholder'], + 'draggedClass': ['String', 'hide-all'], + 'draggingClass': ['String', 'dragging'], + 'dragSelector': ['String', 'li'], + 'dragObject': ['String', null], // Deprecated. Use handleSelector instead. + 'handleSelector': ['String', null], + 'moveSelector': ['String', false], + 'swap': ['Boolean', false], + 'cancelMouseOut': ['Boolean', false] + }, options || {}, this._element); + + if (this._options.dragObject != null) { + // [3.0.0] Remove this deprecation notice and stop providing backwards compatibility + Ink.warn('Ink.UI.SortableList: options.dragObject is now deprecated. ' + + 'Please use options.handleSelector instead.'); + this._options.handleSelector = + this._options.handleSelector || this._options.dragObject; + } + + this._handlers = { + down: Ink.bind(this._onDown, this), + move: Ink.bind(this._onMove, this), + up: Ink.bind(this._onUp, this) + }; + + this._isMoving = false; + + this._init(); + }; + + SortableList.prototype = { + + /** + * Init function called by the constructor. + * + * @method _init + * @private + */ + _init: function() { + this._down = hasTouch ? 'touchstart mousedown' : 'mousedown'; + this._move = hasTouch ? 'touchmove mousemove' : 'mousemove'; + this._up = hasTouch ? 'touchend mouseup' : 'mouseup'; + + this._observe(); + Common.registerInstance(this, this._element, 'sortableList'); + }, + + /** + * Sets the event handlers. + * + * @method _observe + * @private + */ + _observe: function() { + Events.on(this._element, this._down, this._options.dragSelector, this._handlers.down); + Events.on(this._element, this._move, this._options.dragSelector, this._handlers.move); + if(this._options.cancelMouseOut) { + Events.on(this._element, 'mouseleave', Ink.bind(this.stopMoving, this)); + } + Events.on(document.documentElement, this._up, this._handlers.up); + }, + + /** + * Mousedown or touchstart handler + * + * @method _onDown + * @param {Event} ev + * @private + */ + _onDown: function(ev) { + if (this._isMoving || this._placeholder) { return; } + if(this._options.handleSelector && !Selector.matchesSelector(ev.target, this._options.handleSelector)) { return; } + var tgtEl = ev.currentTarget; + this._isMoving = tgtEl; + this._placeholder = tgtEl.cloneNode(true); + this._movePlaceholder(tgtEl); + this._addMovingClasses(); + return false; + }, + + /** + * Mousemove or touchmove handler + * + * @method _onMove + * @param {Event} ev + * @private + */ + _onMove: function(ev) { + this.validateMove(ev.currentTarget); + return false; + }, + + /** + * Mouseup or touchend handler + * + * @method _onUp + * @param {Event} ev + * @private + */ + _onUp: function(ev) { + if (!this._isMoving || !this._placeholder) { return; } + if (ev.currentTarget === this._isMoving) { return; } + if (ev.currentTarget === this._placeholder) { return; } + Element.insertBefore(this._isMoving, this._placeholder); + this.stopMoving(); + return false; + }, + + /** + * Adds the CSS classes to interactive elements + * + * @method _addMovingClasses + * @private + */ + _addMovingClasses: function(){ + Css.addClassName(this._placeholder, this._options.placeholderClass); + Css.addClassName(this._isMoving, this._options.draggedClass); + Css.addClassName(document.documentElement, this._options.draggingClass); + }, + + /** + * Removes the CSS classes from interactive elements + * + * @method _removeMovingClasses + * @private + */ + _removeMovingClasses: function(){ + if(this._isMoving) { Css.removeClassName(this._isMoving, this._options.draggedClass); } + if(this._placeholder) { Css.removeClassName(this._placeholder, this._options.placeholderClass); } + Css.removeClassName(document.documentElement, this._options.draggingClass); + }, + + /** + * Moves the placeholder element relative to the target element + * + * @method _movePlaceholder + * @param {Element} target_position + * @private + */ + _movePlaceholder: function(target){ + var placeholder = this._placeholder, + target_position, + placeholder_position, + from_top, + from_left; + if(!placeholder) { + Element.insertAfter(placeholder, target); + } else if(this._options.swap){ + Element.insertAfter(placeholder, target); + Element.insertBefore(target, this._isMoving); + Element.insertBefore(this._isMoving, placeholder); + } else { + target_position = Element.offset(target); + placeholder_position = Element.offset(this._placeholder); + from_top = target_position[1] > placeholder_position[1]; + from_left = target_position[0] > placeholder_position[0]; + if( ( from_top && from_left ) || ( !from_top && !from_left ) ) { + Element.insertBefore(placeholder, target); + } else { + Element.insertAfter(placeholder, target); + } + Element.insertBefore(this._isMoving, placeholder); + } + }, + + /************** + * PUBLIC API * + **************/ + + /** + * Unregisters the component and removes its markup + * + * @method destroy + * @public + */ + destroy: Common.destroyComponent, + + /** + * Visually stops moving. + * Removes the placeholder as well as the styling classes. + * + * @method _movePlaceholder + * @public + */ + stopMoving: function(){ + this._removeMovingClasses(); + Element.remove(this._placeholder); + this._placeholder = false; + this._isMoving = false; + }, + + /** + * Validate a move. + * This method is used by the move handler + * + * @method _movePlaceholder + * @param {Element} elem + * @public + */ + validateMove: function(elem){ + if (!this._isMoving || !this._placeholder) { return; } + if (elem === this._placeholder) { return; } + if (elem === this._isMoving) { return; } + if(!this._options.moveSelector || Selector.matchesSelector(elem, this._options.moveSelector)){ + this._movePlaceholder(elem); + } else { + this.stopMoving(); + } + } + + }; + + return SortableList; +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.sortablelist.min.js b/ajax/libs/ink/3.0.0/js/ink.sortablelist.min.js new file mode 100644 index 000000000..297c0b6b4 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.sortablelist.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.SortableList","1",["Ink.UI.Common_1","Ink.Dom.Css_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Selector_1"],function(e,t,o,s,i){"use strict";var n="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,r=function(t,o){this._element=e.elOrSelector(t,"Ink.UI.SortableList"),this._options=e.options("Sortable",{placeholderClass:["String","placeholder"],draggedClass:["String","hide-all"],draggingClass:["String","dragging"],dragSelector:["String","li"],dragObject:["String",null],handleSelector:["String",null],moveSelector:["String",!1],swap:["Boolean",!1],cancelMouseOut:["Boolean",!1]},o||{},this._element),null!=this._options.dragObject&&(Ink.warn("Ink.UI.SortableList: options.dragObject is now deprecated. Please use options.handleSelector instead."),this._options.handleSelector=this._options.handleSelector||this._options.dragObject),this._handlers={down:Ink.bind(this._onDown,this),move:Ink.bind(this._onMove,this),up:Ink.bind(this._onUp,this)},this._isMoving=!1,this._init()};return r.prototype={_init:function(){this._down=n?"touchstart mousedown":"mousedown",this._move=n?"touchmove mousemove":"mousemove",this._up=n?"touchend mouseup":"mouseup",this._observe(),e.registerInstance(this,this._element,"sortableList")},_observe:function(){o.on(this._element,this._down,this._options.dragSelector,this._handlers.down),o.on(this._element,this._move,this._options.dragSelector,this._handlers.move),this._options.cancelMouseOut&&o.on(this._element,"mouseleave",Ink.bind(this.stopMoving,this)),o.on(document.documentElement,this._up,this._handlers.up)},_onDown:function(e){if(!(this._isMoving||this._placeholder||this._options.handleSelector&&!i.matchesSelector(e.target,this._options.handleSelector))){var t=e.currentTarget;return this._isMoving=t,this._placeholder=t.cloneNode(!0),this._movePlaceholder(t),this._addMovingClasses(),!1}},_onMove:function(e){return this.validateMove(e.currentTarget),!1},_onUp:function(e){return this._isMoving&&this._placeholder&&e.currentTarget!==this._isMoving&&e.currentTarget!==this._placeholder?(s.insertBefore(this._isMoving,this._placeholder),this.stopMoving(),!1):void 0},_addMovingClasses:function(){t.addClassName(this._placeholder,this._options.placeholderClass),t.addClassName(this._isMoving,this._options.draggedClass),t.addClassName(document.documentElement,this._options.draggingClass)},_removeMovingClasses:function(){this._isMoving&&t.removeClassName(this._isMoving,this._options.draggedClass),this._placeholder&&t.removeClassName(this._placeholder,this._options.placeholderClass),t.removeClassName(document.documentElement,this._options.draggingClass)},_movePlaceholder:function(e){var t,o,i,n,r=this._placeholder;r?this._options.swap?(s.insertAfter(r,e),s.insertBefore(e,this._isMoving),s.insertBefore(this._isMoving,r)):(t=s.offset(e),o=s.offset(this._placeholder),i=t[1]>o[1],n=t[0]>o[0],i&&n||!i&&!n?s.insertBefore(r,e):s.insertAfter(r,e),s.insertBefore(this._isMoving,r)):s.insertAfter(r,e)},destroy:e.destroyComponent,stopMoving:function(){this._removeMovingClasses(),s.remove(this._placeholder),this._placeholder=!1,this._isMoving=!1},validateMove:function(e){this._isMoving&&this._placeholder&&e!==this._placeholder&&e!==this._isMoving&&(!this._options.moveSelector||i.matchesSelector(e,this._options.moveSelector)?this._movePlaceholder(e):this.stopMoving())}},r}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.spy.js b/ajax/libs/ink/3.0.0/js/ink.spy.js new file mode 100644 index 000000000..15dfabf65 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.spy.js @@ -0,0 +1,176 @@ +/** + * @module Ink.UI.Spy_1 + * @author inkdev AT sapo.pt + * @version 1 + * + * Highlight elements as you scroll + */ +Ink.createModule('Ink.UI.Spy', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1'], function(Common, Event, Css, Element, Selector ) { + 'use strict'; + + // Maps a spy target (EG a menu with links inside) to spied instances. + var spyTargets = [ + // [target, [spied, spied, spied...]], ... + ]; + + function targetIndex(target) { + for (var i = 0, len = spyTargets.length; i < len; i++) { + if (spyTargets[i][0] === target) { + return i; + } + } + return null; + } + + function addSpied(spied, target) { + var index = targetIndex(target); + + if (index === null) { + spyTargets.push([target, [spied]]); + } else { + spyTargets[index][1].push(spied); + } + } + + var observingOnScroll = false; + function observeOnScroll() { + if (!observingOnScroll) { + observingOnScroll = true; + Event.observe(document, 'scroll', Event.throttle(onScroll, 300)); + } + } + + function onScroll() { + for (var i = 0, len = spyTargets.length; i < len; i++) { + onScrollForTarget(spyTargets[i][0], spyTargets[i][1]); + } + } + + function onScrollForTarget(target, spied) { + var activeEl = findActiveElement(spied); + + // This selector finds li's to deactivate + var toDeactivate = Selector.select('li.active', target); + for (var i = 0, total = toDeactivate.length; i < total; i++) { + Css.removeClassName(toDeactivate[i], 'active'); + } + + if (activeEl === null) { + return; + } + + // The link which should be activated has a "href" ending with "#" + name or id of the element + var menuLinkSelector = 'a[href$="#' + (activeEl.name || activeEl.id) + '"]'; + + var toActivate = Selector.select(menuLinkSelector, target); + for (i = 0, total = toActivate.length; i < total; i++) { + Css.addClassName(Element.findUpwardsByTag(toActivate[i], 'li'), 'active'); + } + } + + function findActiveElement(spied) { + /* + * Find the element above the top of the screen, but closest to it. + * _____ + * |_____| element 1 (active element) + * + * ------------------------ + * | _____ | + * | | | element 2 | + * | | | | + * | |_____| | + * ------- Viewport ------- + */ + + // Remember that getBoundingClientRect returns coordinates + // relative to the top left corner of the screen. + // + // So checking if it's < 0 is used to tell if + // the element is above the top of the screen. + var closest = -Infinity; + var closestIndex; + var bBox; + for( var i = 0, total = spied.length; i < total; i++ ){ + bBox = spied[i].getBoundingClientRect(); + if (bBox.top <= 0 && bBox.top > closest) { + closest = bBox.top; + closestIndex = i; + } + } + if (closestIndex === undefined) { + return null; + } else { + return spied[closestIndex]; + } + } + + /** + * Spy is a UI component which tells the user which section is currently + * visible. + * + * Spy can be used to highlight a menu item for the section which is + * visible to the user. + * + * You need two things: A menu element (which contains your links inside + * `li` tags), and an element containing your section's content. + * + * The links must be inside `li` tags. These will get the 'active' class, + * to signal which item is currently visible. In your CSS you need to add + * styling for this class. + * + * To use Ink.UI.Spy for more than one section, loop through your + * sections (as you see in the sample below), or just load + * `autoload.js` and set add the `data-spy="true"` attribute to + * your sections. + * + * The currently visible element's corresponding link in the menu + * gets the 'visible' class added to it. + * + * @class Ink.UI.Spy + * @constructor + * @version 1 + * @param {String|DOMElement} selector + * @param {Object} [options] Options + * @param {DOMElement|String} options.target Target menu where the spy will highlight the right option. + * + * @sample Ink_UI_Spy_1.html + */ + var Spy = function( selector, options ){ + + this._element = Common.elOrSelector( selector, 'Ink.UI.Spy_1: Section element' ); + + /** + * Setting default options and - if needed - overriding it with the data attributes + */ + this._options = Ink.extendObj({ + target: undefined, + activeClass: 'active' // [todo] Spy#_options.activeClass + }, Element.data( this._element ) ); + + /** + * In case options have been defined when creating the instance, they've precedence + */ + this._options = Ink.extendObj(this._options,options || {}); + + this._options.target = Common.elOrSelector( this._options.target, 'Ink.UI.Spy_1: Target element' ); + + this._init(); + }; + + Spy.prototype = { + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function() { + addSpied(this._element, this._options.target); + observeOnScroll(); + onScroll(); + } + }; + + return Spy; + +}); diff --git a/ajax/libs/ink/3.0.0/js/ink.spy.min.js b/ajax/libs/ink/3.0.0/js/ink.spy.min.js new file mode 100644 index 000000000..dfa47da47 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.spy.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Spy","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1"],function(t,e,n,o,i){"use strict";function r(t){for(var e=0,n=h.length;n>e;e++)if(h[e][0]===t)return e;return null}function l(t,e){var n=r(e);null===n?h.push([e,[t]]):h[n][1].push(t)}function s(){f||(f=!0,e.observe(document,"scroll",e.throttle(a,300)))}function a(){for(var t=0,e=h.length;e>t;t++)c(h[t][0],h[t][1])}function c(t,e){for(var r=u(e),l=i.select("li.active",t),s=0,a=l.length;a>s;s++)n.removeClassName(l[s],"active");if(null!==r){var c='a[href$="#'+(r.name||r.id)+'"]',h=i.select(c,t);for(s=0,a=h.length;a>s;s++)n.addClassName(o.findUpwardsByTag(h[s],"li"),"active")}}function u(t){for(var e,n,o=-1/0,i=0,r=t.length;r>i;i++)n=t[i].getBoundingClientRect(),n.top<=0&&n.top>o&&(o=n.top,e=i);return void 0===e?null:t[e]}var h=[],f=!1,_=function(e,n){this._element=t.elOrSelector(e,"Ink.UI.Spy_1: Section element"),this._options=Ink.extendObj({target:void 0,activeClass:"active"},o.data(this._element)),this._options=Ink.extendObj(this._options,n||{}),this._options.target=t.elOrSelector(this._options.target,"Ink.UI.Spy_1: Target element"),this._init()};return _.prototype={_init:function(){l(this._element,this._options.target),s(),a()}},_}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.stacker.js b/ajax/libs/ink/3.0.0/js/ink.stacker.js new file mode 100644 index 000000000..ab2e8bc2d --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.stacker.js @@ -0,0 +1,283 @@ +/** + * @module Ink.UI.Stacker_1 + * Stacking items in columns + * @version 1 + **/ + +Ink.createModule('Ink.UI.Stacker', 1, ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1'], function(InkUICommon, InkEvent, InkElement) { + 'use strict'; + +function Stacker(selector, options) { + this._init(selector, options); +} + +Stacker.prototype = { + /** + * This module combines several stacks of items together, in smaller screen sizes. + * + * The purpose is to have several stacks of items which may have different heights and as such cannot be used because of `float: left` quirks. + * + * For example, when you have three different columns of information: + * + * [col. A: 1] [col. B: 1] [col. C: 1] + * [col. B: 2] [col. C: 2] [col. C: 2] + * + * and the screen resizes and you need a layout of 2 columns, Stacker reorders the stacks so that you get: + * + * [col. A: 1] [col. B: 1] + * [col. C: 1] [col. A: 2] + * [col. B: 2] [col. C: 2] + * + * Note: If you just want to use a different amount of columns for your items in several viewports, but these items are guaranteed to have a fixed height, don't use this module. Use the `small-*`, `medium-*` and `large-*` classes instead. + * + * @class Ink.UI.Stacker_1 + * + * @constructor + * @param {DOMElement|String} [container] Element which contains the stacks (identified by the options.column selector) + * @param {Object} [options] Options object. + * @param {String} [options.column] Selector for the the columns inside the container element. Defaults to '.stacker-column'. + * @param {String} [options.item] Selector for the items in your stack. Defaults to '.stacker-item'. + * @param {Object} [options.customBreakPoints] Options for each breakpoint name. Use this if you have more breakpoints than Ink by default (`large`, `medium`, `small`) + * @param {Object} [options.customBreakpoints.BREAKPOINT_NAME] Custom breakpoints object. + * @param {String} options.customBreakpoints.BREAKPOINT_NAME.max Maximum screen size as seen in your media query + * @param {String} options.customBreakpoints.BREAKPOINT_NAME.min Minimum screen size as seen in your media query + * @param {String} options.customBreakpoints.BREAKPOINT_NAME.cols Column count for this size. + * @param {Number} [options.largeMax] Upper bound of `large` breakpoint + * @param {Number} [options.largeMin] Lower bound of `large` breakpoint. Defaults to 961. + * @param {Number} [options.mediumMax] Upper bound of `medium` breakpoint. Defaults to 960. + * @param {Number} [options.mediumMin] Lower bound of `medium` breakpoint. Defaults to 651. + * @param {Number} [options.smallMax] Upper bound of `small` breakpoint. Defaults to 650. + * @param {Number} [options.smallMin] Lower bound of `small` breakpoint + * + * @param {Integer} [options.largeCols] Number of columns in the `large` viewport. Defaults to 3. + * @param {Integer} [options.mediumCols] Number of columns in the `medium` viewport. Defaults to 2. + * @param {Integer} [options.smallCols] Number of columns in the `small` viewport. Defaults to 1. + * + * @param {Boolean} [options.isOrdered] When false, doesn't reorder stacks when combining them. + * @param {Function} [options.onRunCallback] Called when instantiated. + * @param {Function} [options.onResizeCallback] Called when the window resizes. + * @param {Function} [options.onAPIReloadCallback] Called when the reload function executes. + * + * @example + * + * Html: + * + *
        + *
        + *
        a
        + *
        d
        + *
        g
        + *
        + *
        + *
        b
        + *
        e
        + *
        h
        + *
        + *
        + *
        c
        + *
        f
        + *
        i
        + *
        + *
        + * + * Javascript: + * + * Ink.requireModules(['Ink.UI.Stacker_1'], function (Stacker) { + * var stacker = new Stacker('#stacker-container'); + * // Keep the "stacker" variable around if you want to call addItem and reloadItems + * }); + **/ + _init: function(selector, options) { + /* globals console */ + this._rootElm = InkUICommon.elsOrSelector(selector, 'Ink.UI.Stacker root element')[0] || null; + if(this._rootElm === null) { + if(typeof console !== 'undefined') { + console.warn('Ink.UI.Stacker: No root element'); + } + } + + this._options = InkUICommon.options({ + column: ['String', '.stacker-column'], + item: ['String', '.stacker-item'], + + // [3.0.0] review this when we have info about our breakpoints from the CSS + customBreakPoints: ['Object', null], // Must be: {xlarge: {max: 9999, min: 1281, cols: 5}, large:{max:1280, min:1001, cols:4} medium:{max:1000, min:801,cols:3}, ...etc..} + largeMax: ['Number', Number.MAX_VALUE], + largeMin: ['Number', 961], + mediumMax: ['Number', 960], + mediumMin: ['Number', 651], + smallMax: ['Number', 650], + smallMin: ['Number', 0], + + largeCols: ['Integer', 3], + mediumCols: ['Integer', 2], + smallCols: ['Integer', 1], + + isOrdered: ['Boolean', true], + onRunCallback: ['Function', null], + onResizeCallback: ['Function', null], + onAPIReloadCallback: ['Function', null] + }, options || {}, this._rootElm); + + this._aList = []; + + this._curLayout = 'large'; + + // [todo] is this needed? + this._runFirstTime = false; + + this._getPageItemsToList(); + + if(this._canApplyLayoutChange() || !this._runFirstTime) { + this._runFirstTime = true; + this._applyLayoutChange(); + if(typeof(this._options.onRunCallback) === 'function') { + this._options.onRunCallback(this._curLayout); + } + } + this._addEvents(); + }, + + /** + * Adds an item to the end of your stacks. + * Call `reloadItems()` when you are done adding items. + * @method addItem + * @param {DOMElement} item Element + **/ + addItem: function(item) { + this._aList.push(item); + }, + + /** + * Updates the layout of your items. + * Call this method after adding items or changing their dimensions. This method is automatically called when the window resizes. + * + * @method reloadItems + **/ + reloadItems: function() { + this._applyLayoutChange(); + if(typeof(this._options.onAPIReloadCallback) === 'function') { + this._options.onAPIReloadCallback(this._curLayout); + } + }, + + _addEvents: function() { + InkEvent.observe(window, 'resize', Ink.bindEvent(this._onResize, this)); + }, + + _onResize: function() { + if(this._canApplyLayoutChange()) { + this._removeDomItems(); + this._applyLayoutChange(); + if(typeof(this._options.onResizeCallback) === 'function') { + this._options.onResizeCallback(this._curLayout); + } + } + }, + + _setCurLayout: function() { + var viewportWidth = InkElement.viewportWidth(); + if(this._options.customBreakpoints && typeof(this._options.customBreakPoints) === 'object') { + for(var prop in this._options.customBreakPoints) { + if(this._options.customBreakPoints.hasOwnProperty(prop)) { + if(viewportWidth >= Number(this._options.customBreakPoints[prop].min) && viewportWidth <= Number(this._options.customBreakPoints[prop].max) && this._curLayout !== prop) { + this._curLayout = prop; + return; + } + } + } + } else { + if(viewportWidth <= Number(this._options.largeMax) && viewportWidth >= Number(this._options.largeMin) && this._curLayout !== 'large') { + this._curLayout = 'large'; + } else if(viewportWidth >= Number(this._options.mediumMin) && viewportWidth <= Number(this._options.mediumMax) && this._curLayout !== 'medium') { + this._curLayout = 'medium'; + } else if(viewportWidth >= Number(this._options.smallMin) && viewportWidth <= Number(this._options.smallMax) && this._curLayout !== 'small') { + this._curLayout = 'small'; + } + } + }, + + _getColumnsToShow: function() { + if(this._options.customBreakPoints && typeof(this._options.customBreakPoints) === 'object') { + return Number(this._options.customBreakPoints[this._curLayout].cols); + } else { + return Number(this._options[this._curLayout+'Cols']); + } + }, + + _canApplyLayoutChange: function() { + var curLayout = this._curLayout; + this._setCurLayout(); + if(curLayout !== this._curLayout) { + return true; + } + return false; + }, + + _getPageItemsToList: function() { + this._aColumn = Ink.ss(this._options.column, this._rootElm); + var totalCols = this._aColumn.length; + var index = 0; + if(totalCols > 0) { + for(var i=0; i < this._aColumn.length; i++) { + var aItems = Ink.ss(this._options.item, this._aColumn[i]); + for(var j=0; j < aItems.length; j++) { + if(this._options.isOrdered) { + index = i + (j * totalCols); + } + this._aList[index] = aItems[j]; + if(!this._options.isOrdered) { + index++; + } + //aItems[j].style.height = (100 + (Math.random() * 100))+'px'; + aItems[j].parentNode.removeChild(aItems[j]); + } + } + if(this._aList.length > 0 && this._options.isOrdered) { + var aNewList = []; + for(var ii=0; ii < this._aList.length; ii++) { + if(typeof(this._aList[ii]) !== 'undefined') { + aNewList.push(this._aList[ii]); + } + } + this._aList = aNewList; + } + } + }, + + _removeDomItems: function() { + var totalCols = this._aColumn.length; + if(totalCols > 0) { + for(var i=0; i < totalCols; i++) { + var aItems = Ink.ss(this._options.item, this._aColumn[i]); + for(var j=aItems.length - 1; j >= 0; j--) { + aItems[j].parentNode.removeChild(aItems[j]); + } + } + } + }, + + _applyLayoutChange: function() { + var totalCols = this._getColumnsToShow(); + var totalItems = this._aList.length; + var index = 0; + var countCol = 0; + if(totalCols > 0) { + while(countCol < totalCols) { + this._aColumn[countCol].appendChild(this._aList[index]); + index++; + countCol++; + if(index === totalItems) { + return; + } + if(countCol === totalCols) { + countCol = 0; + } + } + } + } +}; + +return Stacker; + +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.stacker.min.js b/ajax/libs/ink/3.0.0/js/ink.stacker.min.js new file mode 100644 index 000000000..ea8cff893 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.stacker.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Stacker",1,["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1"],function(t,o,i){"use strict";function s(t,o){this._init(t,o)}return s.prototype={_init:function(o,i){this._rootElm=t.elsOrSelector(o,"Ink.UI.Stacker root element")[0]||null,null===this._rootElm&&"undefined"!=typeof console&&console.warn("Ink.UI.Stacker: No root element"),this._options=t.options({column:["String",".stacker-column"],item:["String",".stacker-item"],customBreakPoints:["Object",null],largeMax:["Number",Number.MAX_VALUE],largeMin:["Number",961],mediumMax:["Number",960],mediumMin:["Number",651],smallMax:["Number",650],smallMin:["Number",0],largeCols:["Integer",3],mediumCols:["Integer",2],smallCols:["Integer",1],isOrdered:["Boolean",!0],onRunCallback:["Function",null],onResizeCallback:["Function",null],onAPIReloadCallback:["Function",null]},i||{},this._rootElm),this._aList=[],this._curLayout="large",this._runFirstTime=!1,this._getPageItemsToList(),(this._canApplyLayoutChange()||!this._runFirstTime)&&(this._runFirstTime=!0,this._applyLayoutChange(),"function"==typeof this._options.onRunCallback&&this._options.onRunCallback(this._curLayout)),this._addEvents()},addItem:function(t){this._aList.push(t)},reloadItems:function(){this._applyLayoutChange(),"function"==typeof this._options.onAPIReloadCallback&&this._options.onAPIReloadCallback(this._curLayout)},_addEvents:function(){o.observe(window,"resize",Ink.bindEvent(this._onResize,this))},_onResize:function(){this._canApplyLayoutChange()&&(this._removeDomItems(),this._applyLayoutChange(),"function"==typeof this._options.onResizeCallback&&this._options.onResizeCallback(this._curLayout))},_setCurLayout:function(){var t=i.viewportWidth();if(this._options.customBreakpoints&&"object"==typeof this._options.customBreakPoints){for(var o in this._options.customBreakPoints)if(this._options.customBreakPoints.hasOwnProperty(o)&&t>=Number(this._options.customBreakPoints[o].min)&&t<=Number(this._options.customBreakPoints[o].max)&&this._curLayout!==o)return void(this._curLayout=o)}else t<=Number(this._options.largeMax)&&t>=Number(this._options.largeMin)&&"large"!==this._curLayout?this._curLayout="large":t>=Number(this._options.mediumMin)&&t<=Number(this._options.mediumMax)&&"medium"!==this._curLayout?this._curLayout="medium":t>=Number(this._options.smallMin)&&t<=Number(this._options.smallMax)&&"small"!==this._curLayout&&(this._curLayout="small")},_getColumnsToShow:function(){return Number(this._options.customBreakPoints&&"object"==typeof this._options.customBreakPoints?this._options.customBreakPoints[this._curLayout].cols:this._options[this._curLayout+"Cols"])},_canApplyLayoutChange:function(){var t=this._curLayout;return this._setCurLayout(),t!==this._curLayout?!0:!1},_getPageItemsToList:function(){this._aColumn=Ink.ss(this._options.column,this._rootElm);var t=this._aColumn.length,o=0;if(t>0){for(var i=0;i0&&this._options.isOrdered){for(var e=[],a=0;a0)for(var o=0;t>o;o++)for(var i=Ink.ss(this._options.item,this._aColumn[o]),s=i.length-1;s>=0;s--)i[s].parentNode.removeChild(i[s])},_applyLayoutChange:function(){var t=this._getColumnsToShow(),o=this._aList.length,i=0,s=0;if(t>0)for(;t>s;){if(this._aColumn[s].appendChild(this._aList[i]),i++,s++,i===o)return;s===t&&(s=0)}}},s}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.sticky.js b/ajax/libs/ink/3.0.0/js/ink.sticky.js new file mode 100644 index 000000000..96d7987f2 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.sticky.js @@ -0,0 +1,283 @@ +/** + * @module Ink.UI.Sticky_1 + * Stick elements to the viewport + * @version 1 + */ +Ink.createModule('Ink.UI.Sticky', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Element_1','Ink.Dom.Css_1'], function(Common, Event, Element, Css) { + 'use strict'; + + /** + * Ink.UI.Sticky makes an element "stick" to the screen and stay in the same place as the user scrolls. + * + * To use it, just select an element as you create the Sticky. As you scroll past it, it will stick to the top of the screen. + * + * The `activateInLayouts` option controls in what layouts this behaviour happens. By default, it is disabled for the `small` and `tiny` layouts. + * Pass a comma-separated string to choose just the layouts you need. + * + * You can use the `offsetTop` option if you want it to keep some distance from the top of the screen. + * + * To avoid it going under the footer of your page, pass a selector to your footer as the `bottomElement` option. + * + * + * @class Ink.UI.Sticky + * @constructor + * @version 1 + * @param {String|DOMElement} selector Element or selector + * @param {Object} [options] Options Options object. + * @param {Number} [options.offsetBottom] Number of pixels of distance from the bottomElement. Defaults to 0. + * @param {Number} [options.offsetTop] Number of pixels of distance from the topElement. Defaults to 0. + * @param {Boolean} [options.inlineDimensions] Set to false to disable setting inline CSS dimensions. Use this if you want to use CSS to define your own dimensions. Defaults to true. + * @param {Boolean} [options.inlinePosition] Set to false to disable setting inline CSS positions. Use this if you want to use CSS to define your own positioning. Defaults to true. + * @param {String} [options.wrapperClass] CSS class for the wrapper element. Defaults to 'ink-sticky-wrapper'. + * @param {String} [options.stickyClass] CSS class to stick the element to the screen. Defaults to 'ink-sticky-stuck'. + * @param {String} [options.topElement] CSS Selector that specifies a top element with which the component could collide. + * @param {String} [options.bottomElement] CSS Selector that specifies a bottom element with which the component could collide. + * @param {Array|String} [options.activateInLayouts] Layouts in which the sticky behaviour is present. Pass an array or comma-separated string. Defaults to 'medium,large'. + * + * @sample Ink_UI_Sticky_1.html + */ + var Sticky = function( selector, options ){ + this._rootElement = Common.elOrSelector(selector, 'Ink.UI.Sticky_1'); + + this._options = Common.options({ + offsetBottom: ['Integer', 0], + offsetTop: ['Integer', 0], + topElement: ['Element', null], + wrapperClass: ['String', 'ink-sticky-wrapper'], + stickyClass: ['String', 'ink-sticky-stuck'], + inlineDimensions: ['Boolean', true], + inlinePosition: ['Boolean', true], + bottomElement: ['Element', null], + activateInLayouts: ['String', 'medium,large'] + }, options || {}, this._rootElement ); + + // Because String#indexOf is compatible with lt IE8 but not Array#indexOf + this._options.activateInLayouts = this._options.activateInLayouts.toString(); + + this._dims = null; // force a recalculation of the dimensions later + + this._options.offsetTop = parseInt(this._options.offsetTop, 10) || 0; + this._options.offsetBottom = parseInt(this._options.offsetBottom, 10) || 0; + + if (this._options.topElement) { + this._options.topElement = Common.elOrSelector(this._options.topElement, 'Top Element'); + } + if (this._options.bottomElement) { + this._options.bottomElement = Common.elOrSelector(this._options.bottomElement, 'Sticky bottom Element'); + } + + this._wrapper = Element.create('div', { className: this._options.wrapperClass }); + Element.wrap(this._rootElement, this._wrapper); + + this._init(); + }; + + Sticky.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function() { + var scrollTarget = document.addEventListener ? document : window; + this._onScroll = Ink.bind(Event.throttle(this._onScroll, 33), this); // Because this is called directly. + Event.observe( scrollTarget, 'scroll', this._onScroll ); + Event.observe( window, 'resize', Ink.bindEvent(Event.throttle(this._onResize, 100), this) ); + this._onScroll(); + }, + + /** + * Returns whether the sticky is disabled in the current view + * + * @method isDisabledInLayout + * @private + */ + _isDisabledInLayout: function () { + var currentLayout = Common.currentLayout(); + if (!currentLayout) { return false; } + return this._options.activateInLayouts.indexOf(currentLayout) === -1; + }, + + /** + * Scroll handler. + * + * @method _onScroll + * @private + */ + _onScroll: function(){ + var dims = this._getDims(); + var scrollHeight = Element.scrollHeight(); + + var unstick = this._isDisabledInLayout() || + scrollHeight <= dims.top - this._options.offsetTop || + (this._options.topElement && this._options.topElement.getBoundingClientRect().bottom + this._options.offsetTop > 0); + + if( unstick ) { + // We're on top, no sticking. position:static is the "normal" position. + this._unstick(); + return; + } + + // If we stick it now, what will be its boundingClientRect.bottom ? + var bottomOfSticky = this._options.offsetTop + dims.height + Element.scrollHeight(); + var maxBottomOfSticky = document.body.scrollHeight; + + if (this._options.bottomElement) { + maxBottomOfSticky = + this._options.bottomElement.getBoundingClientRect().top + + Element.scrollHeight(); + } + + maxBottomOfSticky -= this._options.offsetBottom; + + if ( bottomOfSticky < maxBottomOfSticky ) { + // Stick to screen! + this._stickTo('screen'); + } else { + // Stick to bottom + this._stickTo('bottom'); + } + }, + + /** + * Have the sticky stick nowhere, to the screen, or to the bottom. + * + * @method _stickTo + * @private + */ + _stickTo: function (where) { + var style = this._rootElement.style; + var dims = this._getDims(); + + Css.addClassName(this._rootElement, this._options.stickyClass); + this._wrapper.style.height = dims.height + 'px'; + + this._inlineDimensions(dims.height + 'px', dims.width + 'px'); + + if (this._options.inlinePosition === false) { + return; + } + + style.left = dims.left + 'px'; + + if (where === 'screen') { + style.bottom = null; + style.top = this._options.offsetTop + 'px'; + } else if (where === 'bottom') { + // Distance between bottom of sticky and bottom of document + var bottom = this._getBottomOffset(); + + // Distance between bottom of viewport and bottom of document + var bottomOfViewport = Element.scrollHeight() + Element.viewportHeight(); + var toBottomOfDocument = Element.pageHeight() - bottomOfViewport; + + style.bottom = bottom - toBottomOfDocument + 'px'; + style.top = 'auto'; + } + }, + + /** + * "unstick" the sticky from the screen or bottom of the document + * @method _unstick + * @private + */ + _unstick: function () { + Css.removeClassName(this._rootElement, this._options.stickyClass); + // deinline dimensions of our root element + this._inlineDimensions(null, null); + + // deinline the position of our root element + if (this._options.inlinePosition) { + this._rootElement.style.left = null; + this._rootElement.style.top = null; + this._rootElement.style.bottom = null; + } + + // deinline dimensions of wrapper + this._wrapper.style.height = null; + this._wrapper.style.width = null; + + // Break the "getDims" cache + this._dims = null; + }, + + /** + * Resize handler + * + * @method _onResize + * @private + */ + _onResize: function(){ + this._dims = null; // Blow the cache so _getDims recalculates + this._onScroll(); + }, + + /** + * Recalculate the "dims" cache, or get it. + * + * The "dims" cache is to be set to null when the element is liable to have changed dimensions + * + * (eg: on resize) + * + **/ + _getDims: function () { + if (this._dims !== null) { return this._dims; } + + var style = this._rootElement.style; + + // We unstick the sticky so we can measure. + var oldPosition = style.position; + var oldWidth = style.width; + + style.position = 'static'; // [todo] this should be a class toggle + style.width = null; + + var dimensionsInStatic = Element.outerDimensions(this._rootElement); + var rect = this._wrapper.getBoundingClientRect(); + this._dims = { + height: dimensionsInStatic[1], + width: dimensionsInStatic[0], + left: rect.left + Element.scrollWidth(), + top: rect.top + Element.scrollHeight() + }; + + style.position = oldPosition; + style.width = oldWidth; + + return this._dims; + }, + + /** + * Set style.height and style.width, but not if options.inlineDimensions === false + * + * @method _inlineDimensions + * @private + */ + _inlineDimensions: function (height, width) { + if (this._options.inlineDimensions) { + this._rootElement.style.height = height; + this._rootElement.style.width = width; + } + }, + + /** + * Get the distance between the bottom of the element and the bottom of the page + * + * @method _getBottomOffset + * @private + */ + _getBottomOffset: function () { + var bottom = this._options.offsetBottom; + if (this._options.bottomElement) { + bottom += Element.pageHeight() - + Element.offsetTop(this._options.bottomElement); + } + return bottom; + } + }; + + return Sticky; + +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.sticky.min.js b/ajax/libs/ink/3.0.0/js/ink.sticky.min.js new file mode 100644 index 000000000..e9f3c1082 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.sticky.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Sticky","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Css_1"],function(t,o,i,e){"use strict";var s=function(o,e){this._rootElement=t.elOrSelector(o,"Ink.UI.Sticky_1"),this._options=t.options({offsetBottom:["Integer",0],offsetTop:["Integer",0],topElement:["Element",null],wrapperClass:["String","ink-sticky-wrapper"],stickyClass:["String","ink-sticky-stuck"],inlineDimensions:["Boolean",!0],inlinePosition:["Boolean",!0],bottomElement:["Element",null],activateInLayouts:["String","medium,large"]},e||{},this._rootElement),this._options.activateInLayouts=this._options.activateInLayouts.toString(),this._dims=null,this._options.offsetTop=parseInt(this._options.offsetTop,10)||0,this._options.offsetBottom=parseInt(this._options.offsetBottom,10)||0,this._options.topElement&&(this._options.topElement=t.elOrSelector(this._options.topElement,"Top Element")),this._options.bottomElement&&(this._options.bottomElement=t.elOrSelector(this._options.bottomElement,"Sticky bottom Element")),this._wrapper=i.create("div",{className:this._options.wrapperClass}),i.wrap(this._rootElement,this._wrapper),this._init()};return s.prototype={_init:function(){var t=document.addEventListener?document:window;this._onScroll=Ink.bind(o.throttle(this._onScroll,33),this),o.observe(t,"scroll",this._onScroll),o.observe(window,"resize",Ink.bindEvent(o.throttle(this._onResize,100),this)),this._onScroll()},_isDisabledInLayout:function(){var o=t.currentLayout();return o?-1===this._options.activateInLayouts.indexOf(o):!1},_onScroll:function(){var t=this._getDims(),o=i.scrollHeight(),e=this._isDisabledInLayout()||o<=t.top-this._options.offsetTop||this._options.topElement&&this._options.topElement.getBoundingClientRect().bottom+this._options.offsetTop>0;if(e)return void this._unstick();var s=this._options.offsetTop+t.height+i.scrollHeight(),n=document.body.scrollHeight;this._options.bottomElement&&(n=this._options.bottomElement.getBoundingClientRect().top+i.scrollHeight()),n-=this._options.offsetBottom,this._stickTo(n>s?"screen":"bottom")},_stickTo:function(t){var o=this._rootElement.style,s=this._getDims();if(e.addClassName(this._rootElement,this._options.stickyClass),this._wrapper.style.height=s.height+"px",this._inlineDimensions(s.height+"px",s.width+"px"),this._options.inlinePosition!==!1)if(o.left=s.left+"px","screen"===t)o.bottom=null,o.top=this._options.offsetTop+"px";else if("bottom"===t){var n=this._getBottomOffset(),l=i.scrollHeight()+i.viewportHeight(),h=i.pageHeight()-l;o.bottom=n-h+"px",o.top="auto"}},_unstick:function(){e.removeClassName(this._rootElement,this._options.stickyClass),this._inlineDimensions(null,null),this._options.inlinePosition&&(this._rootElement.style.left=null,this._rootElement.style.top=null,this._rootElement.style.bottom=null),this._wrapper.style.height=null,this._wrapper.style.width=null,this._dims=null},_onResize:function(){this._dims=null,this._onScroll()},_getDims:function(){if(null!==this._dims)return this._dims;var t=this._rootElement.style,o=t.position,e=t.width;t.position="static",t.width=null;var s=i.outerDimensions(this._rootElement),n=this._wrapper.getBoundingClientRect();return this._dims={height:s[1],width:s[0],left:n.left+i.scrollWidth(),top:n.top+i.scrollHeight()},t.position=o,t.width=e,this._dims},_inlineDimensions:function(t,o){this._options.inlineDimensions&&(this._rootElement.style.height=t,this._rootElement.style.width=o)},_getBottomOffset:function(){var t=this._options.offsetBottom;return this._options.bottomElement&&(t+=i.pageHeight()-i.offsetTop(this._options.bottomElement)),t}},s}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.swipe.js b/ajax/libs/ink/3.0.0/js/ink.swipe.js new file mode 100644 index 000000000..51c9dbf56 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.swipe.js @@ -0,0 +1,210 @@ +/** + * @module Ink.UI.Swipe_1 + * Swipe gestures + * @version 1 + */ +Ink.createModule('Ink.UI.Swipe', '1', ['Ink.Dom.Event_1', 'Ink.Dom.Element_1', 'Ink.UI.Common_1'], function(InkEvent, InkElement, Common) { + 'use strict'; + + /** + * Subscribe swipe gestures. + * + * Supports filtering swipes be any combination of the criteria supported in the options. + * + * @class Ink.UI.Swipe_1 + * @constructor + * @param {String|DOMElement} el Element or Selector + * @param {Object} options Options Object + * @param {Function} [options.onEnd] Callback function for the `touchend` event. Gets all the gesture information, and is filtered by min/max Dist and Duration options (see below) + * @param {Function} [options.onStart] Callback function for `touchstart` event. + * @param {Function} [options.onMove] Callback function for every `touchmove` event. Gets current gesture information. + * @param {Number} [options.minDist] Minimum allowed distance, in pixels. + * @param {Number} [options.maxDist] Maximum allowed distance, in pixels. + * @param {Number} [options.minDuration] Minimum allowed duration, in seconds. + * @param {Number} [options.maxDuration] Maximum allowed duration, in seconds. + * @param {String} [options.axis] If either 'x' or 'y' is passed, only swipes where the dominant axis is the given one trigger the callback + * @param {String} [options.storeGesture] If to store gesture information and provide it to the callback. Defaults to true. + * @param {String} [options.stopEvents] Flag to stop (default and propagation) of the received events. Defaults to true. + * + * ----- + * + * Arguments received by the callbacks + * ----------------------------------- + * + * `onStart`, `onMove`, and `onEnd` receive as argument an object containing: + * + * - `event`: the DOMEvent object + * - `element`: the target element + * - `Instance`: the `Ink.UI.Swipe_1` instance + * - `position`: `Array` with `[x, y]` coordinates of current position + * - `dt`: Time passed between now and the first event (onMove only) + * - `gesture`: an Array containing [x,y] coordinates of every touchmove event received (storeGesture only) (onEnd only) + * - `time`: an Array containing all the `dt` values for every touchmove event (onEnd only) + * - `overallMovement`: X and Y distance traveled by the touch movement (`[x, y]`) (onEnd only) + * - `overallTime`: total time passed (onEnd only) + * + * @sample Ink_UI_Swipe_1.html + */ + function Swipe(el, options) { + el = Common.elOrSelector(el, 'Swipe target'); + + this._options = Ink.extendObj({ + onEnd: undefined, + onStart: undefined, + onMove: undefined, + minDist: undefined, // in pixels + maxDist: undefined, + minDuration: undefined, // in seconds + maxDuration: undefined, + axis: undefined, // x | y + storeGesture: false, + stopEvents: true + }, InkElement.data(el), options || {}); + + if (typeof options === 'function') { + this._options.onEnd = options; + } + + this._handlers = { + down: Ink.bindEvent(this._onDown, this), + move: Ink.bindEvent(this._onMove, this), + up: Ink.bindEvent(this._onUp, this) + }; + + this._element = el; + + this._init(); + } + + Swipe.prototype = { + + version: '0.1', + + _supported: ('ontouchstart' in document.documentElement), + + _init: function() { + var db = document.body; + InkEvent.observe(db, 'touchstart', this._handlers.down); + if (this._options.storeGesture || this._options.onMove) { + InkEvent.observe(db, 'touchmove', this._handlers.move); + } + InkEvent.observe(db, 'touchend', this._handlers.up); + this._isOn = false; + }, + + _isMeOrParent: function(el, parentEl) { + if (!el) {return;} + do { + if (el === parentEl) { return true; } + el = el.parentNode; + } while (el); + return false; + }, + + _pushGesture: function (coords, dt) { + if (this._options.storeGesture) { + this._gesture.push(coords); + this._time.push(dt); + } + }, + + _onDown: function(event) { + if (event.changedTouches.length !== 1) { return; } + if (!this._isMeOrParent(event.target, this._element)) { return; } + + if( this._options.stopEvents === true ){ + InkEvent.stop(event); + } + event = event.changedTouches[0]; + this._isOn = true; + this._target = event.target; + + this._t0 = +new Date(); + this._p0 = [event.pageX, event.pageY]; + + if (this._options.storeGesture) { + this._gesture = []; + this._time = []; + } + + this._pushGesture(this._p0, 0); + + if (this._options.onStart) { + this._options.onStart({ + event: event, + element: this._element, + instance: this, + position: this._p0, + dt: 0 + }); + } + }, + + _onMove: function(event) { + if (!this._isOn || event.changedTouches.length !== 1) { return; } + if( this._options.stopEvents === true ) { + InkEvent.stop(event); + } + + event = event.changedTouches[0]; + var t1 = +new Date(); + var dt = (t1 - this._t0); + + var gesture = [event.pageX, event.pageY]; + + this._pushGesture(gesture, dt); + + if (this._options.onMove) { + this._options.onMove({ + event: event, + element: this._element, + instance: this, + position: gesture, + dt: dt + }); + } + }, + + _onUp: function(event) { + if (!this._isOn || event.changedTouches.length !== 1) { return; } + + if( this._options.stopEvents === true ){ + InkEvent.stop(event); + } + event = event.changedTouches[0]; // TODO SHOULD CHECK IT IS THE SAME TOUCH + this._isOn = false; + + var t1 = +new Date(); + var p1 = [event.pageX, event.pageY]; + var dt = (t1 - this._t0); + var dr = [ + p1[0] - this._p0[0], + p1[1] - this._p0[1] + ]; + var dist = Math.sqrt(dr[0]*dr[0] + dr[1]*dr[1]); + var axis = Math.abs(dr[0]) > Math.abs(dr[1]) ? 'x' : 'y'; + + var o = this._options; + if (o.minDist && dist < o.minDist) { return; } + if (o.maxDist && dist > o.maxDist) { return; } + if (o.minDuration && dt < o.minDuration) { return; } + if (o.maxDuration && dt > o.maxDuration) { return; } + if (o.axis && axis !== o.axis) { return; } + + if (this._options.onEnd) { + this._options.onEnd({ + event: event, + element: this._element, + instance: this, + gesture: this._gesture, + time: this._time, + axis: axis, + overallMovement: dr, + overallTime: dt + }); + } + } + }; + + return Swipe; +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.swipe.min.js b/ajax/libs/ink/3.0.0/js/ink.swipe.min.js new file mode 100644 index 000000000..93b9c88c7 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.swipe.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Swipe","1",["Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.UI.Common_1"],function(t,e,n){"use strict";function i(t,i){t=n.elOrSelector(t,"Swipe target"),this._options=Ink.extendObj({onEnd:void 0,onStart:void 0,onMove:void 0,minDist:void 0,maxDist:void 0,minDuration:void 0,maxDuration:void 0,axis:void 0,storeGesture:!1,stopEvents:!0},e.data(t),i||{}),"function"==typeof i&&(this._options.onEnd=i),this._handlers={down:Ink.bindEvent(this._onDown,this),move:Ink.bindEvent(this._onMove,this),up:Ink.bindEvent(this._onUp,this)},this._element=t,this._init()}return i.prototype={version:"0.1",_supported:"ontouchstart"in document.documentElement,_init:function(){var e=document.body;t.observe(e,"touchstart",this._handlers.down),(this._options.storeGesture||this._options.onMove)&&t.observe(e,"touchmove",this._handlers.move),t.observe(e,"touchend",this._handlers.up),this._isOn=!1},_isMeOrParent:function(t,e){if(t){do{if(t===e)return!0;t=t.parentNode}while(t);return!1}},_pushGesture:function(t,e){this._options.storeGesture&&(this._gesture.push(t),this._time.push(e))},_onDown:function(e){1===e.changedTouches.length&&this._isMeOrParent(e.target,this._element)&&(this._options.stopEvents===!0&&t.stop(e),e=e.changedTouches[0],this._isOn=!0,this._target=e.target,this._t0=+new Date,this._p0=[e.pageX,e.pageY],this._options.storeGesture&&(this._gesture=[],this._time=[]),this._pushGesture(this._p0,0),this._options.onStart&&this._options.onStart({event:e,element:this._element,instance:this,position:this._p0,dt:0}))},_onMove:function(e){if(this._isOn&&1===e.changedTouches.length){this._options.stopEvents===!0&&t.stop(e),e=e.changedTouches[0];var n=+new Date,i=n-this._t0,s=[e.pageX,e.pageY];this._pushGesture(s,i),this._options.onMove&&this._options.onMove({event:e,element:this._element,instance:this,position:s,dt:i})}},_onUp:function(e){if(this._isOn&&1===e.changedTouches.length){this._options.stopEvents===!0&&t.stop(e),e=e.changedTouches[0],this._isOn=!1;var n=+new Date,i=[e.pageX,e.pageY],s=n-this._t0,o=[i[0]-this._p0[0],i[1]-this._p0[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),a=Math.abs(o[0])>Math.abs(o[1])?"x":"y",_=this._options;_.minDist&&h<_.minDist||_.maxDist&&h>_.maxDist||_.minDuration&&s<_.minDuration||_.maxDuration&&s>_.maxDuration||_.axis&&a!==_.axis||this._options.onEnd&&this._options.onEnd({event:e,element:this._element,instance:this,gesture:this._gesture,time:this._time,axis:a,overallMovement:o,overallTime:s})}}},i}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.table.js b/ajax/libs/ink/3.0.0/js/ink.table.js new file mode 100644 index 000000000..85a8ded9c --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.table.js @@ -0,0 +1,704 @@ +/** + * @module Ink.UI.Table_1 + * Sort and paginate tabular data + * @version 1 + */ +Ink.createModule('Ink.UI.Table', '1', ['Ink.Util.Url_1','Ink.UI.Pagination_1','Ink.Net.Ajax_1','Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1','Ink.Util.String_1', 'Ink.Util.Json_1'], function(InkUrl,Pagination, Ajax, Common, Event, Css, Element, Selector, InkArray, InkString, Json) { + 'use strict'; + + var rNumber = /\d/g; + // Turn into a number, if we can. For sorting data which could be numeric or not. + function maybeTurnIntoNumber(value) { + if( !isNaN(value) && rNumber.test(value) ){ + return parseInt(value, 10); + } else if( !isNaN(value) ){ + return parseFloat(value); + } + return value; + } + function cmp (a, b) { + if( a === b ){ + return 0; + } + return ( ( a > b ) ? 1 : -1 ); + } + // cmp function for comparing data which might be a number. + function numberishEnabledCmp (a, b) { + var aValue = maybeTurnIntoNumber(Element.textContent(a)); + var bValue = maybeTurnIntoNumber(Element.textContent(b)); + + return cmp(aValue, bValue); + } + // Object.keys polyfill + function keys(obj) { + if (typeof Object.keys !== 'undefined') { + return Object.keys(obj); + } + var ret = []; + for (var k in obj) if (obj.hasOwnProperty(k)) { + ret.push(k); + } + return ret; + } + + // Most processJSON* functions can just default to this. + function sameSame(obj) { return obj; } + /** + * The Table component transforms the native/DOM table element into a sortable, paginated component. + * + * You can use this component to display data from a JSON endpoint, or + * from table rows in the DOM. Displaying from the DOM is more practical, + * but sometimes you don't want to load everything at once (if you have + * a HUGE table). In those cases, you should configure Ink.UI.Table to + * get data from JSON endpoint. + * + * To enable sorting, just set the `data-sortable` attribute of your table headers (they must be in the `thead` of the table) to "true". + * + * To enable pagination, you should pass either an `Ink.UI.Pagination` instance or a selector to create the Ink.UI.Paginate element on. + * + * @class Ink.UI.Table + * @constructor + * @version 1 + * @param {String|DOMElement} selector + * @param {Object} [options] Options + * @param {Number} [options.pageSize] Number of rows per page. Omit to avoid paginating. + * @param {String} [options.endpoint] Endpoint to get the records via AJAX. Omit if you don't want to do AJAX + * @param {Function} [options.createEndpointUrl] Callback to customise what URL the AJAX endpoint is at. Receives three arguments: base (the "endpoint" option), sort (`{ order: 'asc' or 'desc', field: fieldname }`) and page ({ page: page number, size: items per page }) + * @param {Function} [options.getDataFromEndPoint] Callback to allow the user to retrieve the data himself given an URL. Must accept two arguments: `url` and `callback`. This `callback` will take as a single argument a JavaScript object. + * @param {Function} [options.processJSONRows] Retrieve an array of rows from the data which came from AJAX. + * @param {Function} [options.processJSONHeaders] Get an object with all the headers' names as keys, and a { label, sortable } object as value. Example: `{col1: {label: "Column 1"}, col2: {label: "Column 2", sortable: true}`. Takes a single argument, the JSON response. + * @param {Function} [options.processJSONRow] Process a row object before it gets on the table. + * @param {Function} [options.processJSONField] Process the field data before putting it on the table. You can return HTML, a DOM element, or a string here. Arguments you receive: `(column, fieldData, rowIndex)`. + * @param {Function} [options.processJSONField.FIELD_NAME] The same as processJSONField, but for a particular field. + * @param {Function} [options.processJSONTotalRows] A callback where you have a chance to say how many rows are in the dataset (not only on this page) you have on the collection. You get as an argument the JSON response. + * @param {Function} [options.getSortKey] A function taking a `{ columnIndex, columnName, data, element }` object and returning a value which serves as a sort key for the sorting operation. For example, if you want to sort by a `data-sort-key` atribute, set `getSortKey` to: function (cell) { return cell.element.getAttribute('data-sort-key'); } + * @param {Function} [options.getSortKey.FIELD_NAME] Same as `options.getSortKey`, but for a particular field. + * @param {Object} [options.tdClassNames] An object mapping each field to what classes it gets. Example: `{ name: "large-10", isBoss: "hide-small" }` + * @param {Mixed} [options.pagination] Pagination instance, element or selector. + * @param {Object} [options.paginationOptions] Override the options with which we instantiate the Ink.UI.Pagination. + * @param {Boolean} [options.allowResetSorting] Allow sort order to be set to "none" in addition to "ascending" and "descending" + * @param {String|Array} [options.visibleFields] Set of fields which get shown on the table + * + * @sample Ink_UI_Table_1.html + */ + var Table = function( selector, options ){ + + /** + * Get the root element + */ + this._rootElement = Common.elOrSelector(selector, 'Ink.UI.Table :'); + + if( this._rootElement.nodeName.toLowerCase() !== 'table' ){ + throw new Error('[Ink.UI.Table] :: The element is not a table'); + } + + this._options = Common.options({ + pageSize: ['Integer', null], + caretUpClass: ['String', 'fa fa-caret-up'], + caretDownClass: ['String', 'fa fa-caret-down'], + endpoint: ['String', null], + createEndpointUrl: ['Function', null /* default func uses above option */], + getDataFromEndPoint: ['Function', null /* by default use plain ajax for JSON */], + processJSONRows: ['Function', sameSame], + processJSONRow: ['Function', sameSame], + processJSONField: ['Function', sameSame], + processJSONHeaders: ['Function', function (dt) { return dt.fields; }], + processJSONTotalRows: ['Function', function (dt) { return dt.length || dt.totalRows; }], + getSortKey: ['Function', null], + pagination: ['Element', null], + allowResetSorting: ['Boolean', false], + visibleFields: ['String', null], + tdClassNames: ['Object', {}], + paginationOptions: ['Object', null] + }, options || {}, this._rootElement); + + /** + * Checking if it's in markup mode or endpoint mode + */ + this._markupMode = !this._options.endpoint; + + if( this._options.visibleFields ){ + this._options.visibleFields = this._options.visibleFields.toString().split(/[, ]+/g); + } + + this._thead = this._rootElement.tHead || this._rootElement.createTHead(); + this._headers = Selector.select('th', this._thead); + + /** + * Initializing variables + */ + this._handlers = { + thClick: null + }; + this._originalFields = [ + // field headers from the DOM + ]; + this._sortableFields = { + // Identifies which columns are sorted and how. + // columnIndex: 'none'|'asc'|'desc' + }; + this._originalData = this._data = []; + this._pagination = null; + this._totalRows = 0; + + this._handlers.thClick = Event.observeDelegated(this._rootElement, 'click', + 'thead th[data-sortable="true"]', + Ink.bindMethod(this, '_onThClick')); + + this._init(); + }; + + Table.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function(){ + /** + * If not is in markup mode, we have to do the initial request + * to get the first data and the headers + */ + if( !this._markupMode ) { + /* Endpoint mode */ + this._getData( ); + } else /* Markup mode */ { + this._resetSortOrder(); + this._addHeadersClasses(); + + /** + * Getting the table's data + */ + this._data = Selector.select('tbody tr', this._rootElement); + this._originalData = this._data.slice(0); + + this._totalRows = this._data.length; + + /** + * Set pagination if options tell us to + */ + this._setPagination(); + } + }, + + /** + * Add the classes in this._options.tdClassNames to our table headers. + * @method _addHeadersClasses + * @private + */ + _addHeadersClasses: function () { + var headerLabel; + var classNames; + for (var i = 0, len = this._headers.length; i < len; i++) { + headerLabel = Element.textContent(this._headers[i]); + classNames = this._options.tdClassNames[headerLabel]; + // TODO do not find header labels this way. But how? + if (classNames) { + Css.addClassName(this._headers[i], classNames); + } + } + }, + + /** + * Click handler. This will mainly handle the sorting (when you click in the headers) + * + * @method _onThClick + * @param {Event} event Event obj + * @private + */ + _onThClick: function( event ){ + var tgtEl = Event.element(event), + paginated = this._options.pageSize !== undefined; + + Event.stop(event); + + var index = InkArray.keyValue(tgtEl, this._headers, true); + var sortable = index !== false && this._sortableFields[index] !== undefined; + + if( !sortable ){ + return; + } + + if( !this._markupMode && paginated ){ + this._invertSortOrder(index, false); + } else { + if ( (this._sortableFields[index] === 'desc') && this._options.allowResetSorting ) { + this._setSortOrderOfColumn(index, null); + this._data = this._originalData.slice(0); + } else { + this._invertSortOrder(index, true); + } + + var tbody = Selector.select('tbody',this._rootElement)[0]; + Common.cleanChildren(tbody); + InkArray.each(this._data, Ink.bindMethod(tbody, 'appendChild')); + + if (this._pagination) { + this._pagination.setCurrent(0); + this._paginate(1); + } + } + }, + + _invertSortOrder: function (index, sortAndReverse) { + var isAscending = this._sortableFields[index] === 'asc'; + + for (var i = 0, len = this._headers.length; i < len; i++) { + this._setSortOrderOfColumn(i, null); + } + + if (sortAndReverse) { + this._sort(index); + if (isAscending) { + this._data.reverse(); + } + } + + this._setSortOrderOfColumn(index, !isAscending); + }, + + _setSortOrderOfColumn: function(index, up) { + var header = this._headers[index]; + var caretHtml = ['']; + var order = 'none'; + + if (up === true) { + caretHtml = ['']; + order = 'asc'; + } else if (up === false) { + caretHtml = ['']; + order = 'desc'; + } + + this._sortableFields[index] = order; + header.innerHTML = Element.textContent(header) + caretHtml.join(''); + }, + + /** + * Applies and/or changes the CSS classes in order to show the right columns + * + * @method _paginate + * @param {Number} page Current page + * @private + */ + _paginate: function( page ){ + if (!this._pagination) { return; } + + var pageSize = this._options.pageSize; + + // Hide everything except the items between these indices + var firstIndex = (page - 1) * pageSize; + var lastIndex = firstIndex + pageSize; + + InkArray.each(this._data, function(item, index){ + if (index >= firstIndex && index < lastIndex) { + Css.removeClassName(item,'hide-all'); + } else { + Css.addClassName(item,'hide-all'); + } + }); + + }, + + /* register fields into this._originalFields, whether they come from JSON or a table. + * @method _registerFieldNames + * @private + * @param [names] The field names in an array + **/ + _registerFieldNames: function (names) { + this._originalFields = []; + + InkArray.forEach(names, Ink.bind(function (field) { + if( !this._fieldIsVisible(field) ){ + return; // The user deems this not to be necessary to see. + } + this._originalFields.push(field); + }, this)); + }, + + _fieldIsVisible: function (field) { + return !this._options.visibleFields || + (this._options.visibleFields.indexOf(field) !== -1); + }, + + /** + * Sorts by a specific column. + * + * @method _sort + * @param {Number} index Column number (starting at 0) + * @private + */ + _sort: function( index ){ + // TODO this is THE worst way to declare field names. Incompatible with i18n and a lot of other things. + var fieldName = Element.textContent(this._headers[index]); + var keyFunction = this._options.getSortKey; + + if (keyFunction) { + keyFunction = + typeof keyFunction[fieldName] === 'function' ? + keyFunction[fieldName] : + typeof keyFunction === 'function' ? + keyFunction : + null; + } + + var self = this; + + this._data.sort(function (trA, trB) { + var elementA = Ink.ss('td', trA)[index]; + var elementB = Ink.ss('td', trB)[index]; + if (keyFunction) { + return cmp(userKey(elementA), userKey(elementB)); + } else { + return numberishEnabledCmp(elementA, elementB, index); + } + }); + + function userKey(element) { + return keyFunction.call(self, { + columnIndex: index, + columnName: fieldName, + data: Element.textContent(element), + element: element + }); + } + }, + + /** + * Assembles the headers markup + * + * @method _createHeadersFromJson + * @param {Object} headers Key-value object that contains the fields as keys, their configuration (label and sorting ability) as value + * @private + */ + _createHeadersFromJson: function( headers ){ + this._registerFieldNames(keys(headers)); + + if (this._thead.children.length) { return; } + + var tr = this._thead.insertRow(0); + var th; + + for (var i = 0, len = headers.length; i < len; i++) { + if (this._fieldIsVisible(headers[i])) { + th = Element.create('th'); + th = this._createSingleHeaderFromJson(headers[i], th); + tr.appendChild(th); + this._headers.push(th); + } + } + }, + + _createSingleHeaderFromJson: function (header, th) { + if (header.sortable) { + th.setAttribute('data-sortable','true'); + } + + if (header.label){ + Element.setTextContent(th, header.label); + } + + return th; + }, + + /** + * Reset the sort order as marked on the table headers to "none" + * + * @method _resetSortOrder + * @private + */ + _resetSortOrder: function(){ + /** + * Setting the sortable columns and its event listeners + */ + for (var i = 0, len = this._headers.length; i < len; i++) { + var dataset = Element.data( this._headers[i] ); + if (dataset.sortable && dataset.sortable.toString() === 'true') { + this._sortableFields[i] = 'none'; + } + } + }, + + /** + * This method gets the rows from AJAX and places them as and + * + * @method _createRowsFromJSON + * @param {Object} rows Array of objects with the data to be showed + * @private + */ + _createRowsFromJSON: function( rows ){ + var tbody = Selector.select('tbody',this._rootElement)[0]; + + if( !tbody ){ + tbody = document.createElement('tbody'); + this._rootElement.appendChild( tbody ); + } else { + Element.setHTML(tbody, ''); + } + + this._data = []; + var row; + + for (var trIndex in rows) { + if (rows.hasOwnProperty(trIndex)) { + row = this._options.processJSONRow(rows[trIndex]); + this._createSingleRowFromJson(tbody, row, trIndex); + } + } + + this._originalData = this._data.slice(0); + }, + + _createSingleRowFromJson: function (tbody, row, rowIndex) { + var tr = document.createElement('tr'); + tbody.appendChild( tr ); + for( var field in row ){ + if (row.hasOwnProperty(field)) { + this._createFieldFromJson(tr, row[field], field, rowIndex); + } + } + this._data.push(tr); + }, + + _createFieldFromJson: function (tr, fieldData, fieldName, rowIndex) { + if (!this._fieldIsVisible(fieldName)) { return; } + + var processor = + this._options.processJSONField[fieldName] || // per-field callback + this._options.processJSONField; // generic callback + + var result; + if (typeof processor === 'function') { + result = processor(fieldData, fieldName, rowIndex); + } else { + result = fieldData; + } + var elm = this._elOrFieldData(result); + + var className = this._options.tdClassNames[fieldName]; + if (className) { + Css.addClassName(elm, className); + } + + tr.appendChild(elm); + }, + + _elOrFieldData: function (processed) { + if (Common.isDOMElement(processed)) { + return processed; + } + + var isString = typeof processed === 'string'; + var isNumber = typeof processed === 'number'; + var elm = Element.create('td'); + + if (isString && /^\s*?e?1:-1}function p(t,e){var i=_(r.textContent(t)),s=_(r.textContent(e));return c(i,s)}function u(t){if("undefined"!=typeof Object.keys)return Object.keys(t);var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e}function f(t){return t}var g=/\d/g,m=function(t,e){if(this._rootElement=s.elOrSelector(t,"Ink.UI.Table :"),"table"!==this._rootElement.nodeName.toLowerCase())throw new Error("[Ink.UI.Table] :: The element is not a table");this._options=s.options({pageSize:["Integer",null],caretUpClass:["String","fa fa-caret-up"],caretDownClass:["String","fa fa-caret-down"],endpoint:["String",null],createEndpointUrl:["Function",null],getDataFromEndPoint:["Function",null],processJSONRows:["Function",f],processJSONRow:["Function",f],processJSONField:["Function",f],processJSONHeaders:["Function",function(t){return t.fields}],processJSONTotalRows:["Function",function(t){return t.length||t.totalRows}],getSortKey:["Function",null],pagination:["Element",null],allowResetSorting:["Boolean",!1],visibleFields:["String",null],tdClassNames:["Object",{}],paginationOptions:["Object",null]},e||{},this._rootElement),this._markupMode=!this._options.endpoint,this._options.visibleFields&&(this._options.visibleFields=this._options.visibleFields.toString().split(/[, ]+/g)),this._thead=this._rootElement.tHead||this._rootElement.createTHead(),this._headers=a.select("th",this._thead),this._handlers={thClick:null},this._originalFields=[],this._sortableFields={},this._originalData=this._data=[],this._pagination=null,this._totalRows=0,this._handlers.thClick=n.observeDelegated(this._rootElement,"click",'thead th[data-sortable="true"]',Ink.bindMethod(this,"_onThClick")),this._init()};return m.prototype={_init:function(){this._markupMode?(this._resetSortOrder(),this._addHeadersClasses(),this._data=a.select("tbody tr",this._rootElement),this._originalData=this._data.slice(0),this._totalRows=this._data.length,this._setPagination()):this._getData()},_addHeadersClasses:function(){for(var t,e,i=0,s=this._headers.length;s>i;i++)t=r.textContent(this._headers[i]),e=this._options.tdClassNames[t],e&&o.addClassName(this._headers[i],e)},_onThClick:function(t){var e=n.element(t),i=void 0!==this._options.pageSize;n.stop(t);var o=l.keyValue(e,this._headers,!0),r=o!==!1&&void 0!==this._sortableFields[o];if(r)if(!this._markupMode&&i)this._invertSortOrder(o,!1);else{"desc"===this._sortableFields[o]&&this._options.allowResetSorting?(this._setSortOrderOfColumn(o,null),this._data=this._originalData.slice(0)):this._invertSortOrder(o,!0);var h=a.select("tbody",this._rootElement)[0];s.cleanChildren(h),l.each(this._data,Ink.bindMethod(h,"appendChild")),this._pagination&&(this._pagination.setCurrent(0),this._paginate(1))}},_invertSortOrder:function(t,e){for(var i="asc"===this._sortableFields[t],s=0,n=this._headers.length;n>s;s++)this._setSortOrderOfColumn(s,null);e&&(this._sort(t),i&&this._data.reverse()),this._setSortOrderOfColumn(t,!i)},_setSortOrderOfColumn:function(t,e){var i=this._headers[t],s=[""],n="none";e===!0?(s=[''],n="asc"):e===!1&&(s=[''],n="desc"),this._sortableFields[t]=n,i.innerHTML=r.textContent(i)+s.join("")},_paginate:function(t){if(this._pagination){var e=this._options.pageSize,i=(t-1)*e,s=i+e;l.each(this._data,function(t,e){e>=i&&s>e?o.removeClassName(t,"hide-all"):o.addClassName(t,"hide-all")})}},_registerFieldNames:function(t){this._originalFields=[],l.forEach(t,Ink.bind(function(t){this._fieldIsVisible(t)&&this._originalFields.push(t)},this))},_fieldIsVisible:function(t){return!this._options.visibleFields||-1!==this._options.visibleFields.indexOf(t)},_sort:function(t){function e(e){return s.call(n,{columnIndex:t,columnName:i,data:r.textContent(e),element:e})}var i=r.textContent(this._headers[t]),s=this._options.getSortKey;s&&(s="function"==typeof s[i]?s[i]:"function"==typeof s?s:null);var n=this;this._data.sort(function(i,n){var o=Ink.ss("td",i)[t],r=Ink.ss("td",n)[t];return s?c(e(o),e(r)):p(o,r,t)})},_createHeadersFromJson:function(t){if(this._registerFieldNames(u(t)),!this._thead.children.length)for(var e,i=this._thead.insertRow(0),s=0,n=t.length;n>s;s++)this._fieldIsVisible(t[s])&&(e=r.create("th"),e=this._createSingleHeaderFromJson(t[s],e),i.appendChild(e),this._headers.push(e))},_createSingleHeaderFromJson:function(t,e){return t.sortable&&e.setAttribute("data-sortable","true"),t.label&&r.setTextContent(e,t.label),e},_resetSortOrder:function(){for(var t=0,e=this._headers.length;e>t;t++){var i=r.data(this._headers[t]);i.sortable&&"true"===i.sortable.toString()&&(this._sortableFields[t]="none")}},_createRowsFromJSON:function(t){var e=a.select("tbody",this._rootElement)[0];e?r.setHTML(e,""):(e=document.createElement("tbody"),this._rootElement.appendChild(e)),this._data=[];var i;for(var s in t)t.hasOwnProperty(s)&&(i=this._options.processJSONRow(t[s]),this._createSingleRowFromJson(e,i,s));this._originalData=this._data.slice(0)},_createSingleRowFromJson:function(t,e,i){var s=document.createElement("tr");t.appendChild(s);for(var n in e)e.hasOwnProperty(n)&&this._createFieldFromJson(s,e[n],n,i);this._data.push(s)},_createFieldFromJson:function(t,e,i,s){if(this._fieldIsVisible(i)){var n,r=this._options.processJSONField[i]||this._options.processJSONField;n="function"==typeof r?r(e,i,s):e;var a=this._elOrFieldData(n),l=this._options.tdClassNames[i];l&&o.addClassName(a,l),t.appendChild(a)}},_elOrFieldData:function(t){if(s.isDOMElement(t))return t;var e="string"==typeof t,i="number"==typeof t,n=r.create("td");if(e&&/^\s*? + * + * By applying this UI class to the above input, you get a tag field with the tags "initial" and "value". The class preserves the original input element. It remains hidden and is updated with new tag information dynamically, so regular HTML form logic still applies. + * + * Below "input" refers to the current value of the input tag (updated as the user enters text, of course), and "output" refers to the value which this class writes back to said input tag. + * + * @class Ink.UI.TagField + * @version 1 + * @constructor + * @param {String|DOMElement} element Selector or DOM Input Element. + * @param {Object} [options] Options object + * @param {String|Array} [options.tags] Initial tags in the input + * @param {Boolean} [options.allowRepeated] Flag to allow user to input several tags. Defaults to true. + * @param {RegExp} [options.separator] Split the input by this RegExp. Defaults to /[,;(space)]+/g (spaces, commas and semicolons) + * @param {String} [options.outSeparator] Use this string to separate each tag from the next in the output. Defaults to ','. + * @param {Boolean} [options.autoSplit] Flag to activate tag creation when the user types a separator. Defaults to true. + * @param {Integer} [options.maxTags] Maximum number of tags allowed. Set to -1 for no limit. Defaults to -1. + * @example + */ + function TagField(element, options) { + this.init(element, options); + } + + TagField.prototype = { + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + init: function(element, options) { + element = this._element = Common.elOrSelector(element, 'Ink.UI.TagField'); + var o = this._options = Common.options('Ink.UI.TagField', { + tags: ['String', []], + tagQuery: ['Object', null], + tagQueryAsync: ['Object', null], + allowRepeated: ['Boolean', false], + maxTags: ['Integer', -1], + outSeparator: ['String', ','], + separator: ['String', /[,; ]+/g], + autoSplit: ['Boolean', true] + }, options || {}, this._element); + + if (typeof o.separator === 'string') { + o.separator = new RegExp(o.separator, 'g'); + } + + if (typeof o.tags === 'string') { + // coerce to array using the separator + o.tags = this._readInput(o.tags); + } + + Css.addClassName(this._element, 'hide-all'); + + this._viewElm = InkElement.create('div', { + className: 'ink-tagfield', + insertAfter: this._element + }); + + this._input = InkElement.create('input', { + type: 'text', + className: 'new-tag-input', + insertBottom: this._viewElm + }); + + var tags = [].concat(o.tags, this._tagsFromMarkup(this._element)); + + this._tags = []; + + InkArray.each(tags, Ink.bindMethod(this, '_addTag')); + + InkEvent.observe(this._input, 'keyup', Ink.bindEvent(this._onKeyUp, this)); + InkEvent.observe(this._input, 'change', Ink.bindEvent(this._onKeyUp, this)); + InkEvent.observe(this._input, 'keydown', Ink.bindEvent(this._onKeyDown, this)); + InkEvent.observe(this._input, 'blur', Ink.bindEvent(this._onBlur, this)); + InkEvent.observe(this._viewElm, 'click', Ink.bindEvent(this._refocus, this)); + }, + + destroy: function () { + InkElement.remove(this._viewElm); + Css.removeClassName(this._element, 'hide-all'); + }, + + _tagsFromMarkup: function (element) { + var tagname = element.tagName.toLowerCase(); + if (tagname === 'input') { + return this._readInput(element.value); + } else if (tagname === 'select') { + return InkArray.map(element.getElementsByTagName('option'), function (option) { + return InkElement.textContent(option); + }); + } else { + throw new Error('Cannot read tags from a ' + tagname + ' tag. Unknown tag'); + } + }, + + _tagsToMarkup: function (tags, element) { + var tagname = element.tagName.toLowerCase(); + if (tagname === 'input') { + if (this._options.separator) { + element.value = tags.join(this._options.outSeparator); + } + } else if (tagname === 'select') { + element.innerHTML = ''; + InkArray.each(tags, function (tag) { + var opt = InkElement.create('option', {selected: 'selected'}); + InkElement.setTextContent(opt, tag); + element.appendChild(opt); + }); + } else { + throw new Error('TagField: Cannot read tags from a ' + tagname + ' tag. Unknown tag'); + } + }, + + _addTag: function (tag) { + if (this._options.maxTags !== -1 && + this._tags.length >= this._options.maxTags) { + return; + } + if ((!this._options.allowRepeated && + InkArray.inArray(tag, this._tags, tag)) || !tag) { + return false; + } + var elm = InkElement.create('span', { + className: 'ink-tag', + setTextContent: tag + ' ' + }); + + var remove = InkElement.create('span', { + className: 'remove fa fa-times', + insertBottom: elm + }); + InkEvent.observe(remove, 'click', Ink.bindEvent(this._removeTag, this, null)); + + var spc = document.createTextNode(' '); + + this._tags.push(tag); + this._viewElm.insertBefore(elm, this._input); + this._viewElm.insertBefore(spc, this._input); + this._tagsToMarkup(this._tags, this._element); + }, + + _readInput: function (text) { + if (this._options.separator) { + return InkArray.filter(text.split(this._options.separator), isTruthy); + } else { + return [text]; + } + }, + + _onKeyUp: function () { // TODO control input box size + if (!this._options.autoSplit) { + return; + } + var split = this._input.value.split(this._options.separator); + if (split.length <= 1) { + return; + } + var last = split[split.length - 1]; + split = split.splice(0, split.length - 1); + split = InkArray.filter(split, isTruthy); + + InkArray.each(split, Ink.bind(this._addTag, this)); + this._input.value = last; + }, + + _onKeyDown: function (event) { + if (event.which === enterKey) { + return this._onEnterKeyDown(event); + } else if (event.which === backspaceKey) { + return this._onBackspaceKeyDown(); + } else if (this._removeConfirm) { + // user pressed another key, cancel removal from a backspace key + this._unsetRemovingVisual(this._tags.length - 1); + } + }, + + /** + * When the user presses backspace twice on the empty input, we delete the last tag on the field. + * @method onBackspaceKeyDown + * @private + */ + _onBackspaceKeyDown: function () { + if (this._input.value) { return; } + + if (this._removeConfirm) { + this._unsetRemovingVisual(this._tags.length - 1); + this._removeTag(this._tags.length - 1); + this._removeConfirm = null; + } else { + this._setRemovingVisual(this._tags.length - 1); + } + }, + + _onEnterKeyDown: function (event) { + var tag = this._input.value; + if (tag) { + this._addTag(tag); + this._input.value = ''; + } + InkEvent.stopDefault(event); + }, + + _onBlur: function () { + this._addTag(this._input.value); + this._input.value = ''; + }, + + /* For when the user presses backspace. + * Set the style of the tag so that it seems like it's going to be removed + * if they press backspace again. */ + _setRemovingVisual: function (tagIndex) { + var elm = this._viewElm.children[tagIndex]; + Css.addClassName(elm, 'tag-deleting'); + + this._removeRemovingVisualTimeout = setTimeout(Ink.bindMethod(this, '_unsetRemovingVisual', tagIndex), 4000); + InkEvent.observe(this._input, 'blur', Ink.bindMethod(this, '_unsetRemovingVisual', tagIndex)); + this._removeConfirm = true; + }, + _unsetRemovingVisual: function (tagIndex) { + var elm = this._viewElm.children[tagIndex]; + if (elm) { + Css.removeClassName(elm, 'tag-deleting'); + clearTimeout(this._removeRemovingVisualTimeout); + } + this._removeConfirm = null; + }, + + _removeTag: function (event) { + var index; + if (typeof event === 'object') { // click event on close button + var elm = InkEvent.element(event).parentNode; + index = InkElement.parentIndexOf(this._viewElm, elm); + } else if (typeof event === 'number') { // manual removal + index = event; + } + this._tags = InkArray.remove(this._tags, index, 1); + InkElement.remove(this._viewElm.children[index]); + this._tagsToMarkup(this._tags, this._element); + }, + + _refocus: function (event) { + this._input.focus(); + InkEvent.stop(event); + return false; + } + }; + return TagField; +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.tagfield.min.js b/ajax/libs/ink/3.0.0/js/ink.tagfield.min.js new file mode 100644 index 000000000..5a01a69a2 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.tagfield.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.TagField","1",["Ink.Dom.Element_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Browser_1","Ink.UI.Droppable_1","Ink.Util.Array_1","Ink.Dom.Selector_1","Ink.UI.Common_1"],function(t,e,i,n,s,a,o,r){"use strict";function h(t,e){this.init(t,e)}var l=13,u=8,_=function(t){return!!t};return h.prototype={init:function(n,s){n=this._element=r.elOrSelector(n,"Ink.UI.TagField");var o=this._options=r.options("Ink.UI.TagField",{tags:["String",[]],tagQuery:["Object",null],tagQueryAsync:["Object",null],allowRepeated:["Boolean",!1],maxTags:["Integer",-1],outSeparator:["String",","],separator:["String",/[,; ]+/g],autoSplit:["Boolean",!0]},s||{},this._element);"string"==typeof o.separator&&(o.separator=new RegExp(o.separator,"g")),"string"==typeof o.tags&&(o.tags=this._readInput(o.tags)),i.addClassName(this._element,"hide-all"),this._viewElm=t.create("div",{className:"ink-tagfield",insertAfter:this._element}),this._input=t.create("input",{type:"text",className:"new-tag-input",insertBottom:this._viewElm});var h=[].concat(o.tags,this._tagsFromMarkup(this._element));this._tags=[],a.each(h,Ink.bindMethod(this,"_addTag")),e.observe(this._input,"keyup",Ink.bindEvent(this._onKeyUp,this)),e.observe(this._input,"change",Ink.bindEvent(this._onKeyUp,this)),e.observe(this._input,"keydown",Ink.bindEvent(this._onKeyDown,this)),e.observe(this._input,"blur",Ink.bindEvent(this._onBlur,this)),e.observe(this._viewElm,"click",Ink.bindEvent(this._refocus,this))},destroy:function(){t.remove(this._viewElm),i.removeClassName(this._element,"hide-all")},_tagsFromMarkup:function(e){var i=e.tagName.toLowerCase();if("input"===i)return this._readInput(e.value);if("select"===i)return a.map(e.getElementsByTagName("option"),function(e){return t.textContent(e)});throw new Error("Cannot read tags from a "+i+" tag. Unknown tag")},_tagsToMarkup:function(e,i){var n=i.tagName.toLowerCase();if("input"===n)this._options.separator&&(i.value=e.join(this._options.outSeparator));else{if("select"!==n)throw new Error("TagField: Cannot read tags from a "+n+" tag. Unknown tag");i.innerHTML="",a.each(e,function(e){var n=t.create("option",{selected:"selected"});t.setTextContent(n,e),i.appendChild(n)})}},_addTag:function(i){if(!(-1!==this._options.maxTags&&this._tags.length>=this._options.maxTags)){if(!this._options.allowRepeated&&a.inArray(i,this._tags,i)||!i)return!1;var n=t.create("span",{className:"ink-tag",setTextContent:i+" "}),s=t.create("span",{className:"remove fa fa-times",insertBottom:n});e.observe(s,"click",Ink.bindEvent(this._removeTag,this,null));var o=document.createTextNode(" ");this._tags.push(i),this._viewElm.insertBefore(n,this._input),this._viewElm.insertBefore(o,this._input),this._tagsToMarkup(this._tags,this._element)}},_readInput:function(t){return this._options.separator?a.filter(t.split(this._options.separator),_):[t]},_onKeyUp:function(){if(this._options.autoSplit){var t=this._input.value.split(this._options.separator);if(!(t.length<=1)){var e=t[t.length-1];t=t.splice(0,t.length-1),t=a.filter(t,_),a.each(t,Ink.bind(this._addTag,this)),this._input.value=e}}},_onKeyDown:function(t){return t.which===l?this._onEnterKeyDown(t):t.which===u?this._onBackspaceKeyDown():void(this._removeConfirm&&this._unsetRemovingVisual(this._tags.length-1))},_onBackspaceKeyDown:function(){this._input.value||(this._removeConfirm?(this._unsetRemovingVisual(this._tags.length-1),this._removeTag(this._tags.length-1),this._removeConfirm=null):this._setRemovingVisual(this._tags.length-1))},_onEnterKeyDown:function(t){var i=this._input.value;i&&(this._addTag(i),this._input.value=""),e.stopDefault(t)},_onBlur:function(){this._addTag(this._input.value),this._input.value=""},_setRemovingVisual:function(t){var n=this._viewElm.children[t];i.addClassName(n,"tag-deleting"),this._removeRemovingVisualTimeout=setTimeout(Ink.bindMethod(this,"_unsetRemovingVisual",t),4e3),e.observe(this._input,"blur",Ink.bindMethod(this,"_unsetRemovingVisual",t)),this._removeConfirm=!0},_unsetRemovingVisual:function(t){var e=this._viewElm.children[t];e&&(i.removeClassName(e,"tag-deleting"),clearTimeout(this._removeRemovingVisualTimeout)),this._removeConfirm=null},_removeTag:function(i){var n;if("object"==typeof i){var s=e.element(i).parentNode;n=t.parentIndexOf(this._viewElm,s)}else"number"==typeof i&&(n=i);this._tags=a.remove(this._tags,n,1),t.remove(this._viewElm.children[n]),this._tagsToMarkup(this._tags,this._element)},_refocus:function(t){return this._input.focus(),e.stop(t),!1}},h}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.toggle.js b/ajax/libs/ink/3.0.0/js/ink.toggle.js new file mode 100644 index 000000000..280efc951 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.toggle.js @@ -0,0 +1,256 @@ +/** + * @module Ink.UI.Toggle_1 + * Toggle the visibility of elements. + * @version 1 + */ + + Ink.createModule('Ink.UI.Toggle', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1'], function(Common, InkEvent, Css, InkElement, Selector, InkArray ) { + 'use strict'; + + /** + * + * You need two elements to use Toggle: the `trigger` element, and the `target` element (or elements). The default behaviour is to toggle the `target`(s) when you click the `trigger`. + * + * The toggle has a state. It is either "on" or "off". It works by switching between the CSS classes in `classNameOn` and `classNameOff` according to the current state. + * + * When you initialize the Toggle, it will check if the targets are visible to figure out what the initial state is. You can force the toggle to consider itself turned "on" or "off" by setting the `initialState` option to `true` or `false`, respectively. + * + * You can get the current state of the Toggle by calling `getState`, or by checking if your `trigger` element has the "active" class. + * The state can be changed through JavaScript. Just call `setState(true)` + * to turn the Toggle on (or `setState(false)` to turn it off). + * + * @class Ink.UI.Toggle + * @constructor + * @version 1 + * @param {String|DOMElement} selector Trigger element. By clicking this, the target (or targets) are triggered. + * @param {Object} [options] Options object, containing: + * + * @param {String} options.target CSS Selector that specifies the elements that this component will toggle + * @param {String} [options.classNameOn] CSS class to toggle when on. Defaults to 'show-all'. + * @param {String} [options.classNameOff] CSS class to toggle when off. Defaults to 'hide-all'. + * @param {String} [options.triggerEvent] Event that will trigger the toggling. Defaults to 'click'. + * @param {Boolean} [options.closeOnClick] Flag to toggle the targe off when clicking outside the toggled content. Defaults to true. + * @param {String} [options.closeOnInsideClick] Toggle off when an element matching this selector is clicked. Set to null to deactivate the check. Defaults to 'a[href]'. + * @param {Boolean} [options.initialState] Flag to define initial state. false: off, true: on, null: markup. Defaults to null. + * @param {Function} [options.onChangeState] Callback when the toggle state changes. Return `false` to cancel the event. + * + * @sample Ink_UI_Toggle_1_constructor.html + */ + var Toggle = function( selector, options ){ + this._rootElement = Common.elOrSelector(selector, '[Ink.UI.Toggle root element]:'); + + this._options = Ink.extendObj({ + target : undefined, + triggerEvent: 'click', + closeOnClick: true, + isAccordion: false, + initialState: null, + classNameOn: 'show-all', + classNameOff: 'hide-all', + togglesDisplay: null, + closeOnInsideClick: 'a[href]', // closes the toggle when a target is clicked and it is a link + onChangeState: null + }, options || {}, InkElement.data(this._rootElement)); + + this._targets = Common.elsOrSelector(this._options.target, 'Ink.UI.Toggle target option'); + + // Boolean option handling + this._options.closeOnClick = this._options.closeOnClick.toString() === 'true'; + // Actually a throolean + if (this._options.initialState !== null){ + this._options.initialState = this._options.initialState.toString() === 'true'; + } else { + this._options.initialState = Css.getStyle(this._targets[0], 'display') !== 'none'; + } + + if (this._options.classNameOn !== 'show-all' || this._options.classNameOff !== 'hide-all') { + for (var i = 0, len = this._targets.length; i < len; i++) { + Css.removeClassName(this._targets[i], 'show-all'); + Css.removeClassName(this._targets[i], 'hide-all'); + } + } + + this._init(); + }; + + Toggle.prototype = { + + /** + * Init function called by the constructor + * + * @method _init + * @private + */ + _init: function(){ + this._accordion = ( Css.hasClassName(this._rootElement.parentNode,'accordion') || Css.hasClassName(this._targets[0].parentNode,'accordion') ); + + this._firstTime = true; + + this._bindEvents(); + + if (this._options.initialState !== null) { + this.setState(this._options.initialState, true); + } else { + // Add initial classes matching the current "display" of the object. + var state = Css.getStyle(this._targets[0], 'display') !== 'none'; + this.setState(state, true); + } + // Aditionally, remove any inline "display" style. + for (var i = 0, len = this._targets.length; i < len; i++) { + if (this._targets[i].style.display) { + this._targets[i].style.display = ''; // becomes default + } + } + + this._rootElement.setAttribute('data-is-toggle-trigger', 'true'); + }, + + /** + * @method _bindEvents + * @private + */ + _bindEvents: function () { + if ( this._options.triggerEvent ) { + InkEvent.observe( + this._rootElement, + this._options.triggerEvent, + Ink.bind(this._onTriggerEvent, this)); + } + if( this._options.closeOnClick ){ + InkEvent.observe( document, 'click', Ink.bind(this._onOutsideClick, this)); + } + if( this._options.closeOnInsideClick && this._options.closeOnInsideClick !== 'false') { + var sel = this._options.closeOnInsideClick; + if (sel.toString() === 'true') { + sel = '*'; + } + InkEvent.observeMulti(this._targets, 'click', Ink.bind(function (e) { + if ( InkElement.findUpwardsBySelector(InkEvent.element(e), sel) ) { + this.setState(false, true); + } + }, this)); + } + }, + + /** + * Event handler. It's responsible for handling the `triggerEvent` as defined in the options. + * + * This will trigger the toggle. + * + * @method _onTriggerEvent + * @param {Event} event + * @private + */ + _onTriggerEvent: function( event ){ + // When the togglee is a child of the toggler, we get the togglee's events here. We have to check that this event is for us. + var target = InkEvent.element(event); + + var isAncestorOfClickedElement = InkArray.some(this._targets, function (thisOne) { + return thisOne === target || InkElement.isAncestorOf(thisOne, target); + }); + + if (isAncestorOfClickedElement) { + return; + } + + if (this._accordion) { + this._updateAccordion(); + } + + var has = this.getState(); + this.setState(!has, true); + if (!has && this._firstTime) { + this._firstTime = false; + } + + InkEvent.stopDefault(event); + }, + + /** + * Be compatible with accordions + * + * @method _updateAccordion + **/ + _updateAccordion: function () { + var elms, accordionElement; + if( Css.hasClassName(this._targets[0].parentNode,'accordion') ){ + accordionElement = this._targets[0].parentNode; + } else { + accordionElement = this._targets[0].parentNode.parentNode; + } + elms = Selector.select('.toggle, .ink-toggle',accordionElement); + for(var i=0; i 0) && (targetElm[0] !== this._targets[0]) ){ + targetElm[0].style.display = 'none'; + } + } + }, + + /** + * Click handler. Will handle clicks outside the toggle component. + * + * @method _onOutsideClick + * @param {Event} event + * @private + */ + _onOutsideClick: function( event ){ + var tgtEl = InkEvent.element(event), + shades; + + if (InkElement.findUpwardsBySelector(tgtEl, '[data-is-toggle-trigger="true"]')) return; + + var ancestorOfTargets = InkArray.some(this._targets, function (target) { + return InkElement.isAncestorOf(target, tgtEl) || target === tgtEl; + }); + + if( (this._rootElement === tgtEl) || InkElement.isAncestorOf(this._rootElement, tgtEl) || ancestorOfTargets) { + return; + } else if( (shades = Ink.ss('.ink-shade')).length ) { + var shadesLength = shades.length; + + for( var i = 0; i < shadesLength; i++ ){ + if( InkElement.isAncestorOf(shades[i],tgtEl) && InkElement.isAncestorOf(shades[i],this._rootElement) ){ + return; + } + } + } + + this.setState(false, true); // dismiss + }, + + /** + * Sets the state of the toggle. (on/off) + * + * @method setState + * @param newState {Boolean} New state (on/off) + */ + setState: function (on, callHandler) { + if (on === this.getState()) { return; } + if (callHandler && typeof this._options.onChangeState === 'function') { + var ret = this._options.onChangeState(on); + if (ret === false) { return false; } // Canceled by the event handler + } + for (var i = 0, len = this._targets.length; i < len; i++) { + Css.addRemoveClassName(this._targets[i], this._options.classNameOn, on); + Css.addRemoveClassName(this._targets[i], this._options.classNameOff, !on); + } + Css.addRemoveClassName(this._rootElement, 'active', on); + }, + + /** + * Gets the state of the toggle. (on/off) + * + * @method getState + * + * @return {Boolean} whether the toggle is toggled on. + */ + getState: function () { + return Css.hasClassName(this._rootElement, 'active'); + } + }; + + return Toggle; +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.toggle.min.js b/ajax/libs/ink/3.0.0/js/ink.toggle.min.js new file mode 100644 index 000000000..a0b34d2f9 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.toggle.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Toggle","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1"],function(t,e,s,i,n,o){"use strict";var a=function(e,n){if(this._rootElement=t.elOrSelector(e,"[Ink.UI.Toggle root element]:"),this._options=Ink.extendObj({target:void 0,triggerEvent:"click",closeOnClick:!0,isAccordion:!1,initialState:null,classNameOn:"show-all",classNameOff:"hide-all",togglesDisplay:null,closeOnInsideClick:"a[href]",onChangeState:null},n||{},i.data(this._rootElement)),this._targets=t.elsOrSelector(this._options.target,"Ink.UI.Toggle target option"),this._options.closeOnClick="true"===this._options.closeOnClick.toString(),this._options.initialState=null!==this._options.initialState?"true"===this._options.initialState.toString():"none"!==s.getStyle(this._targets[0],"display"),"show-all"!==this._options.classNameOn||"hide-all"!==this._options.classNameOff)for(var o=0,a=this._targets.length;a>o;o++)s.removeClassName(this._targets[o],"show-all"),s.removeClassName(this._targets[o],"hide-all");this._init()};return a.prototype={_init:function(){if(this._accordion=s.hasClassName(this._rootElement.parentNode,"accordion")||s.hasClassName(this._targets[0].parentNode,"accordion"),this._firstTime=!0,this._bindEvents(),null!==this._options.initialState)this.setState(this._options.initialState,!0);else{var t="none"!==s.getStyle(this._targets[0],"display");this.setState(t,!0)}for(var e=0,i=this._targets.length;i>e;e++)this._targets[e].style.display&&(this._targets[e].style.display="");this._rootElement.setAttribute("data-is-toggle-trigger","true")},_bindEvents:function(){if(this._options.triggerEvent&&e.observe(this._rootElement,this._options.triggerEvent,Ink.bind(this._onTriggerEvent,this)),this._options.closeOnClick&&e.observe(document,"click",Ink.bind(this._onOutsideClick,this)),this._options.closeOnInsideClick&&"false"!==this._options.closeOnInsideClick){var t=this._options.closeOnInsideClick;"true"===t.toString()&&(t="*"),e.observeMulti(this._targets,"click",Ink.bind(function(s){i.findUpwardsBySelector(e.element(s),t)&&this.setState(!1,!0)},this))}},_onTriggerEvent:function(t){var s=e.element(t),n=o.some(this._targets,function(t){return t===s||i.isAncestorOf(t,s)});if(!n){this._accordion&&this._updateAccordion();var a=this.getState();this.setState(!a,!0),!a&&this._firstTime&&(this._firstTime=!1),e.stopDefault(t)}},_updateAccordion:function(){var t,e;e=s.hasClassName(this._targets[0].parentNode,"accordion")?this._targets[0].parentNode:this._targets[0].parentNode.parentNode,t=n.select(".toggle, .ink-toggle",e);for(var o=0;o0&&r[0]!==this._targets[0]&&(r[0].style.display="none")}},_onOutsideClick:function(t){var s,n=e.element(t);if(!i.findUpwardsBySelector(n,'[data-is-toggle-trigger="true"]')){var a=o.some(this._targets,function(t){return i.isAncestorOf(t,n)||t===n});if(this._rootElement!==n&&!i.isAncestorOf(this._rootElement,n)&&!a){if((s=Ink.ss(".ink-shade")).length)for(var r=s.length,l=0;r>l;l++)if(i.isAncestorOf(s[l],n)&&i.isAncestorOf(s[l],this._rootElement))return;this.setState(!1,!0)}}},setState:function(t,e){if(t!==this.getState()){if(e&&"function"==typeof this._options.onChangeState){var i=this._options.onChangeState(t);if(i===!1)return!1}for(var n=0,o=this._targets.length;o>n;n++)s.addRemoveClassName(this._targets[n],this._options.classNameOn,t),s.addRemoveClassName(this._targets[n],this._options.classNameOff,!t);s.addRemoveClassName(this._rootElement,"active",t)}},getState:function(){return s.hasClassName(this._rootElement,"active")}},a}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.tooltip.js b/ajax/libs/ink/3.0.0/js/ink.tooltip.js new file mode 100644 index 000000000..2d0a44294 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.tooltip.js @@ -0,0 +1,455 @@ +/** + * @module Ink.UI.Tooltip_1 + * Content Tooltips + * @version 1 + */ +Ink.createModule('Ink.UI.Tooltip', '1', ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Element_1', 'Ink.Dom.Selector_1', 'Ink.Util.Array_1', 'Ink.Dom.Css_1', 'Ink.Dom.Browser_1'], function (Common, InkEvent, InkElement, Selector, InkArray, Css) { + 'use strict'; + + /** + * Tooltips are useful as a means to display information about functionality while avoiding clutter. + * + * Tooltips show up when you hover elements which "have" tooltips. + * + * This class will "give" a tooltip to many elements, selected by its first argument (`target`). This is contrary to the other UI modules in Ink, which are created once per element. + * + * You can define options either through the second argument of the Tooltip constructor, or as data-attributes in each `target` element. Options set through data-attributes all start with "data-tip", and override options passed into the Tooltip constructor. + * + * @class Ink.UI.Tooltip + * @constructor + * + * @param {DOMElement|String} target Target element or selector of elements, to display the tooltips on. + * @param {Object} [options] Options object + * @param {String} [options.text] Text content for the tooltip. + * @param {String} [options.html] HTML for the tooltip. Same as above, but won't escape HTML. + * @param {String} [options.where] Positioning for the tooltip. Options are 'up', 'down', 'left', 'right', 'mousemove' (follows the cursor), and 'mousefix' (stays fixed). Defaults to 'up'. + * + * @param {String} [options.color] Color of the tooltip. Options are red, orange, blue, green and black. Default is white. + * @param {Number} [options.fade] Number of seconds to fade in/out. Defaults to 0.3. + * @param {Boolean} [options.forever] Flag to prevent the tooltip from being erased when the mouse hovers away from the target. + * @param {Number} [options.timeout] Number of seconds the tooltip will stay open. Useful together with options.forever. Defaults to 0. + * @param {Number} [options.delay] Time the tooltip waits until it is displayed. Useful to avoid getting the attention of the user unnecessarily + * @param {DOMElement|Selector} [options.template] Element or selector containing HTML to be cloned into the tooltips. Can be a hidden element, because CSS `display` is set to `block`. + * @param {String} [options.templatefield] Selector within the template element to choose where the text is inserted into the tooltip. Useful when a wrapper DIV is required. + * @param {Number} [options.left] Spacing from the target to the tooltip, when `where` is `mousemove` or `mousefix`. Defaults to 10. + * @param {Number} [options.top] Spacing from the target to the tooltip, when `where` is `mousemove` or `mousefix`. Defaults to 10. + * @param {Number} [options.spacing] Spacing between the tooltip and the target element, when `where` is not `mousemove` or `mousefix`. Defaults to 8. + * + * @sample Ink_UI_Tooltip_1.html + */ + function Tooltip(element, options) { + this._init(element, options || {}); + } + + function EachTooltip(root, elm) { + this._init(root, elm); + } + + var transitionDurationName, + transitionPropertyName, + transitionTimingFunctionName; + (function () { // Feature detection + var test = document.createElement('DIV'); + var names = ['transition', 'oTransition', 'msTransition', 'mozTransition', + 'webkitTransition']; + for (var i = 0; i < names.length; i++) { + if (typeof test.style[names[i] + 'Duration'] !== 'undefined') { + transitionDurationName = names[i] + 'Duration'; + transitionPropertyName = names[i] + 'Property'; + transitionTimingFunctionName = names[i] + 'TimingFunction'; + break; + } + } + }()); + + // Body or documentElement + var bodies = document.getElementsByTagName('body'); + var body = bodies.length ? bodies[0] : document.documentElement; + + Tooltip.prototype = { + _init: function(element, options) { + var elements; + + this.options = Ink.extendObj({ + where: 'up', + zIndex: 10000, + left: 10, + top: 10, + spacing: 8, + forever: 0, + color: '', + timeout: 0, + delay: 0, + template: null, + templatefield: null, + fade: 0.3, + text: '' + }, options || {}); + + if (typeof element === 'string') { + elements = Selector.select(element); + } else if (typeof element === 'object') { + elements = [element]; + } else { + throw 'Element expected'; + } + + this.tooltips = []; + + for (var i = 0, len = elements.length; i < len; i++) { + this.tooltips[i] = new EachTooltip(this, elements[i]); + } + }, + /** + * Destroys the tooltips created by this instance + * + * @method destroy + */ + destroy: function () { + InkArray.each(this.tooltips, function (tooltip) { + tooltip._destroy(); + }); + this.tooltips = null; + this.options = null; + } + }; + + EachTooltip.prototype = { + _oppositeDirections: { + left: 'right', + right: 'left', + up: 'down', + down: 'up' + }, + _init: function(root, elm) { + InkEvent.observe(elm, 'mouseover', Ink.bindEvent(this._onMouseOver, this)); + InkEvent.observe(elm, 'mouseout', Ink.bindEvent(this._onMouseOut, this)); + InkEvent.observe(elm, 'mousemove', Ink.bindEvent(this._onMouseMove, this)); + + this.root = root; + this.element = elm; + this._delayTimeout = null; + this.tooltip = null; + }, + _makeTooltip: function (mousePosition) { + if (!this._getOpt('text') && + !this._getOpt('html') && + !InkElement.hasAttribute(this.element, 'title')) { + return false; + } + + var tooltip = this._createTooltipElement(); + + if (this.tooltip) { + this._removeTooltip(); + } + + this.tooltip = tooltip; + + this._fadeInTooltipElement(tooltip); + this._placeTooltipElement(tooltip, mousePosition); + + InkEvent.observe(tooltip, 'mouseover', Ink.bindEvent(this._onTooltipMouseOver, this)); + + var timeout = this._getFloatOpt('timeout'); + if (timeout) { + setTimeout(Ink.bind(function () { + if (this.tooltip === tooltip) { + this._removeTooltip(); + } + }, this), timeout * 1000); + } + }, + _createTooltipElement: function () { + var template = this._getOpt('template'), // User template instead of our HTML + templatefield = this._getOpt('templatefield'), + + tooltip, // The element we float + field; // Element where we write our message. Child or same as the above + + if (template) { // The user told us of a template to use. We copy it. + var temp = document.createElement('DIV'); + temp.innerHTML = Common.elOrSelector(template, 'options.template').outerHTML; + tooltip = temp.firstChild; + + if (templatefield) { + field = Selector.select(templatefield, tooltip); + if (field) { + field = field[0]; + } else { + throw 'options.templatefield must be a valid selector within options.template'; + } + } else { + field = tooltip; // Assume same element if user did not specify a field + } + } else { // We create the default structure + tooltip = document.createElement('DIV'); + Css.addClassName(tooltip, 'ink-tooltip'); + Css.addClassName(tooltip, this._getOpt('color')); + + field = document.createElement('DIV'); + Css.addClassName(field, 'content'); + + tooltip.appendChild(field); + } + + if (this._getOpt('html')) { + field.innerHTML = this._getOpt('html'); + } else if (this._getOpt('text')) { + InkElement.setTextContent(field, this._getOpt('text')); + } else { + InkElement.setTextContent(field, this.element.getAttribute('title')); + } + tooltip.style.display = 'block'; + tooltip.style.position = 'absolute'; + tooltip.style.zIndex = this._getIntOpt('zIndex'); + + return tooltip; + }, + _fadeInTooltipElement: function (tooltip) { + var fadeTime = this._getFloatOpt('fade'); + if (transitionDurationName && fadeTime) { + tooltip.style.opacity = '0'; + tooltip.style[transitionDurationName] = fadeTime + 's'; + tooltip.style[transitionPropertyName] = 'opacity'; + tooltip.style[transitionTimingFunctionName] = 'ease-in-out'; + setTimeout(function () { + tooltip.style.opacity = '1'; + }, 0); // Wait a tick + } + }, + _placeTooltipElement: function (tooltip, mousePosition) { + var where = this._getOpt('where'); + + if (where === 'mousemove' || where === 'mousefix') { + var mPos = mousePosition; + this._setPos(mPos[0], mPos[1]); + body.appendChild(tooltip); + } else if (where.match(/(up|down|left|right)/)) { + body.appendChild(tooltip); + var targetElementPos = InkElement.offset(this.element); + var tleft = targetElementPos[0], + ttop = targetElementPos[1]; + + var centerh = (InkElement.elementWidth(this.element) / 2) - (InkElement.elementWidth(tooltip) / 2), + centerv = (InkElement.elementHeight(this.element) / 2) - (InkElement.elementHeight(tooltip) / 2); + var spacing = this._getIntOpt('spacing'); + + var tooltipDims = InkElement.elementDimensions(tooltip); + var elementDims = InkElement.elementDimensions(this.element); + + var maxX = InkElement.scrollWidth() + InkElement.viewportWidth(); + var maxY = InkElement.scrollHeight() + InkElement.viewportHeight(); + + where = this._getWhereValueInsideViewport(where, { + left: tleft - tooltipDims[0], + right: tleft + tooltipDims[0], + top: ttop + tooltipDims[1], + bottom: ttop + tooltipDims[1] + }, { + right: maxX, + bottom: maxY + }); + + if (where === 'up') { + ttop -= tooltipDims[1]; + ttop -= spacing; + tleft += centerh; + } else if (where === 'down') { + ttop += elementDims[1]; + ttop += spacing; + tleft += centerh; + } else if (where === 'left') { + tleft -= tooltipDims[0]; + tleft -= spacing; + ttop += centerv; + } else if (where === 'right') { + tleft += elementDims[0]; + tleft += spacing; + ttop += centerv; + } + + var arrow = null; + if (where.match(/(up|down|left|right)/)) { + arrow = document.createElement('SPAN'); + Css.addClassName(arrow, 'arrow'); + Css.addClassName(arrow, this._oppositeDirections[where]); + tooltip.appendChild(arrow); + } + + var tooltipLeft = tleft; + var tooltipTop = ttop; + + var toBottom = (tooltipTop + tooltipDims[1]) - maxY; + var toRight = (tooltipLeft + tooltipDims[0]) - maxX; + var toLeft = 0 - tooltipLeft; + var toTop = 0 - tooltipTop; + + if (toBottom > 0) { + if (arrow) { arrow.style.top = (tooltipDims[1] / 2) + toBottom + 'px'; } + tooltipTop -= toBottom; + } else if (toTop > 0) { + if (arrow) { arrow.style.top = (tooltipDims[1] / 2) - toTop + 'px'; } + tooltipTop += toTop; + } else if (toRight > 0) { + if (arrow) { arrow.style.left = (tooltipDims[0] / 2) + toRight + 'px'; } + tooltipLeft -= toRight; + } else if (toLeft > 0) { + if (arrow) { arrow.style.left = (tooltipDims[0] / 2) - toLeft + 'px'; } + tooltipLeft += toLeft; + } + + tooltip.style.left = tooltipLeft + 'px'; + tooltip.style.top = tooltipTop + 'px'; + } + }, + + /** + * Get a value for "where" (left/right/up/down) which doesn't put the + * tooltip off the screen + * + * @method _getWhereValueInsideViewport + * @param where {String} "where" value which was given by the user and we might change + * @param bbox {BoundingBox} A bounding box like what you get from getBoundingClientRect ({top, bottom, left, right}) with pixel positions from the top left corner of the viewport. + * @param viewport {BoundingBox} Bounding box for the viewport. "top" and "left" are omitted because these coordinates are relative to the top-left corner of the viewport so they are zero. + * + * @TODO: we can't use getBoundingClientRect in this case because it returns {0,0,0,0} on our uncreated tooltip. + */ + _getWhereValueInsideViewport: function (where, bbox, viewport) { + if (where === 'left' && bbox.left < 0) { + return 'right'; + } else if (where === 'right' && bbox.right > viewport.right) { + return 'left'; + } else if (where === 'up' && bbox.top < 0) { + return 'down'; + } else if (where === 'down' && bbox.bottom > viewport.bottom) { + return 'up'; + } + + return where; + }, + _removeTooltip: function() { + var tooltip = this.tooltip; + if (!tooltip) {return;} + + var remove = Ink.bind(InkElement.remove, {}, tooltip); + + if (this._getOpt('where') !== 'mousemove' && transitionDurationName) { + tooltip.style.opacity = 0; + // remove() will operate on correct tooltip, although this.tooltip === null then + setTimeout(remove, this._getFloatOpt('fade') * 1000); + } else { + remove(); + } + this.tooltip = null; + }, + _getOpt: function (option) { + var dataAttrVal = InkElement.data(this.element)[InkElement._camelCase('tip-' + option)]; + if (dataAttrVal /* either null or "" may signify the absense of this attribute*/) { + return dataAttrVal; + } + var instanceOption = this.root.options[option]; + if (typeof instanceOption !== 'undefined') { + return instanceOption; + } + }, + _getIntOpt: function (option) { + return parseInt(this._getOpt(option), 10); + }, + _getFloatOpt: function (option) { + return parseFloat(this._getOpt(option), 10); + }, + _destroy: function () { + if (this.tooltip) { + InkElement.remove(this.tooltip); + } + this.root = null; // Cyclic reference = memory leaks + this.element = null; + this.tooltip = null; + }, + _onMouseOver: function(e) { + // on IE < 10 you can't access the mouse event not even a tick after it fired + var mousePosition = this._getMousePosition(e); + var delay = this._getFloatOpt('delay'); + if (delay) { + this._delayTimeout = setTimeout(Ink.bind(function () { + if (!this.tooltip) { + this._makeTooltip(mousePosition); + } + this._delayTimeout = null; + }, this), delay * 1000); + } else { + this._makeTooltip(mousePosition); + } + }, + _onMouseMove: function(e) { + if (this._getOpt('where') === 'mousemove' && this.tooltip) { + var mPos = this._getMousePosition(e); + this._setPos(mPos[0], mPos[1]); + } + }, + _onMouseOut: function () { + if (!this._getIntOpt('forever')) { + this._removeTooltip(); + } + if (this._delayTimeout) { + clearTimeout(this._delayTimeout); + this._delayTimeout = null; + } + }, + _onTooltipMouseOver: function () { + if (this.tooltip) { // If tooltip is already being removed, this has no effect + this._removeTooltip(); + } + }, + _setPos: function(left, top) { + left += this._getIntOpt('left'); + top += this._getIntOpt('top'); + var pageDims = this._getPageXY(); + if (this.tooltip) { + var elmDims = [InkElement.elementWidth(this.tooltip), InkElement.elementHeight(this.tooltip)]; + var scrollDim = this._getScroll(); + + if((elmDims[0] + left - scrollDim[0]) >= (pageDims[0] - 20)) { + left = (left - elmDims[0] - this._getIntOpt('left') - 10); + } + if((elmDims[1] + top - scrollDim[1]) >= (pageDims[1] - 20)) { + top = (top - elmDims[1] - this._getIntOpt('top') - 10); + } + + this.tooltip.style.left = left + 'px'; + this.tooltip.style.top = top + 'px'; + } + }, + _getPageXY: function() { + var cWidth = 0; + var cHeight = 0; + if( typeof( window.innerWidth ) === 'number' ) { + cWidth = window.innerWidth; + cHeight = window.innerHeight; + } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { + cWidth = document.documentElement.clientWidth; + cHeight = document.documentElement.clientHeight; + } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { + cWidth = document.body.clientWidth; + cHeight = document.body.clientHeight; + } + return [parseInt(cWidth, 10), parseInt(cHeight, 10)]; + }, + _getScroll: function() { + var dd = document.documentElement, db = document.body; + if (dd && (dd.scrollLeft || dd.scrollTop)) { + return [dd.scrollLeft, dd.scrollTop]; + } else if (db) { + return [db.scrollLeft, db.scrollTop]; + } else { + return [0, 0]; + } + }, + _getMousePosition: function(e) { + return [parseInt(InkEvent.pointerX(e), 10), parseInt(InkEvent.pointerY(e), 10)]; + } + }; + + return Tooltip; +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.tooltip.min.js b/ajax/libs/ink/3.0.0/js/ink.tooltip.min.js new file mode 100644 index 000000000..094750256 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.tooltip.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.Tooltip","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1","Ink.Dom.Css_1","Ink.Dom.Browser_1"],function(t,e,o,i,n,l){"use strict";function s(t,e){this._init(t,e||{})}function r(t,e){this._init(t,e)}var p,h,u;!function(){for(var t=document.createElement("DIV"),e=["transition","oTransition","msTransition","mozTransition","webkitTransition"],o=0;on;n++)this.tooltips[n]=new r(this,o[n])},destroy:function(){n.each(this.tooltips,function(t){t._destroy()}),this.tooltips=null,this.options=null}},r.prototype={_oppositeDirections:{left:"right",right:"left",up:"down",down:"up"},_init:function(t,o){e.observe(o,"mouseover",Ink.bindEvent(this._onMouseOver,this)),e.observe(o,"mouseout",Ink.bindEvent(this._onMouseOut,this)),e.observe(o,"mousemove",Ink.bindEvent(this._onMouseMove,this)),this.root=t,this.element=o,this._delayTimeout=null,this.tooltip=null},_makeTooltip:function(t){if(!this._getOpt("text")&&!this._getOpt("html")&&!o.hasAttribute(this.element,"title"))return!1;var i=this._createTooltipElement();this.tooltip&&this._removeTooltip(),this.tooltip=i,this._fadeInTooltipElement(i),this._placeTooltipElement(i,t),e.observe(i,"mouseover",Ink.bindEvent(this._onTooltipMouseOver,this));var n=this._getFloatOpt("timeout");n&&setTimeout(Ink.bind(function(){this.tooltip===i&&this._removeTooltip()},this),1e3*n)},_createTooltipElement:function(){var e,n,s=this._getOpt("template"),r=this._getOpt("templatefield");if(s){var p=document.createElement("DIV");if(p.innerHTML=t.elOrSelector(s,"options.template").outerHTML,e=p.firstChild,r){if(n=i.select(r,e),!n)throw"options.templatefield must be a valid selector within options.template";n=n[0]}else n=e}else e=document.createElement("DIV"),l.addClassName(e,"ink-tooltip"),l.addClassName(e,this._getOpt("color")),n=document.createElement("DIV"),l.addClassName(n,"content"),e.appendChild(n);return this._getOpt("html")?n.innerHTML=this._getOpt("html"):this._getOpt("text")?o.setTextContent(n,this._getOpt("text")):o.setTextContent(n,this.element.getAttribute("title")),e.style.display="block",e.style.position="absolute",e.style.zIndex=this._getIntOpt("zIndex"),e},_fadeInTooltipElement:function(t){var e=this._getFloatOpt("fade");p&&e&&(t.style.opacity="0",t.style[p]=e+"s",t.style[h]="opacity",t.style[u]="ease-in-out",setTimeout(function(){t.style.opacity="1"},0))},_placeTooltipElement:function(t,e){var i=this._getOpt("where");if("mousemove"===i||"mousefix"===i){var n=e;this._setPos(n[0],n[1]),a.appendChild(t)}else if(i.match(/(up|down|left|right)/)){a.appendChild(t);var s=o.offset(this.element),r=s[0],p=s[1],h=o.elementWidth(this.element)/2-o.elementWidth(t)/2,u=o.elementHeight(this.element)/2-o.elementHeight(t)/2,m=this._getIntOpt("spacing"),d=o.elementDimensions(t),c=o.elementDimensions(this.element),f=o.scrollWidth()+o.viewportWidth(),_=o.scrollHeight()+o.viewportHeight();i=this._getWhereValueInsideViewport(i,{left:r-d[0],right:r+d[0],top:p+d[1],bottom:p+d[1]},{right:f,bottom:_}),"up"===i?(p-=d[1],p-=m,r+=h):"down"===i?(p+=c[1],p+=m,r+=h):"left"===i?(r-=d[0],r-=m,p+=u):"right"===i&&(r+=c[0],r+=m,p+=u);var g=null;i.match(/(up|down|left|right)/)&&(g=document.createElement("SPAN"),l.addClassName(g,"arrow"),l.addClassName(g,this._oppositeDirections[i]),t.appendChild(g));var v=r,y=p,I=y+d[1]-_,T=v+d[0]-f,O=0-v,b=0-y;I>0?(g&&(g.style.top=d[1]/2+I+"px"),y-=I):b>0?(g&&(g.style.top=d[1]/2-b+"px"),y+=b):T>0?(g&&(g.style.left=d[0]/2+T+"px"),v-=T):O>0&&(g&&(g.style.left=d[0]/2-O+"px"),v+=O),t.style.left=v+"px",t.style.top=y+"px"}},_getWhereValueInsideViewport:function(t,e,o){return"left"===t&&e.left<0?"right":"right"===t&&e.right>o.right?"left":"up"===t&&e.top<0?"down":"down"===t&&e.bottom>o.bottom?"up":t},_removeTooltip:function(){var t=this.tooltip;if(t){var e=Ink.bind(o.remove,{},t);"mousemove"!==this._getOpt("where")&&p?(t.style.opacity=0,setTimeout(e,1e3*this._getFloatOpt("fade"))):e(),this.tooltip=null}},_getOpt:function(t){var e=o.data(this.element)[o._camelCase("tip-"+t)];if(e)return e;var i=this.root.options[t];return"undefined"!=typeof i?i:void 0},_getIntOpt:function(t){return parseInt(this._getOpt(t),10)},_getFloatOpt:function(t){return parseFloat(this._getOpt(t),10)},_destroy:function(){this.tooltip&&o.remove(this.tooltip),this.root=null,this.element=null,this.tooltip=null},_onMouseOver:function(t){var e=this._getMousePosition(t),o=this._getFloatOpt("delay");o?this._delayTimeout=setTimeout(Ink.bind(function(){this.tooltip||this._makeTooltip(e),this._delayTimeout=null},this),1e3*o):this._makeTooltip(e)},_onMouseMove:function(t){if("mousemove"===this._getOpt("where")&&this.tooltip){var e=this._getMousePosition(t);this._setPos(e[0],e[1])}},_onMouseOut:function(){this._getIntOpt("forever")||this._removeTooltip(),this._delayTimeout&&(clearTimeout(this._delayTimeout),this._delayTimeout=null)},_onTooltipMouseOver:function(){this.tooltip&&this._removeTooltip()},_setPos:function(t,e){t+=this._getIntOpt("left"),e+=this._getIntOpt("top");var i=this._getPageXY();if(this.tooltip){var n=[o.elementWidth(this.tooltip),o.elementHeight(this.tooltip)],l=this._getScroll();n[0]+t-l[0]>=i[0]-20&&(t=t-n[0]-this._getIntOpt("left")-10),n[1]+e-l[1]>=i[1]-20&&(e=e-n[1]-this._getIntOpt("top")-10),this.tooltip.style.left=t+"px",this.tooltip.style.top=e+"px"}},_getPageXY:function(){var t=0,e=0;return"number"==typeof window.innerWidth?(t=window.innerWidth,e=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(t=document.documentElement.clientWidth,e=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(t=document.body.clientWidth,e=document.body.clientHeight),[parseInt(t,10),parseInt(e,10)]},_getScroll:function(){var t=document.documentElement,e=document.body;return t&&(t.scrollLeft||t.scrollTop)?[t.scrollLeft,t.scrollTop]:e?[e.scrollLeft,e.scrollTop]:[0,0]},_getMousePosition:function(t){return[parseInt(e.pointerX(t),10),parseInt(e.pointerY(t),10)]}},s}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.treeview.js b/ajax/libs/ink/3.0.0/js/ink.treeview.js new file mode 100644 index 000000000..69a39792e --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.treeview.js @@ -0,0 +1,243 @@ +/** + * @module Ink.UI.TreeView_1 + * Elements in a tree structure + * @version 1 + */ +Ink.createModule('Ink.UI.TreeView', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1'], function(Common, Event, Css, Element, Selector, InkArray ) { + 'use strict'; + + + /** + * Shows elements in a tree structure which can be expanded and contracted. + * A TreeView is built with "node"s and "children". "node"s are `li` tags, and "children" are `ul` tags. + * You can build your TreeView out of a regular UL and LI element structure which you already use to display lists with several levels. + * If you want a node to be open when the TreeView is built, just add the data-open="true" attribute to it. + * + * @class Ink.UI.TreeView + * @constructor + * @version 1 + * @param {String|DOMElement} selector Element or selector. + * @param {String} [options] Options object, containing: + * @param {String} [options.node] Selector for the nodes. Defaults to 'li'. + * @param {String} [options.children] Selector for the children. Defaults to 'ul'. + * @param {String} [options.parentClass] CSS classes to be added to parent nodes. Defaults to 'parent'. + * @param {String} [options.openClass] CSS classes to be added to the icon when a parent is open. Defaults to 'fa fa-minus-circle'. + * @param {String} [options.closedClass] CSS classes to be added to the icon when a parent is closed. Defaults to 'fa fa-plus-circle'. + * @param {String} [options.hideClass] CSS Class to toggle visibility of the children. Defaults to 'hide-all'. + * @param {String} [options.iconTag] The name of icon tag. The component tries to find a tag with that name as a direct child of the node. If it doesn't find it, it creates it. Defaults to 'i'. + * @param {Boolean} [options.stopDefault] Flag to stops the default behavior of the click handler. Defaults to true. + * @example + * + * + * + * @sample Ink_UI_TreeView_1.html + */ + var TreeView = function(selector, options){ + this._element = Common.elOrSelector(selector, '[Ink.UI.TreeView_1]'); + + this._options = Common.options('Treeview', { + 'node': ['String', 'li'], + // [3.0.1] Deprecate this terrible, terrible name + 'child': ['String',null], + 'children': ['String','ul'], + 'parentClass': ['String','parent'], + 'openNodeClass': ['String', 'open'], + 'openClass': ['String','fa fa-minus-circle'], + 'closedClass': ['String','fa fa-plus-circle'], + 'hideClass': ['String','hide-all'], + 'iconTag': ['String', 'i'], + 'stopDefault' : ['Boolean', true] + }, options || {}, this._element); + + if (this._options.child) { + Ink.warn('Ink.UI.TreeView: options.child is being renamed to options.children.'); + this._options.children = this._options.child; + } + + this._init(); + }; + + TreeView.prototype = { + + /** + * Init function called by the constructor. Sets the necessary event handlers. + * + * @method _init + * @private + */ + _init: function(){ + this._handlers = { + click: Ink.bindEvent(this._onClick,this) + }; + + Event.on(this._element, 'click', this._options.node, this._handlers.click); + + InkArray.each(Ink.ss(this._options.node, this._element), Ink.bind(function(item){ + if( this.isParent(item) ) { + Css.addClassName(item, this._options.parentClass); + + var isOpen = this.isOpen(item); + if( !this._getIcon(item) ){ + Element.create(this._options.iconTag, { insertTop: item }); + } + + this._setNodeOpen(item, isOpen); + } + },this)); + }, + + _getIcon: function (node) { + return Ink.s('> ' + this._options.iconTag, node); + }, + + /** + * Checks if a node is open. + * + * @method isOpen + * @param {DOMElement} node The tree node to check + **/ + isOpen: function (node) { + if (!this._getChild(node)) { + throw new Error('not a node!'); + } + + return Element.data(node).open === 'true' || + Css.hasClassName(node, this._options.openNodeClass); + }, + + /** + * Checks if a node is a parent. + * + * @method isParent + * @param {DOMElement} node Node to check + **/ + isParent: function (node) { + return Css.hasClassName(node, this._options.parentClass) || + this._getChild(node) != null; + }, + + _setNodeOpen: function (node, beOpen) { + var child = this._getChild(node); + if (child) { + Css.setClassName(child, this._options.hideClass, !beOpen); + var icon = this._getIcon(node); + + node.setAttribute('data-open', beOpen); + + /* + * Don't refactor this to + * + * setClassName(el, className, status); setClassName(el, className, !status); + * + * because it won't work with multiple classes. + * + * Doing: + * setClassName(el, 'fa fa-whatever', true);setClassName(el, 'fa fa-whatever-else', false); + * + * will remove 'fa' although it is a class we want. + */ + + var toAdd = beOpen ? this._options.openClass : this._options.closedClass; + var toRemove = beOpen ? this._options.closedClass : this._options.openClass; + Css.removeClassName(icon, toRemove); + Css.addClassName(icon, toAdd); + + Css.setClassName(node, this._options.openNodeClass, beOpen); + } else { + Ink.error('Ink.UI.TreeView: node', node, 'is not a node!'); + } + }, + + /** + * Opens one of the tree nodes + * + * Make sure you pass the node's DOMElement + * @method open + * @param {DOMElement} node The node you wish to open. + **/ + open: function (node) { + this._setNodeOpen(node, true); + }, + + /** + * Closes one of the tree nodes + * + * Make sure you pass the node's DOMElement + * @method close + * @param {DOMElement} node The node you wish to close. + **/ + close: function (node) { + this._setNodeOpen(node, false); + }, + + /** + * Toggles a node state + * + * @method toggle + * @param {DOMElement} node The node to toggle. + **/ + toggle: function (node) { + if (this.isOpen(node)) { + this.close(node); + } else { + this.open(node); + } + }, + + _getChild: function (node) { + return Selector.select(this._options.children, node)[0] || null; + }, + + /** + * Handles the click event (as specified in the _init function). + * + * @method _onClick + * @param {Event} event + * @private + */ + _onClick: function(ev){ + /** + * Summary: + * If the clicked element is a "node" as defined in the options, will check if it has any "child". + * If so, will toggle its state and stop the event's default behavior if the stopDefault option is true. + **/ + + if (!this.isParent(ev.currentTarget) || + Selector.matchesSelector(ev.target, this._options.node) || + Selector.matchesSelector(ev.target, this._options.children)) { + return; + } + + if (this._options.stopDefault){ + ev.preventDefault(); + } + + this.toggle(ev.currentTarget); + } + }; + + return TreeView; +}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.treeview.min.js b/ajax/libs/ink/3.0.0/js/ink.treeview.min.js new file mode 100644 index 000000000..58ffdd01b --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.treeview.min.js @@ -0,0 +1 @@ +Ink.createModule("Ink.UI.TreeView","1",["Ink.UI.Common_1","Ink.Dom.Event_1","Ink.Dom.Css_1","Ink.Dom.Element_1","Ink.Dom.Selector_1","Ink.Util.Array_1"],function(t,e,n,s,i,o){"use strict";var l=function(e,n){this._element=t.elOrSelector(e,"[Ink.UI.TreeView_1]"),this._options=t.options("Treeview",{node:["String","li"],child:["String",null],children:["String","ul"],parentClass:["String","parent"],openNodeClass:["String","open"],openClass:["String","fa fa-minus-circle"],closedClass:["String","fa fa-plus-circle"],hideClass:["String","hide-all"],iconTag:["String","i"],stopDefault:["Boolean",!0]},n||{},this._element),this._options.child&&(Ink.warn("Ink.UI.TreeView: options.child is being renamed to options.children."),this._options.children=this._options.child),this._init()};return l.prototype={_init:function(){this._handlers={click:Ink.bindEvent(this._onClick,this)},e.on(this._element,"click",this._options.node,this._handlers.click),o.each(Ink.ss(this._options.node,this._element),Ink.bind(function(t){if(this.isParent(t)){n.addClassName(t,this._options.parentClass);var e=this.isOpen(t);this._getIcon(t)||s.create(this._options.iconTag,{insertTop:t}),this._setNodeOpen(t,e)}},this))},_getIcon:function(t){return Ink.s("> "+this._options.iconTag,t)},isOpen:function(t){if(!this._getChild(t))throw new Error("not a node!");return"true"===s.data(t).open||n.hasClassName(t,this._options.openNodeClass)},isParent:function(t){return n.hasClassName(t,this._options.parentClass)||null!=this._getChild(t)},_setNodeOpen:function(t,e){var s=this._getChild(t);if(s){n.setClassName(s,this._options.hideClass,!e);var i=this._getIcon(t);t.setAttribute("data-open",e);var o=e?this._options.openClass:this._options.closedClass,l=e?this._options.closedClass:this._options.openClass;n.removeClassName(i,l),n.addClassName(i,o),n.setClassName(t,this._options.openNodeClass,e)}else Ink.error("Ink.UI.TreeView: node",t,"is not a node!")},open:function(t){this._setNodeOpen(t,!0)},close:function(t){this._setNodeOpen(t,!1)},toggle:function(t){this.isOpen(t)?this.close(t):this.open(t)},_getChild:function(t){return i.select(this._options.children,t)[0]||null},_onClick:function(t){!this.isParent(t.currentTarget)||i.matchesSelector(t.target,this._options.node)||i.matchesSelector(t.target,this._options.children)||(this._options.stopDefault&&t.preventDefault(),this.toggle(t.currentTarget))}},l}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/ink.upload.js b/ajax/libs/ink/3.0.0/js/ink.upload.js new file mode 100644 index 000000000..12d2bb2c1 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/ink.upload.js @@ -0,0 +1,877 @@ +Ink.createModule('Ink.UI.Upload', '1', [ + 'Ink.Dom.Event_1', + 'Ink.Dom.Element_1', + 'Ink.Dom.Browser_1', + 'Ink.UI.Common_1' +], function(Event, Element, Browser, Common) { + 'use strict'; + + var DirectoryReader = function(options) { + this.init(options); + }; + + DirectoryReader.prototype = { + init: function(options) { + this.options = Ink.extendObj({ + entry: undefined, + maxDepth: 10 + }, options || {}); + + try { + this._read(); + } catch(e) { + Ink.error(e); + } + }, + + + _read: function() { + if(!this.options.entry) { + throw("The entry specify you must"); + } + + try { + this._readDirectories(); + } catch(e) { + Ink.error(e); + } + }, + + + _readDirectories: function() { + var entries = [], + running = false, + maxDepth = 0; + + /* TODO return as tree because much better well */ + var _readEntries = Ink.bind(function(currentEntry) { + var dir = currentEntry.createReader(); + running = true; + + dir.readEntries(Ink.bind(function(res) { + if(res.length > 0) { + for(var i = 0, len = res.length; i=0; i--) { + if(typeof(arr[i]) === 'undefined' || arr[i] === null || arr[i] === '') { + arr.splice(i, 1); + } + } + return arr; + } + }; + + var Queue = { + lists: [], + items: [], + + + /** + * Create new queue list + * @function create + * @public + * @param {String} list name + * @param {Function} function to iterate on items + * @return {Object} list id + */ + create: function(name) { + var id; + name = String(name); + this.lists.push({name: name}); + id = this.lists.length - 1; + return id; + }, + + + getItems: function(parentId) { + if(!parentId) { + return this.items; + } + var items = []; + for(var i = 0, len = this.items.length; i=0; i--) { + if(this.items[i] && id === this.items[i].parentId) { + this.remove(this.items[i].parentId, this.items[i].pid); + } + } + if(!keepList) { + this.lists.splice(id, 1); + } + return true; + } catch(e) { + Ink.error('Purge: invalid id'); + return false; + } + }, + + + /** + * add an item to a list + * @function add + * @public + * @param {String} name + * @param {Object} item + * @return {Number} pid + */ + add: function(parentId, item, priority) { + if(!this.lists[parentId]) { + return false; + } + if(typeof(item) !== 'object') { + item = String(item); + } + + var pid = parseInt(Math.round(Math.random() * 100000) + "" + Math.round(Math.random() * 100000), 10); + priority = priority || 0; + + this.items.push({parentId: parentId, item: item, priority: priority || 0, pid: pid}); + return pid; + }, + + + /** + * View list + * @function view + * @public + * @param {Number} list id + * @param {Number} process id + * @return {Object} item + */ + view: function(parentId, pid) { + var id = this._searchByPid(parentId, pid); + if(id === false) { + return false; + } + return this.items[id]; + }, + + + /** + * Remove an item + * @function remove + * @public + * @param {Object} item + * @return {Object|Boolean} removed item or false if not found + */ + remove: function(parentId, pid) { + try { + var id = this._searchByPid(parentId, pid); + if(id === false) { + return false; + } + this.items.splice(id, 1); + return true; + } catch(e) { + Ink.error('Remove: invalid id'); + return false; + } + }, + + _searchByPid: function(parentId, pid) { + if(!parentId && typeof(parentId) === 'boolean' || !pid) { + return false; + } + + parentId = parseInt(parentId, 10); + pid = parseInt(pid, 10); + + if(isNaN(parentId) || isNaN(pid)) { + return false; + } + + for(var i = 0, len = this.items.length; i this.options.minSizeToUseChunks; + }, + + + _dropEventHandler: function(ev) { + if(ev && ev.stopPropagation) { + ev.stopPropagation(); + } + if(ev && ev.preventDefault) { + ev.preventDefault(); + } + if(ev) { + ev.returnValue = false; + } + + this.publish('DropComplete', ev.dataTransfer); + + var data = ev.dataTransfer; + + if(!data || !data.files || !data.files.length) { + return false; + } + + this._files = data.files; + this._files = Array.prototype.slice.call(this._files || [], 0); + + // check if webkitGetAsEntry exists on first item + if(data.items && data.items[0] && data.items[0].webkitGetAsEntry) { + if(!this.options.foldersEnabled) { + return setTimeout(Ink.bind(this._addFilesToQueue, this, this._files), 0); + } + var entry, folders = []; + for(var i = ev.dataTransfer.items.length-1; i>=0; i--) { + entry = ev.dataTransfer.items[i].webkitGetAsEntry(); + if(entry && entry.isDirectory) { + folders.push(entry); + this._files[i].isDirectory = true; + this._files.splice(i, 1); + } + } + // starting callback hell + this._addFolderToQueue(folders, Ink.bind(function() { + setTimeout(Ink.bind(this._addFilesToQueue, this, this._files), 0); + }, this)); + } else { + setTimeout(Ink.bind(this._addFilesToQueue, this, this._files), 0); + } + + return true; + }, + + + _addFolderToQueue: function(folders, cb) { + var files = [], invalidFolders = {}; + + if(!folders || !folders.length) { + cb(); + return files; + } + + var getFiles = function(entries) { + var files = []; + for(var i = 0, len = entries.length; i this.options.maxFilesize) { + this.publish('MaxSizeFailure', file, this.options.maxFilesize); + continue; + } + + fileID = parseInt(Math.round(Math.random() * 100000) + "" + Math.round(Math.random() * 100000), 10); + o = { id: i, data: file, fileID: fileID, directory: file.isDirectory }; + Queue.add(this._queueId, o); + + this.publish('FileAddedToQueue', o); + } + this._processQueue(true); + this._files = []; + }, + + + _processQueue: function(internalUpload) { + if(this._queueRunning) { + return false; + } + + this.running = 0; + var max = 1, i = 0, items, + queueLen = Queue.items.length; + this._queueRunning = true; + + this.interval = setInterval(Ink.bind(function() { + if(Queue.items.length === i && this.running === 0) { + Queue.purge(this._queueId, true); + this._queueRunning = false; + clearInterval(this.interval); + this.publish('QueueEnd', this._queueId, queueLen); + } + + items = Queue.getItems(this._queueId); + + if(this.running < max && items[i]) { + if(!items[i].canceled) { + _doRequest.call(this, items[i].pid, items[i].item.data, items[i].item.fileID, items[i].item.directory, internalUpload); + this.running++; + i++; + } else { + var j = i; + while(items[j] && items[j].canceled) { + i++; + j++; + } + } + return true; + } + return false; + }, this), 100); + + + var _doRequest = function(pid, data, fileID, directory, internalUpload) { + var o = { + file: data, + fileID: fileID, + cb: Ink.bind(function() { + this.running--; + }, this) + }; + if(internalUpload) { + if(directory) { + // do magic + o.cb(); + } else { + this._upload(o); + } + } + }; + + return true; + }, + + + _upload: function(o) { + var file = o.file, + xhr = new XMLHttpRequest(), + fileID = o.fileID; + + this.publish('BeforeUpload', file, this.options.extraData, fileID, xhr, this._supportChunks(file.size)); + + var forceAbort = function(showError) { + if(o.cb && typeof(o.cb === 'function')) { + o.cb(); + } + + this.publish('OnProgress', { + length: file.size, + lengthComputable: true, + loaded: file.size, + total: file.size + }, file, fileID); + this.publish('EndUpload', file, fileID, (showError ? { error: true } : true)); + this.publish('InvalidFile', file, 'name'); + xhr.abort(); + }; + + if(this.options.INVALID_FILE_NAME && this.options.INVALID_FILE_NAME instanceof RegExp) { + if(this.options.INVALID_FILE_NAME.test(o.file.name)) { + forceAbort.call(this); + return; + } + } + + // If file was renamed, abort it + // FU OPERA: Opera always return lastModified date as null + if(!file.lastModifiedDate && !Ink.Dom.Browser.OPERA) { + forceAbort.call(this, true); + return; + } + + xhr.upload.onprogress = Ink.bind(this.publish, this, 'OnProgress', file, fileID); + + var endpoint, method; + if(this._supportChunks(file.size)) { + if(file.size <= file.chunk_offset) { + endpoint = this.options.endpointChunkCommit; + method = 'POST'; + } else { + endpoint = this.options.endpointChunk; + if(file.chunk_upload_id) { + endpoint += '?upload_id=' + file.chunk_upload_id; + } + if(file.chunk_offset) { + endpoint += '&offset=' + file.chunk_offset; + } + method = 'PUT'; + } + } else { + endpoint = this.options.endpoint; + method = 'POST'; + } + + xhr.open(method, endpoint, true); + xhr.withCredentials = true; + xhr.setRequestHeader("x-requested-with", "XMLHttpRequest"); + if(this._supportChunks(file.size)) { + xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + } + + var fd = new FormData(), + blob; + + if("Blob" in window && typeof Blob === 'function') { + blob = new Blob([file], { type: file.type }); + if(this._supportChunks(file.size)) { + file.chunk_offset = file.chunk_offset || 0; + blob = blob.slice(file.chunk_offset, file.chunk_offset + this.options.chunkSize); + } else { + fd.append(this.options.fileFormName, blob, file.name); + } + } else { + fd.append(this.options.fileFormName, file); + } + + if(!this._supportChunks(file.size)) { + for(var k in this.options.extraData) { + if(this.options.extraData.hasOwnProperty(k)) { + fd.append(k, this.options.extraData[k]); + } + } + } else { + fd.append('upload_id', file.chunk_upload_id); + fd.append('path', file.upload_path); + } + + if(!file.hasParent) { + if(!this._supportChunks(file.size)) { + xhr.send(fd); + } else { + if(file.size <= file.chunk_offset) { + xhr.send('upload_id=' + file.chunk_upload_id + '&path=' + file.upload_path + '/' + file.name); + } else { + xhr.send(blob); + } + } + } else { + this.publish('cbCreateFolder', file.parentID, file.fullPath, this.options.extraData, this._folders, file.rootPath, Ink.bind(function() { + if(!this._supportChunks(file.size)) { + xhr.send(fd); + } else { + if(file.size <= file.chunk_offset) { + xhr.send('upload_id=' + file.chunk_upload_id + '&path=' + file.upload_path + '/' + file.name); + } else { + xhr.send(blob); + } + } + }, this)); + } + + + xhr.onload = Ink.bindEvent(function() { + /* jshint boss:true */ + if(this._supportChunks(file.size) && file.size > file.chunk_offset) { + if(xhr.response) { + var response = JSON.parse(xhr.response); + + // check expected offset + var invalidOffset = file.chunk_offset && response.offset !== (file.chunk_offset + this.options.chunkSize) && file.size !== response.offset; + if(invalidOffset) { + if(o.cb) { + o.cb(); + } + this.publish('ErrorUpload', file, fileID); + } else { + file.chunk_upload_id = response.upload_id; + file.chunk_offset = response.offset; + file.chunk_expires = response.expires; + this._upload(o); + } + } else { + if(o.cb) { + o.cb(); + } + this.publish('ErrorUpload', file, fileID); + } + return (xhr = null); + } + + if(o.cb) { + o.cb(); + } + + if(xhr.responseText && xhr['status'] < 400) { + this.publish('EndUpload', file, fileID, xhr.responseText); + } else { + this.publish('ErrorUpload', file, fileID); + } + return (xhr = null); + }, this); + + + xhr.onerror = Ink.bindEvent(function() { + if(o.cb) { + o.cb(); + } + this.publish('ErrorUpload', file, fileID); + }, this); + + xhr.onabort = Ink.bindEvent(function() { + if(o.cb) { + o.cb(); + } + this.publish('AbortUpload', file, fileID, { + abortAll: Ink.bind(this.abortAll, this), + abortOne: Ink.bind(this.abortOne, this) + }); + }, this); + }, + + + abortAll: function() { + if(!this._queueRunning) { + return false; + } + clearInterval(this.interval); + this._queueRunning = false; + Queue.purge(this._queueId, true); + return true; + }, + + abortOne: function(id, cb) { + var items = Queue.getItems(0), + o; + for(var i = 0, len = items.length; i0){for(var o=0,r=s.length;r>o;o++)t.push(s[o]),s[o].isDirectory&&(i=this.clearArray(s[o].fullPath.split("/")),i.shift(),i=i.length,i<=this.options.maxDepth&&n(s[o]));this._stopActivityTimeout&&clearTimeout(this._stopActivityTimeout),this._stopActivityTimeout=setTimeout(function(){e=!1},250)}s.length||(e=!1)},this),Ink.bind(function(t){this.options.readError(t,s)},this))},this);n(this.options.entry);var s,o=function(){return e?!1:(clearInterval(s),this.options.readComplete&&"function"==typeof this.options.readComplete&&this.options.readComplete(t),!0)};s=setInterval(Ink.bind(o,this),250)},clearArray:function(t){for(var e=t.length-1;e>=0;e--)("undefined"==typeof t[e]||null===t[e]||""===t[e])&&t.splice(e,1);return t}};var o={lists:[],items:[],create:function(t){var e;return t=String(t),this.lists.push({name:t}),e=this.lists.length-1},getItems:function(t){if(!t)return this.items;for(var e=[],i=0,n=this.items.length;n>i;i++)this.items[i].parentId===t&&e.push(this.items[i]);return e},purge:function(t,e){if("number"!=typeof t||isNaN(Number(t)))return!1;try{for(var i=this.items.length;i>=0;i--)this.items[i]&&t===this.items[i].parentId&&this.remove(this.items[i].parentId,this.items[i].pid);return e||this.lists.splice(t,1),!0}catch(n){return Ink.error("Purge: invalid id"),!1}},add:function(t,e,i){if(!this.lists[t])return!1;"object"!=typeof e&&(e=String(e));var n=parseInt(Math.round(1e5*Math.random())+""+Math.round(1e5*Math.random()),10);return i=i||0,this.items.push({parentId:t,item:e,priority:i||0,pid:n}),n},view:function(t,e){var i=this._searchByPid(t,e);return i===!1?!1:this.items[i]},remove:function(t,e){try{var i=this._searchByPid(t,e);return i===!1?!1:(this.items.splice(i,1),!0)}catch(n){return Ink.error("Remove: invalid id"),!1}},_searchByPid:function(t,e){if(!t&&"boolean"==typeof t||!e)return!1;if(t=parseInt(t,10),e=parseInt(e,10),isNaN(t)||isNaN(e))return!1;for(var i=0,n=this.items.length;n>i;i++)if(this.items[i].parentId===t&&this.items[i].pid===e)return i;return!1}},r=function(t){this.Upload=t,this.init()};r.prototype={init:function(){this._fileButton=this.Upload.options.fileButton,this._dropzone=this.Upload.options.dropzone,this._setDropEvent(),this._setFileButton()},_setDropEvent:function(){for(var t=this._dropzone,e=0,i=t.length;i>e;e++)t[e].ondrop=Ink.bindEvent(this.Upload._dropEventHandler,this.Upload),t[e].ondragleave=Ink.bindEvent(this._onDragLeave,this),t[e].ondragend=Ink.bindEvent(this._onDragEndEventHandler,this),t[e].ondragenter=Ink.bindEvent(this._onDragEnterHandler,this),t[e].ondragover=Ink.bindEvent(this._onDragOverHandler,this)},_onDragEnterHandler:function(t){return t&&t.stopPropagation&&t.stopPropagation(),t&&t.preventDefault&&t.preventDefault(),t&&(t.returnValue=!1),this.Upload.publish("DragEnter",t),!1},_onDragOverHandler:function(t){return t?(t.preventDefault(),t.stopPropagation(),t.returnValue=!1,!0):!1},_onDragLeave:function(t){return this.Upload.publish("DragLeave",t)},_onDragEndEventHandler:function(t){return this.Upload.publish("DragEnd",t)},_setFileButton:function(){var e=this._fileButton;t.observeMulti(e,"change",Ink.bindEvent(this._fileChangeHandler,this))},_fileChangeHandler:function(i){var n=t.element(i),s=n.files,o=e.findUpwardsByTag(n,"form");return s&&window.FormData&&"withCredentials"in new XMLHttpRequest?(this.Upload._addFilesToQueue(s),void(n.value="")):(o.parentNode.submit(),!1)}};var a=function(t){this.Queue=o,this.init(t),this._events={}};return a.prototype={init:function(t){if("string"==typeof t&&(t=e.data(n.elOrSelector(t,"1st argument"))),this.options=Ink.extendObj({extraData:{},fileFormName:"Ink_Filelist",dropzone:void 0,fileButton:void 0,endpoint:"",endpointChunk:"",endpointChunkCommit:"",maxFilesize:300<<20,chunkSize:4194304,minSizeToUseChunks:20971520,INVALID_FILE_NAME:void 0,foldersEnabled:!0,useChunks:!0,directoryMaxDepth:10},t||{}),this._queueId=o.create("Ink_UPLOAD"),this._queueRunning=!1,this._folders={},this.options.dropzone&&n.elOrSelector(this.options.dropzone,"Upload - dropzone"),this.options.fileButton&&n.elOrSelector(this.options.fileButton,"Upload - fileButton"),!this.options.dropzone&&!this.options.fileButton)throw new TypeError("A file button or dropzone, specify you must, my young padawan");this.options.dropzone=Ink.ss(this.options.dropzone),this.options.fileButton=Ink.ss(this.options.fileButton),new r(this)},_supportChunks:function(t){return this.options.useChunks&&"Blob"in window&&(new Blob).slice&&t>this.options.minSizeToUseChunks},_dropEventHandler:function(t){t&&t.stopPropagation&&t.stopPropagation(),t&&t.preventDefault&&t.preventDefault(),t&&(t.returnValue=!1),this.publish("DropComplete",t.dataTransfer);var e=t.dataTransfer;if(!e||!e.files||!e.files.length)return!1;if(this._files=e.files,this._files=Array.prototype.slice.call(this._files||[],0),e.items&&e.items[0]&&e.items[0].webkitGetAsEntry){if(!this.options.foldersEnabled)return setTimeout(Ink.bind(this._addFilesToQueue,this,this._files),0);for(var i,n=[],s=t.dataTransfer.items.length-1;s>=0;s--)i=t.dataTransfer.items[s].webkitGetAsEntry(),i&&i.isDirectory&&(n.push(i),this._files[s].isDirectory=!0,this._files.splice(s,1));this._addFolderToQueue(n,Ink.bind(function(){setTimeout(Ink.bind(this._addFilesToQueue,this,this._files),0)},this))}else setTimeout(Ink.bind(this._addFilesToQueue,this,this._files),0);return!0},_addFolderToQueue:function(t,e){var i=[],n={};if(!t||!t.length)return e(),i;var o=function(t){for(var e=[],i=0,n=t.length;n>i;i++)t[i].isFile&&e.push(t[i]);return e},r=function(t,e){var n;return e=e||0,this._files[e]?"fileentry"!==this._files[e].constructor.name.toLowerCase()?r.apply(this,[t,++e]):void this._files[e].file(Ink.bind(function(i){n=this._files[e].fullPath,this._files[e]=i,this._files[e].hasParent=!0,this._files[e].fullPath||(this._files[e].fullPath=n),r.apply(this,[t,++e])},this),Ink.bind(function(){this._files.splice(e,1),r.apply(this,[t,e])},this)):(t(),i)},a=Ink.bind(function(h){return t[h]?void new s({entry:t[h],maxDepth:this.options.directoryMaxDepth,readComplete:Ink.bind(function(e){if(i=i.concat(o(e)),t[h]&&!(t[h].fullPath in this._folders)){this._folders[t[h].fullPath]={items:e,files:i,length:e.length,created:!1,root:!0};for(var s=0,r=e.length;r>s;s++)e[s].isFile||(e[s].fullPath in n?delete n[e[s].fullPath]:this._folders[e[s].fullPath]={created:!1,root:!1});a(++h)}},this),readError:Ink.bind(function(t,e){n[e.fullPath]={},n[e.fullPath].error=t},this)}):(this._files=this._files.concat(i),r.call(this,e),!1)},this);return a(0),i},_addFilesToQueue:function(t){for(var e,n,s,r=0,a=t.length;a>r;r++)e=t[r],e.isDirectory||null!==e&&(e.type||e.size%4096!==0||i.CHROME&&this.options.foldersEnabled)?e.size>this.options.maxFilesize?this.publish("MaxSizeFailure",e,this.options.maxFilesize):(n=parseInt(Math.round(1e5*Math.random())+""+Math.round(1e5*Math.random()),10),s={id:r,data:e,fileID:n,directory:e.isDirectory},o.add(this._queueId,s),this.publish("FileAddedToQueue",s)):this.publish("InvalidFile",e,"size");this._processQueue(!0),this._files=[]},_processQueue:function(t){if(this._queueRunning)return!1;this.running=0;var e,i=1,n=0,s=o.items.length;this._queueRunning=!0,this.interval=setInterval(Ink.bind(function(){if(o.items.length===n&&0===this.running&&(o.purge(this._queueId,!0),this._queueRunning=!1,clearInterval(this.interval),this.publish("QueueEnd",this._queueId,s)),e=o.getItems(this._queueId),this.runninge.chunk_offset){if(i.response){var s=JSON.parse(i.response),o=e.chunk_offset&&s.offset!==e.chunk_offset+this.options.chunkSize&&e.size!==s.offset;o?(t.cb&&t.cb(),this.publish("ErrorUpload",e,n)):(e.chunk_upload_id=s.upload_id,e.chunk_offset=s.offset,e.chunk_expires=s.expires,this._upload(t))}else t.cb&&t.cb(),this.publish("ErrorUpload",e,n);return i=null}return t.cb&&t.cb(),i.responseText&&i.status<400?this.publish("EndUpload",e,n,i.responseText):this.publish("ErrorUpload",e,n),i=null},this),i.onerror=Ink.bindEvent(function(){t.cb&&t.cb(),this.publish("ErrorUpload",e,n)},this),i.onabort=Ink.bindEvent(function(){t.cb&&t.cb(),this.publish("AbortUpload",e,n,{abortAll:Ink.bind(this.abortAll,this),abortOne:Ink.bind(this.abortOne,this)})},this)},abortAll:function(){return this._queueRunning?(clearInterval(this.interval),this._queueRunning=!1,o.purge(this._queueId,!0),!0):!1},abortOne:function(t,e){for(var i,n=o.getItems(0),s=0,r=n.length;r>s;s++)if(n[s].item.fileID===t)return i={id:n[s].item.fileID,name:n[s].item.data.name,size:n[s].item.data.size,hasParent:n[s].item.data.hasParent},o.remove(0,n[s].pid),e&&e(i),!0;return!1},subscribe:function(t,e){return this._events[t]||(this._events[t]=[]),this._events[t].push(e),this._events[t]},publish:function(t){var e=this._events[t],i=Array.prototype.slice.call(arguments||[],0);if(e)for(var n=0,s=e.length;s>n;n++)try{e[n].apply(this,i.splice(1,i.length))}catch(o){Ink.error(t+": "+o)}}},a}); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/modernizr.js b/ajax/libs/ink/3.0.0/js/modernizr.js new file mode 100644 index 000000000..def52d581 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/modernizr.js @@ -0,0 +1,1393 @@ +/*! + * Modernizr v2.6.3 + * www.modernizr.com + * + * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton + * Available under the BSD and MIT licenses: www.modernizr.com/license/ + */ + +/* + * Modernizr tests which native CSS3 and HTML5 features are available in + * the current UA and makes the results available to you in two ways: + * as properties on a global Modernizr object, and as classes on the + * element. This information allows you to progressively enhance + * your pages with a granular level of control over the experience. + * + * Modernizr has an optional (not included) conditional resource loader + * called Modernizr.load(), based on Yepnope.js (yepnopejs.com). + * To get a build that includes Modernizr.load(), as well as choosing + * which tests to include, go to www.modernizr.com/download/ + * + * Authors Faruk Ates, Paul Irish, Alex Sexton + * Contributors Ryan Seddon, Ben Alman + */ + +window.Modernizr = (function( window, document, undefined ) { + + var version = '2.6.3', + + Modernizr = {}, + + /*>>cssclasses*/ + // option for enabling the HTML classes to be added + enableClasses = true, + /*>>cssclasses*/ + + docElement = document.documentElement, + + /** + * Create our "modernizr" element that we do most feature tests on. + */ + mod = 'modernizr', + modElem = document.createElement(mod), + mStyle = modElem.style, + + /** + * Create the input element for various Web Forms feature tests. + */ + inputElem /*>>inputelem*/ = document.createElement('input') /*>>inputelem*/ , + + /*>>smile*/ + smile = ':)', + /*>>smile*/ + + toString = {}.toString, + + // TODO :: make the prefixes more granular + /*>>prefixes*/ + // List of property values to set for css tests. See ticket #21 + prefixes = ' -webkit- -moz- -o- -ms- '.split(' '), + /*>>prefixes*/ + + /*>>domprefixes*/ + // Following spec is to expose vendor-specific style properties as: + // elem.style.WebkitBorderRadius + // and the following would be incorrect: + // elem.style.webkitBorderRadius + + // Webkit ghosts their properties in lowercase but Opera & Moz do not. + // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+ + // erik.eae.net/archives/2008/03/10/21.48.10/ + + // More here: github.com/Modernizr/Modernizr/issues/issue/21 + omPrefixes = 'Webkit Moz O ms', + + cssomPrefixes = omPrefixes.split(' '), + + domPrefixes = omPrefixes.toLowerCase().split(' '), + /*>>domprefixes*/ + + /*>>ns*/ + ns = {'svg': 'http://www.w3.org/2000/svg'}, + /*>>ns*/ + + tests = {}, + inputs = {}, + attrs = {}, + + classes = [], + + slice = classes.slice, + + featureName, // used in testing loop + + + /*>>teststyles*/ + // Inject element with style element and some CSS rules + injectElementWithStyles = function( rule, callback, nodes, testnames ) { + + var style, ret, node, docOverflow, + div = document.createElement('div'), + // After page load injecting a fake body doesn't work so check if body exists + body = document.body, + // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it. + fakeBody = body || document.createElement('body'); + + if ( parseInt(nodes, 10) ) { + // In order not to give false positives we create a node for each test + // This also allows the method to scale for unspecified uses + while ( nodes-- ) { + node = document.createElement('div'); + node.id = testnames ? testnames[nodes] : mod + (nodes + 1); + div.appendChild(node); + } + } + + // '].join(''); + div.id = mod; + // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody. + // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270 + (body ? div : fakeBody).innerHTML += style; + fakeBody.appendChild(div); + if ( !body ) { + //avoid crashing IE8, if background image is used + fakeBody.style.background = ''; + //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible + fakeBody.style.overflow = 'hidden'; + docOverflow = docElement.style.overflow; + docElement.style.overflow = 'hidden'; + docElement.appendChild(fakeBody); + } + + ret = callback(div, rule); + // If this is done after page load we don't want to remove the body so check if body exists + if ( !body ) { + fakeBody.parentNode.removeChild(fakeBody); + docElement.style.overflow = docOverflow; + } else { + div.parentNode.removeChild(div); + } + + return !!ret; + + }, + /*>>teststyles*/ + + /*>>mq*/ + // adapted from matchMedia polyfill + // by Scott Jehl and Paul Irish + // gist.github.com/786768 + testMediaQuery = function( mq ) { + + var matchMedia = window.matchMedia || window.msMatchMedia; + if ( matchMedia ) { + return matchMedia(mq).matches; + } + + var bool; + + injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) { + bool = (window.getComputedStyle ? + getComputedStyle(node, null) : + node.currentStyle)['position'] == 'absolute'; + }); + + return bool; + + }, + /*>>mq*/ + + + /*>>hasevent*/ + // + // isEventSupported determines if a given element supports the given event + // kangax.github.com/iseventsupported/ + // + // The following results are known incorrects: + // Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative + // Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333 + // ... + isEventSupported = (function() { + + var TAGNAMES = { + 'select': 'input', 'change': 'input', + 'submit': 'form', 'reset': 'form', + 'error': 'img', 'load': 'img', 'abort': 'img' + }; + + function isEventSupported( eventName, element ) { + + element = element || document.createElement(TAGNAMES[eventName] || 'div'); + eventName = 'on' + eventName; + + // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those + var isSupported = eventName in element; + + if ( !isSupported ) { + // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element + if ( !element.setAttribute ) { + element = document.createElement('div'); + } + if ( element.setAttribute && element.removeAttribute ) { + element.setAttribute(eventName, ''); + isSupported = is(element[eventName], 'function'); + + // If property was created, "remove it" (by setting value to `undefined`) + if ( !is(element[eventName], 'undefined') ) { + element[eventName] = undefined; + } + element.removeAttribute(eventName); + } + } + + element = null; + return isSupported; + } + return isEventSupported; + })(), + /*>>hasevent*/ + + // TODO :: Add flag for hasownprop ? didn't last time + + // hasOwnProperty shim by kangax needed for Safari 2.0 support + _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp; + + if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) { + hasOwnProp = function (object, property) { + return _hasOwnProperty.call(object, property); + }; + } + else { + hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ + return ((property in object) && is(object.constructor.prototype[property], 'undefined')); + }; + } + + // Adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js + // es5.github.com/#x15.3.4.5 + + if (!Function.prototype.bind) { + Function.prototype.bind = function bind(that) { + + var target = this; + + if (typeof target != "function") { + throw new TypeError(); + } + + var args = slice.call(arguments, 1), + bound = function () { + + if (this instanceof bound) { + + var F = function(){}; + F.prototype = target.prototype; + var self = new F(); + + var result = target.apply( + self, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return self; + + } else { + + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + + } + + }; + + return bound; + }; + } + + /** + * setCss applies given styles to the Modernizr DOM node. + */ + function setCss( str ) { + mStyle.cssText = str; + } + + /** + * setCssAll extrapolates all vendor-specific css strings. + */ + function setCssAll( str1, str2 ) { + return setCss(prefixes.join(str1 + ';') + ( str2 || '' )); + } + + /** + * is returns a boolean for if typeof obj is exactly type. + */ + function is( obj, type ) { + return typeof obj === type; + } + + /** + * contains returns a boolean for if substr is found within str. + */ + function contains( str, substr ) { + return !!~('' + str).indexOf(substr); + } + + /*>>testprop*/ + + // testProps is a generic CSS / DOM property test. + + // In testing support for a given CSS property, it's legit to test: + // `elem.style[styleName] !== undefined` + // If the property is supported it will return an empty string, + // if unsupported it will return undefined. + + // We'll take advantage of this quick test and skip setting a style + // on our modernizr element, but instead just testing undefined vs + // empty string. + + // Because the testing of the CSS property names (with "-", as + // opposed to the camelCase DOM properties) is non-portable and + // non-standard but works in WebKit and IE (but not Gecko or Opera), + // we explicitly reject properties with dashes so that authors + // developing in WebKit or IE first don't end up with + // browser-specific content by accident. + + function testProps( props, prefixed ) { + for ( var i in props ) { + var prop = props[i]; + if ( !contains(prop, "-") && mStyle[prop] !== undefined ) { + return prefixed == 'pfx' ? prop : true; + } + } + return false; + } + /*>>testprop*/ + + // TODO :: add testDOMProps + /** + * testDOMProps is a generic DOM property test; if a browser supports + * a certain property, it won't return undefined for it. + */ + function testDOMProps( props, obj, elem ) { + for ( var i in props ) { + var item = obj[props[i]]; + if ( item !== undefined) { + + // return the property name as a string + if (elem === false) return props[i]; + + // let's bind a function + if (is(item, 'function')){ + // default to autobind unless override + return item.bind(elem || obj); + } + + // return the unbound function or obj or value + return item; + } + } + return false; + } + + /*>>testallprops*/ + /** + * testPropsAll tests a list of DOM properties we want to check against. + * We specify literally ALL possible (known and/or likely) properties on + * the element including the non-vendor prefixed one, for forward- + * compatibility. + */ + function testPropsAll( prop, prefixed, elem ) { + + var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), + props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' '); + + // did they call .prefixed('boxSizing') or are we just testing a prop? + if(is(prefixed, "string") || is(prefixed, "undefined")) { + return testProps(props, prefixed); + + // otherwise, they called .prefixed('requestAnimationFrame', window[, elem]) + } else { + props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' '); + return testDOMProps(props, prefixed, elem); + } + } + /*>>testallprops*/ + + + /** + * Tests + * ----- + */ + + // The *new* flexbox + // dev.w3.org/csswg/css3-flexbox + + tests['flexbox'] = function() { + return testPropsAll('flexWrap'); + }; + + // The *old* flexbox + // www.w3.org/TR/2009/WD-css3-flexbox-20090723/ + + tests['flexboxlegacy'] = function() { + return testPropsAll('boxDirection'); + }; + + // On the S60 and BB Storm, getContext exists, but always returns undefined + // so we actually have to call getContext() to verify + // github.com/Modernizr/Modernizr/issues/issue/97/ + + tests['canvas'] = function() { + var elem = document.createElement('canvas'); + return !!(elem.getContext && elem.getContext('2d')); + }; + + tests['canvastext'] = function() { + return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function')); + }; + + // webk.it/70117 is tracking a legit WebGL feature detect proposal + + // We do a soft detect which may false positive in order to avoid + // an expensive context creation: bugzil.la/732441 + + tests['webgl'] = function() { + return !!window.WebGLRenderingContext; + }; + + /* + * The Modernizr.touch test only indicates if the browser supports + * touch events, which does not necessarily reflect a touchscreen + * device, as evidenced by tablets running Windows 7 or, alas, + * the Palm Pre / WebOS (touch) phones. + * + * Additionally, Chrome (desktop) used to lie about its support on this, + * but that has since been rectified: crbug.com/36415 + * + * We also test for Firefox 4 Multitouch Support. + * + * For more info, see: modernizr.github.com/Modernizr/touch.html + */ + + tests['touch'] = function() { + var bool; + + if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) { + bool = true; + } else { + injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) { + bool = node.offsetTop === 9; + }); + } + + return bool; + }; + + + // geolocation is often considered a trivial feature detect... + // Turns out, it's quite tricky to get right: + // + // Using !!navigator.geolocation does two things we don't want. It: + // 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513 + // 2. Disables page caching in WebKit: webk.it/43956 + // + // Meanwhile, in Firefox < 8, an about:config setting could expose + // a false positive that would throw an exception: bugzil.la/688158 + + tests['geolocation'] = function() { + return 'geolocation' in navigator; + }; + + + tests['postmessage'] = function() { + return !!window.postMessage; + }; + + + // Chrome incognito mode used to throw an exception when using openDatabase + // It doesn't anymore. + tests['websqldatabase'] = function() { + return !!window.openDatabase; + }; + + // Vendors had inconsistent prefixing with the experimental Indexed DB: + // - Webkit's implementation is accessible through webkitIndexedDB + // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB + // For speed, we don't test the legacy (and beta-only) indexedDB + tests['indexedDB'] = function() { + return !!testPropsAll("indexedDB", window); + }; + + // documentMode logic from YUI to filter out IE8 Compat Mode + // which false positives. + tests['hashchange'] = function() { + return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7); + }; + + // Per 1.6: + // This used to be Modernizr.historymanagement but the longer + // name has been deprecated in favor of a shorter and property-matching one. + // The old API is still available in 1.6, but as of 2.0 will throw a warning, + // and in the first release thereafter disappear entirely. + tests['history'] = function() { + return !!(window.history && history.pushState); + }; + + tests['draganddrop'] = function() { + var div = document.createElement('div'); + return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div); + }; + + // FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10 + // will be supported until FF19 (2/12/13), at which time, ESR becomes FF17. + // FF10 still uses prefixes, so check for it until then. + // for more ESR info, see: mozilla.org/en-US/firefox/organizations/faq/ + tests['websockets'] = function() { + return 'WebSocket' in window || 'MozWebSocket' in window; + }; + + + // css-tricks.com/rgba-browser-support/ + tests['rgba'] = function() { + // Set an rgba() color and check the returned value + + setCss('background-color:rgba(150,255,150,.5)'); + + return contains(mStyle.backgroundColor, 'rgba'); + }; + + tests['hsla'] = function() { + // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally, + // except IE9 who retains it as hsla + + setCss('background-color:hsla(120,40%,100%,.5)'); + + return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla'); + }; + + tests['multiplebgs'] = function() { + // Setting multiple images AND a color on the background shorthand property + // and then querying the style.background property value for the number of + // occurrences of "url(" is a reliable method for detecting ACTUAL support for this! + + setCss('background:url(https://),url(https://),red url(https://)'); + + // If the UA supports multiple backgrounds, there should be three occurrences + // of the string "url(" in the return value for elemStyle.background + + return (/(url\s*\(.*?){3}/).test(mStyle.background); + }; + + + + // this will false positive in Opera Mini + // github.com/Modernizr/Modernizr/issues/396 + + tests['backgroundsize'] = function() { + return testPropsAll('backgroundSize'); + }; + + tests['borderimage'] = function() { + return testPropsAll('borderImage'); + }; + + + // Super comprehensive table about all the unique implementations of + // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance + + tests['borderradius'] = function() { + return testPropsAll('borderRadius'); + }; + + // WebOS unfortunately false positives on this test. + tests['boxshadow'] = function() { + return testPropsAll('boxShadow'); + }; + + // FF3.0 will false positive on this test + tests['textshadow'] = function() { + return document.createElement('div').style.textShadow === ''; + }; + + + tests['opacity'] = function() { + // Browsers that actually have CSS Opacity implemented have done so + // according to spec, which means their return values are within the + // range of [0.0,1.0] - including the leading zero. + + setCssAll('opacity:.55'); + + // The non-literal . in this regex is intentional: + // German Chrome returns this value as 0,55 + // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632 + return (/^0.55$/).test(mStyle.opacity); + }; + + + // Note, Android < 4 will pass this test, but can only animate + // a single property at a time + // daneden.me/2011/12/putting-up-with-androids-bullshit/ + tests['cssanimations'] = function() { + return testPropsAll('animationName'); + }; + + + tests['csscolumns'] = function() { + return testPropsAll('columnCount'); + }; + + + tests['cssgradients'] = function() { + /** + * For CSS Gradients syntax, please see: + * webkit.org/blog/175/introducing-css-gradients/ + * developer.mozilla.org/en/CSS/-moz-linear-gradient + * developer.mozilla.org/en/CSS/-moz-radial-gradient + * dev.w3.org/csswg/css3-images/#gradients- + */ + + var str1 = 'background-image:', + str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));', + str3 = 'linear-gradient(left top,#9f9, white);'; + + setCss( + // legacy webkit syntax (FIXME: remove when syntax not in use anymore) + (str1 + '-webkit- '.split(' ').join(str2 + str1) + + // standard syntax // trailing 'background-image:' + prefixes.join(str3 + str1)).slice(0, -str1.length) + ); + + return contains(mStyle.backgroundImage, 'gradient'); + }; + + + tests['cssreflections'] = function() { + return testPropsAll('boxReflect'); + }; + + + tests['csstransforms'] = function() { + return !!testPropsAll('transform'); + }; + + + tests['csstransforms3d'] = function() { + + var ret = !!testPropsAll('perspective'); + + // Webkit's 3D transforms are passed off to the browser's own graphics renderer. + // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in + // some conditions. As a result, Webkit typically recognizes the syntax but + // will sometimes throw a false positive, thus we must do a more thorough check: + if ( ret && 'webkitPerspective' in docElement.style ) { + + // Webkit allows this media query to succeed only if the feature is enabled. + // `@media (transform-3d),(-webkit-transform-3d){ ... }` + injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) { + ret = node.offsetLeft === 9 && node.offsetHeight === 3; + }); + } + return ret; + }; + + + tests['csstransitions'] = function() { + return testPropsAll('transition'); + }; + + + /*>>fontface*/ + // @font-face detection routine by Diego Perini + // javascript.nwbox.com/CSSSupport/ + + // false positives: + // WebOS github.com/Modernizr/Modernizr/issues/342 + // WP7 github.com/Modernizr/Modernizr/issues/538 + tests['fontface'] = function() { + var bool; + + injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) { + var style = document.getElementById('smodernizr'), + sheet = style.sheet || style.styleSheet, + cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : ''; + + bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0; + }); + + return bool; + }; + /*>>fontface*/ + + // CSS generated content detection + tests['generatedcontent'] = function() { + var bool; + + injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) { + bool = node.offsetHeight >= 3; + }); + + return bool; + }; + + + + // These tests evaluate support of the video/audio elements, as well as + // testing what types of content they support. + // + // We're using the Boolean constructor here, so that we can extend the value + // e.g. Modernizr.video // true + // Modernizr.video.ogg // 'probably' + // + // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845 + // thx to NielsLeenheer and zcorpan + + // Note: in some older browsers, "no" was a return value instead of empty string. + // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2 + // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5 + + tests['video'] = function() { + var elem = document.createElement('video'), + bool = false; + + // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224 + try { + if ( bool = !!elem.canPlayType ) { + bool = new Boolean(bool); + bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,''); + + // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546 + bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,''); + + bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,''); + } + + } catch(e) { } + + return bool; + }; + + tests['audio'] = function() { + var elem = document.createElement('audio'), + bool = false; + + try { + if ( bool = !!elem.canPlayType ) { + bool = new Boolean(bool); + bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,''); + bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,''); + + // Mimetypes accepted: + // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements + // bit.ly/iphoneoscodecs + bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,''); + bool.m4a = ( elem.canPlayType('audio/x-m4a;') || + elem.canPlayType('audio/aac;')) .replace(/^no$/,''); + } + } catch(e) { } + + return bool; + }; + + + // In FF4, if disabled, window.localStorage should === null. + + // Normally, we could not test that directly and need to do a + // `('localStorage' in window) && ` test first because otherwise Firefox will + // throw bugzil.la/365772 if cookies are disabled + + // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem + // will throw the exception: + // QUOTA_EXCEEDED_ERRROR DOM Exception 22. + // Peculiarly, getItem and removeItem calls do not throw. + + // Because we are forced to try/catch this, we'll go aggressive. + + // Just FWIW: IE8 Compat mode supports these features completely: + // www.quirksmode.org/dom/html5.html + // But IE8 doesn't support either with local files + + tests['localstorage'] = function() { + try { + localStorage.setItem(mod, mod); + localStorage.removeItem(mod); + return true; + } catch(e) { + return false; + } + }; + + tests['sessionstorage'] = function() { + try { + sessionStorage.setItem(mod, mod); + sessionStorage.removeItem(mod); + return true; + } catch(e) { + return false; + } + }; + + + tests['webworkers'] = function() { + return !!window.Worker; + }; + + + tests['applicationcache'] = function() { + return !!window.applicationCache; + }; + + + // Thanks to Erik Dahlstrom + tests['svg'] = function() { + return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect; + }; + + // specifically for SVG inline in HTML, not within XHTML + // test page: paulirish.com/demo/inline-svg + tests['inlinesvg'] = function() { + var div = document.createElement('div'); + div.innerHTML = ''; + return (div.firstChild && div.firstChild.namespaceURI) == ns.svg; + }; + + // SVG SMIL animation + tests['smil'] = function() { + return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate'))); + }; + + // This test is only for clip paths in SVG proper, not clip paths on HTML content + // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg + + // However read the comments to dig into applying SVG clippaths to HTML content here: + // github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491 + tests['svgclippaths'] = function() { + return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath'))); + }; + + /*>>webforms*/ + // input features and input types go directly onto the ret object, bypassing the tests loop. + // Hold this guy to execute in a moment. + function webforms() { + /*>>input*/ + // Run through HTML5's new input attributes to see if the UA understands any. + // We're using f which is the element created early on + // Mike Taylr has created a comprehensive resource for testing these attributes + // when applied to all input types: + // miketaylr.com/code/input-type-attr.html + // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + + // Only input placeholder is tested while textarea's placeholder is not. + // Currently Safari 4 and Opera 11 have support only for the input placeholder + // Both tests are available in feature-detects/forms-placeholder.js + Modernizr['input'] = (function( props ) { + for ( var i = 0, len = props.length; i < len; i++ ) { + attrs[ props[i] ] = !!(props[i] in inputElem); + } + if (attrs.list){ + // safari false positive's on datalist: webk.it/74252 + // see also github.com/Modernizr/Modernizr/issues/146 + attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement); + } + return attrs; + })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ')); + /*>>input*/ + + /*>>inputtypes*/ + // Run through HTML5's new input types to see if the UA understands any. + // This is put behind the tests runloop because it doesn't return a + // true/false like all the other tests; instead, it returns an object + // containing each input type with its corresponding true/false value + + // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/ + Modernizr['inputtypes'] = (function(props) { + + for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) { + + inputElem.setAttribute('type', inputElemType = props[i]); + bool = inputElem.type !== 'text'; + + // We first check to see if the type we give it sticks.. + // If the type does, we feed it a textual value, which shouldn't be valid. + // If the value doesn't stick, we know there's input sanitization which infers a custom UI + if ( bool ) { + + inputElem.value = smile; + inputElem.style.cssText = 'position:absolute;visibility:hidden;'; + + if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) { + + docElement.appendChild(inputElem); + defaultView = document.defaultView; + + // Safari 2-4 allows the smiley as a value, despite making a slider + bool = defaultView.getComputedStyle && + defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' && + // Mobile android web browser has false positive, so must + // check the height to see if the widget is actually there. + (inputElem.offsetHeight !== 0); + + docElement.removeChild(inputElem); + + } else if ( /^(search|tel)$/.test(inputElemType) ){ + // Spec doesn't define any special parsing or detectable UI + // behaviors so we pass these through as true + + // Interestingly, opera fails the earlier test, so it doesn't + // even make it here. + + } else if ( /^(url|email)$/.test(inputElemType) ) { + // Real url and email support comes with prebaked validation. + bool = inputElem.checkValidity && inputElem.checkValidity() === false; + + } else { + // If the upgraded input compontent rejects the :) text, we got a winner + bool = inputElem.value != smile; + } + } + + inputs[ props[i] ] = !!bool; + } + return inputs; + })('search tel url email datetime date month week time datetime-local number range color'.split(' ')); + /*>>inputtypes*/ + } + /*>>webforms*/ + + + // End of test definitions + // ----------------------- + + + + // Run through all tests and detect their support in the current UA. + // todo: hypothetically we could be doing an array of tests and use a basic loop here. + for ( var feature in tests ) { + if ( hasOwnProp(tests, feature) ) { + // run the test, throw the return value into the Modernizr, + // then based on that boolean, define an appropriate className + // and push it into an array of classes we'll join later. + featureName = feature.toLowerCase(); + Modernizr[featureName] = tests[feature](); + + classes.push((Modernizr[featureName] ? '' : 'no-') + featureName); + } + } + + /*>>webforms*/ + // input tests need to run. + Modernizr.input || webforms(); + /*>>webforms*/ + + + /** + * addTest allows the user to define their own feature tests + * the result will be added onto the Modernizr object, + * as well as an appropriate className set on the html element + * + * @param feature - String naming the feature + * @param test - Function returning true if feature is supported, false if not + */ + Modernizr.addTest = function ( feature, test ) { + if ( typeof feature == 'object' ) { + for ( var key in feature ) { + if ( hasOwnProp( feature, key ) ) { + Modernizr.addTest( key, feature[ key ] ); + } + } + } else { + + feature = feature.toLowerCase(); + + if ( Modernizr[feature] !== undefined ) { + // we're going to quit if you're trying to overwrite an existing test + // if we were to allow it, we'd do this: + // var re = new RegExp("\\b(no-)?" + feature + "\\b"); + // docElement.className = docElement.className.replace( re, '' ); + // but, no rly, stuff 'em. + return Modernizr; + } + + test = typeof test == 'function' ? test() : test; + + if (typeof enableClasses !== "undefined" && enableClasses) { + docElement.className += ' ' + (test ? '' : 'no-') + feature; + } + Modernizr[feature] = test; + + } + + return Modernizr; // allow chaining. + }; + + + // Reset modElem.cssText to nothing to reduce memory footprint. + setCss(''); + modElem = inputElem = null; + + /*>>shiv*/ + /*! HTML5 Shiv v3.6.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */ + ;(function(window, document) { + /*jshint evil:true */ + /** 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 = ''; + //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) { + 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'; + 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; + } + + /** + * 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) ? 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>shiv*/ + + // Assign private properties to the return object with prefix + Modernizr._version = version; + + // expose these for the plugin API. Look in the source for how to join() them against your input + /*>>prefixes*/ + Modernizr._prefixes = prefixes; + /*>>prefixes*/ + /*>>domprefixes*/ + Modernizr._domPrefixes = domPrefixes; + Modernizr._cssomPrefixes = cssomPrefixes; + /*>>domprefixes*/ + + /*>>mq*/ + // Modernizr.mq tests a given media query, live against the current state of the window + // A few important notes: + // * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false + // * A max-width or orientation query will be evaluated against the current state, which may change later. + // * You must specify values. Eg. If you are testing support for the min-width media query use: + // Modernizr.mq('(min-width:0)') + // usage: + // Modernizr.mq('only screen and (max-width:768)') + Modernizr.mq = testMediaQuery; + /*>>mq*/ + + /*>>hasevent*/ + // Modernizr.hasEvent() detects support for a given event, with an optional element to test on + // Modernizr.hasEvent('gesturestart', elem) + Modernizr.hasEvent = isEventSupported; + /*>>hasevent*/ + + /*>>testprop*/ + // Modernizr.testProp() investigates whether a given style property is recognized + // Note that the property names must be provided in the camelCase variant. + // Modernizr.testProp('pointerEvents') + Modernizr.testProp = function(prop){ + return testProps([prop]); + }; + /*>>testprop*/ + + /*>>testallprops*/ + // Modernizr.testAllProps() investigates whether a given style property, + // or any of its vendor-prefixed variants, is recognized + // Note that the property names must be provided in the camelCase variant. + // Modernizr.testAllProps('boxSizing') + Modernizr.testAllProps = testPropsAll; + /*>>testallprops*/ + + + /*>>teststyles*/ + // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards + // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... }) + Modernizr.testStyles = injectElementWithStyles; + /*>>teststyles*/ + + + /*>>prefixed*/ + // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input + // Modernizr.prefixed('boxSizing') // 'MozBoxSizing' + + // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style. + // Return values will also be the camelCase variant, if you need to translate that to hypenated style use: + // + // str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-'); + + // If you're trying to ascertain which transition end event to bind to, you might do something like... + // + // var transEndEventNames = { + // 'WebkitTransition' : 'webkitTransitionEnd', + // 'MozTransition' : 'transitionend', + // 'OTransition' : 'oTransitionEnd', + // 'msTransition' : 'MSTransitionEnd', + // 'transition' : 'transitionend' + // }, + // transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ]; + + Modernizr.prefixed = function(prop, obj, elem){ + if(!obj) { + return testPropsAll(prop, 'pfx'); + } else { + // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame' + return testPropsAll(prop, obj, elem); + } + }; + /*>>prefixed*/ + + + /*>>cssclasses*/ + // Remove "no-js" class from element, if it exists: + docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') + + + // Add the new classes to the element. + (enableClasses ? ' js ' + classes.join(' ') : ''); + /*>>cssclasses*/ + + return Modernizr; + +})(this, this.document); diff --git a/ajax/libs/ink/3.0.0/js/modernizr.min.js b/ajax/libs/ink/3.0.0/js/modernizr.min.js new file mode 100644 index 000000000..f52b9f676 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/modernizr.min.js @@ -0,0 +1 @@ +window.Modernizr=function(e,t,n){function r(e){b.cssText=e}function o(e,t){return r(S.join(e+";")+(t||""))}function a(e,t){return typeof e===t}function i(e,t){return!!~(""+e).indexOf(t)}function c(e,t){for(var r in e){var o=e[r];if(!i(o,"-")&&b[o]!==n)return"pfx"==t?o:!0}return!1}function u(e,t,r){for(var o in e){var i=t[e[o]];if(i!==n)return r===!1?e[o]:a(i,"function")?i.bind(r||t):i}return!1}function s(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),o=(e+" "+k.join(r+" ")+r).split(" ");return a(t,"string")||a(t,"undefined")?c(o,t):(o=(e+" "+T.join(r+" ")+r).split(" "),u(o,t,n))}function l(){p.input=function(n){for(var r=0,o=n.length;o>r;r++)j[n[r]]=!!(n[r]in E);return j.list&&(j.list=!(!t.createElement("datalist")||!e.HTMLDataListElement)),j}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),p.inputtypes=function(e){for(var r,o,a,i=0,c=e.length;c>i;i++)E.setAttribute("type",o=e[i]),r="text"!==E.type,r&&(E.value=x,E.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(o)&&E.style.WebkitAppearance!==n?(g.appendChild(E),a=t.defaultView,r=a.getComputedStyle&&"textfield"!==a.getComputedStyle(E,null).WebkitAppearance&&0!==E.offsetHeight,g.removeChild(E)):/^(search|tel)$/.test(o)||(r=/^(url|email)$/.test(o)?E.checkValidity&&E.checkValidity()===!1:E.value!=x)),P[e[i]]=!!r;return P}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var f,d,m="2.6.3",p={},h=!0,g=t.documentElement,v="modernizr",y=t.createElement(v),b=y.style,E=t.createElement("input"),x=":)",w={}.toString,S=" -webkit- -moz- -o- -ms- ".split(" "),C="Webkit Moz O ms",k=C.split(" "),T=C.toLowerCase().split(" "),N={svg:"http://www.w3.org/2000/svg"},M={},P={},j={},$=[],D=$.slice,F=function(e,n,r,o){var a,i,c,u,s=t.createElement("div"),l=t.body,f=l||t.createElement("body");if(parseInt(r,10))for(;r--;)c=t.createElement("div"),c.id=o?o[r]:v+(r+1),s.appendChild(c);return a=["­",'"].join(""),s.id=v,(l?s:f).innerHTML+=a,f.appendChild(s),l||(f.style.background="",f.style.overflow="hidden",u=g.style.overflow,g.style.overflow="hidden",g.appendChild(f)),i=n(s,e),l?s.parentNode.removeChild(s):(f.parentNode.removeChild(f),g.style.overflow=u),!!i},z=function(t){var n=e.matchMedia||e.msMatchMedia;if(n)return n(t).matches;var r;return F("@media "+t+" { #"+v+" { position: absolute; } }",function(t){r="absolute"==(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position}),r},A=function(){function e(e,o){o=o||t.createElement(r[e]||"div"),e="on"+e;var i=e in o;return i||(o.setAttribute||(o=t.createElement("div")),o.setAttribute&&o.removeAttribute&&(o.setAttribute(e,""),i=a(o[e],"function"),a(o[e],"undefined")||(o[e]=n),o.removeAttribute(e))),o=null,i}var r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return e}(),L={}.hasOwnProperty;d=a(L,"undefined")||a(L.call,"undefined")?function(e,t){return t in e&&a(e.constructor.prototype[t],"undefined")}:function(e,t){return L.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=D.call(arguments,1),r=function(){if(this instanceof r){var o=function(){};o.prototype=t.prototype;var a=new o,i=t.apply(a,n.concat(D.call(arguments)));return Object(i)===i?i:a}return t.apply(e,n.concat(D.call(arguments)))};return r}),M.flexbox=function(){return s("flexWrap")},M.flexboxlegacy=function(){return s("boxDirection")},M.canvas=function(){var e=t.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},M.canvastext=function(){return!(!p.canvas||!a(t.createElement("canvas").getContext("2d").fillText,"function"))},M.webgl=function(){return!!e.WebGLRenderingContext},M.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:F(["@media (",S.join("touch-enabled),("),v,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){n=9===e.offsetTop}),n},M.geolocation=function(){return"geolocation"in navigator},M.postmessage=function(){return!!e.postMessage},M.websqldatabase=function(){return!!e.openDatabase},M.indexedDB=function(){return!!s("indexedDB",e)},M.hashchange=function(){return A("hashchange",e)&&(t.documentMode===n||t.documentMode>7)},M.history=function(){return!(!e.history||!history.pushState)},M.draganddrop=function(){var e=t.createElement("div");return"draggable"in e||"ondragstart"in e&&"ondrop"in e},M.websockets=function(){return"WebSocket"in e||"MozWebSocket"in e},M.rgba=function(){return r("background-color:rgba(150,255,150,.5)"),i(b.backgroundColor,"rgba")},M.hsla=function(){return r("background-color:hsla(120,40%,100%,.5)"),i(b.backgroundColor,"rgba")||i(b.backgroundColor,"hsla")},M.multiplebgs=function(){return r("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(b.background)},M.backgroundsize=function(){return s("backgroundSize")},M.borderimage=function(){return s("borderImage")},M.borderradius=function(){return s("borderRadius")},M.boxshadow=function(){return s("boxShadow")},M.textshadow=function(){return""===t.createElement("div").style.textShadow},M.opacity=function(){return o("opacity:.55"),/^0.55$/.test(b.opacity)},M.cssanimations=function(){return s("animationName")},M.csscolumns=function(){return s("columnCount")},M.cssgradients=function(){var e="background-image:",t="gradient(linear,left top,right bottom,from(#9f9),to(white));",n="linear-gradient(left top,#9f9, white);";return r((e+"-webkit- ".split(" ").join(t+e)+S.join(n+e)).slice(0,-e.length)),i(b.backgroundImage,"gradient")},M.cssreflections=function(){return s("boxReflect")},M.csstransforms=function(){return!!s("transform")},M.csstransforms3d=function(){var e=!!s("perspective");return e&&"webkitPerspective"in g.style&&F("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t){e=9===t.offsetLeft&&3===t.offsetHeight}),e},M.csstransitions=function(){return s("transition")},M.fontface=function(){var e;return F('@font-face {font-family:"font";src:url("https://")}',function(n,r){var o=t.getElementById("smodernizr"),a=o.sheet||o.styleSheet,i=a?a.cssRules&&a.cssRules[0]?a.cssRules[0].cssText:a.cssText||"":"";e=/src/i.test(i)&&0===i.indexOf(r.split(" ")[0])}),e},M.generatedcontent=function(){var e;return F(["#",v,"{font:0/0 a}#",v,':after{content:"',x,'";visibility:hidden;font:3px/1 a}'].join(""),function(t){e=t.offsetHeight>=3}),e},M.video=function(){var e=t.createElement("video"),n=!1;try{(n=!!e.canPlayType)&&(n=new Boolean(n),n.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(r){}return n},M.audio=function(){var e=t.createElement("audio"),n=!1;try{(n=!!e.canPlayType)&&(n=new Boolean(n),n.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=e.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(r){}return n},M.localstorage=function(){try{return localStorage.setItem(v,v),localStorage.removeItem(v),!0}catch(e){return!1}},M.sessionstorage=function(){try{return sessionStorage.setItem(v,v),sessionStorage.removeItem(v),!0}catch(e){return!1}},M.webworkers=function(){return!!e.Worker},M.applicationcache=function(){return!!e.applicationCache},M.svg=function(){return!!t.createElementNS&&!!t.createElementNS(N.svg,"svg").createSVGRect},M.inlinesvg=function(){var e=t.createElement("div");return e.innerHTML="",(e.firstChild&&e.firstChild.namespaceURI)==N.svg},M.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(w.call(t.createElementNS(N.svg,"animate")))},M.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(w.call(t.createElementNS(N.svg,"clipPath")))};for(var H in M)d(M,H)&&(f=H.toLowerCase(),p[f]=M[H](),$.push((p[f]?"":"no-")+f));return p.input||l(),p.addTest=function(e,t){if("object"==typeof e)for(var r in e)d(e,r)&&p.addTest(r,e[r]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,"undefined"!=typeof h&&h&&(g.className+=" "+(t?"":"no-")+e),p[e]=t}return p},r(""),y=E=null,function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=v.elements;return"string"==typeof e?e.split(" "):e}function o(e){var t=g[e[p]];return t||(t={},h++,e[p]=h,g[h]=t),t}function a(e,n,r){if(n||(n=t),l)return n.createElement(e);r||(r=o(n));var a;return a=r.cache[e]?r.cache[e].cloneNode():m.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),a.canHaveChildren&&!d.test(e)?r.frag.appendChild(a):a}function i(e,n){if(e||(e=t),l)return e.createDocumentFragment();n=n||o(e);for(var a=n.frag.cloneNode(),i=0,c=r(),u=c.length;u>i;i++)a.createElement(c[i]);return a}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return v.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/\w+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(v,t.frag)}function u(e){e||(e=t);var r=o(e);return!v.shivCSS||s||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),l||c(e,r),e}var s,l,f=e.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,m=/^(?: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,p="_html5shiv",h=0,g={};!function(){try{var e=t.createElement("a");e.innerHTML="",s="hidden"in e,l=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){s=!0,l=!0}}();var v={elements:f.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:f.shivCSS!==!1,supportsUnknownElements:l,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:u,createElement:a,createDocumentFragment:i};e.html5=v,u(t)}(this,t),p._version=m,p._prefixes=S,p._domPrefixes=T,p._cssomPrefixes=k,p.mq=z,p.hasEvent=A,p.testProp=function(e){return c([e])},p.testAllProps=s,p.testStyles=F,p.prefixed=function(e,t,n){return t?s(e,t,n):s(e,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(h?" js "+$.join(" "):""),p}(this,this.document); \ No newline at end of file diff --git a/ajax/libs/ink/3.0.0/js/prettify.js b/ajax/libs/ink/3.0.0/js/prettify.js new file mode 100644 index 000000000..30fc2a5d3 --- /dev/null +++ b/ajax/libs/ink/3.0.0/js/prettify.js @@ -0,0 +1,29 @@ +// [3.0.0] remove this file when docs properly separated +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p="0"&&"7">=n?parseInt(e.substring(1),8):"u"===n||"x"===n?parseInt(e.substring(2),16):e.charCodeAt(1)}function n(e){return 32>e?(16>e?"\\x0":"\\x")+e.toString(16):(e=String.fromCharCode(e),("\\"===e||"-"===e||"["===e||"]"===e)&&(e="\\"+e),e)}function r(e){for(var r=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=[],s="^"===r[0],i=s?1:0,o=r.length;o>i;++i){var l=r[i];if(/\\[bdsw]/i.test(l))e.push(l);else{var c,l=t(l);o>i+2&&"-"===r[i+1]?(c=t(r[i+2]),i+=2):c=l,a.push([l,c]),65>c||l>122||(65>c||l>90||a.push([32|Math.max(65,l),32|Math.min(c,90)]),97>c||l>122||a.push([-33&Math.max(97,l),-33&Math.min(c,122)]))}}for(a.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]}),r=[],l=[0/0,0/0],i=0;io[0]&&(o[1]+1>o[0]&&a.push("-"),a.push(n(o[1])));return a.push("]"),a.join("")}function a(e){for(var t=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),n=t.length,a=[],o=0,l=0;n>o;++o){var c=t[o];"("===c?++l:"\\"===c.charAt(0)&&(c=+c.substring(1))&&l>=c&&(a[c]=-1)}for(o=1;oo;++o)c=t[o],"("===c?(++l,void 0===a[l]&&(t[o]="(?:")):"\\"===c.charAt(0)&&(c=+c.substring(1))&&l>=c&&(t[o]="\\"+a[l]);for(l=o=0;n>o;++o)"^"===t[o]&&"^"!==t[o+1]&&(t[o]="");if(e.ignoreCase&&i)for(o=0;n>o;++o)c=t[o],e=c.charAt(0),c.length>=2&&"["===e?t[o]=r(c):"\\"!==e&&(t[o]=c.replace(/[A-Za-z]/g,function(e){return e=e.charCodeAt(0),"["+String.fromCharCode(-33&e,32|e)+"]"}));return t.join("")}for(var s=0,i=!1,o=!1,l=0,c=e.length;c>l;++l){var u=e[l];if(u.ignoreCase)o=!0;else if(/[a-z]/i.test(u.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){i=!0,o=!1;break}}for(var d={b:8,t:9,n:10,v:11,f:12,r:13},p=[],l=0,c=e.length;c>l;++l){if(u=e[l],u.global||u.multiline)throw Error(""+u);p.push("(?:"+a(u)+")")}return RegExp(p.join("|"),o?"gi":"g")}function t(e){function t(e){switch(e.nodeType){case 1:if(r.test(e.className))break;for(var n=e.firstChild;n;n=n.nextSibling)t(n);n=e.nodeName,("BR"===n||"LI"===n)&&(a[o]="\n",i[o<<1]=s++,i[o++<<1|1]=e);break;case 3:case 4:n=e.nodeValue,n.length&&(n=l?n.replace(/\r\n?/g,"\n"):n.replace(/[\t\n\r ]+/g," "),a[o]=n,i[o<<1]=s,s+=n.length,i[o++<<1|1]=e)}}var n,r=/(?:^|\s)nocode(?:\s|$)/,a=[],s=0,i=[],o=0;e.currentStyle?n=e.currentStyle.whiteSpace:window.getComputedStyle&&(n=document.defaultView.getComputedStyle(e,q).getPropertyValue("white-space"));var l=n&&"pre"===n.substring(0,3);return t(e),{a:a.join("").replace(/\n$/,""),c:i}}function n(e,t,n,r){t&&(e={a:t,d:e},n(e),r.push.apply(r,e.e))}function r(t,r){function a(e){for(var t=e.d,c=[t,"pln"],u=0,d=e.a.match(s)||[],p={},f=0,h=d.length;h>f;++f){var g,m=d[f],y=p[m],v=void 0;if("string"==typeof y)g=!1;else{var w=i[m.charAt(0)];if(w)v=m.match(w[1]),y=w[0];else{for(g=0;l>g;++g)if(w=r[g],v=m.match(w[1])){y=w[0];break}v||(y="pln")}!(g=y.length>=5&&"lang-"===y.substring(0,5))||v&&"string"==typeof v[1]||(g=!1,y="src"),g||(p[m]=y)}if(w=u,u+=m.length,g){g=v[1];var b=m.indexOf(g),S=b+g.length;v[2]&&(S=m.length-v[2].length,b=S-g.length),y=y.substring(5),n(t+w,m.substring(0,b),a,c),n(t+w+b,g,o(y,g),c),n(t+w+S,m.substring(S),a,c)}else c.push(t+w,y)}e.e=c}var s,i={};!function(){for(var n=t.concat(r),a=[],o={},l=0,c=n.length;c>l;++l){var u=n[l],d=u[3];if(d)for(var p=d.length;--p>=0;)i[d.charAt(p)]=u;u=u[1],d=""+u,o.hasOwnProperty(d)||(a.push(u),o[d]=q)}a.push(/[\S\s]/),s=e(a)}();var l=r.length;return a}function a(e){var t=[],n=[];t.push(e.tripleQuotedStrings?["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]:e.multiLineStrings?["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,q,"'\"`"]:["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]),e.verbatimStrings&&n.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var a=e.hashComments;return a&&(e.cStyleComments?(t.push(a>1?["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]:["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):t.push(["com",/^#[^\n\r]*/,q,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\n\r]*/,q]),n.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q])),e.regexLiterals&&n.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]),(a=e.types)&&n.push(["typ",a]),e=(""+e.keywords).replace(/^ | $/g,""),e.length&&n.push(["kwd",RegExp("^(?:"+e.replace(/[\s,]+/g,"|")+")\\b"),q]),t.push(["pln",/^\s+/,q," \r\n  "]),n.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]),r(t,n)}function s(e,t){function n(e){switch(e.nodeType){case 1:if(s.test(e.className))break;if("BR"===e.nodeName)r(e),e.parentNode&&e.parentNode.removeChild(e);else for(e=e.firstChild;e;e=e.nextSibling)n(e);break;case 3:case 4:if(l){var t=e.nodeValue,a=t.match(i);if(a){var c=t.substring(0,a.index);e.nodeValue=c,(t=t.substring(a.index+a[0].length))&&e.parentNode.insertBefore(o.createTextNode(t),e.nextSibling),r(e),c||e.parentNode.removeChild(e)}}}}function r(e){function t(e,n){var r=n?e.cloneNode(!1):e,a=e.parentNode;if(a){var a=t(a,1),s=e.nextSibling;a.appendChild(r);for(var i=s;i;i=s)s=i.nextSibling,a.appendChild(i)}return r}for(;!e.nextSibling;)if(e=e.parentNode,!e)return;for(var n,e=t(e.nextSibling,0);(n=e.parentNode)&&1===n.nodeType;)e=n;c.push(e)}var a,s=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,o=e.ownerDocument;e.currentStyle?a=e.currentStyle.whiteSpace:window.getComputedStyle&&(a=o.defaultView.getComputedStyle(e,q).getPropertyValue("white-space"));var l=a&&"pre"===a.substring(0,3);for(a=o.createElement("LI");e.firstChild;)a.appendChild(e.firstChild);for(var c=[a],u=0;uu;++u)a=c[u],a.className="L"+(u+p)%10,a.firstChild||a.appendChild(o.createTextNode(" ")),d.appendChild(a);e.appendChild(d)}function i(e,t){for(var n=t.length;--n>=0;){var r=t[n];w.hasOwnProperty(r)?window.console&&console.warn("cannot override language handler %s",r):w[r]=e}}function o(e,t){return e&&w.hasOwnProperty(e)||(e=/^\s*h;)d[h]!==d[h+2]?(d[f++]=d[h++],d[f++]=d[h++]):h+=2;for(p=f,h=f=0;p>h;){for(var g=d[h],m=d[h+1],y=h+2;p>=y+2&&d[y+1]===m;)y+=2;d[f++]=g,d[f++]=m,h=y}for(d.length=f;u>a;){var v,w=c[a+2]||l,b=d[e+2]||l,y=Math.min(w,b),S=c[a+1];if(1!==S.nodeType&&(v=i.substring(r,y))){s&&(v=v.replace(n,"\r")),S.nodeValue=v;var x=S.ownerDocument,N=x.createElement("SPAN");N.className=d[e+1];var C=S.parentNode;C.replaceChild(N,S),N.appendChild(S),w>r&&(c[a+1]=S=x.createTextNode(i.substring(y,w)),C.insertBefore(S,N.nextSibling))}r=y,r>=w&&(a+=2),r>=b&&(e+=2)}}catch(k){"console"in window&&console.log(k&&k.stack?k.stack:k)}}var c=["break,continue,do,else,for,if,return,while"],u=[[c,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],d=[u,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],p=[u,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],f=[p,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],u=[u,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],h=[c,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],g=[c,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],c=[c,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],m=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,y=/\S/,v=a({keywords:[d,f,u,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+h,g,c],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),w={};i(v,["default-code"]),i(r([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),i(r([["pln",/^\s+/,q," \r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]),i(r([],[["atv",/^[\S\s]+/]]),["uq.val"]),i(a({keywords:d,hashComments:!0,cStyleComments:!0,types:m}),["c","cc","cpp","cxx","cyc","m"]),i(a({keywords:"null,true,false"}),["json"]),i(a({keywords:f,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:m}),["cs"]),i(a({keywords:p,cStyleComments:!0}),["java"]),i(a({keywords:c,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),i(a({keywords:h,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),i(a({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),i(a({keywords:g,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),i(a({keywords:u,cStyleComments:!0,regexLiterals:!0}),["js"]),i(a({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),i(r([],[["str",/^[\S\s]+/]]),["regex"]),window.prettyPrintOne=function(e,t,n){var r=document.createElement("PRE");return r.innerHTML=e,n&&s(r,n),l({g:t,i:n,h:r}),r.innerHTML},window.prettyPrint=function(e){function t(){for(var n=window.PR_SHOULD_USE_CONTINUATION?c.now()+250:1/0;d=0){var o,f,i=i.match(p);if(f=!i){f=a;for(var h=void 0,g=f.firstChild;g;g=g.nextSibling)var m=g.nodeType,h=1===m?h?f:g:3===m?y.test(g.nodeValue)?f:h:h;f=(o=h===f?void 0:h)&&"CODE"===o.tagName}for(f&&(i=o.className.match(p)),i&&(i=i[1]),f=!1,h=a.parentNode;h;h=h.parentNode)if(("pre"===h.tagName||"code"===h.tagName||"xmp"===h.tagName)&&h.className&&h.className.indexOf("prettyprint")>=0){f=!0;break}f||((f=(f=a.className.match(/\blinenums\b(?::(\d+))?/))?f[1]&&f[1].length?+f[1]:!0:!1)&&s(a,f),u={g:i,h:a,i:f},l(u))}}di;++i)r.push(n[a][i]);var n=q,c=Date;c.now||(c={now:function(){return+new Date}});var u,d=0,p=/\blang(?:uage)?-([\w.]+)(?!\S)/;t()},window.PR={createSimpleLexer:r,registerLangHandler:i,sourceDecorator:a,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}}(); \ No newline at end of file diff --git a/ajax/libs/ink/package.json b/ajax/libs/ink/package.json index b13327f91..11d68d5fc 100644 --- a/ajax/libs/ink/package.json +++ b/ajax/libs/ink/package.json @@ -1,7 +1,7 @@ { "name": "ink", "filename": "js/ink-all.min.js", - "version": "2.3.2", + "version": "3.0.0", "description": "An HTML5/CSS3 framework used at SAPO for fast and efficient website design and prototyping", "homepage": "http://ink.sapo.pt/", "keywords": [