readme.txt000064400000013005150212710760006542 0ustar00=== SiteOrigin CSS === Tags: css editor, visual css, live editing, theme editor, website styling Requires at least: 3.9 Requires PHP: 7.0.0 Tested up to: 6.7 Stable tag: 1.6.3 Build time: 2025-01-15T13:23:32+00:00 License: GPLv2 or later Contributors: gpriday, alexgso Donate link: https://siteorigin.com/downloads/premium/ SiteOrigin CSS is the simple yet powerful CSS editor for WordPress. It gives you visual controls that let you edit the look and feel of your site in real-time. == Description == SiteOrigin CSS is the simple yet powerful CSS editor for WordPress. It gives you visual controls that let you edit the look and feel of your site in real-time. We've created a site editing experience that will suit both beginners and advanced users alike. Beginners will love the simple visual controls and real-time preview. Advanced users will love the code autocompletion that makes writing CSS faster than ever. [vimeo https://vimeo.com/129660380] = Inspector = The hardest part of editing your site's design using CSS is usually finding the correct selector to use. The powerful inspector that comes with SiteOrigin CSS makes this easy. While viewing a full preview of your site, just click on an element, and it'll help you identify the best selector to use to target that element. The inspector will help you even if you have no idea what a CSS selector is. = Visual Editor = Don't like playing around with code? No problem. SiteOrigin CSS has a set of simple controls that make it easy to choose colors, styles, and measurements. Combined with the inspector, you'll be able to make changes in just a few clicks. = CSS Editor = SiteOrigin CSS has a powerful CSS editor, the likes of which you'd usually only expect from high-end IDEs. It has autocompletion for both CSS selectors and attributes. It also features very useful CSS linting to help you identify issues in your code before you publish your changes. = It's Free = We're committed to keeping SiteOrigin CSS free. You can install it on as many sites as you like without ever worrying about licensing. All future updates and upgrades will be free, and we even offer free support over on our friendly support forums. = Works With Any Theme = There's an ever-growing collection of awesome WordPress themes, and now with SiteOrigin CSS, you can edit every single one of them to your heart's content. No matter what theme you're using, SiteOrigin CSS will work perfectly. = Actively Developed = We're actively developing SiteOrigin CSS. Keep track of what's happening over on [GitHub](https://github.com/siteorigin/so-css/). == Installation == 1. Upload and install SiteOrigin CSS in the same way you'd install any other plugin. 2. Read the [usage documentation](http://siteorigin.com/css/getting-started/) on SiteOrigin. == Screenshots == 1. Inspector for finding elements on your site. 2. Simple visual controls, including a background image uploader. 3. A full CSS editor that works in real-time with a preview of your site. 4. Code completion for all your theme's selectors. == Documentation == [Documentation](https://siteorigin.com/css/getting-started/) is available on SiteOrigin. == Support == Free support is available on the [SiteOrigin support forums](https://siteorigin.com/thread/). == SiteOrigin Premium == [SiteOrigin Premium](https://siteorigin.com/downloads/premium/) enhances SiteOrigin CSS with a Google Web Font Selector. Choose from hundreds of beautiful web fonts right in the visual editor. SiteOrigin Premium includes access to our professional email support service, perfect for those times when you need fast and effective technical support. We're standing by to assist you in any way we can. == Changelog == = 1.6.3 - 15 January 2025 = * Resolved Uninstall Notice: Updated `register_uninstall_hook` callback to use a static class method, addressing a WordPress notice introduced in version 3.1.0. = 1.6.2 - 13 January 2025 = * Fixed uninstall process to prevent PHP fatal error by updating the `register_uninstall_hook` callback to use a valid instance method. = 1.6.1 - 25 November 2024 = * CSS Output Location: Additional check to ensure the default is Dedicated File. = 1.6.0 - 22 November 2024 = * Added `Visual Editor: Decoration > Background Attachment` setting. * Added CSS Ouput Location setting. Dedicated CSS File offers best performance, Internal CSS embeds styles in page HTML. = 1.5.11 - 13 August 2024 = * Added Divi theme compatibility. * Accounted for for themes that don't use menu item selectors by adding them automatically. = 1.5.10 - 31 May 2024 = * Updated SiteOrigin Installer. * Updated Tested up to tag. * Updated Required PHP version. = 1.5.9 - 11 November 2023 = * Updated Tested up to tag. * Updated SiteOrigin Installer. = 1.5.8 - 11 August 2023 = * Updated the SiteOrigin Installer submodule. = 1.5.7 - 09 August 2023 = * Updated the expand/compress title depending on the state in the visual editor. * Updated the "Tested up to" version in the readme.txt file from 6.2 to 6.3, indicating compatibility with WordPress version 6.3. * Added SiteOrigin Installer submodule and functionality to handle the installer link and status in the editor and page templates. = 1.5.6 - 07 April 2023 = * WordPress PHP Coding Standards improvements. * Updated `Tested up to` tag. = 1.5.5 - 30 September 2022 = * Added a check to ensure WP Filesystem is setup. = 1.5.4 - 28 September 2022 = * Developer: Introduced definable Custom CSS file name and location using `siteorigin_custom_css_file` and `siteorigin_css_enqueue_css`. [View full changelog.](https://siteorigin.com/css/changelog/) css/admin.css000064400000046474150212710760007156 0ustar00@font-face { font-family: 'SoCSSIcons'; src: url('icons/so-css-icons.ttf?joepfs') format('truetype'), url('icons/so-css-icons.woff?joepfs') format('woff'), url('icons/so-css-icons.svg?joepfs#icomoon') format(' svg'); font-weight: normal; font-style: normal; font-display: block; } .so-css-icon { display: inline-block; font: normal normal normal 14px/1 SoCSSIcons; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transform: translate(0, 0); } .so-css-icon-compress:before { content: "\f066"; } .so-css-icon-plus:before { content: "\f067"; } .so-css-icon-minus:before { content: "\f068"; } .so-css-icon-check:before { content: "\f00c"; } .so-css-icon-font:before { content: "\f031"; } .so-css-icon-bold:before { content: "\f032"; } .so-css-icon-italic:before { content: "\f033"; } .so-css-icon-align-left:before { content: "\f036"; } .so-css-icon-align-center:before { content: "\f037"; } .so-css-icon-align-right:before { content: "\f038"; } .so-css-icon-align-justify:before { content: "\f039"; } .so-css-icon-expand:before { content: "\f065"; } .so-css-icon-compress:before { content: "\f066"; } .so-css-icon-eye:before { content: "\f06e"; } .so-css-icon-upload:before { content: "\f093"; } .so-css-icon-save:before { content: "\e900"; } .so-css-icon-strikethrough:before { content: "\f0cc"; } .so-css-icon-underline:before { content: "\f0cd"; } .so-css-icon-columns:before { content: "\f0db"; } .so-css-icon-circle:before { content: "\f10c"; } .so-css-icon-eyedropper:before { content: "\f1fb"; } #siteorigin-custom-css { color: #333; margin: 0 0 0 -20px; } #siteorigin-custom-css h2 { background: #f8f8f8; padding: 20px; border-bottom: 1px solid #d0d0d0; margin-bottom: 20px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.035); } #siteorigin-custom-css h2 .icon { width: 40px; height: auto; margin: -8px 10px -8px 0; } #siteorigin-custom-css .notice { margin: 0 20px 20px 20px; } #siteorigin-custom-css #poststuff { padding: 0 20px; } #siteorigin-custom-css #poststuff .postbox { border: 1px solid #D0D0D0; } #siteorigin-custom-css #poststuff .postbox h3.hndle { cursor: default; border-bottom: 1px solid #D0D0D0; background: #efefef; position: relative; } #siteorigin-custom-css #poststuff .postbox h3.hndle .hide { position: absolute; top: 50%; line-height: 1em; margin-top: -0.5em; right: 12px; } #siteorigin-custom-css #poststuff #so-custom-css-getting-started .inside { padding: 0 6px 6px 6px; } #siteorigin-custom-css #poststuff #so-custom-css-getting-started .inside img { display: block; width: 100%; height: auto; } #so-custom-css-form { margin-right: 340px; } #so-custom-css-info { float: right; width: 315px; } #so-custom-css-info .inside { margin: 11px; padding: 0; } #so-custom-css-info p.so-custom-css-submit { padding-top: 1px; } #so-custom-css-info p.so-custom-css-submit .button-primary { font-size: 14px; min-height: 40px; width: 100%; } #so-custom-css-info #so_css_editor_theme { margin-top: 6px; width: 100%; } #so-custom-css-info select { margin-top: 6px; width: 100%; } #so-custom-css-revisions ol { list-style: none; margin: 0; } #so-custom-css-revisions ol li { margin: 0; line-height: 2.2em; } #so-custom-css-form .custom-css-preview iframe, #so-custom-css-form .custom-css-preview #preview-navigator { display: none; } #so-custom-css-form .custom-css-toolbar { border: 1px solid #D0D0D0; border-bottom: none; background: #efefef; padding: 8px 10px; overflow: auto; } #so-custom-css-form .custom-css-toolbar .toolbar-function-buttons { float: left; } #so-custom-css-form .custom-css-toolbar .toolbar-function-buttons .toolbar-functions-dropdown { display: none; } #so-custom-css-form .custom-css-toolbar .toolbar-function-buttons ul.toolbar-buttons { margin: 0; } #so-custom-css-form .custom-css-toolbar .toolbar-function-buttons ul.toolbar-buttons li { display: inline-block; margin: 0; padding: 0; } #so-custom-css-form .custom-css-toolbar .toolbar-action-buttons { float: right; } #so-custom-css-form .custom-css-toolbar .toolbar-action-buttons a.active { border-color: #b4c4cf; background-color: #e9f9ff; color: #596872; } #so-custom-css-form .custom-css-toolbar .toolbar-action-buttons .editor-expand { float: right; text-decoration: none; color: #666; } #so-custom-css-form .custom-css-toolbar .toolbar-action-buttons .editor-expand .so-css-icon-compress { display: none; } #so-custom-css-form .custom-css-toolbar .so-css-icon { font-size: 14px; } #so-custom-css-form .custom-css-container { border: 1px solid #D0D0D0; background: #f7f7f7; cursor: text; overflow: hidden; } #so-custom-css-form .custom-css-container .CodeMirror { height: auto; } #so-custom-css-form .custom-css-container .CodeMirror-scroll { margin: 0; min-height: 300px; overflow-x: hidden !important; padding: 0; } #so-custom-css-form .custom-css-container .CodeMirror-lines { padding: 8px 0 8px 0; } #so-custom-css-form .custom-css-container textarea { border: 0; padding: 8px 0 8px 4px; width: 100%; min-height: 300px; display: block; font-family: monospace; font-size: 13px; line-height: 1.4em; border-left: 1px solid #ddd; margin-left: 16px; } #so-custom-css-form .so-css-footer { align-items: center; display: flex; justify-content: space-between; margin-top: 10px; } @media (max-width: 800px) { #so-custom-css-form .so-css-footer { align-items: start; flex-direction: column-reverse; } } #so-custom-css-form .decoration { display: none; } #so-custom-css-form:not(.expanded) .save.socss-button { display: none; } #so-custom-css-form.expanded { z-index: 100000; position: fixed; top: 0; left: 0; bottom: 0; width: 340px; } #so-custom-css-form.expanded .custom-css-toolbar .editor-expand .so-css-icon-expand { display: none; } #so-custom-css-form.expanded .custom-css-toolbar .editor-expand .so-css-icon-compress { display: inline-block; } #so-custom-css-form.expanded .decoration { display: block; position: absolute; top: 0; bottom: 0; left: 339px; width: 2px; background: rgba(0, 0, 0, 0.1); } #so-custom-css-form.expanded .description { display: none; } #so-custom-css-form.expanded .submit { display: none; } #so-custom-css-form.expanded .custom-css-preview { position: fixed; display: block; top: 40px; right: 0; bottom: 0; left: 340px; background: #ffffff; } #so-custom-css-form.expanded .custom-css-preview #preview-navigator { display: block; -ms-box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 6px 10px; position: absolute; width: 100%; height: 40px; top: -40px; background: #bbb; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #bbb), color-stop(1, #eee)); background: -ms-linear-gradient(bottom, #bbb, #eee); background: -moz-linear-gradient(center bottom, #bbb 0%, #eee 100%); background: -o-linear-gradient(#eee, #bbb); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eee', endColorstr='#bbb', GradientType=0); border-bottom: 1px solid #888; } #so-custom-css-form.expanded .custom-css-preview #preview-navigator input { width: 100%; border: 1px solid #888; border-radius: 2px; color: #444; -webkit-box-shadow: inset 2px 2px 2px rgba( 0,0,0,0.1 ); -moz-box-shadow: inset 2px 2px 2px rgba( 0,0,0,0.1 ); box-shadow: inset 2px 2px 2px rgba( 0,0,0,0.1 ); } #so-custom-css-form.expanded .custom-css-preview #preview-iframe { display: block; width: 100%; height: 100%; overflow-x: hidden; } #so-custom-css-properties { display: none; position: fixed; top: 0; left: -338px; bottom: 0; width: 338px; background: #ffffff; border: 1px solid #D0D0D0; overflow-y: auto; z-index: 100000; } #so-custom-css-properties .toolbar { display: block; padding: 7px 10px; border-bottom: 1px solid #aaa; background: #F6F6F6; text-align: left; } #so-custom-css-properties .toolbar select { font-size: 13px; height: 30px; line-height: 30px; max-width: 225px; min-height: 0; width: 100%; } #so-custom-css-properties .toolbar select.highlighted { background: #daeaf7; } #so-custom-css-properties .toolbar .close, #so-custom-css-properties .toolbar .save { float: right; } #so-custom-css-properties .section-tabs { list-style: none; height: auto; margin: 0; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); } #so-custom-css-properties .section-tabs li { box-sizing: border-box; float: left; width: 33.333%; padding: 10px 7px; border: 1px solid #aaa; background: #F6F6F6; font-weight: bold; border-top: 0; border-left: 0; font-size: 13px; line-height: 1em; cursor: pointer; white-space: nowrap; overflow: hidden; color: #666; } #so-custom-css-properties .section-tabs li:hover { background: #fff; } #so-custom-css-properties .section-tabs li .so-css-icon { float: left; display: block; margin: -1px 6px -1px 0; font-size: 15px; color: #666; } #so-custom-css-properties .section-tabs li:last-child { border-right: 0; } #so-custom-css-properties .section-tabs li.active { color: #444; background: #e8e8e8; } #so-custom-css-properties .section-tabs li.active .so-css-icon { color: #333; } #so-custom-css-properties .sections .section { display: none; padding: 10px; } #so-custom-css-properties .sections .fields-table { width: 100%; padding-top: 5px; } #so-custom-css-properties .sections .fields-table th, #so-custom-css-properties .sections .fields-table td { position: relative; zoom: 1; } #so-custom-css-properties .sections .fields-table th:before, #so-custom-css-properties .sections .fields-table td:before { content: ''; display: block; } #so-custom-css-properties .sections .fields-table th:after, #so-custom-css-properties .sections .fields-table td:after { content: ''; display: table; clear: both; } #so-custom-css-properties .sections .fields-table th[scope="row"] { font-weight: bold; font-size: 12px; padding-right: 10px; text-align: left; width: 36%; vertical-align: top; } #so-custom-css-properties .sections .fields-table td { padding: 0 0 12px 0 ; } #so-custom-css-properties .sections .fields-table input, #so-custom-css-properties .sections .fields-table select { display: block; margin: 0 25px 0 0; border: 1px solid #c0c0c0; width: 175px; box-sizing: border-box; border-radius: 0; font-size: 12px; } #so-custom-css-properties .sections .fields-table .socss-field-number input { margin: 0; width: 120px; } #so-custom-css-properties .sections .fields-table .minicolors input { box-sizing: border-box; height: 30px; padding: 5px 0 5px 30px; } #so-custom-css-properties .sections .fields-table .select { display: block; position: absolute; top: 0px; right: 0; line-height: inherit; margin: 0; padding: 4px 5px 6px; cursor: pointer; font-size: 15px; } #so-custom-css-properties .sections .fields-table .select-tabs { margin: 0; height: 40px; } #so-custom-css-properties .sections .fields-table .select-tabs .select-tab { cursor: pointer; float: left; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; text-align: center; border: 1px solid #c0c0c0; padding: 4px 2px; border-right-width: 0; background: #f7f7f7; } #so-custom-css-properties .sections .fields-table .select-tabs .select-tab .so-css-icon { line-height: 14px; font-size: 14px; color: #777; } #so-custom-css-properties .sections .fields-table .select-tabs .select-tab:last-child { border-right-width: 1px; } #so-custom-css-properties .sections .fields-table .select-tabs .select-tab:hover, #so-custom-css-properties .sections .fields-table .select-tabs .select-tab.active { background: #e9e9e9; } #so-custom-css-properties .sections .fields-table .select-tabs .select-tab:hover .so-css-icon, #so-custom-css-properties .sections .fields-table .select-tabs .select-tab.active .so-css-icon { color: #333; } #so-custom-css-properties .sections .fields-table .side-tabs { height: 26px; } #so-custom-css-properties .sections .fields-table .side-tabs .side-tab { width: 20%; text-align: center; padding: 5px; line-height: 0; } #so-custom-css-properties .sections .fields-table .side-tabs .side-tab div { display: inline-block; width: 10px; height: 10px; border: 2px solid #aaa; } #so-custom-css-properties .sections .fields-table .side-tabs .side-tab .spacing-all { border-color: #12609b; } #so-custom-css-properties .sections .fields-table .side-tabs .side-tab .spacing-top { border-top-color: #12609b; } #so-custom-css-properties .sections .fields-table .side-tabs .side-tab .spacing-left { border-left-color: #12609b; } #so-custom-css-properties .sections .fields-table .side-tabs .side-tab .spacing-bottom { border-bottom-color: #12609b; } #so-custom-css-properties .sections .fields-table .side-tabs .side-tab .spacing-right { border-right-color: #12609b; } #so-custom-css-properties .sections .fields-table .sides .side > div { margin-bottom: 5px; } #so-custom-css-properties .sections .fields-table .sides .side > div:last-child { margin-bottom: 0; } .css-editor-snippet-browser { display: none; } .css-editor-snippet-browser .snippet-browser-overlay { position: fixed; z-index: 100000; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.8); } .css-editor-snippet-browser .snippet-browser-dialog > div { position: fixed; z-index: 100001; background: #fff; box-sizing: border-box; } .css-editor-snippet-browser .snippet-browser-dialog .toolbar { top: 40px; left: 40px; right: 40px; height: 50px; background: #FCFCFC; border-bottom: 1px solid #dddddd; overflow: hidden; } .css-editor-snippet-browser .snippet-browser-dialog .toolbar h1 { padding: 0 16px; font-size: 22px; line-height: 50px; margin: 0; color: #444; } .css-editor-snippet-browser .snippet-browser-dialog .toolbar .close { cursor: pointer; color: #777; background-color: transparent; height: 50px; width: 50px; padding: 15px 0 0 0; position: absolute; text-align: center; border: 0; border-left: 1px solid #ddd; top: 0; right: 0; text-decoration: none; box-sizing: border-box; } .css-editor-snippet-browser .snippet-browser-dialog .toolbar .close:hover { background: #dddddd; } .css-editor-snippet-browser .snippet-browser-dialog .toolbar .close .icon:before { content: '\f158'; font: normal 20px/1 'dashicons'; vertical-align: middle; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #666; } .css-editor-snippet-browser .snippet-browser-dialog .sidebar { top: 90px; left: 40px; bottom: 90px; width: 300px; background: #f3f3f3; border-right: 1px solid #dddddd; padding: 16px; overflow: auto; } .css-editor-snippet-browser .snippet-browser-dialog .sidebar .snippet-search { width: 100%; margin-bottom: 20px; padding: 8px; } .css-editor-snippet-browser .snippet-browser-dialog .sidebar .snippets { margin: 0; } .css-editor-snippet-browser .snippet-browser-dialog .sidebar .snippets .snippet { cursor: pointer; font-size: 1.1em; line-height: 1.35em; margin-bottom: 20px; } .css-editor-snippet-browser .snippet-browser-dialog .sidebar .snippets .snippet.active { font-weight: bold; } .css-editor-snippet-browser .snippet-browser-dialog .main { top: 90px; left: 340px; right: 40px; bottom: 90px; background: #fff; overflow: auto; } .css-editor-snippet-browser .snippet-browser-dialog .main .snippet-view { padding: 20px; } .css-editor-snippet-browser .snippet-browser-dialog .main .snippet-view .snippet-title { margin: 0 0 0.75em 0; padding: 0; } .css-editor-snippet-browser .snippet-browser-dialog .main .snippet-view .snippet-description { font-size: 1.1em; color: #666; margin-bottom: 2em; } .css-editor-snippet-browser .snippet-browser-dialog .main .snippet-view .snippet-code { padding: 20px; border: 1px solid #d0d0d0; background: #f8f8f8; } .css-editor-snippet-browser .snippet-browser-dialog .buttons { bottom: 40px; left: 40px; right: 40px; height: 50px; background: #FCFCFC; border-top: 1px solid #dddddd; text-align: right; padding: 10px 20px; overflow: hidden; } .socss-field-measurement { position: relative; } .socss-field-measurement input.socss-field-input { padding-right: 50px; width: 120px !important; box-sizing: border-box; } .socss-field-measurement .dashicons-arrow-down { position: absolute; top: 4px; left: 97px; cursor: pointer; } .socss-field-measurement .dropdown { display: none; background: #F5F5F5; border: 1px solid #c0c0c0; position: absolute; top: 27px; left: 71px; width: 50px; z-index: 2; margin: 0; box-sizing: border-box; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); } .socss-field-measurement .dropdown li { padding: 5px 0; text-align: center; line-height: 1.1em; font-size: 11px; margin: 0; } .socss-field-measurement .dropdown li:hover, .socss-field-measurement .dropdown li.active { background: #e8e8e8; cursor: pointer; } .socss-field-measurement .units { position: absolute; top: 5px; left: 12px; color: #bbb; pointer-events: none; } .socss-diw { position: absolute; top: 0px; left: 124px; } .socss-diw .inc-button, .socss-diw .dec-button { cursor: pointer; box-sizing: border-box; float: left; padding: 9px; user-select: none; text-align: center; margin: 0; width: 30px; height: 30px; } .socss-diw .inc-button .so-css-icon, .socss-diw .dec-button .so-css-icon { font-size: 10px; } .socss-diw .inc-button { border-left: 0; } .custom-css-toolbar .socss-button, #so-custom-css-properties .toolbar .socss-button { align-items: center; border: 1px solid #c0c0c0; color: #555; cursor: pointer; display: flex; float: right; font-size: 0.95em; font-weight: bold; justify-content: center; line-height: 1em; margin-left: 7px; min-height: 0; text-decoration: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; -webkit-user-select: none; user-select: none; } .custom-css-toolbar .socss-button:not(.save), #so-custom-css-properties .toolbar .socss-button:not(.save) { height: 28px; width: 28px; } .custom-css-toolbar .socss-button:not(.save):hover, #so-custom-css-properties .toolbar .socss-button:not(.save):hover { background: #fff; border-color: #b0b0b0; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } .custom-css-toolbar .socss-button:not(.save):hover .so-css-icon, #so-custom-css-properties .toolbar .socss-button:not(.save):hover .so-css-icon { color: #333; } .custom-css-toolbar .socss-button .so-css-icon, #so-custom-css-properties .toolbar .socss-button .so-css-icon { color: #555; } .custom-css-toolbar .socss-button .so-css-icon.so-css-icon-save, #so-custom-css-properties .toolbar .socss-button .so-css-icon.so-css-icon-save { color: #fff; } .custom-css-toolbar .socss-button.save, #so-custom-css-properties .toolbar .socss-button.save { border-color: #dcdcde; border-radius: 0; height: 30px; width: 30px; } .custom-css-toolbar .socss-button.save.button-primary-disabled, #so-custom-css-properties .toolbar .socss-button.save.button-primary-disabled { cursor: default; } .custom-css-toolbar .socss-button.save.button-primary-disabled .so-css-icon-save, #so-custom-css-properties .toolbar .socss-button.save.button-primary-disabled .so-css-icon-save { color: #a7aaad; } body .CodeMirror-lint-tooltip, body .CodeMirror-hints { /* This is above the editor in full-screen mode */ z-index: 100002; } css/images/video.jpg000064400000040616150212710760010421 0ustar00 ExifII* !(1$2i$ ' 'Adobe Photoshop CC 2014 (Macintosh)2015:07:18 16:07:300221!rz(HH Adobe_CMAdobed            Z" ?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?I$I%)$IJI%*HcKBGMJ~G;RԿ)?z?hG{7;RԿ){\Q>ֺJvu?T7('z$IJI$RI$I$I%)$INA,αƤO672cXѵy5՝y?H1G4A&y)"cbn5fa1׷7huniȵ-q&?7{6?{VHշc6 _`+Pn n-:܌|p>ԘH4 %4Zuҹ3({P?AY޺i8+??fڢikJ+XD R{'fX:PLSc1퍳b=h 9 Bd#B$7̣6cs Ƿ^uO֧@`< ˵Sz595oSQcZ82ȋ0'aXC_7b[b,mroz;>f6;*Ͱ;xmħ^{"Jy[jUXaXǴxkڢm_ks̾^9E%=_ ;=,km#mk[[ϱ˚ƹ; hkhm"?9u~ f\3-el zYh ien/or#Wn;"n;"%DF4FJxɿ.dd;}]mڄïwE/ّp@<$:g{OO=͚ʰ`SN{v1g=U]T|=Ogc[k<$?-N3CQ2cDZbI-6ʒI$I%?Ў8$_gWԾ$_gWԾ$ֆI%)$IJI$RI$I%)$IJI$SPhotoshop 3.08BIMZ%G8BIM%}Ǿ pvN8BIM: printOutputPstSboolInteenumInteClrmprintSixteenBitbool printerNameTEXTprintProofSetupObjc Proof Setup proofSetupBltnenum builtinProof proofCMYK8BIM;-printOutputOptionsCptnboolClbrboolRgsMboolCrnCboolCntCboolLblsboolNgtvboolEmlDboolIntrboolBckgObjcRGBCRd doub@oGrn doub@oBl doub@oBrdTUntF#RltBld UntF#RltRsltUntF#Pxl@R vectorDataboolPgPsenumPgPsPgPCLeftUntF#RltTop UntF#RltScl UntF#Prc@YcropWhenPrintingboolcropRectBottomlong cropRectLeftlong cropRectRightlong cropRectToplong8BIMHH8BIM&?8BIM 8BIM8BIM 8BIM' 8BIMH/fflff/ff2Z5-8BIMp8BIM8BIM 8BIM08BIM-8BIM@@8BIM8BIM?!video!nullboundsObjcRct1Top longLeftlongBtomlongRghtlong!slicesVlLsObjcslicesliceIDlonggroupIDlongoriginenum ESliceOrigin autoGeneratedTypeenum ESliceTypeImg boundsObjcRct1Top longLeftlongBtomlongRghtlong!urlTEXTnullTEXTMsgeTEXTaltTagTEXTcellTextIsHTMLboolcellTextTEXT horzAlignenumESliceHorzAligndefault vertAlignenumESliceVertAligndefault bgColorTypeenumESliceBGColorTypeNone topOutsetlong leftOutsetlong bottomOutsetlong rightOutsetlong8BIM( ?8BIM8BIM8BIM Z Adobe_CMAdobed            Z" ?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?I$I%)$IJI%*HcKBGMJ~G;RԿ)?z?hG{7;RԿ){\Q>ֺJvu?T7('z$IJI$RI$I$I%)$INA,αƤO672cXѵy5՝y?H1G4A&y)"cbn5fa1׷7huniȵ-q&?7{6?{VHշc6 _`+Pn n-:܌|p>ԘH4 %4Zuҹ3({P?AY޺i8+??fڢikJ+XD R{'fX:PLSc1퍳b=h 9 Bd#B$7̣6cs Ƿ^uO֧@`< ˵Sz595oSQcZ82ȋ0'aXC_7b[b,mroz;>f6;*Ͱ;xmħ^{"Jy[jUXaXǴxkڢm_ks̾^9E%=_ ;=,km#mk[[ϱ˚ƹ; hkhm"?9u~ f\3-el zYh ien/or#Wn;"n;"%DF4FJxɿ.dd;}]mڄïwE/ّp@<$:g{OO=͚ʰ`SN{v1g=U]T|=Ogc[k<$?-N3CQ2cDZbI-6ʒI$I%?Ў8$_gWԾ$_gWԾ$ֆI%)$IJI$RI$I%)$IJI$S8BIM!]Adobe PhotoshopAdobe Photoshop CC 20148BIMhttp://ns.adobe.com/xap/1.0/ adobe:docid:photoshop:5e594251-498e-1178-8b77-cda4a221b58d adobe:docid:photoshop:e27e73bf-4996-1178-abec-9e920570c518 xmp.did:E582B984FE3C11E4A5CAC27EA05F3240 Adobed         !%  s!1AQa"q2B#R3b$r%C4Scs5D'6Tdt& EFVU(eufv7GWgw8HXhx)9IYiy*:JZjzm!1AQa"q2#BRbr3$4CS%cs5DT &6E'dtU7()󄔤euFVfvGWgw8HXhx9IYiy*:JZjz ?Wb]v*UثWb]v*UثWb]v*UثWb]v*UثWb]Wb]v*UثWb]v*UثWb]v*UثWb]v*UثWb]Wb]v*UثWb]v*UثWb]v*UثWb]v*UثWb]Wb]v*UثWbQ:~} {(ZiOeU<1NJg0E_c]z!'FC4{v#艗.àLIw ࿭[1OodG].U~-_QeO;U~-_Q<swCRz}/h_EOepw Z.x./W_uяn_O-o >3 #r6w_MeMƹ~>tҖq)gXڷ,F~qbNf<$2]v*UثWb]v*UWb]v*UثWb#K5l)ݏEQ1 Q8g.2dh-f@7Cq:LK_ɐG;[Wb]v*UثU9x^dAхA%Ao9y\跪T\a'r:?sw?\~o7͛UثWb]v*UثWWb]v*UثWbD[j,>7agTokszn{b]v* lMV;7\*Hq*UثT:zyv2*!#45九ٹ<=3~|3;v*UثWb]v*UWb]v*UثWbY' aF?E\bW>@:ad٫q]_o hy8Գ~>"dj#E h2_˛@W@Tƪ\M@ʹ;dz#ʎ()Y4K@WU 㕒dC(JdxWO3(8X4Ʋ-@uZًm|NXOjt_ Fጢ S.JEI9ilqMŬU~v98ڈ!K +Ėw|2P5 R 硽Wb]v*UثWb_Wb]v*UثWb^_97]6sZ㮊)f!Y`Dz0$g_kdm n(OW+ġŔd❄4T.L )oDA8T@*䒀" 2{kBL'q_1ͬC\EO2 0AV&|U&CZP$PO* ^.]v*UثWb]Wb]v*UثWb^_97]6+L62IxZPtUfӰCI9Zq/gys݊@]pf>LukPK/NsO-RR!#1,?'6 odAc;S\Wu?_\M%'+sثWb]v*UثWbWb]v*UثWb^_97]6]jF[6Y'?Vjg|Q:?jǐ{XkV wh}ߺ>Yi5p(.Q1a1̖bPv+$cn>prcE [> ae$c9i<{(NadVݤr3 6ib9BUثWb]v*UثWWb]v*UثWb^_97]6sZ㣴]jF[&Yo*+ƭ9~S<3{k2ʭřc3vg5'R!ثMOEzb]v*UثWb]Wb]v*UثWb^_97]6sZGh~MlB?VMG=<zZ[F&XՇIxqGwX d(^Y۵ 8HŌ",麾1Ƈڴ>u:yE"#.F0i+U }Eޣ1xv Yj1!lrzh:+[Wb7?,!^.]v*UثWb]T;^ 7>k7?*Cp}> 늻7?*Cp}z^{"ʚeUq?%oGثTv_{d4-%Ooտg/jg|Q:?g!=]֬ѿɖ&qua|ꡞQ],bд=6{:Ro!F4*ӗrOncqcDys@yq曽GLF}3ԂǏ zC>cYGdNjQ)LJ Q0e>oMbWiokz59|pB_LK.^8xڂ>'8][!1YBUثWb]v*UثWɿORUثWb]v*U֭>knFfp݊v*uolf*+ƭ9 tCazaX-ݣ4-~giC<8HYDńiZ`~kZWٍ|tZCyyw{w-ܦkdU7&INFR%lUZ>M!Vm2R>eqW[[O%O 1IbJ؆SBTWbY冸}mHNGȿ`J棶4&>!csN&lssu.]v*5]GK7:|8aVly e &RV_+4=!$#))JD<Բv*UثV%4TibLO+sv]v*UثWb]ɿORUثW<=o^Ѵ-:MGX/<WQ~&_&~wi[ΗƆݩve)u*R?uzLXqWbQ?ܟ*O+~abK-`*cu?9c<_?~}%1%·zg=j@Ly|Wb]v*Ud @8cMد?0t=e%>%/m}!!ä dVKDIDATxڜMKUQ DIh D"H*"H'Rq` BoK$s`Ě}ٙEDЗAD j DRݞ{6<,>kCV!*ZgA\/-,QOC5ۺ`IaA[5ۺ_a(þ=mp0/QߞPͶ't:)e·U+0g;Ts^9)@j2a8,(|۩mg&=z}ȷTs6sE cFmj>i}5Ja)SEڴ=0vSW!2"L8yV%ȭ-.Cͥ~aĺ^\X .jj񕿱=V|Rؓk&?$=_0"R*3au6C0J4lpY 8Ylv\ pIENDB`css/images/icon.png000064400000006272150212710760010247 0ustar00PNG  IHDRPBQ=tEXtSoftwareAdobe ImageReadyqe<hiTXtXML:com.adobe.xmp }-PIDATxɏU_faM 2APPD! 1&r0ɋF&FqID#"aغgYz+J-j%d~S~Սu1L*ec&U >H|ߔ݈kۭ XJz[8^ו=neyek]?|GrWXJx]U֫l KmerHو?Y6(낇.t=Ae[+UB,[38^39rpO%+x6]܄;/j [8IqN@~0 B8s.EB:=ބw ; oҹ [lpǗqfpk㸙W֩7J<.BOٟX4Ao1{6¸GH'+){Fq",ѝ6ooiw s"Wcw*;숲/p%/b:+*UC̭,^w#'Vqco sm"ih2`3,Y04m-!EL ?ϼ>W7!epR[Wԋ~6m1]7`ӸD;(M;;8G@Mu k , Fn]ٻʆWH9(^4(qQZ$`r P e߹Bj^PLrՈk~]б(Q-E! LAX:. hR!Uc tɐcv'U!"x`w+Ļ siy_\C,E /$aմf&=C6!idDǚXywB$"Ɂ%eq-B5 * 8NbzZt`"cz,cǖ VPL*`6E$ߎͰ!j~wb1"D4laZ0L:xLx{I~r>v(]|"hJ/[ /;1thu,zmDm-; CՅԘty TL8X?(p, %/q/9>%:ӝ /\bxXh s_tC(&zl (}rp;*#l9$ .;GLk X.>Y?+]S6V粁Hύg.ĵd4"F<c ڋ)t  AG?E *(ə Gqb&ɘ%Z<$S{!6IGrsl` `?d 3kKo0Ig  DUtnU8ک/;txCWV{8Ttii|ayGbe$ wⳓM!Roʾzra_ZmHо=e>w4@S4Bޤ%İMא(V!M" `&yi!>kxK@){!䘧D2^i|OzSPC/1Q>=µNIENDB`css/inspector.css000064400000012663150212710760010065 0ustar00#socss-inspector-interface { color: #333; display: none; position: fixed; bottom: 0; left: 0; right: 0; height: 220px; background: #ffffff; box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.05); z-index: 100000; font-family: "Arial", sans-serif; font-size: 14px; border-top: 1px solid #a3a3a3; } #socss-inspector-interface .socss-link { box-sizing: border-box; background: #f3f3f3; box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.05); border-top: 1px solid #a3a3a3; position: absolute; top: -29px; height: 28px; padding: 6px 15px; width: 100%; font-size: 13px; text-align: right; line-height: 1em; display: none; } #socss-inspector-interface .socss-toolbar { box-sizing: border-box; background: #e6e6e6; padding: 0 4px; user-select: none; position: absolute; top: 0; left: 0; right: 0; height: 30px; overflow: hidden; } #socss-inspector-interface .socss-toolbar .socss-enable-inspector { font-size: 20px; display: inline-block; padding: 5px; color: #777; border-left: 1px solid transparent; border-right: 1px solid transparent; position: absolute; top: 0; left: 5px; bottom: 0; height: 30px; width: 30px; box-sizing: border-box; } #socss-inspector-interface .socss-toolbar .socss-enable-inspector:hover { cursor: pointer; background-color: #f3f3f3; color: #596872; } #socss-inspector-interface .socss-toolbar .socss-hierarchy { position: absolute; top: 0; right: 20px; left: 40px; bottom: 0; display: block; padding-left: 10px; overflow: hidden; white-space: nowrap; background: #e6e6e6; } #socss-inspector-interface .socss-toolbar .socss-hierarchy .socss-selector { font-size: 12px; line-height: 1em; padding: 9px 20px 9px 9px; display: inline-block; background: url(./images/separator.png) top right no-repeat; background-size: contain; cursor: pointer; } #socss-inspector-interface .socss-toolbar .socss-hierarchy .socss-selector:last-child { background: none; padding-right: 9px; } #socss-inspector-interface .socss-selectors-window, #socss-inspector-interface .socss-properties-window { overflow-y: scroll; font-family: "Courier New", "Lucida Console", Courier, monospace; font-size: 13px; border-top: 1px solid #a3a3a3; } #socss-inspector-interface .socss-selectors-window > div, #socss-inspector-interface .socss-properties-window > div { line-height: 1.2em; padding: 4px 10px; white-space: nowrap; } #socss-inspector-interface .socss-selectors-window > div:hover, #socss-inspector-interface .socss-properties-window > div:hover { background: #f6f6f6; cursor: pointer; } #socss-inspector-interface .socss-selectors-window strong, #socss-inspector-interface .socss-properties-window strong { font-weight: bold; } #socss-inspector-interface .socss-selectors-window { position: absolute; top: 29px; left: 0; right: 50%; bottom: 0; background: #fff; border-right: 1px solid #aaa; } #socss-inspector-interface .socss-properties-window { position: absolute; top: 29px; right: 0; left: 50%; bottom: 0; background: #fff; } body.socss-active { padding-bottom: 200px !important; } body.socss-active #socss-inspector-interface { display: block; height: 200px; } body.socss-active #socss-inspector-interface .socss-toolbar .socss-enable-inspector { border-left: 1px solid #aaa; border-right: 1px solid #aaa; background-color: #f3f3f3; color: #005a67; } body.socss-inactive { padding-bottom: 29px !important; } body.socss-inactive #socss-inspector-interface { display: block; height: 29px; } body.socss-inactive #socss-inspector-interface .socss-selectors-window, body.socss-inactive #socss-inspector-interface .socss-attributes-window { display: none; } .socss-inspector-hover { pointer-events: none; position: absolute; /* Same index as the admin bar */ z-index: 99999; border: 1px dashed #0075cb; background: rgba(0, 117, 203, 0.15); box-sizing: border-box; } .socss-inspector-hover .socss-guide { display: none; } .socss-inspector-hover .socss-guide-margin, .socss-inspector-hover .socss-guide-padding { position: absolute; } .socss-inspector-hover .socss-guide-margin.socss-guide-top, .socss-inspector-hover .socss-guide-padding.socss-guide-top, .socss-inspector-hover .socss-guide-margin.socss-guide-bottom, .socss-inspector-hover .socss-guide-padding.socss-guide-bottom { right: 0; left: 0; } .socss-inspector-hover .socss-guide-margin.socss-guide-left, .socss-inspector-hover .socss-guide-padding.socss-guide-left, .socss-inspector-hover .socss-guide-margin.socss-guide-right, .socss-inspector-hover .socss-guide-padding.socss-guide-right { top: 0; bottom: 0; } .socss-inspector-hover .socss-guide-margin { background: rgba(20, 126, 74, 0.25); } .socss-inspector-hover .socss-guide-margin.socss-guide-top { bottom: 100%; } .socss-inspector-hover .socss-guide-margin.socss-guide-bottom { top: 100%; } .socss-inspector-hover .socss-guide-margin.socss-guide-left { right: 100%; } .socss-inspector-hover .socss-guide-margin.socss-guide-right { left: 100%; } .socss-inspector-hover .socss-guide-padding { background: rgba(0, 117, 203, 0.25); } .socss-inspector-hover .socss-guide-padding.socss-guide-top { top: 0; } .socss-inspector-hover .socss-guide-padding.socss-guide-bottom { bottom: 0; } .socss-inspector-hover .socss-guide-padding.socss-guide-left { left: 0; } .socss-inspector-hover .socss-guide-padding.socss-guide-right { right: 0; } body, html { max-width: 100% !important; overflow-x: hidden !important; } css/mixins.css000064400000000000150212710760007344 0ustar00css/icons/so-css-icons.woff000064400000012720150212710760011655 0ustar00wOFF OS/2``ccmaphڈgasp glyfchead66#hheaP$$ohmtxt``O]Lloca220,dmaxp name(J post 3 @mnm  39hn 16en G: 797979  0'.#!"3!2654&'"&54632#!"&=463!2b '5KK55K ^5KK55KK @   ^ K55KK5( K55KK55K   E#"'&54?632632NvNMwN k2327&'767676767673"'&#"#4?276727676767654'&'&'%3"'&#"##a;;! 18b   Iu*)  '($HI$,OPK !BC! ->!r- `-gf6??!   ..78!OO   %=3254'&'&'&'&'&#"3276767654'&'&'&#"76767676767654='&'&'&'&'&#'67632332#"'&#"=*&!*&/##!!&- ((   8K  (&&$# X;;"!.-00522 ! "#'0*nh|&/6323276727#"327676767654'&'&/&'&'737#"'&'&'&=4'&'54'&#!"3!276"K1/B "%" #23;2    90u+E ) *+=>T_CD"# FSI2$C G-"  ")Y.**1!' 1   p>+%! *,D.Yk%%%!!3%!!2765#!"'&54763!2[\[I&%%&mJ&&&n1"32767654'&'&##"'&'&54767632UGH)**)HGUTHG****GHT;;eewxde;;;;edxwee;;**GGUUGG****GGUUGG**wee;;;;eewwee;;;;eew``+1#"/+'7547'&54?6327632 '366;x<t%IY<x<5LL5[Inn*5LL5<x<I%tY<x;66InnHE_< soso``mnE%I%% h:|dD>`R2`6u K   g = |   R 4icomoonicomoonVersion 1.0Version 1.0icomoonicomoonicomoonicomoonRegularRegularicomoonicomoonFont generated by IcoMoon.Font generated by IcoMoon.css/icons/selection.json000064400000045137150212710760011342 0ustar00{"IcoMoonType":"selection","icons":[{"icon":{"paths":["M866.2 258.2l-167.8-167.8c-13.8-13.76-44.2-26.4-66.2-26.4h-504.2c-70.7 0-128 57.3-128 128v640c0 70.7 57.3 128 128 128h640c70.7 0 128-57.3 128-128v-504.2c0-22-12.6-52.4-29.8-69.6zM448 832c-70.68 0-128-57.32-128-128s57.32-128 128-128 128 57.32 128 128-57.4 128-128 128zM640 416c0 17.6-14.4 32-32 32h-448c-17.68 0-32-14.4-32-32v-192c0-17.6 14.32-32 32-32h448c17.6 0 32 14.4 32 32v192z"],"attrs":[{}],"width":896,"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["floppy-disk-solid"]},"attrs":[{}],"properties":{"order":34,"id":520,"name":"floppy-disk-solid","prevSize":32,"code":59648},"setIdx":0,"setId":2,"iconIdx":0},{"icon":{"paths":["M954.857 323.429q0 22.857-16 38.857l-491.429 491.429q-16 16-38.857 16t-38.857-16l-284.571-284.571q-16-16-16-38.857t16-38.857l77.714-77.714q16-16 38.857-16t38.857 16l168 168.571 374.857-375.429q16-16 38.857-16t38.857 16l77.714 77.714q16 16 16 38.857z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61452,"grid":0},"properties":{"id":13,"order":2,"ligatures":"","prevSize":32,"code":61452,"name":"check"},"setIdx":0,"setId":2,"iconIdx":1},{"icon":{"paths":["M414.286 319.429l-97.143 257.143q18.857 0 78 1.143t91.714 1.143q10.857 0 32.571-1.143-49.714-144.571-105.143-258.286zM0 950.857l1.143-45.143q13.143-4 32-7.143t32.571-6 28.286-8.286 25.429-16.571 17.714-28.857l135.429-352 160-413.714h73.143q4.571 8 6.286 12l117.143 274.286q18.857 44.571 60.571 147.143t65.143 156.857q8.571 19.429 33.143 82.571t41.143 96.286q11.429 25.714 20 32.571 10.857 8.571 50.286 16.857t48 11.714q3.429 21.714 3.429 32.571 0 2.286-0.286 7.429t-0.286 7.429q-36 0-108.571-4.571t-109.143-4.571q-43.429 0-122.857 4t-101.714 4.571q0-24.571 2.286-44.571l74.857-16q0.571 0 7.143-1.429t8.857-2 8.286-2.571 8.571-3.714 6.286-4.571 5.143-6.286 1.429-8q0-9.143-17.714-55.143t-41.143-101.429-24-57.143l-257.143-1.143q-14.857 33.143-43.714 111.714t-28.857 92.857q0 12.571 8 21.429t24.857 14 27.714 7.714 32.571 4.857 23.429 2.286q0.571 10.857 0.571 33.143 0 5.143-1.143 15.429-33.143 0-99.714-5.714t-99.714-5.714q-4.571 0-15.143 2.286t-12.286 2.286q-45.714 8-107.429 8z"],"width":951,"isMulticolor":false,"isMulticolor2":false,"defaultCode":61489,"grid":0},"properties":{"id":47,"order":35,"ligatures":"","prevSize":32,"code":61489,"name":"uniF031"},"setIdx":0,"setId":2,"iconIdx":2},{"icon":{"paths":["M317.143 869.143q42.286 18.286 80 18.286 214.857 0 214.857-191.429 0-65.143-23.429-102.857-15.429-25.143-35.143-42.286t-38.571-26.571-46-14.286-48-6-54-1.143q-41.714 0-57.714 5.714 0 30.286-0.286 90.857t-0.286 90.286q0 4.571-0.571 38.571t-0.286 55.143 2.571 47.714 6.857 38zM309.143 442.857q24 4 62.286 4 46.857 0 81.714-7.429t62.857-25.429 42.571-51.143 14.571-81.143q0-40-16.571-70t-45.143-46.857-61.714-24.857-70.857-8q-28.571 0-74.286 7.429 0 28.571 2.286 86.286t2.286 86.857q0 15.429-0.286 45.714t-0.286 45.143q0 26.286 0.571 39.429zM0 950.857l1.143-53.714q8.571-2.286 48.571-9.143t60.571-15.429q4-6.857 7.143-15.429t4.857-19.143 3.143-18.571 1.714-21.429 0.286-19.429v-37.429q0-561.143-12.571-585.714-2.286-4.571-12.571-8.286t-25.429-6.286-28.286-4-27.714-2.571-17.429-1.714l-2.286-47.429q56-1.143 194.286-6.571t213.143-5.429q13.143 0 39.143 0.286t38.571 0.286q40 0 78 7.429t73.429 24 61.714 40.571 42.286 59.714 16 78.571q0 29.714-9.429 54.571t-22.286 41.143-36.857 32.857-41.714 25.714-48 22.857q88 20 146.571 76.571t58.571 141.714q0 57.143-20 102.571t-53.429 74.571-78.857 48.857-93.429 27.714-100.571 8q-25.143 0-75.429-1.714t-75.429-1.714q-60.571 0-175.429 6.286t-132 6.857z"],"width":805,"isMulticolor":false,"isMulticolor2":false,"defaultCode":61490,"grid":0},"properties":{"id":48,"order":36,"ligatures":"","prevSize":32,"code":61490,"name":"uniF032"},"setIdx":0,"setId":2,"iconIdx":3},{"icon":{"paths":["M0 949.714l9.714-48.571q3.429-1.143 46.571-12.286t63.714-21.429q16-20 23.429-57.714 0.571-4 35.429-165.143t65.143-310.571 29.714-169.429v-14.286q-13.714-7.429-31.143-10.571t-39.714-4.571-33.143-3.143l10.857-58.857q18.857 1.143 68.571 3.714t85.429 4 68.857 1.429q27.429 0 56.286-1.429t69.143-4 56.286-3.714q-2.857 22.286-10.857 50.857-17.143 5.714-58 16.286t-62 19.143q-4.571 10.857-8 24.286t-5.143 22.857-4.286 26-3.714 24q-15.429 84.571-50 239.714t-44.286 203.143q-1.143 5.143-7.429 33.143t-11.429 51.429-9.143 47.714-3.429 32.857l0.571 10.286q9.714 2.286 105.714 17.714-1.714 25.143-9.143 56.571-6.286 0-18.571 0.857t-18.571 0.857q-16.571 0-49.714-5.714t-49.143-5.714q-78.857-1.143-117.714-1.143-29.143 0-81.714 5.143t-69.143 6.286z"],"width":585,"isMulticolor":false,"isMulticolor2":false,"defaultCode":61491,"grid":0},"properties":{"id":49,"order":37,"ligatures":"","prevSize":32,"code":61491,"name":"uniF033"},"setIdx":0,"setId":2,"iconIdx":4},{"icon":{"paths":["M1024 768v73.143q0 14.857-10.857 25.714t-25.714 10.857h-950.857q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h950.857q14.857 0 25.714 10.857t10.857 25.714zM804.571 548.571v73.143q0 14.857-10.857 25.714t-25.714 10.857h-731.429q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h731.429q14.857 0 25.714 10.857t10.857 25.714zM950.857 329.143v73.143q0 14.857-10.857 25.714t-25.714 10.857h-877.714q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h877.714q14.857 0 25.714 10.857t10.857 25.714zM731.429 109.714v73.143q0 14.857-10.857 25.714t-25.714 10.857h-658.286q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h658.286q14.857 0 25.714 10.857t10.857 25.714z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61494,"grid":0},"properties":{"id":52,"order":40,"ligatures":"","prevSize":32,"code":61494,"name":"uniF036"},"setIdx":0,"setId":2,"iconIdx":5},{"icon":{"paths":["M1024 768v73.143q0 14.857-10.857 25.714t-25.714 10.857h-950.857q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h950.857q14.857 0 25.714 10.857t10.857 25.714zM804.571 548.571v73.143q0 14.857-10.857 25.714t-25.714 10.857h-512q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h512q14.857 0 25.714 10.857t10.857 25.714zM950.857 329.143v73.143q0 14.857-10.857 25.714t-25.714 10.857h-804.571q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h804.571q14.857 0 25.714 10.857t10.857 25.714zM731.429 109.714v73.143q0 14.857-10.857 25.714t-25.714 10.857h-365.714q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h365.714q14.857 0 25.714 10.857t10.857 25.714z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61495,"grid":0},"properties":{"id":53,"order":38,"ligatures":"","prevSize":32,"code":61495,"name":"uniF037"},"setIdx":0,"setId":2,"iconIdx":6},{"icon":{"paths":["M1024 768v73.143q0 14.857-10.857 25.714t-25.714 10.857h-950.857q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h950.857q14.857 0 25.714 10.857t10.857 25.714zM1024 548.571v73.143q0 14.857-10.857 25.714t-25.714 10.857h-731.429q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h731.429q14.857 0 25.714 10.857t10.857 25.714zM1024 329.143v73.143q0 14.857-10.857 25.714t-25.714 10.857h-877.714q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h877.714q14.857 0 25.714 10.857t10.857 25.714zM1024 109.714v73.143q0 14.857-10.857 25.714t-25.714 10.857h-658.286q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h658.286q14.857 0 25.714 10.857t10.857 25.714z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61496,"grid":0},"properties":{"id":54,"order":39,"ligatures":"","prevSize":32,"code":61496,"name":"uniF038"},"setIdx":0,"setId":2,"iconIdx":7},{"icon":{"paths":["M1024 768v73.143q0 14.857-10.857 25.714t-25.714 10.857h-950.857q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h950.857q14.857 0 25.714 10.857t10.857 25.714zM1024 548.571v73.143q0 14.857-10.857 25.714t-25.714 10.857h-950.857q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h950.857q14.857 0 25.714 10.857t10.857 25.714zM1024 329.143v73.143q0 14.857-10.857 25.714t-25.714 10.857h-950.857q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h950.857q14.857 0 25.714 10.857t10.857 25.714zM1024 109.714v73.143q0 14.857-10.857 25.714t-25.714 10.857h-950.857q-14.857 0-25.714-10.857t-10.857-25.714v-73.143q0-14.857 10.857-25.714t25.714-10.857h950.857q14.857 0 25.714 10.857t10.857 25.714z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61497,"grid":0},"properties":{"id":55,"order":41,"ligatures":"","prevSize":32,"code":61497,"name":"uniF039"},"setIdx":0,"setId":2,"iconIdx":8},{"icon":{"paths":["M431.429 603.429q0 7.429-5.714 13.143l-189.714 189.714 82.286 82.286q10.857 10.857 10.857 25.714t-10.857 25.714-25.714 10.857h-256q-14.857 0-25.714-10.857t-10.857-25.714v-256q0-14.857 10.857-25.714t25.714-10.857 25.714 10.857l82.286 82.286 189.714-189.714q5.714-5.714 13.143-5.714t13.143 5.714l65.143 65.143q5.714 5.714 5.714 13.143zM877.714 109.714v256q0 14.857-10.857 25.714t-25.714 10.857-25.714-10.857l-82.286-82.286-189.714 189.714q-5.714 5.714-13.143 5.714t-13.143-5.714l-65.143-65.143q-5.714-5.714-5.714-13.143t5.714-13.143l189.714-189.714-82.286-82.286q-10.857-10.857-10.857-25.714t10.857-25.714 25.714-10.857h256q14.857 0 25.714 10.857t10.857 25.714z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61541,"grid":0},"properties":{"id":96,"order":42,"ligatures":"","prevSize":32,"code":61541,"name":"uniF065"},"setIdx":0,"setId":2,"iconIdx":9},{"icon":{"paths":["M438.857 548.571v256q0 14.857-10.857 25.714t-25.714 10.857-25.714-10.857l-82.286-82.286-189.714 189.714q-5.714 5.714-13.143 5.714t-13.143-5.714l-65.143-65.143q-5.714-5.714-5.714-13.143t5.714-13.143l189.714-189.714-82.286-82.286q-10.857-10.857-10.857-25.714t10.857-25.714 25.714-10.857h256q14.857 0 25.714 10.857t10.857 25.714zM870.286 164.571q0 7.429-5.714 13.143l-189.714 189.714 82.286 82.286q10.857 10.857 10.857 25.714t-10.857 25.714-25.714 10.857h-256q-14.857 0-25.714-10.857t-10.857-25.714v-256q0-14.857 10.857-25.714t25.714-10.857 25.714 10.857l82.286 82.286 189.714-189.714q5.714-5.714 13.143-5.714t13.143 5.714l65.143 65.143q5.714 5.714 5.714 13.143z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61542,"grid":0},"properties":{"id":97,"order":43,"ligatures":"","prevSize":32,"code":61542,"name":"uniF066"},"setIdx":0,"setId":2,"iconIdx":10},{"icon":{"paths":["M804.571 420.571v109.714q0 22.857-16 38.857t-38.857 16h-237.714v237.714q0 22.857-16 38.857t-38.857 16h-109.714q-22.857 0-38.857-16t-16-38.857v-237.714h-237.714q-22.857 0-38.857-16t-16-38.857v-109.714q0-22.857 16-38.857t38.857-16h237.714v-237.714q0-22.857 16-38.857t38.857-16h109.714q22.857 0 38.857 16t16 38.857v237.714h237.714q22.857 0 38.857 16t16 38.857z"],"width":805,"isMulticolor":false,"isMulticolor2":false,"defaultCode":61543,"grid":0},"properties":{"id":98,"order":44,"ligatures":"","prevSize":32,"code":61543,"name":"plus"},"setIdx":0,"setId":2,"iconIdx":11},{"icon":{"paths":["M804.571 420.571v109.714q0 22.857-16 38.857t-38.857 16h-694.857q-22.857 0-38.857-16t-16-38.857v-109.714q0-22.857 16-38.857t38.857-16h694.857q22.857 0 38.857 16t16 38.857z"],"width":805,"isMulticolor":false,"isMulticolor2":false,"defaultCode":61544,"grid":0},"properties":{"id":99,"order":45,"ligatures":"","prevSize":32,"code":61544,"name":"minus"},"setIdx":0,"setId":2,"iconIdx":12},{"icon":{"paths":["M950.857 548.571q-86.857-134.857-217.714-201.714 34.857 59.429 34.857 128.571 0 105.714-75.143 180.857t-180.857 75.143-180.857-75.143-75.143-180.857q0-69.143 34.857-128.571-130.857 66.857-217.714 201.714 76 117.143 190.571 186.571t248.286 69.429 248.286-69.429 190.571-186.571zM539.429 329.143q0-11.429-8-19.429t-19.429-8q-71.429 0-122.571 51.143t-51.143 122.571q0 11.429 8 19.429t19.429 8 19.429-8 8-19.429q0-49.143 34.857-84t84-34.857q11.429 0 19.429-8t8-19.429zM1024 548.571q0 19.429-11.429 39.429-80 131.429-215.143 210.571t-285.429 79.143-285.429-79.429-215.143-210.286q-11.429-20-11.429-39.429t11.429-39.429q80-130.857 215.143-210.286t285.429-79.429 285.429 79.429 215.143 210.286q11.429 20 11.429 39.429z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61550,"grid":0},"properties":{"id":105,"order":33,"ligatures":"","prevSize":32,"code":61550,"name":"uniF06E"},"setIdx":0,"setId":2,"iconIdx":13},{"icon":{"paths":["M27.429 127.429q-21.143-1.143-25.714-2.286l-1.714-50.286q7.429-0.571 22.857-0.571 34.286 0 64 2.286 75.429 4 94.857 4 49.143 0 96-1.714 66.286-2.286 83.429-2.857 32 0 49.143-1.143l-0.571 8 1.143 36.571v5.143q-34.286 5.143-70.857 5.143-34.286 0-45.143 14.286-7.429 8-7.429 75.429 0 7.429 0.286 18.571t0.286 14.571l0.571 130.857 8 160q3.429 70.857 29.143 115.429 20 33.714 54.857 52.571 50.286 26.857 101.143 26.857 59.429 0 109.143-16 32-10.286 56.571-29.143 27.429-20.571 37.143-36.571 20.571-32 30.286-65.143 12-41.714 12-130.857 0-45.143-2-73.143t-6.286-70-7.714-91.143l-2.286-33.714q-2.857-38.286-13.714-50.286-19.429-20-44-19.429l-57.143 1.143-8-1.714 1.143-49.143h48l117.143 5.714q43.429 1.714 112-5.714l10.286 1.143q3.429 21.714 3.429 29.143 0 4-2.286 17.714-25.714 6.857-48 7.429-41.714 6.286-45.143 9.714-8.571 8.571-8.571 23.429 0 4 0.857 15.429t0.857 17.714q4.571 10.857 12.571 226.286 3.429 111.429-8.571 173.714-8.571 43.429-23.429 69.714-21.714 37.143-64 70.286-42.857 32.571-104 50.857-62.286 18.857-145.714 18.857-95.429 0-162.286-26.286-68-26.857-102.286-69.714-34.857-43.429-47.429-111.429-9.143-45.714-9.143-135.429v-190.286q0-107.429-9.714-121.714-14.286-20.571-84-22.286zM877.714 932.571v-36.571q0-8-5.143-13.143t-13.143-5.143h-841.143q-8 0-13.143 5.143t-5.143 13.143v36.571q0 8 5.143 13.143t13.143 5.143h841.143q8 0 13.143-5.143t5.143-13.143z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61645,"grid":0},"properties":{"id":182,"order":12,"ligatures":"","prevSize":32,"code":61645,"name":"uniF0CD"},"setIdx":0,"setId":2,"iconIdx":14},{"icon":{"paths":["M1005.714 512q8 0 13.143 5.143t5.143 13.143v36.571q0 8-5.143 13.143t-13.143 5.143h-987.429q-8 0-13.143-5.143t-5.143-13.143v-36.571q0-8 5.143-13.143t13.143-5.143h987.429zM276 475.429q-16-20-29.143-45.714-27.429-55.429-27.429-107.429 0-103.429 76.571-176.571 76-72.571 224.571-72.571 28.571 0 95.429 10.857 37.714 6.857 101.143 27.429 5.714 21.714 12 67.429 8 70.286 8 104.571 0 10.286-2.857 25.714l-6.857 1.714-48-3.429-8-1.143q-28.571-85.143-58.857-117.143-50.286-52-120-52-65.143 0-104 33.714-38.286 33.143-38.286 83.429 0 41.714 37.714 80t159.429 73.714q39.429 11.429 98.857 37.714 33.143 16 54.286 29.714h-424.571zM565.714 621.714h234.857q4 22.286 4 52.571 0 63.429-23.429 121.143-13.143 31.429-40.571 59.429-21.143 20-62.286 46.286-45.714 27.429-87.429 37.714-45.714 12-116 12-65.143 0-111.429-13.143l-80-22.857q-32.571-9.143-41.143-16-4.571-4.571-4.571-12.571v-7.429q0-61.714-1.143-89.143-0.571-17.143 0-38.857l1.143-21.143v-25.143l58.286-1.143q8.571 19.429 17.143 40.571t12.857 32 7.143 15.429q20 32.571 45.714 53.714 24.571 20.571 60 32.571 33.714 12.571 75.429 12.571 36.571 0 79.429-15.429 44-14.857 69.714-49.143 26.857-34.857 26.857-73.714 0-48-46.286-89.714-19.429-16.571-78.286-40.571z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61644,"grid":0},"properties":{"id":181,"order":11,"ligatures":"","prevSize":32,"code":61644,"name":"uniF0CC"},"setIdx":0,"setId":2,"iconIdx":15},{"icon":{"paths":["M91.429 877.714h347.429v-658.286h-365.714v640q0 7.429 5.429 12.857t12.857 5.429zM877.714 859.429v-640h-365.714v658.286h347.429q7.429 0 12.857-5.429t5.429-12.857zM950.857 164.571v694.857q0 37.714-26.857 64.571t-64.571 26.857h-768q-37.714 0-64.571-26.857t-26.857-64.571v-694.857q0-37.714 26.857-64.571t64.571-26.857h768q37.714 0 64.571 26.857t26.857 64.571z"],"width":951,"isMulticolor":false,"isMulticolor2":false,"defaultCode":61659,"grid":0},"properties":{"id":195,"order":13,"ligatures":"","prevSize":32,"code":61659,"name":"uniF0DB"},"setIdx":0,"setId":2,"iconIdx":16},{"icon":{"paths":["M438.857 201.143q-84.571 0-156 41.714t-113.143 113.143-41.714 156 41.714 156 113.143 113.143 156 41.714 156-41.714 113.143-113.143 41.714-156-41.714-156-113.143-113.143-156-41.714zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61708,"grid":0},"properties":{"id":241,"order":19,"ligatures":"","prevSize":32,"code":61708,"name":"uniF10C"},"setIdx":0,"setId":2,"iconIdx":17},{"icon":{"paths":["M970.286 53.714q53.714 53.714 53.714 129.429t-53.714 128.857l-128.571 127.429 59.429 59.429q5.714 5.714 5.714 13.143t-5.714 13.143l-120 120q-5.714 5.714-13.143 5.714t-13.143-5.714l-60-60-344.571 344.571q-21.143 21.143-51.429 21.143h-116l-146.286 73.143-36.571-36.571 73.143-146.286v-116q0-30.286 21.143-51.429l344.571-344.571-60-60q-5.714-5.714-5.714-13.143t5.714-13.143l120-120q5.714-5.714 13.143-5.714t13.143 5.714l59.429 59.429 127.429-128.571q53.143-53.714 128.857-53.714t129.429 53.714zM292.571 841.143l329.143-329.143-109.714-109.714-329.143 329.143v109.714h109.714z"],"isMulticolor":false,"isMulticolor2":false,"defaultCode":61947,"grid":0},"properties":{"id":463,"order":14,"ligatures":"","prevSize":32,"code":61947,"name":"uniF1FB"},"setIdx":0,"setId":2,"iconIdx":18},{"icon":{"paths":["M731.429 841.143q0-14.857-10.857-25.714t-25.714-10.857-25.714 10.857-10.857 25.714 10.857 25.714 25.714 10.857 25.714-10.857 10.857-25.714zM877.714 841.143q0-14.857-10.857-25.714t-25.714-10.857-25.714 10.857-10.857 25.714 10.857 25.714 25.714 10.857 25.714-10.857 10.857-25.714zM950.857 713.143v182.857q0 22.857-16 38.857t-38.857 16h-841.143q-22.857 0-38.857-16t-16-38.857v-182.857q0-22.857 16-38.857t38.857-16h244q12 32 40.286 52.571t63.143 20.571h146.286q34.857 0 63.143-20.571t40.286-52.571h244q22.857 0 38.857 16t16 38.857zM765.143 342.857q-9.714 22.857-33.714 22.857h-146.286v256q0 14.857-10.857 25.714t-25.714 10.857h-146.286q-14.857 0-25.714-10.857t-10.857-25.714v-256h-146.286q-24 0-33.714-22.857-9.714-22.286 8-39.429l256-256q10.286-10.857 25.714-10.857t25.714 10.857l256 256q17.714 17.143 8 39.429z"],"width":951,"isMulticolor":false,"isMulticolor2":false,"defaultCode":61587,"grid":0},"properties":{"id":139,"order":32,"ligatures":"","prevSize":32,"code":61587,"name":"uniF093"},"setIdx":0,"setId":2,"iconIdx":19}],"height":1024,"metadata":{"name":"icomoon"},"preferences":{"showGlyphs":true,"showQuickUse":true,"showQuickUse2":true,"showSVGs":true,"fontPref":{"prefix":"icon-","metadata":{"fontFamily":"icomoon","majorVersion":1,"minorVersion":0},"metrics":{"emSize":1024,"baseline":14.285714285714285,"whitespace":25},"embed":false,"noie8":true,"ie7":false},"imagePref":{"prefix":"icon-","png":true,"useClassSelector":true,"color":0,"bgColor":16777215,"classSelector":".icon"},"historySize":50,"showCodes":true,"gridSize":16}}css/icons/so-css-icons.svg000064400000036365150212710760011526 0ustar00 Generated by IcoMoon css/icons/so-css-icons.ttf000064400000012604150212710760011512 0ustar00 0OS/2c`cmapڈgaspglyfchead#6hheao$hmtxO]L(`loca0,d2maxp nameJ postd 3 @mnm  39hn 16en G: 797979  0'.#!"3!2654&'"&54632#!"&=463!2b '5KK55K ^5KK55KK @   ^ K55KK5( K55KK55K   E#"'&54?632632NvNMwN k2327&'767676767673"'&#"#4?276727676767654'&'&'%3"'&#"##a;;! 18b   Iu*)  '($HI$,OPK !BC! ->!r- `-gf6??!   ..78!OO   %=3254'&'&'&'&'&#"3276767654'&'&'&#"76767676767654='&'&'&'&'&#'67632332#"'&#"=*&!*&/##!!&- ((   8K  (&&$# X;;"!.-00522 ! "#'0*nh|&/6323276727#"327676767654'&'&/&'&'737#"'&'&'&=4'&'54'&#!"3!276"K1/B "%" #23;2    90u+E ) *+=>T_CD"# FSI2$C G-"  ")Y.**1!' 1   p>+%! *,D.Yk%%%!!3%!!2765#!"'&54763!2[\[I&%%&mJ&&&n1"32767654'&'&##"'&'&54767632UGH)**)HGUTHG****GHT;;eewxde;;;;edxwee;;**GGUUGG****GGUUGG**wee;;;;eewwee;;;;eew``+1#"/+'7547'&54?6327632 '366;x<t%IY<x<5LL5[Inn*5LL5<x<I%tY<x;66InnHE_< soso``mnE%I%% h:|dD>`R2`6u K   g = |   R 4icomoonicomoonVersion 1.0Version 1.0icomoonicomoonicomoonicomoonRegularRegularicomoonicomoonFont generated by IcoMoon.Font generated by IcoMoon.LICENSE000064400000043177150212710760005566 0ustar00 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. {description} Copyright (C) {year} {fullname} This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. {signature of Ty Coon}, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. inc/legacy.php000064400000000574150212710760007301 0ustar00 array( 'title' => esc_html__( 'Text', 'so-css' ), 'icon' => 'align-left', 'controllers' => array( array( 'title' => esc_html__( 'Text Color', 'so-css' ), 'type' => 'color', 'args' => array( 'property' => 'color', ), ), array( 'title' => esc_html__( 'Font Size', 'so-css' ), 'type' => 'measurement', 'args' => array( 'property' => 'font-size', 'defaultUnit' => 'px', ), ), array( 'title' => esc_html__( 'Line Height', 'so-css' ), 'type' => 'measurement', 'args' => array( 'property' => 'line-height', 'defaultUnit' => 'em', ), ), array( 'title' => esc_html__( 'Font Weight', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'font-weight', 'options' => array( 'normal' => esc_html__( 'Normal', 'so-css' ), 'bold' => esc_html__( 'Bold', 'so-css' ), 'bolder' => esc_html__( 'Bolder', 'so-css' ), 'lighter' => esc_html__( 'Lighter', 'so-css' ), '100' => '100', '200' => '200', '300' => '300', '400' => '400', '500' => '500', '600' => '600', '700' => '700', '800' => '800', '900' => '900', ), ), ), array( 'title' => esc_html__( 'Font Style', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'font-style', 'options' => array( 'none' => esc_html__( 'None', 'so-css' ), 'normal' => esc_html__( 'Normal', 'so-css' ), 'italic' => esc_html__( 'Italic', 'so-css' ), ), 'option_icons' => array( 'normal' => 'font', 'italic' => 'italic', ), ), ), array( 'title' => esc_html__( 'Text Decoration', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'text-decoration', 'options' => array( 'none' => esc_html__( 'None', 'so-css' ), 'underline' => esc_html__( 'Underline', 'so-css' ), 'overline' => esc_html__( 'Overline', 'so-css' ), 'line-through' => esc_html__( 'Line Through', 'so-css' ), ), 'option_icons' => array( 'none' => 'font', 'underline' => 'underline', 'line-through' => 'strikethrough', ), ), ), array( 'title' => esc_html__( 'Font Variant', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'font-variant', 'options' => array( 'normal' => esc_html__( 'Normal', 'so-css' ), 'small-caps' => esc_html__( 'Small Caps', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Text Transform', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'text-transform', 'options' => array( 'none' => esc_html__( 'None', 'so-css' ), 'capitalize' => esc_html__( 'Capitalize', 'so-css' ), 'uppercase' => esc_html__( 'Uppercase', 'so-css' ), 'lowercase' => esc_html__( 'Lowercase', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Font Family', 'so-css' ), 'type' => 'font_select', 'args' => array( 'property' => 'font-family', ), ), array( 'title' => esc_html__( 'Text Align', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'text-align', 'options' => array( 'left' => esc_html__( 'Left', 'so-css' ), 'right' => esc_html__( 'Right', 'so-css' ), 'center' => esc_html__( 'Center', 'so-css' ), 'justify' => esc_html__( 'Justify', 'so-css' ), ), 'option_icons' => array( 'left' => 'align-left', 'right' => 'align-right', 'center' => 'align-center', 'justify' => 'align-justify', ), ), ), array( 'title' => esc_html__( 'Text Indent', 'so-css' ), 'type' => 'measurement', 'args' => array( 'property' => 'text-indent', ), ), array( 'title' => esc_html__( 'Letter Spacing', 'so-css' ), 'type' => 'measurement', 'args' => array( 'property' => 'letter-spacing', ), ), array( 'title' => esc_html__( 'Word Spacing', 'so-css' ), 'type' => 'measurement', 'args' => array( 'property' => 'word-spacing', ), ), array( 'title' => esc_html__( 'White Space', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'white-space', 'options' => array( 'normal' => esc_html__( 'Normal', 'so-css' ), 'encountered' => esc_html__( 'Encountered', 'so-css' ), 'pre' => esc_html__( 'Pre', 'so-css' ), 'pre-line' => esc_html__( 'Pre Line', 'so-css' ), 'pre-wrap' => esc_html__( 'Pre Wrap', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Text Shadow', 'so-css' ), 'type' => 'shadow', 'args' => array( 'property' => 'text-shadow', ), ), ), ), ////////////////////////////////////////////////////////////////////// 'decoration' => array( 'title' => esc_html__( 'Decoration', 'so-css' ), 'icon' => 'eyedropper', 'controllers' => array( array( 'title' => esc_html__( 'Background Color', 'so-css' ), 'type' => 'color', 'args' => array( 'property' => 'background-color', ), ), array( 'title' => esc_html__( 'Background Image', 'so-css' ), 'type' => 'image', 'args' => array( 'property' => 'background-image', 'value' => 'url("{{url}}")', ), ), array( 'title' => esc_html__( 'Background Position', 'so-css' ), 'type' => 'position', 'args' => array( 'property' => 'background-position', ), ), array( 'title' => esc_html__( 'Background Repeat', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'background-repeat', 'options' => array( 'repeat' => esc_html__( 'repeat', 'so-css' ), 'repeat-x' => esc_html__( 'repeat-x', 'so-css' ), 'repeat-y' => esc_html__( 'repeat-y', 'so-css' ), 'no-repeat' => esc_html__( 'no-repeat', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Background Size', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'background-size', 'options' => array( 'auto' => esc_html__( 'auto', 'so-css' ), 'length' => esc_html__( 'length', 'so-css' ), 'percentage' => esc_html__( 'percentage', 'so-css' ), 'cover' => esc_html__( 'cover', 'so-css' ), 'contain' => esc_html__( 'contain', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Background Attachment', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'background-attachment', 'options' => array( 'scroll' => esc_html__( 'scroll', 'so-css' ), 'fixed' => esc_html__( 'fixed', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Box Shadow', 'so-css' ), 'type' => 'shadow', 'args' => array( 'property' => 'box-shadow', ), ), array( 'title' => esc_html__( 'Opacity', 'so-css' ), 'type' => 'number', 'args' => array( 'property' => 'opacity', 'default' => 1, 'min' => 0, 'max' => 1, 'increment' => 0.05, 'decrement' => -0.05, ), ), array( 'title' => esc_html__( 'Borders', 'so-css' ), 'type' => 'sides', 'args' => array( 'controllers' => array( array( 'type' => 'measurement', 'args' => array( 'property' => 'border-{dir}-width', 'propertyAll' => 'border-width', 'defaultUnit' => 'px', ), ), array( 'type' => 'select', 'args' => array( 'property' => 'border-{dir}-style', 'propertyAll' => 'border-style', 'options' => array( 'hidden' => 'Hidden', 'dotted' => 'Dotted', 'dashed' => 'Dashed', 'solid' => 'Solid', 'double' => 'Double', 'groove' => 'Groove', 'ridge' => 'Ridge', 'inset' => 'Inset', 'outset' => 'Outset', ), ), ), array( 'type' => 'color', 'args' => array( 'property' => 'border-{dir}-color', 'propertyAll' => 'border-color', ), ), ), 'hasAll' => true, ), ), array( 'title' => esc_html__( 'Border Radius', 'so-css' ), 'type' => 'sides', 'args' => array( 'controllers' => array( array( 'type' => 'measurement', 'args' => array( 'property' => 'border-{dir}-radius', 'propertyAll' => 'border-radius', 'defaultUnit' => 'px', ), ), ), 'isRadius' => true, 'hasAll' => true, ), ), ), ), ////////////////////////////////////////////////////////////////////// 'layout' => array( 'title' => esc_html__( 'Layout', 'so-css' ), 'icon' => 'columns', 'controllers' => array( array( 'title' => esc_html__( 'Margin', 'so-css' ), 'type' => 'sides', 'args' => array( 'controllers' => array( array( 'type' => 'measurement', 'args' => array( 'property' => 'margin-{dir}', 'propertyAll' => 'margin', 'defaultUnit' => 'px', ), ), ), 'hasAll' => true, ), ), array( 'title' => esc_html__( 'Padding', 'so-css' ), 'type' => 'sides', 'args' => array( 'controllers' => array( array( 'type' => 'measurement', 'args' => array( 'property' => 'padding-{dir}', 'propertyAll' => 'padding', 'defaultUnit' => 'px', ), ), ), 'hasAll' => true, ), ), array( 'title' => esc_html__( 'Position', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'position', 'options' => array( 'absolute' => esc_html__( 'Absolute', 'so-css' ), 'fixed' => esc_html__( 'Fixed', 'so-css' ), 'relative' => esc_html__( 'Relative', 'so-css' ), 'static' => esc_html__( 'Static', 'so-css' ), 'inherit' => esc_html__( 'Inherit', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Absolute Position', 'so-css' ), 'type' => 'sides', 'args' => array( 'controllers' => array( array( 'type' => 'measurement', 'args' => array( 'property' => '{dir}', 'defaultUnit' => 'px', ), ), ), 'hasAll' => false, ), ), array( 'title' => esc_html__( 'Width', 'so-css' ), 'type' => 'measurement', 'args' => array( 'property' => 'width', 'defaultUnit' => 'px', ), ), array( 'title' => esc_html__( 'Height', 'so-css' ), 'type' => 'measurement', 'args' => array( 'property' => 'height', 'defaultUnit' => '%', ), ), array( 'title' => esc_html__( 'Display', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'display', 'options' => array( 'none' => esc_html__( 'None', 'so-css' ), 'inline' => esc_html__( 'Inline', 'so-css' ), 'block' => esc_html__( 'Block', 'so-css' ), 'flex' => esc_html__( 'Flex', 'so-css' ), 'inline-block' => esc_html__( 'Inline Block', 'so-css' ), 'inline-flex' => esc_html__( 'Inline Flex', 'so-css' ), 'inline-table' => esc_html__( 'Inline Table', 'so-css' ), 'list-item' => esc_html__( 'List Item', 'so-css' ), 'run-in' => esc_html__( 'Run In', 'so-css' ), 'table' => esc_html__( 'Table', 'so-css' ), 'table-caption' => esc_html__( 'Table Caption', 'so-css' ), 'table-column-group' => esc_html__( 'Table Column Group', 'so-css' ), 'table-header-group' => esc_html__( 'Table Header Group', 'so-css' ), 'table-footer-group' => esc_html__( 'Table Footer Group', 'so-css' ), 'table-row-group' => esc_html__( 'Table Row Group', 'so-css' ), 'table-cell' => esc_html__( 'Table Cell', 'so-css' ), 'table-column' => esc_html__( 'Table Column', 'so-css' ), 'table-row' => esc_html__( 'Table Row', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Float', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'float', 'options' => array( 'none' => esc_html__( 'None', 'so-css' ), 'left' => esc_html__( 'Left', 'so-css' ), 'right' => esc_html__( 'Right', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Clear', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'clear', 'options' => array( 'none' => esc_html__( 'None', 'so-css' ), 'left' => esc_html__( 'Left', 'so-css' ), 'right' => esc_html__( 'Right', 'so-css' ), 'both' => esc_html__( 'Both', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Visibility', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'visibility', 'options' => array( 'visible' => esc_html__( 'Visible', 'so-css' ), 'hidden' => esc_html__( 'Hidden', 'so-css' ), 'collapse' => esc_html__( 'Collapse', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Overflow', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'overflow', 'options' => array( 'visible' => esc_html__( 'Visible', 'so-css' ), 'hidden' => esc_html__( 'Hidden', 'so-css' ), 'scroll' => esc_html__( 'Scroll', 'so-css' ), 'auto' => esc_html__( 'Auto', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Overflow X', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'overflow-x', 'options' => array( 'visible' => esc_html__( 'Visible', 'so-css' ), 'hidden' => esc_html__( 'Hidden', 'so-css' ), 'scroll' => esc_html__( 'Scroll', 'so-css' ), 'auto' => esc_html__( 'Auto', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Overflow Y', 'so-css' ), 'type' => 'select', 'args' => array( 'property' => 'overflow-y', 'options' => array( 'visible' => esc_html__( 'Visible', 'so-css' ), 'hidden' => esc_html__( 'Hidden', 'so-css' ), 'scroll' => esc_html__( 'Scroll', 'so-css' ), 'auto' => esc_html__( 'Auto', 'so-css' ), ), ), ), array( 'title' => esc_html__( 'Z-Index', 'so-css' ), 'type' => 'number', 'args' => array( 'property' => 'z-index', ), ), ), ), ); inc/installer/css/admin.css000064400000014500150212710760011705 0ustar00.siteorigin-installer-wrap { margin-top: 0; } .siteorigin-installer-header { background: #f6f6f6; margin: 0 -20px; padding: 15px 30px 0 30px; } .siteorigin-installer-wrap .siteorigin-logo { align-items: center; color: #666; display: flex; font: 300 2.3em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif; gap: 8.5px; margin-bottom: 8px; margin-top: 9px; } .siteorigin-installer-wrap .siteorigin-logo img { height: 26px; opacity: 0.7; width: auto; } .siteorigin-installer-wrap .page-sections { border-bottom: 1px solid #d6d6d6; display: flex; margin: 0 -29px; padding: 5px 0 0 30px; } .siteorigin-installer-wrap .page-sections li { background: #f6f6f6; border: 1px solid #d6d6d6; border-right-width: 0; display: inline-block; font-size: 12px; line-height: 1em; margin: 0 0 -0.7px 0; transition: all .2s; } .siteorigin-installer-wrap .page-sections li:last-child { border-right-width: 1px } .siteorigin-installer-wrap .page-sections li a { box-shadow: none !important; color: #555; display: block; font-weight: bold; padding: 12px 25px; text-decoration: none; } .siteorigin-installer-wrap .page-sections li:hover { background: #f3f3f3; } .siteorigin-installer-wrap .page-sections li.active-section { background: #f0f0f0; border-bottom-color: #f0f0f0; } .siteorigin-installer-wrap .siteorigin-products { display: flex; flex-flow: row wrap; min-width: 100%; position: relative; } .siteorigin-installer-wrap .siteorigin-installer-item { box-sizing: border-box; padding: 0 10px 24px 10px; position: relative; width: 33.33%; } .siteorigin-installer-wrap .siteorigin-installer-item .siteorigin-installer-item-body { background: #fefefe; border: 1px solid #d9d9d9; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); box-sizing: border-box; overflow: hidden; padding: 24px; display: flex; } .siteorigin-installer-wrap .siteorigin-installer-item.highlight-item .siteorigin-installer-item-body { box-shadow: 0 1px 12px rgba(0, 0, 0, 0.2); } .siteorigin-installer-wrap .siteorigin-installer-item.highlight-item .siteorigin-installer-item-body .siteorigin-required { display: block; color: #0073aa; margin-bottom: 1em; } @media screen and (max-width: 1280px) { .siteorigin-installer-wrap .siteorigin-installer-item { width: 50%; } } @media screen and (max-width: 960px) { .siteorigin-installer-wrap .siteorigin-installer-item { width: 100%; } } .siteorigin-installer-wrap .siteorigin-installer-item .siteorigin-installer-item-banner { flex: 5; height: 128px; margin: 0 15px 15px 0; object-fit: contain; overflow: hidden; } .siteorigin-installer-wrap .siteorigin-installer-item .siteorigin-product-content { flex: 9; } .siteorigin-installer-wrap .siteorigin-installer-item h3 { color: #0073aa; font-size: 1.4em; font-weight: 500; margin-top: 0; } .siteorigin-installer-wrap .siteorigin-installer-item .so-type-indicator { background-color: #00a0d2; color: #fff; display: inline-block; font-size: 0.85em; line-height: 1.5em; margin: 14px 0; padding: 2px 6px; text-decoration: none; } .siteorigin-installer-wrap .siteorigin-installer-item .so-description { color: #777777; line-height: 1.35em; } .siteorigin-installer-wrap .siteorigin-installer-item .so-buttons { align-items: center; display: flex; flex-wrap: wrap; gap: 15px; } .siteorigin-installer-wrap .siteorigin-installer-item .so-buttons a:focus { outline: none; } .siteorigin-installer-wrap .siteorigin-installer-item .so-buttons .so-buttons-main { display: flex; gap: 10px; } .siteorigin-installer-wrap .siteorigin-installer-item .so-buttons.so-buttons-force-wrap a { flex: 100%; } @-webkit-keyframes SiteOriginInstallerloading { from { background-position-x: 0; } to { background-position-x: 20.5em } } @keyframes SiteOriginInstallerloading { from { background-position: 0; } to { background-position-x: 20.5em; } } .siteorigin-installer-wrap .siteorigin-installer-item .so-buttons .siteorigin-installer-button { -webkit-appearance: none; background: #f6f7f7; border-color: #2271b1; border-radius: 3px; border-style: solid; border-width: 1px; box-sizing: border-box; color: #2271b1; cursor: pointer; display: inline-block; font-size: 13px; line-height: 2.15384615; margin: 0; min-height: 30px; padding: 0 10px; text-decoration: none; vertical-align: top; white-space: nowrap; } .siteorigin-installer-wrap .siteorigin-installer-item .so-buttons .siteorigin-installer-button:focus { background: #f6f7f7; border-color: #3582c4; color: #0a4b78; box-shadow: 0 0 0 1px #3582c4; outline: 2px solid transparent; outline-offset: 0; } .siteorigin-installer-wrap .siteorigin-installer-item .so-buttons .siteorigin-installer-button:hover { background: #f0f0f1; border-color: #0a4b78; color: #0a4b78; } .siteorigin-installer-wrap .siteorigin-installer-item .so-buttons .siteorigin-installer-button:active { background: #f6f7f7; border-color: #8c8f94; box-shadow: none; } .siteorigin-installer-wrap .siteorigin-installer-item .so-buttons .siteorigin-installer-button.disabled { border-color: #dcdcde; box-shadow: none; color: #a7aaad; cursor: default; -webkit-animation: SiteOriginInstallerloading 3s linear infinite; background: linear-gradient( 90deg, #f0f0f1 0%, rgba( 240,240,241, 0.5 ) 40%, rgba( 240,240,241, 0.5 ) 60%, #f0f0f1 100% ); } .siteorigin-installer-wrap .siteorigin-installer-item.siteorigin-installer-item-active .siteorigin-installer-item-toggle-active .siteorigin-installer-item-activate { display: none; } .siteorigin-installer-wrap .siteorigin-installer-item.siteorigin-installer-item-inactive .siteorigin-installer-item-toggle-active .siteorigin-installer-item-deactivate { display: none; } .siteorigin-installer-wrap .siteorigin-installer-item.siteorigin-installer-item-inactive .product-status { opacity: 0; } .siteorigin-installer-wrap .siteorigin-installer-item.siteorigin-installer-item-inactive h3 { color: #666; } .siteorigin-installer-wrap .siteorigin-installer-item.siteorigin-installer-item-inactive .siteorigin-installer-item-text .siteorigin-installer-item-links { display: none; } .siteorigin-installer-wrap .siteorigin-installer-item.siteorigin-installer-item-inactive .siteorigin-installer-item-banner { -webkit-filter: grayscale(1); filter: gray; opacity: 0.7; } .siteorigin-installer-wrap .siteorigin-installer-item.siteorigin-installer-item-inactive .so-buttons .so-section-link { display: none; } inc/installer/css/notices.css000064400000001335150212710760012263 0ustar00#siteorigin-installer-notice { position: relative; margin: 15px 0; } #siteorigin-installer-notice .siteorigin-notice-dismiss { background: none; border: none; color: #787c82; cursor: pointer; margin: 0; padding: 9px; position: absolute; right: 1px; text-decoration: none; top: 0; } #siteorigin-installer-notice .siteorigin-notice-dismiss:before { -webkit-font-smoothing: antialiased; background: none; color: #787c82; content: '\f153'; display: block; font: normal 16px/20px 'dashicons'; height: 20px; speak: none; text-align: center; width: 20px; } #siteorigin-installer-notice .siteorigin-notice-dismiss:focus:before, #siteorigin-installer-notice .siteorigin-notice-dismiss:hover:before { color: #d63638; } inc/installer/data/products.json000064400000004644150212710760012772 0ustar00{ "siteorigin-premium" : { "name" : "SiteOrigin Premium", "description" : "SiteOrigin Premium is a collection of powerful addons that enhance every aspect of our products. They improve existing features and add entirely new functionality. You'll love all the power they offer you.", "documentation" : "https://siteorigin.com/premium-documentation/", "weight" : 100, "version" : 1, "type" : "plugins" }, "siteorigin-panels" : { "name" : "Page Builder by SiteOrigin", "documentation" : "https://siteorigin.com/page-builder/documentation/", "weight" : 95, "type" : "plugins" }, "so-widgets-bundle" : { "name" : "SiteOrigin Widgets Bundle", "weight" : 90, "documentation" : "https://siteorigin.com/widgets-bundle/getting-started/", "type" : "plugins" }, "so-css" : { "name" : "SiteOrigin CSS", "documentation" : "https://siteorigin.com/css/getting-started/", "weight" : 85, "type" : "plugins" }, "siteorigin-corp" : { "name" : "Corp", "demo" : "https://demo.siteorigin.com/corp/", "documentation" : "https://siteorigin.com/corp-documentation/", "screenshot" : "https://ts.w.org/wp-content/themes/siteorigin-corp/screenshot.jpg", "weight" : 80, "type" : "themes" }, "siteorigin-unwind" : { "name" : "Unwind", "demo" : "https://demo.siteorigin.com/unwind/", "documentation" : "https://siteorigin.com/unwind-documentation/", "screenshot" : "https://ts.w.org/wp-content/themes/siteorigin-unwind/screenshot.jpg", "weight" : 75, "type" : "themes" }, "siteorigin-north" : { "name" : "North", "demo" : "https://demo.siteorigin.com/north/", "documentation" : "https://siteorigin.com/north-documentation/", "screenshot" : "https://ts.w.org/wp-content/themes/siteorigin-north/screenshot.jpg", "weight" : 70, "type" : "themes" }, "vantage" : { "name" : "Vantage", "demo" : "https://demo.siteorigin.com/vantage/", "documentation" : "https://siteorigin.com/vantage-documentation/", "screenshot" : "https://ts.w.org/wp-content/themes/vantage/screenshot.jpg", "weight" : 65, "type" : "themes" }, "origami" : { "name" : "Origami", "demo" : "https://demo.siteorigin.com/origami/", "documentation" : "https://siteorigin.com/origami-documentation/", "screenshot" : "https://ts.w.org/wp-content/themes/origami/screenshot.png", "weight" : 60, "type" : "themes" } } inc/installer/siteorigin-installer.php000064400000005110150212710760014170 0ustar00! ,@\x.&I`V)@+ZD($˰kbLw,H @G\e7S(C*8q|%L{(t'! ,@^x.&I`V)@+D(W,æmAw󑀃4p(B!3N" Uf`\n.+! ,@Zx.&I` Zђ@(C$K(JݱrC An(-J!C 8-K_EH vPnb->ꓣʤE! ,@Zx.&I`V)@+$ 2l1|đwO0:(8!LE8%8K2-d7m!e$Af̠F! ,@Zx.&) A+!lfl)]CTLpQ< ˃(Pj7DPupfN(A铣ȢF! ,@Yx.&F;{My$@knx60 P4!N-@PZ k(FL8['GڑA! ,@Yx.&98Mu^ d*UL{A˻K09( EKX?C+Q†L-IYډA! ,@Zx.&08Mu^ d* aJ1S49e`  M% hFW0-I`F! ,@]x.&iF0)MyP,C$x@Hq@JC,P[ g92 L(hrtH! ,@\x.&i! `0ffr)J(DH F\eЩP N\3(r1B!z'LW0cW! ,@^x.&) XZA+W NAbu$J-\$P`p+.JC Icon inc/installer/img/spinner-2x.gif000064400000020530150212710760012563 0ustar00GIF89a((ӊ! NETSCAPE2.0! XMP DataXMPE?xpacket586180" xmpMM:InstanceID="xmp.iid:9ACA89C2E0Cpacket end="r"?>! ,((@x0`y'$Y0[4P dƋ[䎣 ky>@P 1Q8#UUq1`2(`2 f!"'OvochSce"3B5#q%K*s>2"S m$s , z#} u"xϲ N5{RG; XZz^` ! ,((@x0`f+ ׍diL`@՚9<ﭨ-c 01Q@>!AA(Buhq1p~,oo :}U $"B>NWeSkeg%)kz!+8$L|I q$s ,  us Mȹ7lTI< Z\^`b ! ,((@x0`USxdi^ӝl@ղ9<ﭬ3A10$1Q@!Q P2Bufa(:|; jU %r)QNXeSVeg4d~l7&M3q$PIu3pH-  (D%|nt?RwTIV []zx ! ,((@x0`W0 OdY Cl}tJ1 $1Q>⁢A @!0:`  ʋ"樐+ Wu 93 ${(QzxfSWiXh:c[p!A)*R#Pwj mJaF , ~$ vt Ri6kTAA*>lQnXd Ǣ+E?8 ?9 $-TipfVfhk Y[|`b ! ,((@x0`8c@^`&tgL@ղ=<{+]r5HLcq~ B#A@ Bv}0/6w!+rހ0(- :y! &D?IVeRUme1j7KB~i 3#Eto;l   ώpv@׿OXNWSB= Y[x`b ! ,((@x0`8c@^ѠxVa^3P BW))A!4& V:``IۺQ]9KFm;.hsu ht! M&TQfVtf/j=PRk{: mnF1 8   % w>,6q S=tW@; ]C{bd[ ! ,((@x0`8c@^ 8_U0A Cl}`Nɥ48 tATB};rE b\g{; r%H>FWeSVme0i>LP lmxD2 z z~ qx?oCB6m4TA< Z\z`b ! ,((@x0`8c@^`PVa^4o s֘/,c Aᢤm P*@!>fLWV|8"`Tq4 xj*ROXfT/Wnfhk9+ zB  K wsz m} n$)qu0:yG?if;Ƙ[]wacԘ? ! ,((@x0`8c@^`(L 0W zIJb oJcRqz @@ 5/Z .ЍW VEV,) ~luv$PMxdRUEWzviL :Hm}_ J p^ Mn vaZsk>BgO=PS@; Y[u_a ! ,((@x0`8c@^`(L PU ,*C b o : 1)9!ATB}(Z veF)P5bwj>v~6hGeS{VNXg)MW % oD}[ mqy NortIlw\>RhPY:QTA; Z_acX ! ,((@x0`8c@^`(L cZ4Pg ʊpiL€0(,ނtt(Oi/eA;3+aEJ }@Y 9yIZDgTXogil5 )!q ' xtdLN{ Cs*v= n nt Gh2ZUC: \^abd ! ,((@x0`8c@^`(L C3a4Pg qb o,bTPAX8& tAp Bu2-vPd[\oz@$6ma}=hWeS;regv:jHP %!K ! ~x h3RqlE o>mdƞ.9ǕTA; Z\u`b ! ,((@x0`8c@^`(L °@ubFN  ox-HLc$9>pA|t(-i (Th>3c|CNPDYL8MgUXsgi}u R% p wz jcrj) mDpAIT!c]|8sVD>5bd ! ,((@x0`8c@^`(L  4PUwCp\-+^ Ә(; G b@(U8V,}87rf9m]h}$ 61H BFZeVYqe/{?sMS~ }%! ! ux ph lE 1 g>:v8WF@ ])uac[ ! ,((@x0`8c@^`(L @u[9z+[ $% 9toAȡzt(hi-d Abޱ̓ }'Yi(N7HgUXGZy0?~ K %!r " x{ tGM]ln("r*Q"cRVB= \^`bd ! ,((@x0`8c@^`(L @r b o,Z`=1ATB}Y vʕ П 4Sv|'6 $QNFWeS~2meg{j5{I: loD  qE"t>9˵6B P5Oc[2QT@; Z\v`b ! ,((@x0`8c@^`(L @qL Cnj`-ɉ`>uATB}Ȏω1QFlS3!W #XGeUmegwj6|$J ; lL ! vy pt?Uʡ!o"" гP6/XTA< Z\v`b ! ,((@x0`8c@^`(L @$Cnj}`- 8D@4@h/4"*lXэ=h5<:} n L>lVdS'gdf{i6{IP~ k/y ! ux p)r s "?m JobW)< Y[]_a ! ,((@x0`8c@^`(L @ Kpnj`-q| n@@ @-4"غ G zߏ A| #WlVdRy `KnXLXY4$ 6F~%F;K[fWZnfh|k;|(T mI@ ! v q LtD F7 O';nXڗ^)abd ! ,((@x0`8c@^`(L 2>=^M9L >@w?x 8p P]s$REXfT| ;f.n3=IQ mp: ! wzq@r 1um ">>_FSEZ+UA; []ac ! ,((@x0`8c@^`(Lp%3 aS#H4&Aa@|NoAvt(Pд$4z!bzLOp 0$GyPz=EYhU~Xph/:wGR or ! fMA|  tkE TE5u3VA; \^yce ! ,((@x0`8c@^`(L`4P b o)1Q8uATBuY A;G>x+r$} 8dgs x$QHmWeS8!Vhexj5Mlp' bw uNz %xrJŴ:hp ج P=hT@; Z\w`b ! ,((@x0`8c@^`(Lp@>jCl}`89BPcq| n@@ @ 5w"*l]еOȹul f^{vz$PylVdRfOP9L>|[qUO s*ROXfT/Wnfh7?+'p~us G w zi| "ruųxZB;ז[]wacӗ9 ! ,((@x0`8c@^h$.cV Clp1Qʎ>uATB}Fr&xm[ԇУ 9]vF I XJWeSVmeg4>'M ; lo~ho9oRJE-q ~ p|lԾ? P6mʗTA< Z\u`b| ! ,((@x0`8c@^h.cV C$ƲZ'W-LjL9NoAJt:HA0P>`M9K݆w Wx* '=CiZfUxfh4=N 8kx(@t8 ijTn  qzmt±g2VL; ]_bd[ ! ,((@x0`8c@^CZK`@ղ=<{+*oe Ә,g߂k:R PH@!`>bKL{0 u& (?JXfTWnfhk7udFQ #n mp ;Hp;Iy D%rw@sпSi7YU[]`ac7 ! ,((@x0`8c@^E fLp@ղ=<{+*qiL3oAȵzo(Ji1 V4` Ҭg z' DSP!gUYZipb^OB~GR.j)vtC] 3  ̎ |@w8HP7gVx\^re ! ,((@x0`%jleZLp@=}a97Kplg2$\z1Zhq5''D^Vs|]m|7 >8 $FBj[gWgil;T NP> ? S nxus0 1 ){~yCV|;XM@ ^rd ! ,((@x0`˻Sxdirv=՞=<}l[c0d1Q@!ⅢA.B@u42hn*\ # :}+ $")Qx}veSWhX1b[E5>y*3LRIP$ ; l$aGH+ |ǽ ( qos Rh7TܔZ\|bo7 ! ,((@x0` m; OэdYL`,=ղ=<{* lv>nIjLoAȵzt(@!@:b#nU;({%H*,pd}P; kW %"$q?YfUifhC l!i-N4 m K syI ; B #x%v TPR?V\^`bd !,((@x0`5ō+ OэdyeK`@՚=<ﭨ%!j1Q@>!AATB`Ncj3 شN'q~I r#!#(>EyWeSVe1o Mk{'}4  U n%p ,  ̭ vt? Qlj;ޖZ\}`b7 ;inc/installer/img/icon.svg000064400000005302150212710760011540 0ustar00 inc/installer/img/siteorigin.svg000064400000012354150212710760012771 0ustar00inc/installer/changelog.md000064400000000443150212710760011565 0ustar00#### 0.1.3 - 22 January 2016 * Added affiliate ID filter. #### 0.1.2 - 22 January 2016 * Cleaned up recommended plugins. * Fixed duplicated SiteOrigin menu items. #### 0.1.1 - 22 January 2016 * Added WooCommerce to recommended plugins. #### 0.1 - 20 January 2016 * Initial plugin release inc/installer/inc/admin.php000064400000023217150212710760011672 0ustar00 'so_installer_dismiss' ), admin_url( 'admin-ajax.php' ) ), 'so_installer_dismiss' ); ?>

' . __( 'Click here', 'siteorigin-installer' ) . '' ); ?>

wp_nonce_url( admin_url( 'admin-ajax.php?action=siteorigin_installer_manage' ), 'siteorigin-installer-manage' ), 'activateText' => __( 'Activate', 'siteorigin-installer' ), ) ); } public function manage_product() { check_ajax_referer( 'siteorigin-installer-manage' ); if ( empty( $_POST['slug'] ) || empty( $_POST['task'] ) || empty( $_POST['type'] ) || empty( $_POST['version'] ) ) { die(); } $slug = sanitize_file_name( $_POST['slug'] ); $product_url = 'https://wordpress.org/' . urlencode( $_POST['type'] ) . '/download/' . urlencode( $slug ) . '.' . urlencode( $_POST['version'] ) . '.zip'; // check_ajax_referer( 'so_installer_manage' ); if ( ! class_exists( 'WP_Upgrader' ) ) { require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; } $upgrader = new WP_Upgrader(); if ( $_POST['type'] == 'plugins' ) { if ( $_POST['task'] == 'install' || $_POST['task'] == 'update' ) { $upgrader->run( array( 'package' => esc_url( $product_url ), 'destination' => WP_PLUGIN_DIR, 'clear_destination' => true, 'abort_if_destination_exists' => false, 'hook_extra' => array( 'type' => 'plugin', 'action' => 'install', ), ) ); $clear = true; } elseif ( $_POST['task'] == 'activate' && ! is_wp_error( validate_plugin( $slug . '/' . $slug . '.php' ) ) ) { activate_plugin( $slug . '/' . $slug . '.php' ); $clear = true; } } elseif ( $_POST['type'] == 'themes' ) { if ( $_POST['task'] == 'install' || $_POST['task'] == 'update' ) { $upgrader->run( array( 'package' => esc_url( $product_url ), 'destination' => get_theme_root(), 'clear_destination' => true, 'clear_working' => true, 'abort_if_destination_exists' => false, ) ); $clear = true; } elseif ( $_POST['task'] == 'activate' ) { switch_theme( $slug ); $clear = true; } } if ( ! empty( $clear ) ) { delete_transient( 'siteorigin_installer_product_data' ); } die(); } private function update_product_data( $product = array(), $return = true ) { $current_theme = wp_get_theme(); if ( empty( $products ) ) { $products = apply_filters( 'siteorigin_installer_products', json_decode( file_get_contents( SITEORIGIN_INSTALLER_DIR . '/data/products.json' ), true ) ); } require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; $fields = array( 'short_description' => true, 'version' => true, ); // $product_data = get_transient( 'siteorigin_installer_product_data' ); foreach ( $products as $slug => $item ) { $status = false; if ( $slug != 'siteorigin-premium' ) { if ( $item['type'] == 'themes' ) { $api = themes_api( 'theme_information', array( 'slug' => $slug, 'fields' => $fields, ) ); $theme = wp_get_theme( $slug ); // Work out the status of the theme. if ( is_object( $theme->errors() ) ) { $status = 'install'; } else { $products[ $slug ]['update'] = version_compare( $theme->get( 'Version' ), $api->version, '<' ); if ( $theme->get_stylesheet() != $current_theme->get_stylesheet() ) { $status = 'activate'; } } // Theme descriptions are too long so we need to shorten them. $description = explode( '.', $api->sections['description'] ); $description = $description[0] . '. ' . $description[1]; } else { $api = plugins_api( 'plugin_information', array( 'slug' => $slug, 'fields' => $fields, ) ); // Work out the status of the plugin. $plugin_file = "$slug/$slug.php"; if ( ! file_exists( WP_PLUGIN_DIR . "/$plugin_file" ) ) { $status = 'install'; } elseif ( ! is_plugin_active( $plugin_file ) ) { $status = 'activate'; } if ( $status != 'install' ) { $plugin = get_plugin_data( WP_PLUGIN_DIR . "/$plugin_file" ); $products[ $slug ]['update'] = version_compare( $plugin['Version'], $api->version, '<' ); } if ( empty( $item['screenshot'] ) ) { $products[ $slug ]['screenshot'] = 'https://plugins.svn.wordpress.org/' . $slug . '/assets/icon.svg'; } } $products[ $slug ]['status'] = $status; $products[ $slug ]['version'] = $api->version; if ( empty( $item['description'] ) ) { $products[ $slug ]['description'] = $item['type'] == 'themes' ? "$description." : $api->short_description; } } elseif ( ! apply_filters( 'siteorigin_premium_upgrade_teaser', true ) || defined( 'SITEORIGIN_PREMIUM_VERSION' ) ) { unset( $products['siteorigin-premium'] ); } else { $products['siteorigin-premium']['screenshot'] = SITEORIGIN_INSTALLER_URL . 'img/premium-icon.svg'; } } uasort( $products, array( $this, 'sort_compare' ) ); set_transient( 'siteorigin_installer_product_data', $products, 43200 ); return $products; } /** * Display the theme admin page */ public function display_admin_page() { $products = apply_filters( 'siteorigin_installer_products_transient', get_transient( 'siteorigin_installer_product_data' ) ); if ( empty( $products ) ) { $products = $this->update_product_data(); } if ( ! empty( $_GET['highlight'] ) && isset( $products[ (string) $_GET['highlight'] ] ) ) { $products[ (string) $_GET['highlight'] ]['weight'] = 9999; uasort( $products, array( $this, 'sort_compare' ) ); $highlight = $_GET['highlight']; } include SITEORIGIN_INSTALLER_DIR . '/tpl/admin.php'; } /** * Comparison function for sorting * * @return int */ public function sort_compare( $a, $b ) { if ( empty( $a['weight'] ) || empty( $b['weight'] ) ) { return 0; } return $a['weight'] < $b['weight'] ? 1 : -1; } } } SiteOrigin_Installer_Admin::single(); inc/installer/inc/Parsedown/Parsedown.php000064400000111437150212710760014510 0ustar00DefinitionData = array(); # standardize line breaks $text = str_replace(array("\r\n", "\r"), "\n", $text); # remove surrounding line breaks $text = trim($text, "\n"); # split text into lines $lines = explode("\n", $text); # iterate through lines to identify blocks $markup = $this->lines($lines); # trim line breaks $markup = trim($markup, "\n"); return $markup; } # # Setters # function setBreaksEnabled($breaksEnabled) { $this->breaksEnabled = $breaksEnabled; return $this; } protected $breaksEnabled; function setMarkupEscaped($markupEscaped) { $this->markupEscaped = $markupEscaped; return $this; } protected $markupEscaped; function setUrlsLinked($urlsLinked) { $this->urlsLinked = $urlsLinked; return $this; } protected $urlsLinked = true; # # Lines # protected $BlockTypes = array( '#' => array('Header'), '*' => array('Rule', 'List'), '+' => array('List'), '-' => array('SetextHeader', 'Table', 'Rule', 'List'), '0' => array('List'), '1' => array('List'), '2' => array('List'), '3' => array('List'), '4' => array('List'), '5' => array('List'), '6' => array('List'), '7' => array('List'), '8' => array('List'), '9' => array('List'), ':' => array('Table'), '<' => array('Comment', 'Markup'), '=' => array('SetextHeader'), '>' => array('Quote'), '[' => array('Reference'), '_' => array('Rule'), '`' => array('FencedCode'), '|' => array('Table'), '~' => array('FencedCode'), ); # ~ protected $unmarkedBlockTypes = array( 'Code', ); # # Blocks # protected function lines(array $lines) { $CurrentBlock = null; foreach ($lines as $line) { if (chop($line) === '') { if (isset($CurrentBlock)) { $CurrentBlock['interrupted'] = true; } continue; } if (strpos($line, "\t") !== false) { $parts = explode("\t", $line); $line = $parts[0]; unset($parts[0]); foreach ($parts as $part) { $shortage = 4 - mb_strlen($line, 'utf-8') % 4; $line .= str_repeat(' ', $shortage); $line .= $part; } } $indent = 0; while (isset($line[$indent]) and $line[$indent] === ' ') { $indent ++; } $text = $indent > 0 ? substr($line, $indent) : $line; # ~ $Line = array('body' => $line, 'indent' => $indent, 'text' => $text); # ~ if (isset($CurrentBlock['continuable'])) { $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock); if (isset($Block)) { $CurrentBlock = $Block; continue; } else { if ($this->isBlockCompletable($CurrentBlock['type'])) { $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); } } } # ~ $marker = $text[0]; # ~ $blockTypes = $this->unmarkedBlockTypes; if (isset($this->BlockTypes[$marker])) { foreach ($this->BlockTypes[$marker] as $blockType) { $blockTypes []= $blockType; } } # # ~ foreach ($blockTypes as $blockType) { $Block = $this->{'block'.$blockType}($Line, $CurrentBlock); if (isset($Block)) { $Block['type'] = $blockType; if ( ! isset($Block['identified'])) { $Blocks []= $CurrentBlock; $Block['identified'] = true; } if ($this->isBlockContinuable($blockType)) { $Block['continuable'] = true; } $CurrentBlock = $Block; continue 2; } } # ~ if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted'])) { $CurrentBlock['element']['text'] .= "\n".$text; } else { $Blocks []= $CurrentBlock; $CurrentBlock = $this->paragraph($Line); $CurrentBlock['identified'] = true; } } # ~ if (isset($CurrentBlock['continuable']) and $this->isBlockCompletable($CurrentBlock['type'])) { $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); } # ~ $Blocks []= $CurrentBlock; unset($Blocks[0]); # ~ $markup = ''; foreach ($Blocks as $Block) { if (isset($Block['hidden'])) { continue; } $markup .= "\n"; $markup .= isset($Block['markup']) ? $Block['markup'] : $this->element($Block['element']); } $markup .= "\n"; # ~ return $markup; } # # Allow for plugin extensibility # protected function isBlockContinuable($Type) { return method_exists($this, 'block'.$Type.'Continue'); } protected function isBlockCompletable($Type) { return method_exists($this, 'block'.$Type.'Complete'); } # # Code protected function blockCode($Line, $Block = null) { if (isset($Block) and ! isset($Block['type']) and ! isset($Block['interrupted'])) { return; } if ($Line['indent'] >= 4) { $text = substr($Line['body'], 4); $Block = array( 'element' => array( 'name' => 'pre', 'handler' => 'element', 'text' => array( 'name' => 'code', 'text' => $text, ), ), ); return $Block; } } protected function blockCodeContinue($Line, $Block) { if ($Line['indent'] >= 4) { if (isset($Block['interrupted'])) { $Block['element']['text']['text'] .= "\n"; unset($Block['interrupted']); } $Block['element']['text']['text'] .= "\n"; $text = substr($Line['body'], 4); $Block['element']['text']['text'] .= $text; return $Block; } } protected function blockCodeComplete($Block) { $text = $Block['element']['text']['text']; $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); $Block['element']['text']['text'] = $text; return $Block; } # # Comment protected function blockComment($Line) { if ($this->markupEscaped) { return; } if (isset($Line['text'][3]) and $Line['text'][3] === '-' and $Line['text'][2] === '-' and $Line['text'][1] === '!') { $Block = array( 'markup' => $Line['body'], ); if (preg_match('/-->$/', $Line['text'])) { $Block['closed'] = true; } return $Block; } } protected function blockCommentContinue($Line, array $Block) { if (isset($Block['closed'])) { return; } $Block['markup'] .= "\n" . $Line['body']; if (preg_match('/-->$/', $Line['text'])) { $Block['closed'] = true; } return $Block; } # # Fenced Code protected function blockFencedCode($Line) { if (preg_match('/^['.$Line['text'][0].']{3,}[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches)) { $Element = array( 'name' => 'code', 'text' => '', ); if (isset($matches[1])) { $class = 'language-'.$matches[1]; $Element['attributes'] = array( 'class' => $class, ); } $Block = array( 'char' => $Line['text'][0], 'element' => array( 'name' => 'pre', 'handler' => 'element', 'text' => $Element, ), ); return $Block; } } protected function blockFencedCodeContinue($Line, $Block) { if (isset($Block['complete'])) { return; } if (isset($Block['interrupted'])) { $Block['element']['text']['text'] .= "\n"; unset($Block['interrupted']); } if (preg_match('/^'.$Block['char'].'{3,}[ ]*$/', $Line['text'])) { $Block['element']['text']['text'] = substr($Block['element']['text']['text'], 1); $Block['complete'] = true; return $Block; } $Block['element']['text']['text'] .= "\n".$Line['body'];; return $Block; } protected function blockFencedCodeComplete($Block) { $text = $Block['element']['text']['text']; $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); $Block['element']['text']['text'] = $text; return $Block; } # # Header protected function blockHeader($Line) { if (isset($Line['text'][1])) { $level = 1; while (isset($Line['text'][$level]) and $Line['text'][$level] === '#') { $level ++; } if ($level > 6) { return; } $text = trim($Line['text'], '# '); $Block = array( 'element' => array( 'name' => 'h' . min(6, $level), 'text' => $text, 'handler' => 'line', ), ); return $Block; } } # # List protected function blockList($Line) { list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]+[.]'); if (preg_match('/^('.$pattern.'[ ]+)(.*)/', $Line['text'], $matches)) { $Block = array( 'indent' => $Line['indent'], 'pattern' => $pattern, 'element' => array( 'name' => $name, 'handler' => 'elements', ), ); $Block['li'] = array( 'name' => 'li', 'handler' => 'li', 'text' => array( $matches[2], ), ); $Block['element']['text'] []= & $Block['li']; return $Block; } } protected function blockListContinue($Line, array $Block) { if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'(?:[ ]+(.*)|$)/', $Line['text'], $matches)) { if (isset($Block['interrupted'])) { $Block['li']['text'] []= ''; unset($Block['interrupted']); } unset($Block['li']); $text = isset($matches[1]) ? $matches[1] : ''; $Block['li'] = array( 'name' => 'li', 'handler' => 'li', 'text' => array( $text, ), ); $Block['element']['text'] []= & $Block['li']; return $Block; } if ($Line['text'][0] === '[' and $this->blockReference($Line)) { return $Block; } if ( ! isset($Block['interrupted'])) { $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); $Block['li']['text'] []= $text; return $Block; } if ($Line['indent'] > 0) { $Block['li']['text'] []= ''; $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); $Block['li']['text'] []= $text; unset($Block['interrupted']); return $Block; } } # # Quote protected function blockQuote($Line) { if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) { $Block = array( 'element' => array( 'name' => 'blockquote', 'handler' => 'lines', 'text' => (array) $matches[1], ), ); return $Block; } } protected function blockQuoteContinue($Line, array $Block) { if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) { if (isset($Block['interrupted'])) { $Block['element']['text'] []= ''; unset($Block['interrupted']); } $Block['element']['text'] []= $matches[1]; return $Block; } if ( ! isset($Block['interrupted'])) { $Block['element']['text'] []= $Line['text']; return $Block; } } # # Rule protected function blockRule($Line) { if (preg_match('/^(['.$Line['text'][0].'])([ ]*\1){2,}[ ]*$/', $Line['text'])) { $Block = array( 'element' => array( 'name' => 'hr' ), ); return $Block; } } # # Setext protected function blockSetextHeader($Line, array $Block = null) { if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) { return; } if (chop($Line['text'], $Line['text'][0]) === '') { $Block['element']['name'] = $Line['text'][0] === '=' ? 'h1' : 'h2'; return $Block; } } # # Markup protected function blockMarkup($Line) { if ($this->markupEscaped) { return; } if (preg_match('/^<(\w*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches)) { $element = strtolower($matches[1]); if (in_array($element, $this->textLevelElements)) { return; } $Block = array( 'name' => $matches[1], 'depth' => 0, 'markup' => $Line['text'], ); $length = strlen($matches[0]); $remainder = substr($Line['text'], $length); if (trim($remainder) === '') { if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) { $Block['closed'] = true; $Block['void'] = true; } } else { if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) { return; } if (preg_match('/<\/'.$matches[1].'>[ ]*$/i', $remainder)) { $Block['closed'] = true; } } return $Block; } } protected function blockMarkupContinue($Line, array $Block) { if (isset($Block['closed'])) { return; } if (preg_match('/^<'.$Block['name'].'(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*>/i', $Line['text'])) # open { $Block['depth'] ++; } if (preg_match('/(.*?)<\/'.$Block['name'].'>[ ]*$/i', $Line['text'], $matches)) # close { if ($Block['depth'] > 0) { $Block['depth'] --; } else { $Block['closed'] = true; } } if (isset($Block['interrupted'])) { $Block['markup'] .= "\n"; unset($Block['interrupted']); } $Block['markup'] .= "\n".$Line['body']; return $Block; } # # Reference protected function blockReference($Line) { if (preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches)) { $id = strtolower($matches[1]); $Data = array( 'url' => $matches[2], 'title' => null, ); if (isset($matches[3])) { $Data['title'] = $matches[3]; } $this->DefinitionData['Reference'][$id] = $Data; $Block = array( 'hidden' => true, ); return $Block; } } # # Table protected function blockTable($Line, array $Block = null) { if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) { return; } if (strpos($Block['element']['text'], '|') !== false and chop($Line['text'], ' -:|') === '') { $alignments = array(); $divider = $Line['text']; $divider = trim($divider); $divider = trim($divider, '|'); $dividerCells = explode('|', $divider); foreach ($dividerCells as $dividerCell) { $dividerCell = trim($dividerCell); if ($dividerCell === '') { continue; } $alignment = null; if ($dividerCell[0] === ':') { $alignment = 'left'; } if (substr($dividerCell, - 1) === ':') { $alignment = $alignment === 'left' ? 'center' : 'right'; } $alignments []= $alignment; } # ~ $HeaderElements = array(); $header = $Block['element']['text']; $header = trim($header); $header = trim($header, '|'); $headerCells = explode('|', $header); foreach ($headerCells as $index => $headerCell) { $headerCell = trim($headerCell); $HeaderElement = array( 'name' => 'th', 'text' => $headerCell, 'handler' => 'line', ); if (isset($alignments[$index])) { $alignment = $alignments[$index]; $HeaderElement['attributes'] = array( 'style' => 'text-align: '.$alignment.';', ); } $HeaderElements []= $HeaderElement; } # ~ $Block = array( 'alignments' => $alignments, 'identified' => true, 'element' => array( 'name' => 'table', 'handler' => 'elements', ), ); $Block['element']['text'] []= array( 'name' => 'thead', 'handler' => 'elements', ); $Block['element']['text'] []= array( 'name' => 'tbody', 'handler' => 'elements', 'text' => array(), ); $Block['element']['text'][0]['text'] []= array( 'name' => 'tr', 'handler' => 'elements', 'text' => $HeaderElements, ); return $Block; } } protected function blockTableContinue($Line, array $Block) { if (isset($Block['interrupted'])) { return; } if ($Line['text'][0] === '|' or strpos($Line['text'], '|')) { $Elements = array(); $row = $Line['text']; $row = trim($row); $row = trim($row, '|'); preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches); foreach ($matches[0] as $index => $cell) { $cell = trim($cell); $Element = array( 'name' => 'td', 'handler' => 'line', 'text' => $cell, ); if (isset($Block['alignments'][$index])) { $Element['attributes'] = array( 'style' => 'text-align: '.$Block['alignments'][$index].';', ); } $Elements []= $Element; } $Element = array( 'name' => 'tr', 'handler' => 'elements', 'text' => $Elements, ); $Block['element']['text'][1]['text'] []= $Element; return $Block; } } # # ~ # protected function paragraph($Line) { $Block = array( 'element' => array( 'name' => 'p', 'text' => $Line['text'], 'handler' => 'line', ), ); return $Block; } # # Inline Elements # protected $InlineTypes = array( '"' => array('SpecialCharacter'), '!' => array('Image'), '&' => array('SpecialCharacter'), '*' => array('Emphasis'), ':' => array('Url'), '<' => array('UrlTag', 'EmailTag', 'Markup', 'SpecialCharacter'), '>' => array('SpecialCharacter'), '[' => array('Link'), '_' => array('Emphasis'), '`' => array('Code'), '~' => array('Strikethrough'), '\\' => array('EscapeSequence'), ); # ~ protected $inlineMarkerList = '!"*_&[:<>`~\\'; # # ~ # public function line($text) { $markup = ''; # $excerpt is based on the first occurrence of a marker while ($excerpt = strpbrk($text, $this->inlineMarkerList)) { $marker = $excerpt[0]; $markerPosition = strpos($text, $marker); $Excerpt = array('text' => $excerpt, 'context' => $text); foreach ($this->InlineTypes[$marker] as $inlineType) { $Inline = $this->{'inline'.$inlineType}($Excerpt); if ( ! isset($Inline)) { continue; } # makes sure that the inline belongs to "our" marker if (isset($Inline['position']) and $Inline['position'] > $markerPosition) { continue; } # sets a default inline position if ( ! isset($Inline['position'])) { $Inline['position'] = $markerPosition; } # the text that comes before the inline $unmarkedText = substr($text, 0, $Inline['position']); # compile the unmarked text $markup .= $this->unmarkedText($unmarkedText); # compile the inline $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']); # remove the examined text $text = substr($text, $Inline['position'] + $Inline['extent']); continue 2; } # the marker does not belong to an inline $unmarkedText = substr($text, 0, $markerPosition + 1); $markup .= $this->unmarkedText($unmarkedText); $text = substr($text, $markerPosition + 1); } $markup .= $this->unmarkedText($text); return $markup; } # # ~ # protected function inlineCode($Excerpt) { $marker = $Excerpt['text'][0]; if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(? strlen($matches[0]), 'element' => array( 'name' => 'code', 'text' => $text, ), ); } } protected function inlineEmailTag($Excerpt) { if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $Excerpt['text'], $matches)) { $url = $matches[1]; if ( ! isset($matches[2])) { $url = 'mailto:' . $url; } return array( 'extent' => strlen($matches[0]), 'element' => array( 'name' => 'a', 'text' => $matches[1], 'attributes' => array( 'href' => $url, ), ), ); } } protected function inlineEmphasis($Excerpt) { if ( ! isset($Excerpt['text'][1])) { return; } $marker = $Excerpt['text'][0]; if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) { $emphasis = 'strong'; } elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) { $emphasis = 'em'; } else { return; } return array( 'extent' => strlen($matches[0]), 'element' => array( 'name' => $emphasis, 'handler' => 'line', 'text' => $matches[1], ), ); } protected function inlineEscapeSequence($Excerpt) { if (isset($Excerpt['text'][1]) and in_array($Excerpt['text'][1], $this->specialCharacters)) { return array( 'markup' => $Excerpt['text'][1], 'extent' => 2, ); } } protected function inlineImage($Excerpt) { if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') { return; } $Excerpt['text']= substr($Excerpt['text'], 1); $Link = $this->inlineLink($Excerpt); if ($Link === null) { return; } $Inline = array( 'extent' => $Link['extent'] + 1, 'element' => array( 'name' => 'img', 'attributes' => array( 'src' => $Link['element']['attributes']['href'], 'alt' => $Link['element']['text'], ), ), ); $Inline['element']['attributes'] += $Link['element']['attributes']; unset($Inline['element']['attributes']['href']); return $Inline; } protected function inlineLink($Excerpt) { $Element = array( 'name' => 'a', 'handler' => 'line', 'text' => null, 'attributes' => array( 'href' => null, 'title' => null, ), ); $extent = 0; $remainder = $Excerpt['text']; if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches)) { $Element['text'] = $matches[1]; $extent += strlen($matches[0]); $remainder = substr($remainder, $extent); } else { return; } if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches)) { $Element['attributes']['href'] = $matches[1]; if (isset($matches[2])) { $Element['attributes']['title'] = substr($matches[2], 1, - 1); } $extent += strlen($matches[0]); } else { if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) { $definition = strlen($matches[1]) ? $matches[1] : $Element['text']; $definition = strtolower($definition); $extent += strlen($matches[0]); } else { $definition = strtolower($Element['text']); } if ( ! isset($this->DefinitionData['Reference'][$definition])) { return; } $Definition = $this->DefinitionData['Reference'][$definition]; $Element['attributes']['href'] = $Definition['url']; $Element['attributes']['title'] = $Definition['title']; } $Element['attributes']['href'] = str_replace(array('&', '<'), array('&', '<'), $Element['attributes']['href']); return array( 'extent' => $extent, 'element' => $Element, ); } protected function inlineMarkup($Excerpt) { if ($this->markupEscaped or strpos($Excerpt['text'], '>') === false) { return; } if ($Excerpt['text'][1] === '/' and preg_match('/^<\/\w*[ ]*>/s', $Excerpt['text'], $matches)) { return array( 'markup' => $matches[0], 'extent' => strlen($matches[0]), ); } if ($Excerpt['text'][1] === '!' and preg_match('/^/s', $Excerpt['text'], $matches)) { return array( 'markup' => $matches[0], 'extent' => strlen($matches[0]), ); } if ($Excerpt['text'][1] !== ' ' and preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $Excerpt['text'], $matches)) { return array( 'markup' => $matches[0], 'extent' => strlen($matches[0]), ); } } protected function inlineSpecialCharacter($Excerpt) { if ($Excerpt['text'][0] === '&' and ! preg_match('/^&#?\w+;/', $Excerpt['text'])) { return array( 'markup' => '&', 'extent' => 1, ); } $SpecialCharacter = array('>' => 'gt', '<' => 'lt', '"' => 'quot'); if (isset($SpecialCharacter[$Excerpt['text'][0]])) { return array( 'markup' => '&'.$SpecialCharacter[$Excerpt['text'][0]].';', 'extent' => 1, ); } } protected function inlineStrikethrough($Excerpt) { if ( ! isset($Excerpt['text'][1])) { return; } if ($Excerpt['text'][1] === '~' and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $Excerpt['text'], $matches)) { return array( 'extent' => strlen($matches[0]), 'element' => array( 'name' => 'del', 'text' => $matches[1], 'handler' => 'line', ), ); } } protected function inlineUrl($Excerpt) { if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/') { return; } if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $Excerpt['context'], $matches, PREG_OFFSET_CAPTURE)) { $Inline = array( 'extent' => strlen($matches[0][0]), 'position' => $matches[0][1], 'element' => array( 'name' => 'a', 'text' => $matches[0][0], 'attributes' => array( 'href' => $matches[0][0], ), ), ); return $Inline; } } protected function inlineUrlTag($Excerpt) { if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $Excerpt['text'], $matches)) { $url = str_replace(array('&', '<'), array('&', '<'), $matches[1]); return array( 'extent' => strlen($matches[0]), 'element' => array( 'name' => 'a', 'text' => $url, 'attributes' => array( 'href' => $url, ), ), ); } } # ~ protected function unmarkedText($text) { if ($this->breaksEnabled) { $text = preg_replace('/[ ]*\n/', "
\n", $text); } else { $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text); $text = str_replace(" \n", "\n", $text); } return $text; } # # Handlers # protected function element(array $Element) { $markup = '<'.$Element['name']; if (isset($Element['attributes'])) { foreach ($Element['attributes'] as $name => $value) { if ($value === null) { continue; } $markup .= ' '.$name.'="'.$value.'"'; } } if (isset($Element['text'])) { $markup .= '>'; if (isset($Element['handler'])) { $markup .= $this->{$Element['handler']}($Element['text']); } else { $markup .= $Element['text']; } $markup .= ''; } else { $markup .= ' />'; } return $markup; } protected function elements(array $Elements) { $markup = ''; foreach ($Elements as $Element) { $markup .= "\n" . $this->element($Element); } $markup .= "\n"; return $markup; } # ~ protected function li($lines) { $markup = $this->lines($lines); $trimmedMarkup = trim($markup); if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '

') { $markup = $trimmedMarkup; $markup = substr($markup, 3); $position = strpos($markup, "

"); $markup = substr_replace($markup, '', $position, 4); } return $markup; } # # Deprecated Methods # function parse($text) { $markup = $this->text($text); return $markup; } # # Static Methods # static function instance($name = 'default') { if (isset(self::$instances[$name])) { return self::$instances[$name]; } $instance = new static(); self::$instances[$name] = $instance; return $instance; } private static $instances = array(); # # Fields # protected $DefinitionData; # # Read-Only protected $specialCharacters = array( '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', '|', ); protected $StrongRegex = array( '*' => '/^[*]{2}((?:\\\\\*|[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s', '_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us', ); protected $EmRegex = array( '*' => '/^[*]((?:\\\\\*|[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', '_' => '/^_((?:\\\\_|[^_]|__[^_]*__)+?)_(?!_)\b/us', ); protected $regexHtmlAttribute = '[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:[^"\'=<>`\s]+|"[^"]*"|\'[^\']*\'))?'; protected $voidElements = array( 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', ); protected $textLevelElements = array( 'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont', 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing', 'i', 'rp', 'del', 'code', 'strike', 'marquee', 'q', 'rt', 'ins', 'font', 'strong', 's', 'tt', 'sub', 'mark', 'u', 'xm', 'sup', 'nobr', 'var', 'ruby', 'wbr', 'span', 'time', ); } inc/installer/inc/Parsedown/README.md000064400000005236150212710760013313 0ustar00> You might also like [Caret](http://caret.io?ref=parsedown) - our Markdown editor for Mac / Windows / Linux. ## Parsedown [![Build Status](https://img.shields.io/travis/erusev/parsedown/master.svg?style=flat-square)](https://travis-ci.org/erusev/parsedown) Better Markdown Parser in PHP [Demo](http://parsedown.org/demo) | [Benchmarks](http://parsedown.org/speed) | [Tests](http://parsedown.org/tests/) | [Documentation](https://github.com/erusev/parsedown/wiki/) ### Features * Super Fast * [GitHub flavored](https://help.github.com/articles/github-flavored-markdown) * Extensible * Tested in 5.3 to 7.0 and in HHVM * [Markdown Extra extension](https://github.com/erusev/parsedown-extra) ### Installation Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown). ### Example ``` php $Parsedown = new Parsedown(); echo $Parsedown->text('Hello _Parsedown_!'); # prints:

Hello Parsedown!

``` More examples in [the wiki](https://github.com/erusev/parsedown/wiki/) and in [this video tutorial](http://youtu.be/wYZBY8DEikI). ### Questions **How does Parsedown work?** It tries to read Markdown like a human. First, it looks at the lines. It’s interested in how the lines start. This helps it recognise blocks. It knows, for example, that if a line start with a `-` then it perhaps belong to a list. Once it recognises the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognise inline elements (or inlines). We call this approach "line based". We believe that Parsedown is the first Markdown parser to use it. Since the release of Parsedown, other developers have used the same approach to develop other Markdown parsers in PHP and in other languages. **Is it compliant with CommonMark?** It passes most of the CommonMark tests. Most of the tests that don't pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve. **Who uses it?** [phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [Herbie CMS](http://www.getherbie.org/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://www.versioneye.com/php/erusev:parsedown/references). **How can I help?** Use it, star it, share it and if you feel generous, [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2). inc/installer/tpl/action-btn.php000064400000000627150212710760012666 0ustar00 style="display: none;" > inc/installer/tpl/admin.php000064400000010727150212710760011722 0ustar00

    $item ) { $classes = array(); $classes[] = $slug == 'siteorigin-premium' || empty( $item['status'] ) ? 'active' : 'inactive'; if ( ! empty( $highlight ) && $slug == $highlight ) { $classes[] = 'highlight-item'; } ?>
  • '; printf( esc_html__( 'Required %s', 'siteorigin-installer' ), $item['type'] == 'plugins' ? esc_html__( 'Plugin', 'siteorigin-installer' ) : esc_html__( 'Theme', 'siteorigin-installer' ) ); echo ''; } echo esc_html( $item['description'] ); ?>

inc/installer/readme.md000064400000000105150212710760011066 0ustar00SiteOrigin installer helps you install SiteOrigin themes and plugins.inc/installer/js/notices.js000064400000000463150212710760011734 0ustar00jQuery( function( $ ) { $( '#siteorigin-installer-notice .siteorigin-notice-dismiss' ).on( 'click', function( e ) { e.preventDefault(); var $$ = $( this ).trigger( 'blur' ); $.get( $$.attr('href') ); $( '#siteorigin-installer-notice' ).slideUp( function(){ $( this ).remove(); } ) } ); } ); inc/installer/js/script.js000064400000005500150212710760011571 0ustar00jQuery( function( $ ) { var currentSection = ''; $( '.page-sections a' ).on( 'click', function( e ) { e.preventDefault(); $( '.page-sections li' ).removeClass( 'active-section' ); var $$ = $( this ); currentSection = $$.data( 'section' ); $$.parent( 'li' ).addClass( 'active-section' ); $( '.siteorigin-installer-item').show(); if ( currentSection != 'all' ) { $( '.siteorigin-installer-item:not(.siteorigin-' + currentSection + ')' ).hide(); } $( window ).trigger( 'resize' ); } ); $( 'span.siteorigin-installer' ).on( 'click', function( e ) { e.preventDefault(); var $$ = $( this ); if ( ! $$.hasClass( 'disabled' ) ) { $$.addClass( 'disabled' ); $.post( soInstallerAdmin.manageUrl, { 'type' : $$.data( 'type' ), 'slug' : $$.data( 'slug' ), 'task' : $$.data( 'status' ), 'version' : $$.data( 'version' ) }, function( data ) { if ( $$.data( 'status' ) == 'activate' ) { if ( $$.data( 'type' ) == 'themes' ) { var $activeItem = $( '.siteorigin-installer-item-active.siteorigin-themes' ) $activeItem.addClass( 'siteorigin-installer-item-inactive' ).removeClass( 'siteorigin-installer-item-active' ); $activeItem.find( '.siteorigin-installer' ).removeClass( 'disabled' ); $activeItem.removeClass( 'siteorigin-installer-item-active' ); $( '.siteorigin-themes span.siteorigin-installer' ).show(); $$.hide(); } $$.parents( '.siteorigin-installer-item-inactive' ).removeClass( 'siteorigin-installer-item-inactive' ).addClass( 'siteorigin-installer-item-active' ); if ( $$.data( 'type' ) == 'plugins' ) { $$.remove(); } } else if ( $$.data( 'status' ) == 'update' ) { $$.remove(); } else { $$.removeClass( 'disabled' ); $$.text( soInstallerAdmin.activateText ) $$.data( 'status', 'activate' ); } $( window ).trigger( 'resize' ); } ); } } ); $( '.page-sections li:first-of-type a' ).trigger( 'click' ); // Make sure product heights are all the same on a row by row basis. $( window ).on( 'resize', function() { var $products = $( '.siteorigin-installer-item:visible' ).css( 'height', 'auto' ); var largestHeight = []; var column = 0; $( '.siteorigin-installer-item-body' ).css( 'height', 'auto' ); $products.each( function( index ) { column = index / 3; // Turnicate column number - IE 11 friendly. column = column < 0 ? Math.ceil( column ) : Math.floor( column ); $( this ).data( 'column', column ) largestHeight[ column ] = Math.max( typeof largestHeight[ column ] == 'undefined' ? 0 : largestHeight[ column ], $( this ).height() ); } ); $products.each( function () { $( this ).find( '.siteorigin-installer-item-body' ).css( 'height', largestHeight[ $( this ).data( 'column' ) ] + 'px' ); } ); } ).trigger( 'resize' ); } ); lang/so-css.pot000064400000027001150212710760007421 0ustar00# Copyright (C) 2025 so-css # This file is distributed under the same license as the so-css package. msgid "" msgstr "" "Project-Id-Version: so-css\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language-Team: SiteOrigin \n" "Last-Translator: SiteOrigin \n" "Report-Msgid-Bugs-To: http://www.siteorigin.com/thread\n" "X-Poedit-Basepath: ..\n" "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPathExcluded-0: *.js\n" "X-Poedit-SourceCharset: UTF-8\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: so-css.php:3, so-css.php:606 msgid "SiteOrigin CSS" msgstr "" #: so-css.php:4 msgid "An advanced CSS editor from SiteOrigin." msgstr "" #: so-css.php:6, inc/installer/siteorigin-installer.php:6 msgid "SiteOrigin" msgstr "" #: so-css.php:7, inc/installer/siteorigin-installer.php:7 msgid "https://siteorigin.com" msgstr "" #: so-css.php:8 msgid "https://siteorigin.com/css/" msgstr "" #: so-css.php:392, so-css.php:393, so-css.php:453 msgid "Custom CSS" msgstr "" #: so-css.php:455 msgid "SiteOrigin CSS adds any custom CSS you enter here into your site's header. " msgstr "" #: so-css.php:456 msgid "These changes will persist across updates so it's best to make all your changes here. " msgstr "" #: so-css.php:522 msgid "Unchanged" msgstr "" #: so-css.php:523 msgid "Select" msgstr "" #: so-css.php:524 msgid "Select Image" msgstr "" #: so-css.php:525 msgid "Are you sure you want to leave without saving?" msgstr "" #: so-css.php:591 msgid "CSS Editor" msgstr "" #: so-css.php:592 msgid "Support" msgstr "" #: so-css.php:595 msgid "Addons" msgstr "" #: so-css.php:609 msgid "Changes apply to %s and its child themes" msgstr "" #: so-css.php:610, tpl/page.php:135, tpl/page.php:191 msgid "Save CSS" msgstr "" #: so-css.php:617 msgid "Editing CSS for: %s" msgstr "" #: so-css.php:622 msgid "Changes apply to the %s %s when the current theme is %s or its child themes" msgstr "" #: so-css.php:629 msgid "Save %s CSS" msgstr "" #: so-css.php:642 msgid "Revert to this revision" msgstr "" #: so-css.php:697, so-css.php:718, so-css.php:737 msgid "The supplied nonce is invalid." msgstr "" #: so-css.php:698, so-css.php:719, so-css.php:738 msgid "Invalid nonce." msgstr "" #: so-css.php:789 msgid "%d chars" msgstr "" #: so-css.php:789 msgid "Latest" msgstr "" #: so-css.php:795 msgid "No revisions yet." msgstr "" #: inc/controller-config.php:5 msgid "Text" msgstr "" #: inc/controller-config.php:9 msgid "Text Color" msgstr "" #: inc/controller-config.php:16 msgid "Font Size" msgstr "" #: inc/controller-config.php:24 msgid "Line Height" msgstr "" #: inc/controller-config.php:32 msgid "Font Weight" msgstr "" #: inc/controller-config.php:37, inc/controller-config.php:60, inc/controller-config.php:93, inc/controller-config.php:164 msgid "Normal" msgstr "" #: inc/controller-config.php:38 msgid "Bold" msgstr "" #: inc/controller-config.php:39 msgid "Bolder" msgstr "" #: inc/controller-config.php:40 msgid "Lighter" msgstr "" #: inc/controller-config.php:54 msgid "Font Style" msgstr "" #: inc/controller-config.php:59, inc/controller-config.php:75, inc/controller-config.php:104, inc/controller-config.php:428, inc/controller-config.php:455, inc/controller-config.php:467 msgid "None" msgstr "" #: inc/controller-config.php:61 msgid "Italic" msgstr "" #: inc/controller-config.php:70 msgid "Text Decoration" msgstr "" #: inc/controller-config.php:76 msgid "Underline" msgstr "" #: inc/controller-config.php:77 msgid "Overline" msgstr "" #: inc/controller-config.php:78 msgid "Line Through" msgstr "" #: inc/controller-config.php:88 msgid "Font Variant" msgstr "" #: inc/controller-config.php:94 msgid "Small Caps" msgstr "" #: inc/controller-config.php:99 msgid "Text Transform" msgstr "" #: inc/controller-config.php:105 msgid "Capitalize" msgstr "" #: inc/controller-config.php:106 msgid "Uppercase" msgstr "" #: inc/controller-config.php:107 msgid "Lowercase" msgstr "" #: inc/controller-config.php:112 msgid "Font Family" msgstr "" #: inc/controller-config.php:119 msgid "Text Align" msgstr "" #: inc/controller-config.php:124, inc/controller-config.php:456, inc/controller-config.php:468 msgid "Left" msgstr "" #: inc/controller-config.php:125, inc/controller-config.php:457, inc/controller-config.php:469 msgid "Right" msgstr "" #: inc/controller-config.php:126 msgid "Center" msgstr "" #: inc/controller-config.php:127 msgid "Justify" msgstr "" #: inc/controller-config.php:138 msgid "Text Indent" msgstr "" #: inc/controller-config.php:145 msgid "Letter Spacing" msgstr "" #: inc/controller-config.php:152 msgid "Word Spacing" msgstr "" #: inc/controller-config.php:159 msgid "White Space" msgstr "" #: inc/controller-config.php:165 msgid "Encountered" msgstr "" #: inc/controller-config.php:166 msgid "Pre" msgstr "" #: inc/controller-config.php:167 msgid "Pre Line" msgstr "" #: inc/controller-config.php:168 msgid "Pre Wrap" msgstr "" #: inc/controller-config.php:173 msgid "Text Shadow" msgstr "" #: inc/controller-config.php:185 msgid "Decoration" msgstr "" #: inc/controller-config.php:189 msgid "Background Color" msgstr "" #: inc/controller-config.php:196 msgid "Background Image" msgstr "" #: inc/controller-config.php:204 msgid "Background Position" msgstr "" #: inc/controller-config.php:211 msgid "Background Repeat" msgstr "" #: inc/controller-config.php:216 msgid "repeat" msgstr "" #: inc/controller-config.php:217 msgid "repeat-x" msgstr "" #: inc/controller-config.php:218 msgid "repeat-y" msgstr "" #: inc/controller-config.php:219 msgid "no-repeat" msgstr "" #: inc/controller-config.php:225 msgid "Background Size" msgstr "" #: inc/controller-config.php:230 msgid "auto" msgstr "" #: inc/controller-config.php:231 msgid "length" msgstr "" #: inc/controller-config.php:232 msgid "percentage" msgstr "" #: inc/controller-config.php:233 msgid "cover" msgstr "" #: inc/controller-config.php:234 msgid "contain" msgstr "" #: inc/controller-config.php:240 msgid "Background Attachment" msgstr "" #: inc/controller-config.php:245 msgid "scroll" msgstr "" #: inc/controller-config.php:246 msgid "fixed" msgstr "" #: inc/controller-config.php:252 msgid "Box Shadow" msgstr "" #: inc/controller-config.php:260 msgid "Opacity" msgstr "" #: inc/controller-config.php:273 msgid "Borders" msgstr "" #: inc/controller-config.php:316 msgid "Border Radius" msgstr "" #: inc/controller-config.php:339 msgid "Layout" msgstr "" #: inc/controller-config.php:343 msgid "Margin" msgstr "" #: inc/controller-config.php:360 msgid "Padding" msgstr "" #: inc/controller-config.php:377 msgid "Position" msgstr "" #: inc/controller-config.php:382 msgid "Absolute" msgstr "" #: inc/controller-config.php:383 msgid "Fixed" msgstr "" #: inc/controller-config.php:384 msgid "Relative" msgstr "" #: inc/controller-config.php:385 msgid "Static" msgstr "" #: inc/controller-config.php:386 msgid "Inherit" msgstr "" #: inc/controller-config.php:391 msgid "Absolute Position" msgstr "" #: inc/controller-config.php:407 msgid "Width" msgstr "" #: inc/controller-config.php:415 msgid "Height" msgstr "" #: inc/controller-config.php:423 msgid "Display" msgstr "" #: inc/controller-config.php:429, tpl/page.php:100 msgid "Inline" msgstr "" #: inc/controller-config.php:430 msgid "Block" msgstr "" #: inc/controller-config.php:431 msgid "Flex" msgstr "" #: inc/controller-config.php:432 msgid "Inline Block" msgstr "" #: inc/controller-config.php:433 msgid "Inline Flex" msgstr "" #: inc/controller-config.php:434 msgid "Inline Table" msgstr "" #: inc/controller-config.php:435 msgid "List Item" msgstr "" #: inc/controller-config.php:436 msgid "Run In" msgstr "" #: inc/controller-config.php:437 msgid "Table" msgstr "" #: inc/controller-config.php:438 msgid "Table Caption" msgstr "" #: inc/controller-config.php:439 msgid "Table Column Group" msgstr "" #: inc/controller-config.php:440 msgid "Table Header Group" msgstr "" #: inc/controller-config.php:441 msgid "Table Footer Group" msgstr "" #: inc/controller-config.php:442 msgid "Table Row Group" msgstr "" #: inc/controller-config.php:443 msgid "Table Cell" msgstr "" #: inc/controller-config.php:444 msgid "Table Column" msgstr "" #: inc/controller-config.php:445 msgid "Table Row" msgstr "" #: inc/controller-config.php:450 msgid "Float" msgstr "" #: inc/controller-config.php:462 msgid "Clear" msgstr "" #: inc/controller-config.php:470 msgid "Both" msgstr "" #: inc/controller-config.php:475 msgid "Visibility" msgstr "" #: inc/controller-config.php:480, inc/controller-config.php:492, inc/controller-config.php:505, inc/controller-config.php:518 msgid "Visible" msgstr "" #: inc/controller-config.php:481, inc/controller-config.php:493, inc/controller-config.php:506, inc/controller-config.php:519 msgid "Hidden" msgstr "" #: inc/controller-config.php:482 msgid "Collapse" msgstr "" #: inc/controller-config.php:487 msgid "Overflow" msgstr "" #: inc/controller-config.php:494, inc/controller-config.php:507, inc/controller-config.php:520 msgid "Scroll" msgstr "" #: inc/controller-config.php:495, inc/controller-config.php:508, inc/controller-config.php:521 msgid "Auto" msgstr "" #: inc/controller-config.php:500 msgid "Overflow X" msgstr "" #: inc/controller-config.php:513 msgid "Overflow Y" msgstr "" #: inc/controller-config.php:526 msgid "Z-Index" msgstr "" #: tpl/inspector-templates.php:4 msgid "Navigate To: " msgstr "" #: tpl/js-templates.php:8 msgid "CSS Snippets" msgstr "" #: tpl/js-templates.php:14 msgid "Search Snippets" msgstr "" #: tpl/js-templates.php:26 msgid "Insert Snippet" msgstr "" #: tpl/js-templates.php:59 msgid "Invalid URI. Please make sure you're using a URL from the same site." msgstr "" #: tpl/js-templates.php:69 msgid "Get a %sGoogle Font%s selector." msgstr "" #: tpl/page.php:28 msgid "Site design updated." msgstr "" #: tpl/page.php:33 msgid "Editing revision dated %s. Click %sRevert to this revision%s to keep using it." msgstr "" #: tpl/page.php:47 msgid "Get The Full Experience" msgstr "" #: tpl/page.php:49 msgid "%sSiteOrigin Premium%s adds a Google Web Font selector to SiteOrigin CSS so you can easily change any font." msgstr "" #: tpl/page.php:57 msgid "Getting Started Video" msgstr "" #: tpl/page.php:58 msgid "Dismiss" msgstr "" #: tpl/page.php:67 msgid "CSS Revisions" msgstr "" #: tpl/page.php:69 msgid "Are you sure you want to load this revision?" msgstr "" #: tpl/page.php:76 msgid "Editor Theme" msgstr "" #: tpl/page.php:79 msgid "Light" msgstr "" #: tpl/page.php:80 msgid "Dark" msgstr "" #: tpl/page.php:89 msgid "CSS Output Location" msgstr "" #: tpl/page.php:99 msgid "Dedicated File" msgstr "" #: tpl/page.php:105 msgid "Dedicated CSS File offers best performance, Internal CSS embeds styles in page HTML." msgstr "" #: tpl/page.php:126, tpl/page.php:127 msgid "Open Expanded Mode" msgstr "" #: tpl/page.php:128 msgid "Close Expanded Mode" msgstr "" #: tpl/page.php:131 msgid "Open Visual Mode" msgstr "" #: tpl/page.php:160 msgid "Other Settings" msgstr "" #: tpl/page.php:165 msgid "Enable SiteOrigin Installer: " msgstr "" #: tpl/page.php:188 msgid "Close" msgstr "" #: inc/installer/siteorigin-installer.php:3 msgid "SiteOrigin Installer" msgstr "" #: inc/installer/siteorigin-installer.php:4 msgid "https://siteorigin.com/installer/" msgstr "" #: inc/installer/siteorigin-installer.php:5 msgid "This plugin installs all the SiteOrigin themes and plugins you need to get started with your new site." msgstr "" changelog.txt000064400000016775150212710760007255 0ustar00== Changelog == = 1.6.3 - 15 January 2025 = * Resolved Uninstall Notice: Updated `register_uninstall_hook` callback to use a static class method, addressing a WordPress notice introduced in version 3.1.0. = 1.6.2 - 13 January 2025 = * Fixed uninstall process to prevent PHP fatal error by updating the `register_uninstall_hook` callback to use a valid instance method. = 1.6.1 - 25 November 2024 = * CSS Output Location: Additional check to ensure the default is Dedicated File. = 1.6.0 - 22 November 2024 = * Added `Visual Editor: Decoration > Background Attachment` setting. * Added CSS Ouput Location setting. Dedicated CSS File offers best performance, Internal CSS embeds styles in page HTML. = 1.5.11 - 13 August 2024 = * Added Divi theme compatibility. * Accounted for for themes that don't use menu item selectors by adding them automatically. = 1.5.10 - 31 May 2024 = * Updated SiteOrigin Installer. * Updated Tested up to tag. * Updated Required PHP version. = 1.5.9 - 11 November 2023 = * Updated Tested up to tag. * Updated SiteOrigin Installer. = 1.5.8 - 11 August 2023 = * Updated the SiteOrigin Installer submodule. = 1.5.7 - 09 August 2023 = * Updated the expand/compress title depending on the state in the visual editor. * Updated the "Tested up to" version in the readme.txt file from 6.2 to 6.3, indicating compatibility with WordPress version 6.3. * Added SiteOrigin Installer submodule and functionality to handle the installer link and status in the editor and page templates. = 1.5.6 - 07 April 2023 = * WordPress PHP Coding Standards improvements. * Updated `Tested up to` tag. = 1.5.5 - 30 September 2022 = * Added a check to ensure WP Filesystem is setup. = 1.5.4 - 28 September 2022 = * Developer: Introduced definable Custom CSS file name and location using `siteorigin_custom_css_file` and `siteorigin_css_enqueue_css`. = 1.5.3 - 25 May 2022 = * Updated WordPress `Tested up to` tag. = 1.5.2 - 27 January 2022 = * Updated `Tested up to` tag to `5.9`. = 1.5.1 - 30 December 2021 = * Basic Editor Theme Setting: Updated field to show selected option. = 1.5.0 - 16 December 2021 = * Basic Editor: Added a dark theme option. * Ajax Saving: Resolved unintended slashes added during escaping. = 1.4.3 - 29 November 2021 = * Restored editor scrollbar. * Added a fixed editor height. = 1.4.2 - 08 November 2021 = * Fixed string translation functions. = 1.4.1 - 02 November 2021 = * Removed Save button rounding. * Fixed Visual Editor `Navigate To` link functionality. = 1.4.0 - 11 October 2021 = * Added Ajax saving. Users can now save in the expanded and visual editors without exiting to basic editor. * Expanded/Visual toolbar buttons re-ordered for consistency between modes. * Removed Font Awesome. Icons are now added via a custom font. = 1.3.2 - 20 July 2021 = * Updated `Tested up to` tag. = 1.3.1 - 10 July 2021 = * Updated the Plugins page action link list. = 1.3.0 - 14 June 2021 = * Inspector: Added a new Border Radius setting to the Decoration tab. * Allowed for right-clicking anywhere in the Basic Editor. = 1.2.14 - 26 April 2021 = * Resolved Photo Gallery by 10Web plugin conflict. = 1.2.13 - 01 February 2021 = * Inspector: Added support for WooCommerce single product tabs. * Inspector: Highlight important classes when element with class is selected. * Restored the scrollbar in the Custom CSS content field. * Developer: Further changes for jQuery 3.5. * Developer: For WP 4.9+ use the WordPress version of CodeMirror if available. * Developer: Removed `socss-codemirror-show-hint` as a dependency. The script can now be removed to disable hints. = 1.2.12 - 12 December 2020 = * Developer: jQuery updates for WordPress 5.6. = 1.2.11 - 21 October 2020 = * Fixed Background image setting writing to CSS. = 1.2.10 - 09 September 2020 = * Increased the specificity of the Save CSS button styling to prevent plugin conflicts. = 1.2.9 - 29 July 2020 = * Resolved Font Family field output. = 1.2.8 - 22 May 2020 = * Renamed `custom_css` textarea to prevent conflicts. = 1.2.7 - 19 May 2020 = * Restored `Save` button functionality. = 1.2.6 - 15 May 2020 = * Minor visual editor form styling fixes. * Resolved PHP 7.4 `preg_replace()` warning. * Moved the basic editor Save button to the sidebar. = 1.2.5 - 05 February 2020 = * Removed `themeCSS` localized script to prevent `preg_replace()` warning. * Minor form styling fixes. * Updated CSS NPM library. * Rebuilt minified files using new build script. = 1.2.4 - 17 January 2019 = * Prefix so-css for all codemirror assets. * Prevent JS error when attempting to set active element to null. = 1.2.3 - 25 June 2018 = * Add preview iframe 'load' event listener in `render` function. * Reverted change to stylesheet hook. = 1.2.2 - 16 June 2018 = * Removed reference to non-existent view. = 1.2.1 - 15 June 2018 = * Removed `.min` suffix from new stylesheets for CodeMirror plugins. = 1.2.0 - 6 June 2018 = * Updated CSS library. * UI changes to make it more obvious when viewing revision. * Ensure revisions are sorted in descending time order. * Don't link to revision currently being displayed. * Add search functionality to editor. * Enable persistent search and JumpToLine. = 1.1.5 - 19 September 2017 = * Use `home_url` instead of `site_url` to determine where to open CSS preview. * Increment and decrement buttons work when value empty or zero. Also added repeating action while button held down. * Scroll editor instead of the whole page so 'Save' button is always visible. * Set color CSS on visual editor and inspector. * Saving generated CSS to stylesheet file in uploads directory. = 1.1.4 - 31 January 2017 = * Updated CodeMirror to 2.25.2. * Removed extra line padding. * Better integration with WordPress.org translation. = 1.1.3 - 31 January 2017 = * Removed leading slash in paths after plugin_dir_url(). * Updated to latest CodeMirror. * Fixed padding issue that was causing problems with Firefox and the color picker. = 1.1.2 - 11 November 2016 = * Ignore anything other than actual rules in media query subrules. * Removed depreciated jQuery function. * Updated CSSLint library. * Updated minicolors. = 1.1.1 - 28 September 2016 = * Properly handle errors in frontend CSS. * Added notice about SiteOrigin Premium. = 1.1 - 26 September 2016 = * Changed CSS parsing library. Fixed several issues with the visual editor mode. * Added address bar to preview window. * Small CSS fixes. * Small changes to allow adding more visual editor fields. = 1.0.8 - 15 August 2016 = * Fixed action link. * Support for GlotPress. * Removed unused code. * Handling of @imports for future addons. = 1.0.7 - 4 July 2016 = * Ensure user can copy/paste in editor via context menu. * Added plugin action links * Add classes on `body` element to selectors window. = 1.0.6 - 24 February 2016 = * Disabled autocompletion on single item (automatic autocompletion). * Fixed conflict with NextGen Gallery. * Only display relevant linting messages. = 1.0.5 - 21 January 2016 = * Updated to latest version of Code Mirror. = 1.0.4 - 10 November 2015 = * Fixed CSS parsing when going into visual mode. = 1.0.3 - 29 October 2015 = * Changed video image * Adjust revision times by GMT offset. * Don't overwrite media queries sub styles, rather just append them. = 1.0.2 = * Dequeue functionality that conflicted with WordPress color picker, if it's enqueued. * Removed wp_styles for compatibility with older versions of WordPress = 1.0.1 = * Fixed conflicts with CSS editor in SiteOrigin themes. * Force dequeue scripts that cause problems with main editing interface. * Made it easier to follow links with inspector enabled. = 1.0 = * Initial release. tpl/page.php000064400000017757150212710760007012 0ustar00get_snippets(); $user = wp_get_current_user(); if ( ! empty( $current_revision ) ) { $revision_date = date( 'j F Y @ H:i:s', $current_revision + get_option( 'gmt_offset' ) * 60 * 60 ); } ?>

', '' ); ?>

display_teaser() ) { ?>

Google Web Font selector to SiteOrigin CSS so you can easily change any font.', 'so-css' ) ), '', '' ); ?>
ID, 'socss_hide_gs' ) ) { ?>

    custom_css_revisions_list( $theme, $socss_post_id, $current_revision ); ?>

    tpl/inspector-templates.php000064400000002132150212710760012055 0ustar00
    tpl/js-templates.php000064400000005452150212710760010473 0ustar00 so-css.php000064400000110442150212710760006467 0ustar00theme = basename( get_template_directory() ); $this->snippet_paths = array(); // Main header actions add_action( 'plugins_loaded', array( $this, 'set_plugin_textdomain' ) ); global $wp_filesystem; if ( ! class_exists( 'wp_filesystem' ) ) { require_once ABSPATH . '/wp-admin/includes/file.php'; WP_Filesystem(); } // Priority 20 is necessary to ensure our CSS takes precedence. add_action( 'wp_head', array( $this, 'enqueue_css' ), 20 ); add_filter( 'siteorigin_css_enqueue_css', array( $this, 'css_output_location' ), 9, 1 ); // All the admin actions add_action( 'admin_init', array( $this, 'version_check' ) ); add_action( 'admin_menu', array( $this, 'action_admin_menu' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ), 20 ); add_action( 'admin_enqueue_scripts', array( $this, 'dequeue_admin_scripts' ), 19 ); add_action( 'load-appearance_page_so_custom_css', array( $this, 'add_help_tab' ) ); // Add the action links. add_action( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) ); // The request to hide the getting started video add_action( 'wp_ajax_socss_hide_getting_started', array( $this, 'admin_action_hide_getting_started' ) ); add_action( 'wp_ajax_socss_get_post_css', array( $this, 'admin_action_get_post_css' ) ); add_action( 'wp_ajax_socss_get_revisions_list', array( $this, 'admin_action_get_revisions_list' ) ); add_action( 'wp_ajax_socss_save_css', array( $this, 'admin_action_save_css' ) ); if ( ! is_admin() ) { if ( isset( $_GET['so_css_preview'] ) ) { add_action( 'plugins_loaded', array( $this, 'disable_ngg_resource_manager' ) ); add_filter( 'show_admin_bar', '__return_false' ); add_filter( 'wp_enqueue_scripts', array( $this, 'enqueue_inspector_scripts' ) ); add_filter( 'wp_footer', array( $this, 'inspector_templates' ) ); // We'll be grabbing all the enqueued scripts and outputting them add_action( 'wp_enqueue_scripts', array( $this, 'inline_inspector_scripts' ), 100 ); } } elseif ( ! class_exists( 'SiteOrigin_Installer' ) ) { include plugin_dir_path( __FILE__ ) . 'inc/installer/siteorigin-installer.php'; if ( ! class_exists( 'SiteOrigin_Panels' ) && ! class_exists( 'SiteOrigin_Widgets_Bundle' ) && ! class_exists( 'SiteOrigin_Premium' ) ) { add_filter( 'siteorigin_add_installer', array( $this, 'manage_installer' ) ); } } register_uninstall_hook( __FILE__, array( 'SiteOrigin_CSS', 'uninstall' ) ); } /** * Get a singleton of the SiteOrigin CSS. * * @return SiteOrigin_CSS */ public static function single() { static $single; if ( empty( $single ) ) { $single = new SiteOrigin_CSS(); } return $single; } public function manage_installer( $status ) { // If the user hasn't enabled/disabled the installer, disable it by default. if ( empty( get_option( 'siteorigin_installer' ) ) ) { $status = false; } return $status; } /** * Retrieve the current custom CSS for a given theme and post id combination. * * @param $theme string The name of the theme for which to retrieve custom CSS. * @param $post_id int The ID of the specific post for which to retrieve custom CSS. * * @return string The custom CSS for the theme and post ID combination. */ public function get_custom_css( $theme, $post_id = null ) { $css_key = 'siteorigin_custom_css[' . $theme . ']'; if ( empty( $post_id ) && WP_Filesystem() ) { $custom_css_file = apply_filters( 'siteorigin_custom_css_file', false ); if ( ! empty( $custom_css_file ) && ! empty( $custom_css_file['file'] ) ) { // Did we previously load the CSS file? If not, load it. if ( empty( $this->css_file ) || isset( $_POST['siteorigin_custom_css'] ) ) { global $wp_filesystem; // If custom file doesn't exist, create it. if ( ! $wp_filesystem->exists( $custom_css_file['file'] ) ) { $wp_filesystem->touch( $custom_css_file['file'] ); } if ( empty( get_option( 'siteorigin_custom_file' ) ) ) { update_option( 'siteorigin_custom_file', true, true ); } if ( $wp_filesystem->is_writable( $custom_css_file['file'] ) ) { $this->css_file = $wp_filesystem->get_contents( $custom_css_file['file'] ); } } return $this->css_file; } elseif ( ! empty( get_option( 'siteorigin_custom_file' ) ) ) { // If the custom file filter was previously active we need to // generate the global CSS file to avoid no CSS outputting // without modification. delete_option( 'siteorigin_custom_file', true ); $css_file_path = $this->get_css_file_name( $theme ); global $wp_filesystem; $wp_filesystem->put_contents( $css_file_path, get_option( $css_key, '' ) ); } } if ( ! empty( $post_id ) ) { return get_post_meta( $post_id, $css_key, true ); } return get_option( $css_key, '' ); } /** * Save custom CSS for a given theme and post id combination. * * @param $custom_css string The custom CSS to save. * @param $theme string The name of the theme for which to save custom CSS. * @param $post_id int The ID of the specific post for which to save custom CSS. * * @return bool Whether or not saving the custom CSS was successful. */ public function save_custom_css( $custom_css, $theme, $post_id = null ) { $css_key = 'siteorigin_custom_css[' . $theme . ']'; if ( empty( $post_id ) ) { $current = get_option( $css_key ); if ( $current === false ) { return add_option( $css_key, $custom_css, '', 'no' ); } else { return update_option( $css_key, $custom_css ); } } if ( metadata_exists( 'post', $post_id, $css_key ) ) { return update_post_meta( $post_id, $css_key, $custom_css ); } return add_post_meta( $post_id, $css_key, $custom_css ); } /** * Returns the file name of the CSS file we're editing. * * @param null $post_id */ public function get_css_file_name( $theme, $post_id = null ) { global $wp_filesystem; $upload_dir = wp_upload_dir(); $upload_dir_path = $upload_dir['basedir'] . '/so-css/'; if ( ! $wp_filesystem->is_dir( $upload_dir_path ) ) { $wp_filesystem->mkdir( $upload_dir_path ); } $css_file_name = 'so-css-' . $theme . ( ! empty( $post_id ) ? '_' . $post_id : '' ); return $upload_dir_path . $css_file_name . '.css'; } /** * Save custom CSS for a given theme and post id combination to a file in the uploads directory to allow for caching. * * @param null $post_id */ public function save_custom_css_file( $custom_css, $theme, $post_id = null ) { if ( WP_Filesystem() ) { global $wp_filesystem; $css_file_path = apply_filters( 'siteorigin_custom_css_file', false ); if ( empty( $css_file_path ) || empty( $css_file_path['file'] ) || ! $wp_filesystem->is_writable( $css_file_path['file'] ) ) { $css_file_path = $this->get_css_file_name( $theme, $post_id ); if ( file_exists( $css_file_path ) ) { $wp_filesystem->delete( $css_file_path ); } } else { $css_file_path = $css_file_path['file']; $this->css_file = $custom_css; } $wp_filesystem->put_contents( $css_file_path, $custom_css ); } } /** * Retrieve the previous revisions of custom CSS for a given theme and post id combination. * * @param $theme string The name of the theme for which to retrieve custom CSS revisions. * @param $post_id int The ID of the specific post for which to retrieve custom CSS revisions. * * @return array The custom CSS revisions for the theme and post ID combination. */ public function get_custom_css_revisions( $theme, $post_id = null ) { $css_key = 'siteorigin_custom_css_revisions[' . $theme . ']'; if ( empty( $post_id ) ) { return get_option( $css_key, '' ); } return get_post_meta( $post_id, $css_key, true ); } /** * Adds a custom CSS revision for a given theme and post id combination. * * @param $custom_css string The custom CSS to add as a revision. * @param $theme string The name of the theme for which to save custom CSS. * @param $post_id int The ID of the specific post for which to save custom CSS. * * @return bool Whether or not adding the custom CSS revision was successful. */ public function add_custom_css_revision( $custom_css, $theme, $post_id = null ) { $revisions = $this->get_custom_css_revisions( $this->theme, $post_id ); $css_key = 'siteorigin_custom_css_revisions[' . $theme . ']'; if ( empty( $revisions ) ) { $revisions = array(); if ( empty( $post_id ) ) { add_option( $css_key, $revisions, '', 'no' ); } else { add_post_meta( $post_id, $css_key, $revisions ); } } $revisions[ time() ] = $custom_css; // Sort the revisions and cut off any old ones. krsort( $revisions ); $revisions = array_slice( $revisions, 0, 15, true ); if ( empty( $post_id ) ) { return update_option( $css_key, $revisions ); } return update_post_meta( $post_id, $css_key, $revisions ); } /** * Enqueue or print inline CSS. */ public function enqueue_css() { $this->enqueue_custom_css( $this->theme ); if ( is_singular() ) { $this->enqueue_custom_css( $this->theme, get_the_ID() ); } } /** * Changes the CSS output location based on user settings. * * This method retrieves the CSS output location setting from the * `so_css_output_location` option and returns true if the setting is * set to 'file'. Otherwise false is returned. * * @param string|null $location The unused default location value. * * @return bool True if the CSS should be output in a dedicated file. */ public function css_output_location( $location = null ) { $output_location = get_option( 'so_css_output_location', 'file' ); return $output_location === 'file'; } /** * Enqueue the custom CSS for the given theme and post id combination. * * @param $theme string The name of the theme for which to enqueue custom CSS. * @param $post_id int The ID of the specific post for which to enqueue custom CSS. */ public function enqueue_custom_css( $theme, $post_id = null ) { $css_id = $theme . ( ! empty( $post_id ) ? '_' . $post_id : '' ); if ( empty( $_GET['so_css_preview'] ) && ! is_admin() && apply_filters( 'siteorigin_css_enqueue_css', true ) ) { $custom_css_file = apply_filters( 'siteorigin_custom_css_file', array() ); if ( ! empty( $post_id ) || empty( $custom_css_file ) ) { $upload_dir = wp_upload_dir(); $upload_dir_path = $upload_dir['basedir'] . '/so-css/'; $css_file_name = 'so-css-' . $css_id; $css_file_path = $upload_dir_path . $css_file_name . '.css'; $css_file_url = $upload_dir['baseurl'] . '/so-css/' . $css_file_name . '.css'; } elseif ( isset( $custom_css_file['url'] ) ) { $css_file_path = $custom_css_file['file']; $css_file_url = $custom_css_file['url']; } if ( ! empty( $css_file_path ) && file_exists( $css_file_path ) ) { wp_enqueue_style( 'so-css-' . $css_id, set_url_scheme( $css_file_url ), array(), $this->get_latest_revision_timestamp() ); } } else { $custom_css = $this->get_custom_css( $theme, $post_id ); // We just need to enqueue a dummy style if ( ! empty( $custom_css ) ) { echo "\n"; } } } public function set_plugin_textdomain() { load_plugin_textdomain( 'so-css', false, plugin_dir_path( __FILE__ ) . 'lang/' ); } /** * Action to run on the admin action. */ public function action_admin_menu() { add_theme_page( esc_html__( 'Custom CSS', 'so-css' ), esc_html__( 'Custom CSS', 'so-css' ), 'edit_theme_options', 'so_custom_css', array( $this, 'display_admin_page' ) ); if ( current_user_can( 'edit_theme_options' ) && isset( $_POST['siteorigin_custom_css'] ) ) { check_admin_referer( 'custom_css', '_sononce' ); // Sanitize CSS input. Should keep most tags, apart from script and style tags. $custom_css = self::sanitize_css( filter_input( INPUT_POST, 'siteorigin_custom_css' ) ); $socss_post_id = filter_input( INPUT_GET, 'socss_post_id', FILTER_VALIDATE_INT ); if ( empty( $this->css_file ) ) { $current = $this->get_custom_css( $this->theme, $socss_post_id ); $this->save_custom_css( $custom_css, $this->theme, $socss_post_id ); } else { $current = $this->css_file; } // If this has changed, then add a revision. if ( $current != $custom_css ) { $this->add_custom_css_revision( $custom_css, $this->theme, $socss_post_id ); $this->save_custom_css_file( $custom_css, $this->theme, $socss_post_id ); } // Update Editor Theme. if ( $_POST['so_css_editor_theme'] == 'neat' || $_POST['so_css_editor_theme'] == 'ambiance' ) { update_option( 'so_css_editor_theme', sanitize_text_field( $_POST['so_css_editor_theme'] ) ); } if ( ! empty( $_POST['so_css_output_location'] ) && ( $_POST['so_css_output_location'] === 'file' || $_POST['so_css_output_location'] === 'inline' ) ) { update_option( 'so_css_output_location', sanitize_text_field( $_POST['so_css_output_location'] ) ); } } } /** * Display the help tab */ public function add_help_tab() { $screen = get_current_screen(); $screen->add_help_tab( array( 'id' => 'custom-css', 'title' => esc_html__( 'Custom CSS', 'so-css' ), 'content' => '

    ' . sprintf( esc_html__( "SiteOrigin CSS adds any custom CSS you enter here into your site's header. ", 'so-css' ) ) . esc_html__( "These changes will persist across updates so it's best to make all your changes here. ", 'so-css' ) . '

    ', ) ); } public function enqueue_admin_scripts( $page ) { if ( $page != 'appearance_page_so_custom_css' ) { return; } // Core WordPress stuff that we use wp_enqueue_media(); global $wp_version; if ( version_compare( $wp_version, '4.9', '>=' ) && wp_get_current_user()->syntax_highlighting ) { wp_enqueue_code_editor( array( 'type' => 'css', 'codemirror' => array( 'lint' => true, ), ) ); } else { $this->enqueue_fallback_codemirror(); } wp_enqueue_style( 'socss-codemirror-theme-neat', plugin_dir_url( __FILE__ ) . 'lib/codemirror/theme/neat.css', array(), SOCSS_VERSION ); wp_enqueue_style( 'socss-codemirror-theme-ambiance', plugin_dir_url( __FILE__ ) . 'lib/codemirror/theme/ambiance.css', array(), SOCSS_VERSION ); // Enqueue the scripts for theme CSS processing wp_enqueue_script( 'siteorigin-css-parser-lib', plugin_dir_url( __FILE__ ) . 'js/css' . SOCSS_JS_SUFFIX . '.js', array( 'jquery' ), SOCSS_VERSION ); // There are conflicts between CSS linting and the built in WordPress color picker, so use something else wp_enqueue_style( 'siteorigin-custom-css-minicolors', plugin_dir_url( __FILE__ ) . 'lib/minicolors/jquery.minicolors.css', array(), '2.1.7' ); wp_enqueue_script( 'siteorigin-custom-css-minicolors', plugin_dir_url( __FILE__ ) . 'lib/minicolors/jquery.minicolors' . SOCSS_JS_SUFFIX . '.js', array( 'jquery' ), '2.1.7' ); // URI parsing for preview navigation wp_enqueue_script( 'siteorigin-uri', plugin_dir_url( __FILE__ ) . 'js/URI' . SOCSS_JS_SUFFIX . '.js', array(), SOCSS_VERSION, true ); // All the custom SiteOrigin CSS stuff wp_enqueue_script( 'siteorigin-custom-css', plugin_dir_url( __FILE__ ) . 'js/editor' . SOCSS_JS_SUFFIX . '.js', array( 'jquery', 'underscore', 'backbone' ), SOCSS_VERSION, true ); wp_enqueue_style( 'siteorigin-custom-css', plugin_dir_url( __FILE__ ) . 'css/admin.css', array( ), SOCSS_VERSION ); // Pretty confusing, but it seems we should be using `home_url` and NOT `site_url` // as described here => https://wordpress.stackexchange.com/a/50605 $init_url = home_url(); if ( ! empty( $socss_post_id ) && is_int( $socss_post_id ) ) { $init_url = set_url_scheme( get_permalink( $socss_post_id ) ); } $open_visual_editor = ! empty( $_REQUEST['open_visual_editor'] ); $home_url = add_query_arg( 'so_css_preview', '1', $init_url ); wp_localize_script( 'siteorigin-custom-css', 'socssOptions', array( 'homeURL' => $home_url, 'postCssUrlRoot' => wp_nonce_url( admin_url( 'admin-ajax.php?action=socss_get_post_css' ), 'get_post_css' ), 'getRevisionsListAjaxUrl' => wp_nonce_url( admin_url( 'admin-ajax.php?action=socss_get_revisions_list' ), 'get_revisions_list' ), 'ajaxurl' => wp_nonce_url( admin_url( 'admin-ajax.php' ), 'so-css-ajax' ), 'openVisualEditor' => $open_visual_editor, 'propertyControllers' => apply_filters( 'siteorigin_css_property_controllers', $this->get_property_controllers() ), 'loc' => array( 'unchanged' => esc_html__( 'Unchanged', 'so-css' ), 'select' => esc_html__( 'Select', 'so-css' ), 'select_image' => esc_html__( 'Select Image', 'so-css' ), 'leave' => esc_html__( 'Are you sure you want to leave without saving?', 'so-css' ), ), ) ); // This is for the templates required by the CSS editor. Ideally this would be out in the footer, but we need // it earlier for dependent scripts. include plugin_dir_path( __FILE__ ) . 'tpl/js-templates.php'; } // Handles loading the fallback version of CodeMirror. public function enqueue_fallback_codemirror() { // Enqueue the codemirror scripts. Call Underscore and Backbone dependencies so they're enqueued first to prevent conflicts. wp_enqueue_script( 'socss-codemirror', plugin_dir_url( __FILE__ ) . 'lib/codemirror/lib/codemirror' . SOCSS_JS_SUFFIX . '.js', array( 'underscore', 'backbone' ), '5.2.0' ); wp_enqueue_script( 'socss-codemirror-mode-css', plugin_dir_url( __FILE__ ) . 'lib/codemirror/mode/css/css' . SOCSS_JS_SUFFIX . '.js', array(), '5.2.0' ); // Add in all the linting libs wp_enqueue_script( 'socss-codemirror-lint', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/lint/lint' . SOCSS_JS_SUFFIX . '.js', array( 'socss-codemirror' ), '5.2.0' ); wp_enqueue_script( 'socss-codemirror-lint-css', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/lint/css-lint' . SOCSS_JS_SUFFIX . '.js', array( 'socss-codemirror', 'socss-codemirror-lint-css-lib', ), '5.2.0' ); wp_enqueue_script( 'socss-codemirror-lint-css-lib', plugin_dir_url( __FILE__ ) . 'js/csslint' . SOCSS_JS_SUFFIX . '.js', array(), '0.10.0' ); // The CodeMirror autocomplete library wp_enqueue_script( 'socss-codemirror-show-hint', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/hint/show-hint' . SOCSS_JS_SUFFIX . '.js', array( 'socss-codemirror' ), '5.2.0' ); // CodeMirror search and dialog addons wp_enqueue_script( 'socss-codemirror-dialog', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/dialog/dialog' . SOCSS_JS_SUFFIX . '.js', array( 'socss-codemirror' ), '5.2.0' ); wp_enqueue_script( 'socss-codemirror-search', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/search/search' . SOCSS_JS_SUFFIX . '.js', array( 'socss-codemirror' ), '5.37.0' ); wp_enqueue_script( 'socss-codemirror-search-searchcursor', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/search/searchcursor' . SOCSS_JS_SUFFIX . '.js', array( 'socss-codemirror', 'socss-codemirror-search' ), '5.37.0' ); wp_enqueue_script( 'socss-codemirror-search-match-cursor', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/search/match-highlighter' . SOCSS_JS_SUFFIX . '.js', array( 'socss-codemirror', 'socss-codemirror-search' ), '5.37.0' ); wp_enqueue_script( 'socss-codemirror-search-matchesonscrollbar', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/search/matchesonscrollbar' . SOCSS_JS_SUFFIX . '.js', array( 'socss-codemirror', 'socss-codemirror-search' ), '5.37.0' ); wp_enqueue_script( 'socss-codemirror-scroll-annotatescrollbar', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/scroll/annotatescrollbar' . SOCSS_JS_SUFFIX . '.js', array( 'socss-codemirror', 'socss-codemirror-search', 'socss-codemirror-search-matchesonscrollbar' ), '5.37.0' ); wp_enqueue_script( 'socss-codemirror-jump-to-line', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/search/jump-to-line' . SOCSS_JS_SUFFIX . '.js', array( 'socss-codemirror', 'socss-codemirror-search' ), '5.37.0' ); // All the CodeMirror styles wp_enqueue_style( 'socss-codemirror', plugin_dir_url( __FILE__ ) . 'lib/codemirror/lib/codemirror.css', array(), '5.2.0' ); wp_enqueue_style( 'socss-codemirror-lint-css', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/lint/lint.css', array(), '5.2.0' ); wp_enqueue_style( 'socss-codemirror-show-hint', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/hint/show-hint.css', array(), '5.2.0' ); wp_enqueue_style( 'socss-codemirror-dialog', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/dialog/dialog.css', '5.2.0' ); wp_enqueue_style( 'socss-codemirror-search-matchesonscrollbar', plugin_dir_url( __FILE__ ) . 'lib/codemirror/addon/search/matchesonscrollbar.css', array(), '5.37.0' ); } public function dequeue_admin_scripts( $page ) { if ( $page != 'appearance_page_so_custom_css' ) { return; } // Dequeue the core WordPress color picker on the custom CSS page. // This script causes conflicts and other plugins seem to be enqueueing it on the SO CSS admin page. wp_dequeue_script( 'wp-color-picker' ); wp_dequeue_style( 'wp-color-picker' ); } /** * Get all the available property controllers */ public function get_property_controllers() { return include plugin_dir_path( __FILE__ ) . 'inc/controller-config.php'; } public function plugin_action_links( $links ) { if ( isset( $links['edit'] ) ) { unset( $links['edit'] ); } $links['css_editor'] = '' . esc_html__( 'CSS Editor', 'so-css' ) . ''; $links['support'] = '' . esc_html__( 'Support', 'so-css' ) . ''; if ( apply_filters( 'siteorigin_premium_upgrade_teaser', true ) && ! defined( 'SITEORIGIN_PREMIUM_VERSION' ) ) { $links['addons'] = '' . esc_html__( 'Addons', 'so-css' ) . ''; } return $links; } public function display_admin_page() { $socss_post_id = filter_input( INPUT_GET, 'socss_post_id', FILTER_VALIDATE_INT ); $theme = filter_input( INPUT_GET, 'theme' ); $time = filter_input( INPUT_GET, 'time', FILTER_VALIDATE_INT ); $page_title = esc_html__( 'SiteOrigin CSS', 'so-css' ); $theme_obj = wp_get_theme(); $theme_name = $theme_obj->get( 'Name' ); $editor_description = sprintf( esc_html__( 'Changes apply to %s and its child themes', 'so-css' ), $theme_name ); $save_button_label = esc_html__( 'Save CSS', 'so-css' ); $form_save_url = admin_url( 'themes.php?page=so_custom_css' ); if ( ! empty( $socss_post_id ) ) { $selected_post = get_post( $socss_post_id ); $page_title = sprintf( esc_html__( 'Editing CSS for: %s', 'so-css' ), $selected_post->post_title ); $editor_description = sprintf( esc_html__( 'Changes apply to the %s %s when the current theme is %s or its child themes', 'so-css' ), $selected_post->post_type, $selected_post->post_title, $theme_name ); $post_type_obj = get_post_type_object( $selected_post->post_type ); $post_type_labels = $post_type_obj->labels; $save_button_label = sprintf( esc_html__( 'Save %s CSS', 'so-css' ), $post_type_labels->singular_name ); $form_save_url = add_query_arg( 'socss_post_id', urlencode( $socss_post_id ), $form_save_url ); } $custom_css = $this->get_custom_css( $this->theme, $socss_post_id ); $custom_css_revisions = $this->get_custom_css_revisions( $this->theme, $socss_post_id ); $current_revision = 0; if ( ! empty( $theme ) && $theme == $this->theme && ! empty( $time ) && ! empty( $custom_css_revisions[ $time ] ) ) { $current_revision = $time; $custom_css = $custom_css_revisions[ $time ]; } if ( ! empty( $current_revision ) ) { $save_button_label = esc_html__( 'Revert to this revision', 'so-css' ); } if ( ! empty( $custom_css_revisions ) ) { krsort( $custom_css_revisions ); } $theme = basename( get_template_directory() ); $editor_theme = get_option( 'so_css_editor_theme', 'neat' ); $output_location = get_option( 'so_css_output_location', 'file' ); include plugin_dir_path( __FILE__ ) . 'tpl/page.php'; } public function display_teaser() { return apply_filters( 'siteorigin_premium_upgrade_teaser', true ) && ! defined( 'SITEORIGIN_PREMIUM_VERSION' ); } /** * Generates the url to edit the custom CSS for a post. */ public function get_edit_css_link( $post ) { $url = admin_url( 'themes.php?page=so_custom_css' ); if ( ! is_int( $post ) ) { $post = get_post( $post ); $post = $post->ID; } return empty( $post ) ? $url : add_query_arg( array( 'socss_post_id' => urlencode( $post ), 'open_visual_editor' => 1, ), $url ); } public function admin_action_hide_getting_started() { if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'hide' ) ) { return; } $user = wp_get_current_user(); if ( ! empty( $user ) ) { update_user_meta( $user->ID, 'socss_hide_gs', true ); } } /** * Retrieves the post specific CSS for the supplied postId. */ public function admin_action_get_post_css() { if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'get_post_css' ) ) { wp_die( esc_html__( 'The supplied nonce is invalid.', 'so-css' ), esc_html__( 'Invalid nonce.', 'so-css' ), 403 ); } $post_id = filter_input( INPUT_GET, 'postId', FILTER_VALIDATE_INT ); $current = $this->get_custom_css( $this->theme, $post_id ); $url = empty( $post_id ) ? home_url() : set_url_scheme( get_permalink( $post_id ) ); wp_send_json( array( 'css' => empty( $current ) ? '' : $current, 'postUrl' => $url ) ); } /** * Retrieves the past revisions of post specific CSS for the supplied postId. */ public function admin_action_get_revisions_list() { if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'get_revisions_list' ) ) { wp_die( esc_html__( 'The supplied nonce is invalid.', 'so-css' ), esc_html__( 'Invalid nonce.', 'so-css' ), 403 ); } $post_id = filter_input( INPUT_GET, 'postId', FILTER_VALIDATE_INT ); $this->custom_css_revisions_list( $this->theme, $post_id ); wp_die(); } /** * Retrieves the past revisions of post specific CSS for the supplied postId. */ public function admin_action_save_css() { if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'so-css-ajax' ) ) { wp_die( esc_html__( 'The supplied nonce is invalid.', 'so-css' ), esc_html__( 'Invalid nonce.', 'so-css' ), 403 ); } if ( current_user_can( 'edit_theme_options' ) && isset( $_POST['css'] ) ) { // Sanitize CSS input. Should keep most tags, apart from script and style tags. $custom_css = self::sanitize_css( stripslashes( $_POST['css'] ) ); if ( empty( $this->css_file ) ) { $current = $this->get_custom_css( $this->theme ); $this->save_custom_css( $custom_css, $this->theme ); } else { $current = $this->css_file; } // If this has changed, then add a revision. if ( $current != $custom_css ) { $this->add_custom_css_revision( $custom_css, $this->theme ); $this->save_custom_css_file( $custom_css, $this->theme ); // Output the full revisions list. $this->custom_css_revisions_list( $this->theme ); } } wp_die(); } public function custom_css_revisions_list( $theme, $post_id = null, $current_revision = null ) { $revisions = $this->get_custom_css_revisions( $theme, $post_id ); if ( is_array( $revisions ) && ! empty( $revisions ) ) { $i = 0; foreach ( $revisions as $time => $css ) { $is_current = ( empty( $current_revision ) && $i == 0 ) || ( ! empty( $current_revision ) && $time == $current_revision ); $query_args = array( 'theme' => $theme, 'time' => $time, 'open_visual_editor' => false ); if ( ! empty( $post_id ) ) { $query_args['socss_post_id'] = $post_id; } ?>
  • () ()
  • %s', esc_html__( 'No revisions yet.', 'so-css' ) ); } } /** * Add one or more paths to the registered snippet paths * * @param string|array $path */ public function register_snippet_path( $path ) { $this->snippet_paths = array_merge( $this->snippet_paths, (array) $path ); } /** * Get all the available snippets * * @return array|bool */ public function get_snippets() { // Get the snippet paths $snippet_paths = apply_filters( 'siteorigin_css_snippet_paths', $this->snippet_paths ); if ( empty( $snippet_paths ) ) { return array(); } static $snippets = array(); if ( ! empty( $snippets ) ) { return $snippets; } if ( ! WP_Filesystem() ) { return false; } global $wp_filesystem; foreach ( $snippet_paths as $path ) { foreach ( glob( $path . '/*.css' ) as $css_file ) { $data = get_file_data( $css_file, array( 'Name' => 'Name', 'Description' => 'Description', ) ); // Get the CSS and strip out the first header $css = $wp_filesystem->get_contents( $css_file ); $css = preg_replace( '!/\*.*?\*/!s', '', $css, 1 ); $snippets[] = wp_parse_args( $data, array( 'css' => str_replace( "\t", ' ', trim( $css ) ), ) ); } } usort( $snippets, array( $this, 'sort_snippet_callback' ) ); return $snippets; } /** * Sort snippets by name. * * @return int */ public static function sort_snippet_callback( $a, $b ) { return $a['Name'] > $b['Name'] ? 1 : - 1; } /** * A very simple CSS sanitization function. * * @return string */ public static function sanitize_css( $css ) { return trim( strip_tags( $css ) ); } /** * Get all the available theme CSS */ public function get_theme_css() { $css = ''; if ( file_exists( get_template_directory() . '/style.css' ) ) { $css .= file_get_contents( get_template_directory() . '/style.css' ); } if ( is_child_theme() ) { $css .= file_get_contents( get_stylesheet_directory() . '/style.css' ); } // Remove all CSS comments $regex = array( "`^([\t\s]+)`ism" => '', "`^\/\*(.+?)\*\/`ism" => '', "`(\A|[\n;]+)/\*[^*]*\*+(?:[^/*][^*]*\*+)*/`" => '$1', "`(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+`ism" => "\n", ); $css = preg_replace( array_keys( $regex ), $regex, $css ); $css = preg_replace( '/\s+/', ' ', $css ); return $css; } public function enqueue_inspector_scripts() { if ( ! current_user_can( 'edit_theme_options' ) ) { return; } wp_enqueue_style( 'dashicons' ); wp_enqueue_script( 'siteorigin-css-parser-lib', plugin_dir_url( __FILE__ ) . 'js/css' . SOCSS_JS_SUFFIX . '.js', array( 'jquery' ), SOCSS_VERSION ); wp_enqueue_script( 'siteorigin-css-sizes', plugin_dir_url( __FILE__ ) . 'js/jquery.sizes' . SOCSS_JS_SUFFIX . '.js', array( 'jquery' ), '0.33' ); wp_enqueue_script( 'siteorigin-css-specificity', plugin_dir_url( __FILE__ ) . 'js/specificity' . SOCSS_JS_SUFFIX . '.js', array() ); wp_enqueue_script( 'siteorigin-css-inspector', plugin_dir_url( __FILE__ ) . 'js/inspector' . SOCSS_JS_SUFFIX . '.js', array( 'jquery', 'underscore', 'backbone', ), SOCSS_VERSION, true ); wp_enqueue_style( 'siteorigin-css-inspector', plugin_dir_url( __FILE__ ) . 'css/inspector.css', array(), SOCSS_VERSION ); wp_localize_script( 'siteorigin-css-inspector', 'socssOptions', array() ); } public function inspector_templates() { if ( ! current_user_can( 'edit_theme_options' ) ) { return; } include plugin_dir_path( __FILE__ ) . 'tpl/inspector-templates.php'; } /** * Change the stylesheets to all be inline */ public function inline_inspector_scripts() { if ( ! current_user_can( 'edit_theme_options' ) ) { return; } $regex = array( "`^([\t\s]+)`ism" => '', "`^\/\*(.+?)\*\/`ism" => '', "`(\A|[\n;]+)/\*[^*]*\*+(?:[^/*][^*]*\*+)*/`" => '$1', "`(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+`ism" => "\n", ); global $wp_styles; if ( empty( $wp_styles->queue ) ) { return; } // Certain themes serve their main CSS from a file that's different to // what's initially set. $theme_src_compatibility = array( 'divi-style' => get_template_directory_uri() . '/style.min.css', ); // Make each of the scripts inline foreach ( $wp_styles->queue as $handle ) { if ( $handle === 'siteorigin-css-inspector' || $handle === 'dashicons' ) { continue; } $style = $wp_styles->registered[ $handle ]; if ( empty( $style->src ) || substr( $style->src, 0, 4 ) !== 'http' ) { continue; } if ( isset( $theme_src_compatibility[ $handle ] ) ) { $style->src = $theme_src_compatibility[ $handle ]; } $response = wp_remote_get( $style->src ); if ( is_wp_error( $response ) || $response['response']['code'] !== 200 || empty( $response['body'] ) ) { continue; } $css = $response['body']; $css = preg_replace( array_keys( $regex ), $regex, $css ); ?> get_custom_css_revisions( $this->theme ); if ( empty( $revisions ) ) { return false; } krsort( $revisions ); $revision_times = array_keys( $revisions ); return $revision_times[0]; } /** * Checks and updates the plugin version. * * This method checks the current version of the plugin stored in the database. * If no version is set, it checks if the site already had SO CSS installed by * looking for custom CSS. If custom CSS is found, it sets the CSS output location * to 'inline'; otherwise, it sets it to 'file'. * * It also updates the stored version if it is not set or if it is outdated. * Additionally, it triggers the 'so_css_version_update' action when the version is updated. * * @return void */ public function version_check() { $version = get_option( 'so_css_version' ); // If there's no version set or it's set to 1.6.0, check if // this site already had SO CSS installed by checking for custom CSS. if ( empty( $version ) || $version === '1.6.0' ) { update_option( 'so_css_output_location', 'file' ); } if ( empty( $version ) || version_compare( $version, SOCSS_VERSION, '<' ) ) { update_option( 'so_css_version', SOCSS_VERSION ); do_action( 'so_css_version_update', SOCSS_VERSION, $version ); } } /** * Uninstall hook to clean up plugin data. * * This method is called when the plugin is uninstalled. It deletes * options related to the plugin from the WordPress database. * * Things like custom CSS are not deleted. This is to prevent data loss. * * @return void */ public static function uninstall() { $theme = basename( get_template_directory() ); delete_option( 'so_css_version' ); delete_option( 'so_css_editor_theme' ); delete_option( 'so_css_output_location' ); delete_option( 'siteorigin_custom_css_revisions[' . $theme . ']' ); } } // Initialize the single SiteOrigin_CSS::single(); js/specificity.js000064400000012443150212710760010036 0ustar00/** * Calculates the specificity of CSS selectors * https://github.com/keeganstreet/specificity - licensed under MIT. * * Returns an array of objects with the following properties: * - selector: the input * - specificity: e.g. 0,1,0,0 * - parts: array with details about each part of the selector that counts towards the specificity */ var SPECIFICITY = (function() { var calculate, calculateSingle; calculate = function(input) { var selectors, selector, i, len, results = []; // Separate input by commas selectors = input.split(','); for (i = 0, len = selectors.length; i < len; i += 1) { selector = selectors[i]; if (selector.length > 0) { results.push(calculateSingle(selector)); } } return results; }; // Calculate the specificity for a selector by dividing it into simple selectors and counting them calculateSingle = function(input) { var selector = input, findMatch, typeCount = { 'a': 0, 'b': 0, 'c': 0 }, parts = [], // The following regular expressions assume that selectors matching the preceding regular expressions have been removed attributeRegex = /(\[[^\]]+\])/g, idRegex = /(#[^\s\+>~\.\[:]+)/g, classRegex = /(\.[^\s\+>~\.\[:]+)/g, pseudoElementRegex = /(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi, // A regex for pseudo classes with brackets - :nth-child(), :nth-last-child(), :nth-of-type(), :nth-last-type(), :lang() pseudoClassWithBracketsRegex = /(:[\w-]+\([^\)]*\))/gi, // A regex for other pseudo classes, which don't have brackets pseudoClassRegex = /(:[^\s\+>~\.\[:]+)/g, elementRegex = /([^\s\+>~\.\[:]+)/g; // Find matches for a regular expression in a string and push their details to parts // Type is "a" for IDs, "b" for classes, attributes and pseudo-classes and "c" for elements and pseudo-elements findMatch = function(regex, type) { var matches, i, len, match, index, length; if (regex.test(selector)) { matches = selector.match(regex); for (i = 0, len = matches.length; i < len; i += 1) { typeCount[type] += 1; match = matches[i]; index = selector.indexOf(match); length = match.length; parts.push({ selector: match, type: type, index: index, length: length }); // Replace this simple selector with whitespace so it won't be counted in further simple selectors selector = selector.replace(match, Array(length + 1).join(' ')); } } }; // Remove the negation psuedo-class (:not) but leave its argument because specificity is calculated on its argument (function() { var regex = /:not\(([^\)]*)\)/g; if (regex.test(selector)) { selector = selector.replace(regex, ' $1 '); } }()); // Remove anything after a left brace in case a user has pasted in a rule, not just a selector (function() { var regex = /{[^]*/gm, matches, i, len, match; if (regex.test(selector)) { matches = selector.match(regex); for (i = 0, len = matches.length; i < len; i += 1) { match = matches[i]; selector = selector.replace(match, Array(match.length + 1).join(' ')); } } }()); // Add attribute selectors to parts collection (type b) findMatch(attributeRegex, 'b'); // Add ID selectors to parts collection (type a) findMatch(idRegex, 'a'); // Add class selectors to parts collection (type b) findMatch(classRegex, 'b'); // Add pseudo-element selectors to parts collection (type c) findMatch(pseudoElementRegex, 'c'); // Add pseudo-class selectors to parts collection (type b) findMatch(pseudoClassWithBracketsRegex, 'b'); findMatch(pseudoClassRegex, 'b'); // Remove universal selector and separator characters selector = selector.replace(/[\*\s\+>~]/g, ' '); // Remove any stray dots or hashes which aren't attached to words // These may be present if the user is live-editing this selector selector = selector.replace(/[#\.]/g, ' '); // The only things left should be element selectors (type c) findMatch(elementRegex, 'c'); // Order the parts in the order they appear in the original selector // This is neater for external apps to deal with parts.sort(function(a, b) { return a.index - b.index; }); return { selector: input, specificity: '0,' + typeCount.a.toString() + ',' + typeCount.b.toString() + ',' + typeCount.c.toString(), parts: parts }; }; return { calculate: calculate }; }());js/jquery.sizes.js000064400000005563150212710760010203 0ustar00/** * @preserve JSizes - JQuery plugin v0.33 * * Licensed under the revised BSD License. * Copyright 2008-2010 Bram Stein * All rights reserved. */ /*global jQuery*/ (function ($) { 'use strict'; var num = function (value) { return parseInt(value, 10) || 0; }; /** * Sets or gets the values for min-width, min-height, max-width * and max-height. */ $.each(['min', 'max'], function (i, name) { $.fn[name + 'Size'] = function (value) { var width, height; if (value) { if (value.width !== undefined) { this.css(name + '-width', value.width); } if (value.height !== undefined) { this.css(name + '-height', value.height); } } else { width = this.css(name + '-width'); height = this.css(name + '-height'); // Apparently: // * Opera returns -1px instead of none // * IE6 returns undefined instead of none return {'width': (name === 'max' && (width === undefined || width === 'none' || num(width) === -1) && Number.MAX_VALUE) || num(width), 'height': (name === 'max' && (height === undefined || height === 'none' || num(height) === -1) && Number.MAX_VALUE) || num(height)}; } return this; }; }); /** * Returns whether or not an element is visible. */ $.fn.isVisible = function () { return this.is(':visible'); }; /** * Sets or gets the values for border, margin and padding. */ $.each(['border', 'margin', 'padding'], function (i, name) { $.fn[name] = function (value) { if (value) { if (value.top !== undefined) { this.css(name + '-top' + (name === 'border' ? '-width' : ''), value.top); } if (value.bottom !== undefined) { this.css(name + '-bottom' + (name === 'border' ? '-width' : ''), value.bottom); } if (value.left !== undefined) { this.css(name + '-left' + (name === 'border' ? '-width' : ''), value.left); } if (value.right !== undefined) { this.css(name + '-right' + (name === 'border' ? '-width' : ''), value.right); } } else { return {top: num(this.css(name + '-top' + (name === 'border' ? '-width' : ''))), bottom: num(this.css(name + '-bottom' + (name === 'border' ? '-width' : ''))), left: num(this.css(name + '-left' + (name === 'border' ? '-width' : ''))), right: num(this.css(name + '-right' + (name === 'border' ? '-width' : '')))}; } return this; }; }); }(jQuery));js/css.min.js000064400000246616150212710760007110 0ustar00!function t(e,r,n){function o(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,(function(t){return o(e[s][1][t]||t)}),l,l.exports,t,e,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s0?s-4:s;for(r=0;r>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===a&&(e=o[t.charCodeAt(r)]<<2|o[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===a&&(e=o[t.charCodeAt(r)]<<10|o[t.charCodeAt(r+1)]<<4|o[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},r.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],s=0,a=r-o;sa?a:s+16383));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var o,i,s=[],a=e;a>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ "use strict";var n=t("base64-js"),o=t("ieee754");r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;function i(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return r.__proto__=e.prototype,r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return s(t,e,r)}function s(t,r,n){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|h(t,r),o=i(n),s=o.write(t,r);s!==n&&(o=o.slice(0,s));return o}(t,r);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(N(t,ArrayBuffer)||t&&N(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|t}function h(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||N(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return k(t).length;default:if(i)return o?-1:B(t).length;r=(""+r).toLowerCase(),i=!0}}function f(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return E(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,r,n,o,i){if(0===t.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),F(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof r&&(r=e.from(r,o)),e.isBuffer(r))return 0===r.length?-1:m(t,r,n,o,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):m(t,[r],n,o,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,o){var i,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var l=-1;for(i=r;ia&&(r=a-u),i=r;i>=0;i--){for(var h=!0,f=0;fo&&(n=o):n=o;var i=e.length;n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function C(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o239?4:c>223?3:c>191?2:1;if(o+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;ne&&(t+=" ... "),""},e.prototype.compare=function(t,r,n,o,i){if(N(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),r<0||n>t.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(this===t)return 0;for(var s=(i>>>=0)-(o>>>=0),a=(n>>>=0)-(r>>>=0),u=Math.min(s,a),c=this.slice(o,i),l=t.slice(r,n),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return d(this,t,e,r);case"utf8":case"utf-8":return y(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return b(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;on)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function M(t,r,n,o,i,s){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function T(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function x(t,e,r,n,i){return e=+e,r>>>=0,i||T(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return e=+e,r>>>=0,i||T(t,0,r,8),o.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,e>>>=0,r||O(t,e,this.length);for(var n=this[t],o=1,i=0;++i>>=0,e>>>=0,r||O(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},e.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),o.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),o.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),o.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),o.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i>>=0,r>>>=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);M(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+r},e.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);M(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeFloatLE=function(t,e,r){return x(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return x(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,o){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),o||0===o||(o=this.length),r>=t.length&&(r=t.length),r||(r=0),o>0&&o=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r=0;--s)t[s+r]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,o),r);return i},e.prototype.fill=function(t,r,n,o){if("string"==typeof t){if("string"==typeof r?(o=r,r=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!e.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===t.length){var i=t.charCodeAt(0);("utf8"===o&&i<128||"latin1"===o)&&(t=i)}}else"number"==typeof t&&(t&=255);if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=r;s55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function k(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(I,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function P(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function N(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function F(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:4}],4:[function(t,e,r){r.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,u=(1<>1,l=-7,h=r?o-1:0,f=r?-1:1,p=t[e+h];for(h+=f,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+t[e+h],h+=f,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=c}return(p?-1:1)*s*Math.pow(2,i-n)},r.write=function(t,e,r,n,o,i){var s,a,u,c=8*i-o-1,l=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,g=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,o),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;t[r+p]=255&a,p+=g,a/=256,o-=8);for(s=s<0;t[r+p]=255&s,p+=g,s/=256,c-=8);t[r+p-g]|=128*m}},{}],5:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n=-1&&!o;i--){var s=i>=0?arguments[i]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(r=s+"/"+r,o="/"===s.charAt(0))}return(o?"/":"")+(r=e(n(r.split("/"),(function(t){return!!t})),!o).join("/"))||"."},r.normalize=function(t){var i=r.isAbsolute(t),s="/"===o(t,-1);return(t=e(n(t.split("/"),(function(t){return!!t})),!i).join("/"))||i||(t="."),t&&s&&(t+="/"),(i?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var o=n(t.split("/")),i=n(e.split("/")),s=Math.min(o.length,i.length),a=s,u=0;u=1;--i)if(47===(e=t.charCodeAt(i))){if(!o){n=i;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},r.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,n=-1,o=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!o){r=e+1;break}}else-1===n&&(o=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,n=-1,o=!0,i=0,s=t.length-1;s>=0;--s){var a=t.charCodeAt(s);if(47!==a)-1===n&&(o=!1,n=s+1),46===a?-1===e?e=s:1!==i&&(i=1):-1!==e&&(i=-1);else if(!o){r=s+1;break}}return-1===e||-1===n||0===i||1===i&&e===n-1&&e===r+1?"":t.slice(e,n)};var o="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,t("_process"))},{_process:6}],6:[function(t,e,r){var n,o,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(t){o=a}}();var c,l=[],h=!1,f=-1;function p(){h&&c&&(h=!1,c.length?l=c.concat(l):f=-1,l.length&&g())}function g(){if(!h){var t=u(p);h=!0;for(var e=l.length;e;){for(c=l,l=[];++f1)for(var r=1;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,m=String.fromCharCode;function d(t){throw new RangeError(p[t])}function y(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function v(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+y((t=t.replace(f,".")).split("."),e).join(".")}function w(t){for(var e,r,n=[],o=0,i=t.length;o=55296&&e<=56319&&o65535&&(e+=m((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=m(t)})).join("")}function _(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function A(t,e,r){var n=0;for(t=r?g(t/700):t>>1,t+=g(t/e);t>455;n+=36)t=g(t/35);return g(n+36*t/(t+38))}function C(t){var e,r,n,o,i,s,a,u,l,h,f,p=[],m=t.length,y=0,v=128,w=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&d("not-basic"),p.push(t.charCodeAt(n));for(o=r>0?r+1:0;o=m&&d("invalid-input"),((u=(f=t.charCodeAt(o++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||u>g((c-y)/s))&&d("overflow"),y+=u*s,!(u<(l=a<=w?1:a>=w+26?26:a-w));a+=36)s>g(c/(h=36-l))&&d("overflow"),s*=h;w=A(y-i,e=p.length+1,0==i),g(y/e)>c-v&&d("overflow"),v+=g(y/e),y%=e,p.splice(y++,0,v)}return b(p)}function E(t){var e,r,n,o,i,s,a,u,l,h,f,p,y,v,b,C=[];for(p=(t=w(t)).length,e=128,r=0,i=72,s=0;s=e&&fg((c-r)/(y=n+1))&&d("overflow"),r+=(a-e)*y,e=a,s=0;sc&&d("overflow"),f==e){for(u=r,l=36;!(u<(h=l<=i?1:l>=i+26?26:l-i));l+=36)b=u-h,v=36-h,C.push(m(_(h+b%v,0))),u=g(b/v);C.push(m(_(u,0))),i=A(r,y,n==o),r=0,++n}++r,++e}return C.join("")}if(a={version:"1.4.1",ucs2:{decode:w,encode:b},decode:C,encode:E,toASCII:function(t){return v(t,(function(t){return h.test(t)?"xn--"+E(t):t}))},toUnicode:function(t){return v(t,(function(t){return l.test(t)?C(t.slice(4).toLowerCase()):t}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return a}));else if(o&&i)if(e.exports==o)i.exports=a;else for(u in a)a.hasOwnProperty(u)&&(o[u]=a[u]);else n.punycode=a}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,i){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var l=0;l=0?(h=m.substr(0,d),f=m.substr(d+1)):(h=m,f=""),p=decodeURIComponent(h),g=decodeURIComponent(f),n(s,p)?o(s[p])?s[p].push(g):s[p]=[s[p],g]:s[p]=g}return s};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],9:[function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?i(s(t),(function(s){var a=encodeURIComponent(n(s))+r;return o(t[s])?i(t[s],(function(t){return a+encodeURIComponent(n(t))})).join(e):a+encodeURIComponent(n(t[s]))})).join(e):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=u++,n=!(arguments.length<2)&&s.call(arguments,1);return a[e]=!0,o((function(){a[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete a[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":6,timers:11}],12:[function(t,e,r){"use strict";var n=t("punycode"),o=t("./util");function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=w,r.resolve=function(t,e){return w(t,!1,!0).resolve(e)},r.resolveObject=function(t,e){return t?w(t,!1,!0).resolveObject(e):e},r.format=function(t){o.isString(t)&&(t=w(t));return t instanceof i?t.format():i.prototype.format.call(t)},r.Url=i;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),h=["%","/","?",";","#"].concat(l),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},d={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=t("querystring");function w(t,e,r){if(t&&o.isObject(t)&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}i.prototype.parse=function(t,e,r){if(!o.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),a=-1!==i&&i127?I+="x":I+=U[j];if(!I.match(p)){var k=T.slice(0,R),P=T.slice(R+1),N=U.match(g);N&&(k.push(N[1]),P.unshift(N[2])),P.length&&(w="/"+P.join(".")+w),this.hostname=k.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),M||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+F,this.href+=this.host,M&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!m[A])for(R=0,x=l.length;R0)&&r.host.split("@"))&&(r.auth=M.shift(),r.host=r.hostname=M.shift());return r.search=t.search,r.query=t.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!C.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=C.slice(-1)[0],L=(r.host||t.host||C.length>1)&&("."===S||".."===S)||""===S,R=0,O=C.length;O>=0;O--)"."===(S=C[O])?C.splice(O,1):".."===S?(C.splice(O,1),R++):R&&(C.splice(O,1),R--);if(!_&&!A)for(;R--;R)C.unshift("..");!_||""===C[0]||C[0]&&"/"===C[0].charAt(0)||C.unshift(""),L&&"/"!==C.join("/").substr(-1)&&C.push("");var M,T=""===C[0]||C[0]&&"/"===C[0].charAt(0);E&&(r.hostname=r.host=T?"":C.length?C.shift():"",(M=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=M.shift(),r.host=r.hostname=M.shift()));return(_=_||r.host&&C.length)&&!T&&C.unshift(""),C.length?r.pathname=C.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":13,punycode:7,querystring:10}],13:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],14:[function(t,e,r){window.css=t("css")},{css:16}],15:[function(t,e,r){(function(t){!function(r){"use strict";var n,o="function"==typeof(n=r.atob)?n:"function"==typeof t?function(e){return new t(e,"base64").toString("binary")}:"object"==typeof r.base64js?function(t){var e=r.base64js.b64ToByteArray(t);return Array.prototype.map.call(e,(function(t){return String.fromCharCode(t)})).join("")}:function(){throw new Error("You're probably in an old browser or an iOS webworker. It might help to include beatgammit's base64-js.")};r.atob=o,"object"==typeof e&&e&&e.exports&&(e.exports=o)}(window)}).call(this,t("buffer").Buffer)},{buffer:3}],16:[function(t,e,r){r.parse=t("./lib/parse"),r.stringify=t("./lib/stringify")},{"./lib/parse":17,"./lib/stringify":21}],17:[function(t,e,r){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function o(t){return t?t.replace(/^\s+|\s+$/g,""):""}e.exports=function(t,e){e=e||{};var r=1,i=1;function s(t){var e=t.match(/\n/g);e&&(r+=e.length);var n=t.lastIndexOf("\n");i=~n?t.length-n:i+t.length}function a(){var t={line:r,column:i};return function(e){return e.position=new u(t),m(),e}}function u(t){this.start=t,this.end={line:r,column:i},this.source=e.source}u.prototype.content=t;var c=[];function l(n){var o=new Error(e.source+":"+r+":"+i+": "+n);if(o.reason=n,o.filename=e.source,o.line=r,o.column=i,o.source=t,!e.silent)throw o;c.push(o)}function h(){return g(/^{\s*/)}function f(){return g(/^}/)}function p(){var e,r=[];for(m(),d(r);t.length&&"}"!=t.charAt(0)&&(e=R()||O());)!1!==e&&(r.push(e),d(r));return r}function g(e){var r=e.exec(t);if(r){var n=r[0];return s(n),t=t.slice(n.length),r}}function m(){g(/^\s*/)}function d(t){var e;for(t=t||[];e=y();)!1!==e&&t.push(e);return t}function y(){var e=a();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var r=2;""!=t.charAt(r)&&("*"!=t.charAt(r)||"/"!=t.charAt(r+1));)++r;if(r+=2,""===t.charAt(r-1))return l("End of comment missing");var n=t.slice(2,r-2);return i+=2,s(n),t=t.slice(r),i+=2,e({type:"comment",comment:n})}}function v(){var t=g(/^([^{]+)/);if(t)return o(t[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(t){return t.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(t){return t.replace(/\u200C/g,",")}))}function w(){var t=a(),e=g(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(e){if(e=o(e[0]),!g(/^:\s*/))return l("property missing ':'");var r=g(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=t({type:"declaration",property:e.replace(n,""),value:r?o(r[0]).replace(n,""):""});return g(/^[;\s]*/),i}}function b(){var t,e=[];if(!h())return l("missing '{'");for(d(e);t=w();)!1!==t&&(e.push(t),d(e));return f()?e:l("missing '}'")}function _(){for(var t,e=[],r=a();t=g(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)e.push(t[1]),g(/^,\s*/);if(e.length)return r({type:"keyframe",values:e,declarations:b()})}var A,C=L("import"),E=L("charset"),S=L("namespace");function L(t){var e=new RegExp("^@"+t+"\\s*([^;]+);");return function(){var r=a(),n=g(e);if(n){var o={type:t};return o[t]=n[1].trim(),r(o)}}}function R(){if("@"==t[0])return function(){var t=a();if(e=g(/^@([-\w]+)?keyframes\s*/)){var e,r=e[1];if(!(e=g(/^([-\w]+)\s*/)))return l("@keyframes missing name");var n,o=e[1];if(!h())return l("@keyframes missing '{'");for(var i=d();n=_();)i.push(n),i=i.concat(d());return f()?t({type:"keyframes",name:o,vendor:r,keyframes:i}):l("@keyframes missing '}'")}}()||function(){var t=a(),e=g(/^@media *([^{]+)/);if(e){var r=o(e[1]);if(!h())return l("@media missing '{'");var n=d().concat(p());return f()?t({type:"media",media:r,rules:n}):l("@media missing '}'")}}()||function(){var t=a(),e=g(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return t({type:"custom-media",name:o(e[1]),media:o(e[2])})}()||function(){var t=a(),e=g(/^@supports *([^{]+)/);if(e){var r=o(e[1]);if(!h())return l("@supports missing '{'");var n=d().concat(p());return f()?t({type:"supports",supports:r,rules:n}):l("@supports missing '}'")}}()||C()||E()||S()||function(){var t=a(),e=g(/^@([-\w]+)?document *([^{]+)/);if(e){var r=o(e[1]),n=o(e[2]);if(!h())return l("@document missing '{'");var i=d().concat(p());return f()?t({type:"document",document:n,vendor:r,rules:i}):l("@document missing '}'")}}()||function(){var t=a();if(g(/^@page */)){var e=v()||[];if(!h())return l("@page missing '{'");for(var r,n=d();r=w();)n.push(r),n=n.concat(d());return f()?t({type:"page",selectors:e,declarations:n}):l("@page missing '}'")}}()||function(){var t=a();if(g(/^@host\s*/)){if(!h())return l("@host missing '{'");var e=d().concat(p());return f()?t({type:"host",rules:e}):l("@host missing '}'")}}()||function(){var t=a();if(g(/^@font-face\s*/)){if(!h())return l("@font-face missing '{'");for(var e,r=d();e=w();)r.push(e),r=r.concat(d());return f()?t({type:"font-face",declarations:r}):l("@font-face missing '}'")}}()}function O(){var t=a(),e=v();return e?(d(),t({type:"rule",selectors:e,declarations:b()})):l("selector missing")}return function t(e,r){var n=e&&"string"==typeof e.type,o=n?e:r;for(var i in e){var s=e[i];Array.isArray(s)?s.forEach((function(e){t(e,o)})):s&&"object"==typeof s&&t(s,o)}n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:r||null});return e}((A=p(),{type:"stylesheet",stylesheet:{source:e.source,rules:A,parsingErrors:c}}))}},{}],18:[function(t,e,r){function n(t){this.options=t||{}}e.exports=n,n.prototype.emit=function(t){return t},n.prototype.visit=function(t){return this[t.type](t)},n.prototype.mapVisit=function(t,e){var r="";e=e||"";for(var n=0,o=t.length;n=0)return e}else{var r=n.toSetString(t);if(o.call(this._set,r))return this._set[r]}throw new Error('"'+t+'" is not in the set.')},s.prototype.at=function(t){if(t>=0&&t>>=5)>0&&(e|=32),r+=n.encode(e)}while(o>0);return r},r.decode=function(t,e,r){var o,i,s,a,u=t.length,c=0,l=0;do{if(e>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=n.decode(t.charCodeAt(e++))))throw new Error("Invalid base64 digit: "+t.charAt(e-1));o=!!(32&i),c+=(i&=31)<>1,1==(1&s)?-a:a),r.rest=e}},{"./base64":28}],28:[function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(t){if(0<=t&&t0?n-u>1?t(u,n,o,i,s,a):a==r.LEAST_UPPER_BOUND?n1?t(e,u,o,i,s,a):a==r.LEAST_UPPER_BOUND?u:e<0?-1:e}(-1,e.length,t,e,n,o||r.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===n(e[i],e[i-1],!0);)--i;return i}},{}],30:[function(t,e,r){var n=t("./util");function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}o.prototype.unsortedForEach=function(t,e){this._array.forEach(t,e)},o.prototype.add=function(t){var e,r,o,i,s,a;e=this._last,r=t,o=e.generatedLine,i=r.generatedLine,s=e.generatedColumn,a=r.generatedColumn,i>o||i==o&&a>=s||n.compareByGeneratedPositionsInflated(e,r)<=0?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=o},{"./util":35}],31:[function(t,e,r){function n(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function o(t,e,r,i){if(r=0){var a=this._originalMappings[s];if(void 0===t.column)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:n.getArg(a,"generatedLine",null),column:n.getArg(a,"generatedColumn",null),lastColumn:n.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var c=a.originalColumn;a&&a.originalLine===e&&a.originalColumn==c;)i.push({line:n.getArg(a,"generatedLine",null),column:n.getArg(a,"generatedColumn",null),lastColumn:n.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i},r.SourceMapConsumer=u,c.prototype=Object.create(u.prototype),c.prototype.consumer=u,c.prototype._findSourceIndex=function(t){var e,r=t;if(null!=this.sourceRoot&&(r=n.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(e=0;e1&&(r.source=m+i[1],m+=i[1],r.originalLine=p+i[2],p=r.originalLine,r.originalLine+=1,r.originalColumn=g+i[3],g=r.originalColumn,i.length>4&&(r.name=d+i[4],d+=i[4])),A.push(r),"number"==typeof r.originalLine&&_.push(r)}a(A,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,a(_,n.compareByOriginalPositions),this.__originalMappings=_},c.prototype._findMapping=function(t,e,r,n,i,s){if(t[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[r]);if(t[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[n]);return o.search(t,e,i,s)},c.prototype.computeColumnSpans=function(){for(var t=0;t=0){var o=this._generatedMappings[r];if(o.generatedLine===e.generatedLine){var i=n.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=n.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=n.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:n.getArg(o,"originalLine",null),column:n.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(t){return null==t})))},c.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;var r=this._findSourceIndex(t);if(r>=0)return this.sourcesContent[r];var o,i=t;if(null!=this.sourceRoot&&(i=n.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=n.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(e)return null;throw new Error('"'+i+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(t){var e=n.getArg(t,"source");if((e=this._findSourceIndex(e))<0)return{line:null,column:null,lastColumn:null};var r={source:e,originalLine:n.getArg(t,"line"),originalColumn:n.getArg(t,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(t,"bias",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:n.getArg(i,"generatedLine",null),column:n.getArg(i,"generatedColumn",null),lastColumn:n.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=c,h.prototype=Object.create(u.prototype),h.prototype.constructor=u,h.prototype._version=3,Object.defineProperty(h.prototype,"sources",{get:function(){for(var t=[],e=0;e0&&t.column>=0)||e||r||n)&&!(t&&"line"in t&&"column"in t&&e&&"line"in e&&"column"in e&&t.line>0&&t.column>=0&&e.line>0&&e.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:r,original:e,name:n}))},a.prototype._serializeMappings=function(){for(var t,e,r,i,s=0,a=1,u=0,c=0,l=0,h=0,f="",p=this._mappings.toArray(),g=0,m=p.length;g0){if(!o.compareByGeneratedPositionsInflated(e,p[g-1]))continue;t+=","}t+=n.encode(e.generatedColumn-s),s=e.generatedColumn,null!=e.source&&(i=this._sources.indexOf(e.source),t+=n.encode(i-h),h=i,t+=n.encode(e.originalLine-1-c),c=e.originalLine-1,t+=n.encode(e.originalColumn-u),u=e.originalColumn,null!=e.name&&(r=this._names.indexOf(e.name),t+=n.encode(r-l),l=r)),f+=t}return f},a.prototype._generateSourcesContent=function(t,e){return t.map((function(t){if(!this._sourcesContents)return null;null!=e&&(t=o.relative(e,t));var r=o.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},a.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(t.file=this._file),null!=this._sourceRoot&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=a},{"./array-set":26,"./base64-vlq":27,"./mapping-list":30,"./util":35}],34:[function(t,e,r){var n=t("./source-map-generator").SourceMapGenerator,o=t("./util"),i=/(\r?\n)/,s="$$$isSourceNode$$$";function a(t,e,r,n,o){this.children=[],this.sourceContents={},this.line=null==t?null:t,this.column=null==e?null:e,this.source=null==r?null:r,this.name=null==o?null:o,this[s]=!0,null!=n&&this.add(n)}a.fromStringWithSourceMap=function(t,e,r){var n=new a,s=t.split(i),u=0,c=function(){return t()+(t()||"");function t(){return u=0;e--)this.prepend(t[e]);else{if(!t[s]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);this.children.unshift(t)}return this},a.prototype.walk=function(t){for(var e,r=0,n=this.children.length;r0){for(e=[],r=0;r=0;l--)"."===(o=u[l])?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return""===(e=u.join("/"))&&(e=a?"/":"."),n?(n.path=e,s(n)):e}function u(t,e){""===t&&(t="."),""===e&&(e=".");var r=i(e),n=i(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),s(r);if(r||e.match(o))return e;if(n&&!n.host&&!n.path)return n.host=e,s(n);var u="/"===e.charAt(0)?e:a(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=u,s(n)):u}r.urlParse=i,r.urlGenerate=s,r.normalize=a,r.join=u,r.isAbsolute=function(t){return"/"===t.charAt(0)||n.test(t)},r.relative=function(t,e){""===t&&(t="."),t=t.replace(/\/$/,"");for(var r=0;0!==e.indexOf(t+"/");){var n=t.lastIndexOf("/");if(n<0)return e;if((t=t.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)};var c=!("__proto__"in Object.create(null));function l(t){return t}function h(t){if(!t)return!1;var e=t.length;if(e<9)return!1;if(95!==t.charCodeAt(e-1)||95!==t.charCodeAt(e-2)||111!==t.charCodeAt(e-3)||116!==t.charCodeAt(e-4)||111!==t.charCodeAt(e-5)||114!==t.charCodeAt(e-6)||112!==t.charCodeAt(e-7)||95!==t.charCodeAt(e-8)||95!==t.charCodeAt(e-9))return!1;for(var r=e-10;r>=0;r--)if(36!==t.charCodeAt(r))return!1;return!0}function f(t,e){return t===e?0:null===t?1:null===e?-1:t>e?1:-1}r.toSetString=c?l:function(t){return h(t)?"$"+t:t},r.fromSetString=c?l:function(t){return h(t)?t.slice(1):t},r.compareByOriginalPositions=function(t,e,r){var n=f(t.source,e.source);return 0!==n?n:0!==(n=t.originalLine-e.originalLine)?n:0!==(n=t.originalColumn-e.originalColumn)||r?n:0!==(n=t.generatedColumn-e.generatedColumn)?n:0!==(n=t.generatedLine-e.generatedLine)?n:f(t.name,e.name)},r.compareByGeneratedPositionsDeflated=function(t,e,r){var n=t.generatedLine-e.generatedLine;return 0!==n?n:0!==(n=t.generatedColumn-e.generatedColumn)||r?n:0!==(n=f(t.source,e.source))?n:0!==(n=t.originalLine-e.originalLine)?n:0!==(n=t.originalColumn-e.originalColumn)?n:f(t.name,e.name)},r.compareByGeneratedPositionsInflated=function(t,e){var r=t.generatedLine-e.generatedLine;return 0!==r?r:0!==(r=t.generatedColumn-e.generatedColumn)?r:0!==(r=f(t.source,e.source))?r:0!==(r=t.originalLine-e.originalLine)?r:0!==(r=t.originalColumn-e.originalColumn)?r:f(t.name,e.name)},r.parseSourceMapInput=function(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))},r.computeSourceURL=function(t,e,r){if(e=e||"",t&&("/"!==t[t.length-1]&&"/"!==e[0]&&(t+="/"),e=t+e),r){var n=i(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}e=u(s(n),e)}return a(e)}},{}],36:[function(t,e,r){r.SourceMapGenerator=t("./lib/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=t("./lib/source-map-consumer").SourceMapConsumer,r.SourceNode=t("./lib/source-node").SourceNode},{"./lib/source-map-consumer":32,"./lib/source-map-generator":33,"./lib/source-node":34}]},{},[14]);js/csslint.js000064400001276543150212710760007220 0ustar00/*! CSSLint v1.0.3 Copyright (c) 2016 Nicole Sullivan and Nicholas C. Zakas. All rights reserved. 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 CSSLint = (function(){ var module = module || {}, exports = exports || {}; /*! Parser-Lib Copyright (c) 2009-2016 Nicholas C. Zakas. All rights reserved. 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. */ /* Version v1.0.0, Build time: 15-July-2016 12:36:10 */ var parserlib = (function () { var require; require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o). * @namespace parserlib.css * @class Combinator * @extends parserlib.util.SyntaxUnit * @constructor * @param {String} text The text representation of the unit. * @param {int} line The line of text on which the unit resides. * @param {int} col The column of text on which the unit resides. */ function Combinator(text, line, col) { SyntaxUnit.call(this, text, line, col, Parser.COMBINATOR_TYPE); /** * The type of modifier. * @type String * @property type */ this.type = "unknown"; //pretty simple if (/^\s+$/.test(text)) { this.type = "descendant"; } else if (text === ">") { this.type = "child"; } else if (text === "+") { this.type = "adjacent-sibling"; } else if (text === "~") { this.type = "sibling"; } } Combinator.prototype = new SyntaxUnit(); Combinator.prototype.constructor = Combinator; },{"../util/SyntaxUnit":26,"./Parser":6}],3:[function(require,module,exports){ "use strict"; module.exports = Matcher; var StringReader = require("../util/StringReader"); var SyntaxError = require("../util/SyntaxError"); /** * This class implements a combinator library for matcher functions. * The combinators are described at: * https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#Component_value_combinators */ function Matcher(matchFunc, toString) { this.match = function(expression) { // Save/restore marks to ensure that failed matches always restore // the original location in the expression. var result; expression.mark(); result = matchFunc(expression); if (result) { expression.drop(); } else { expression.restore(); } return result; }; this.toString = typeof toString === "function" ? toString : function() { return toString; }; } /** Precedence table of combinators. */ Matcher.prec = { MOD: 5, SEQ: 4, ANDAND: 3, OROR: 2, ALT: 1 }; /** Simple recursive-descent grammar to build matchers from strings. */ Matcher.parse = function(str) { var reader, eat, expr, oror, andand, seq, mod, term, result; reader = new StringReader(str); eat = function(matcher) { var result = reader.readMatch(matcher); if (result === null) { throw new SyntaxError( "Expected "+matcher, reader.getLine(), reader.getCol()); } return result; }; expr = function() { // expr = oror (" | " oror)* var m = [ oror() ]; while (reader.readMatch(" | ") !== null) { m.push(oror()); } return m.length === 1 ? m[0] : Matcher.alt.apply(Matcher, m); }; oror = function() { // oror = andand ( " || " andand)* var m = [ andand() ]; while (reader.readMatch(" || ") !== null) { m.push(andand()); } return m.length === 1 ? m[0] : Matcher.oror.apply(Matcher, m); }; andand = function() { // andand = seq ( " && " seq)* var m = [ seq() ]; while (reader.readMatch(" && ") !== null) { m.push(seq()); } return m.length === 1 ? m[0] : Matcher.andand.apply(Matcher, m); }; seq = function() { // seq = mod ( " " mod)* var m = [ mod() ]; while (reader.readMatch(/^ (?![&|\]])/) !== null) { m.push(mod()); } return m.length === 1 ? m[0] : Matcher.seq.apply(Matcher, m); }; mod = function() { // mod = term ( "?" | "*" | "+" | "#" | "{,}" )? var m = term(); if (reader.readMatch("?") !== null) { return m.question(); } else if (reader.readMatch("*") !== null) { return m.star(); } else if (reader.readMatch("+") !== null) { return m.plus(); } else if (reader.readMatch("#") !== null) { return m.hash(); } else if (reader.readMatch(/^\{\s*/) !== null) { var min = eat(/^\d+/); eat(/^\s*,\s*/); var max = eat(/^\d+/); eat(/^\s*\}/); return m.braces(+min, +max); } return m; }; term = function() { // term = | literal | "[ " expression " ]" if (reader.readMatch("[ ") !== null) { var m = expr(); eat(" ]"); return m; } return Matcher.fromType(eat(/^[^ ?*+#{]+/)); }; result = expr(); if (!reader.eof()) { throw new SyntaxError( "Expected end of string", reader.getLine(), reader.getCol()); } return result; }; /** * Convert a string to a matcher (parsing simple alternations), * or do nothing if the argument is already a matcher. */ Matcher.cast = function(m) { if (m instanceof Matcher) { return m; } return Matcher.parse(m); }; /** * Create a matcher for a single type. */ Matcher.fromType = function(type) { // Late require of ValidationTypes to break a dependency cycle. var ValidationTypes = require("./ValidationTypes"); return new Matcher(function(expression) { return expression.hasNext() && ValidationTypes.isType(expression, type); }, type); }; /** * Create a matcher for one or more juxtaposed words, which all must * occur, in the given order. */ Matcher.seq = function() { var ms = Array.prototype.slice.call(arguments).map(Matcher.cast); if (ms.length === 1) { return ms[0]; } return new Matcher(function(expression) { var i, result = true; for (i = 0; result && i < ms.length; i++) { result = ms[i].match(expression); } return result; }, function(prec) { var p = Matcher.prec.SEQ; var s = ms.map(function(m) { return m.toString(p); }).join(" "); if (prec > p) { s = "[ " + s + " ]"; } return s; }); }; /** * Create a matcher for one or more alternatives, where exactly one * must occur. */ Matcher.alt = function() { var ms = Array.prototype.slice.call(arguments).map(Matcher.cast); if (ms.length === 1) { return ms[0]; } return new Matcher(function(expression) { var i, result = false; for (i = 0; !result && i < ms.length; i++) { result = ms[i].match(expression); } return result; }, function(prec) { var p = Matcher.prec.ALT; var s = ms.map(function(m) { return m.toString(p); }).join(" | "); if (prec > p) { s = "[ " + s + " ]"; } return s; }); }; /** * Create a matcher for two or more options. This implements the * double bar (||) and double ampersand (&&) operators, as well as * variants of && where some of the alternatives are optional. * This will backtrack through even successful matches to try to * maximize the number of items matched. */ Matcher.many = function(required) { var ms = Array.prototype.slice.call(arguments, 1).reduce(function(acc, v) { if (v.expand) { // Insert all of the options for the given complex rule as // individual options. var ValidationTypes = require("./ValidationTypes"); acc.push.apply(acc, ValidationTypes.complex[v.expand].options); } else { acc.push(Matcher.cast(v)); } return acc; }, []); if (required === true) { required = ms.map(function() { return true; }); } var result = new Matcher(function(expression) { var seen = [], max = 0, pass = 0; var success = function(matchCount) { if (pass === 0) { max = Math.max(matchCount, max); return matchCount === ms.length; } else { return matchCount === max; } }; var tryMatch = function(matchCount) { for (var i = 0; i < ms.length; i++) { if (seen[i]) { continue; } expression.mark(); if (ms[i].match(expression)) { seen[i] = true; // Increase matchCount iff this was a required element // (or if all the elements are optional) if (tryMatch(matchCount + ((required === false || required[i]) ? 1 : 0))) { expression.drop(); return true; } // Backtrack: try *not* matching using this rule, and // let's see if it leads to a better overall match. expression.restore(); seen[i] = false; } else { expression.drop(); } } return success(matchCount); }; if (!tryMatch(0)) { // Couldn't get a complete match, retrace our steps to make the // match with the maximum # of required elements. pass++; tryMatch(0); } if (required === false) { return max > 0; } // Use finer-grained specification of which matchers are required. for (var i = 0; i < ms.length; i++) { if (required[i] && !seen[i]) { return false; } } return true; }, function(prec) { var p = required === false ? Matcher.prec.OROR : Matcher.prec.ANDAND; var s = ms.map(function(m, i) { if (required !== false && !required[i]) { return m.toString(Matcher.prec.MOD) + "?"; } return m.toString(p); }).join(required === false ? " || " : " && "); if (prec > p) { s = "[ " + s + " ]"; } return s; }); result.options = ms; return result; }; /** * Create a matcher for two or more options, where all options are * mandatory but they may appear in any order. */ Matcher.andand = function() { var args = Array.prototype.slice.call(arguments); args.unshift(true); return Matcher.many.apply(Matcher, args); }; /** * Create a matcher for two or more options, where options are * optional and may appear in any order, but at least one must be * present. */ Matcher.oror = function() { var args = Array.prototype.slice.call(arguments); args.unshift(false); return Matcher.many.apply(Matcher, args); }; /** Instance methods on Matchers. */ Matcher.prototype = { constructor: Matcher, // These are expected to be overridden in every instance. match: function() { throw new Error("unimplemented"); }, toString: function() { throw new Error("unimplemented"); }, // This returns a standalone function to do the matching. func: function() { return this.match.bind(this); }, // Basic combinators then: function(m) { return Matcher.seq(this, m); }, or: function(m) { return Matcher.alt(this, m); }, andand: function(m) { return Matcher.many(true, this, m); }, oror: function(m) { return Matcher.many(false, this, m); }, // Component value multipliers star: function() { return this.braces(0, Infinity, "*"); }, plus: function() { return this.braces(1, Infinity, "+"); }, question: function() { return this.braces(0, 1, "?"); }, hash: function() { return this.braces(1, Infinity, "#", Matcher.cast(",")); }, braces: function(min, max, marker, optSep) { var m1 = this, m2 = optSep ? optSep.then(this) : this; if (!marker) { marker = "{" + min + "," + max + "}"; } return new Matcher(function(expression) { var result = true, i; for (i = 0; i < max; i++) { if (i > 0 && optSep) { result = m2.match(expression); } else { result = m1.match(expression); } if (!result) { break; } } return i >= min; }, function() { return m1.toString(Matcher.prec.MOD) + marker; }); } }; },{"../util/StringReader":24,"../util/SyntaxError":25,"./ValidationTypes":21}],4:[function(require,module,exports){ "use strict"; module.exports = MediaFeature; var SyntaxUnit = require("../util/SyntaxUnit"); var Parser = require("./Parser"); /** * Represents a media feature, such as max-width:500. * @namespace parserlib.css * @class MediaFeature * @extends parserlib.util.SyntaxUnit * @constructor * @param {SyntaxUnit} name The name of the feature. * @param {SyntaxUnit} value The value of the feature or null if none. */ function MediaFeature(name, value) { SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE); /** * The name of the media feature * @type String * @property name */ this.name = name; /** * The value for the feature or null if there is none. * @type SyntaxUnit * @property value */ this.value = value; } MediaFeature.prototype = new SyntaxUnit(); MediaFeature.prototype.constructor = MediaFeature; },{"../util/SyntaxUnit":26,"./Parser":6}],5:[function(require,module,exports){ "use strict"; module.exports = MediaQuery; var SyntaxUnit = require("../util/SyntaxUnit"); var Parser = require("./Parser"); /** * Represents an individual media query. * @namespace parserlib.css * @class MediaQuery * @extends parserlib.util.SyntaxUnit * @constructor * @param {String} modifier The modifier "not" or "only" (or null). * @param {String} mediaType The type of media (i.e., "print"). * @param {Array} parts Array of selectors parts making up this selector. * @param {int} line The line of text on which the unit resides. * @param {int} col The column of text on which the unit resides. */ function MediaQuery(modifier, mediaType, features, line, col) { SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE); /** * The media modifier ("not" or "only") * @type String * @property modifier */ this.modifier = modifier; /** * The mediaType (i.e., "print") * @type String * @property mediaType */ this.mediaType = mediaType; /** * The parts that make up the selector. * @type Array * @property features */ this.features = features; } MediaQuery.prototype = new SyntaxUnit(); MediaQuery.prototype.constructor = MediaQuery; },{"../util/SyntaxUnit":26,"./Parser":6}],6:[function(require,module,exports){ "use strict"; module.exports = Parser; var EventTarget = require("../util/EventTarget"); var SyntaxError = require("../util/SyntaxError"); var SyntaxUnit = require("../util/SyntaxUnit"); var Combinator = require("./Combinator"); var MediaFeature = require("./MediaFeature"); var MediaQuery = require("./MediaQuery"); var PropertyName = require("./PropertyName"); var PropertyValue = require("./PropertyValue"); var PropertyValuePart = require("./PropertyValuePart"); var Selector = require("./Selector"); var SelectorPart = require("./SelectorPart"); var SelectorSubPart = require("./SelectorSubPart"); var TokenStream = require("./TokenStream"); var Tokens = require("./Tokens"); var Validation = require("./Validation"); /** * A CSS3 parser. * @namespace parserlib.css * @class Parser * @constructor * @param {Object} options (Optional) Various options for the parser: * starHack (true|false) to allow IE6 star hack as valid, * underscoreHack (true|false) to interpret leading underscores * as IE6-7 targeting for known properties, ieFilters (true|false) * to indicate that IE < 8 filters should be accepted and not throw * syntax errors. */ function Parser(options) { //inherit event functionality EventTarget.call(this); this.options = options || {}; this._tokenStream = null; } //Static constants Parser.DEFAULT_TYPE = 0; Parser.COMBINATOR_TYPE = 1; Parser.MEDIA_FEATURE_TYPE = 2; Parser.MEDIA_QUERY_TYPE = 3; Parser.PROPERTY_NAME_TYPE = 4; Parser.PROPERTY_VALUE_TYPE = 5; Parser.PROPERTY_VALUE_PART_TYPE = 6; Parser.SELECTOR_TYPE = 7; Parser.SELECTOR_PART_TYPE = 8; Parser.SELECTOR_SUB_PART_TYPE = 9; Parser.prototype = function() { var proto = new EventTarget(), //new prototype prop, additions = { __proto__: null, //restore constructor constructor: Parser, //instance constants - yuck DEFAULT_TYPE : 0, COMBINATOR_TYPE : 1, MEDIA_FEATURE_TYPE : 2, MEDIA_QUERY_TYPE : 3, PROPERTY_NAME_TYPE : 4, PROPERTY_VALUE_TYPE : 5, PROPERTY_VALUE_PART_TYPE : 6, SELECTOR_TYPE : 7, SELECTOR_PART_TYPE : 8, SELECTOR_SUB_PART_TYPE : 9, //----------------------------------------------------------------- // Grammar //----------------------------------------------------------------- _stylesheet: function() { /* * stylesheet * : [ CHARSET_SYM S* STRING S* ';' ]? * [S|CDO|CDC]* [ import [S|CDO|CDC]* ]* * [ namespace [S|CDO|CDC]* ]* * [ [ ruleset | media | page | font_face | keyframes_rule | supports_rule ] [S|CDO|CDC]* ]* * ; */ var tokenStream = this._tokenStream, count, token, tt; this.fire("startstylesheet"); //try to read character set this._charset(); this._skipCruft(); //try to read imports - may be more than one while (tokenStream.peek() === Tokens.IMPORT_SYM) { this._import(); this._skipCruft(); } //try to read namespaces - may be more than one while (tokenStream.peek() === Tokens.NAMESPACE_SYM) { this._namespace(); this._skipCruft(); } //get the next token tt = tokenStream.peek(); //try to read the rest while (tt > Tokens.EOF) { try { switch (tt) { case Tokens.MEDIA_SYM: this._media(); this._skipCruft(); break; case Tokens.PAGE_SYM: this._page(); this._skipCruft(); break; case Tokens.FONT_FACE_SYM: this._font_face(); this._skipCruft(); break; case Tokens.KEYFRAMES_SYM: this._keyframes(); this._skipCruft(); break; case Tokens.VIEWPORT_SYM: this._viewport(); this._skipCruft(); break; case Tokens.DOCUMENT_SYM: this._document(); this._skipCruft(); break; case Tokens.SUPPORTS_SYM: this._supports(); this._skipCruft(); break; case Tokens.UNKNOWN_SYM: //unknown @ rule tokenStream.get(); if (!this.options.strict) { //fire error event this.fire({ type: "error", error: null, message: "Unknown @ rule: " + tokenStream.LT(0).value + ".", line: tokenStream.LT(0).startLine, col: tokenStream.LT(0).startCol }); //skip braces count=0; while (tokenStream.advance([Tokens.LBRACE, Tokens.RBRACE]) === Tokens.LBRACE) { count++; //keep track of nesting depth } while (count) { tokenStream.advance([Tokens.RBRACE]); count--; } } else { //not a syntax error, rethrow it throw new SyntaxError("Unknown @ rule.", tokenStream.LT(0).startLine, tokenStream.LT(0).startCol); } break; case Tokens.S: this._readWhitespace(); break; default: if (!this._ruleset()) { //error handling for known issues switch (tt) { case Tokens.CHARSET_SYM: token = tokenStream.LT(1); this._charset(false); throw new SyntaxError("@charset not allowed here.", token.startLine, token.startCol); case Tokens.IMPORT_SYM: token = tokenStream.LT(1); this._import(false); throw new SyntaxError("@import not allowed here.", token.startLine, token.startCol); case Tokens.NAMESPACE_SYM: token = tokenStream.LT(1); this._namespace(false); throw new SyntaxError("@namespace not allowed here.", token.startLine, token.startCol); default: tokenStream.get(); //get the last token this._unexpectedToken(tokenStream.token()); } } } } catch (ex) { if (ex instanceof SyntaxError && !this.options.strict) { this.fire({ type: "error", error: ex, message: ex.message, line: ex.line, col: ex.col }); } else { throw ex; } } tt = tokenStream.peek(); } if (tt !== Tokens.EOF) { this._unexpectedToken(tokenStream.token()); } this.fire("endstylesheet"); }, _charset: function(emit) { var tokenStream = this._tokenStream, charset, token, line, col; if (tokenStream.match(Tokens.CHARSET_SYM)) { line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); tokenStream.mustMatch(Tokens.STRING); token = tokenStream.token(); charset = token.value; this._readWhitespace(); tokenStream.mustMatch(Tokens.SEMICOLON); if (emit !== false) { this.fire({ type: "charset", charset:charset, line: line, col: col }); } } }, _import: function(emit) { /* * import * : IMPORT_SYM S* * [STRING|URI] S* media_query_list? ';' S* */ var tokenStream = this._tokenStream, uri, importToken, mediaList = []; //read import symbol tokenStream.mustMatch(Tokens.IMPORT_SYM); importToken = tokenStream.token(); this._readWhitespace(); tokenStream.mustMatch([Tokens.STRING, Tokens.URI]); //grab the URI value uri = tokenStream.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/, "$1"); this._readWhitespace(); mediaList = this._media_query_list(); //must end with a semicolon tokenStream.mustMatch(Tokens.SEMICOLON); this._readWhitespace(); if (emit !== false) { this.fire({ type: "import", uri: uri, media: mediaList, line: importToken.startLine, col: importToken.startCol }); } }, _namespace: function(emit) { /* * namespace * : NAMESPACE_SYM S* [namespace_prefix S*]? [STRING|URI] S* ';' S* */ var tokenStream = this._tokenStream, line, col, prefix, uri; //read import symbol tokenStream.mustMatch(Tokens.NAMESPACE_SYM); line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); //it's a namespace prefix - no _namespace_prefix() method because it's just an IDENT if (tokenStream.match(Tokens.IDENT)) { prefix = tokenStream.token().value; this._readWhitespace(); } tokenStream.mustMatch([Tokens.STRING, Tokens.URI]); /*if (!tokenStream.match(Tokens.STRING)){ tokenStream.mustMatch(Tokens.URI); }*/ //grab the URI value uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1"); this._readWhitespace(); //must end with a semicolon tokenStream.mustMatch(Tokens.SEMICOLON); this._readWhitespace(); if (emit !== false) { this.fire({ type: "namespace", prefix: prefix, uri: uri, line: line, col: col }); } }, _supports: function(emit) { /* * supports_rule * : SUPPORTS_SYM S* supports_condition S* group_rule_body * ; */ var tokenStream = this._tokenStream, line, col; if (tokenStream.match(Tokens.SUPPORTS_SYM)) { line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); this._supports_condition(); this._readWhitespace(); tokenStream.mustMatch(Tokens.LBRACE); this._readWhitespace(); if (emit !== false) { this.fire({ type: "startsupports", line: line, col: col }); } while (true) { if (!this._ruleset()) { break; } } tokenStream.mustMatch(Tokens.RBRACE); this._readWhitespace(); this.fire({ type: "endsupports", line: line, col: col }); } }, _supports_condition: function() { /* * supports_condition * : supports_negation | supports_conjunction | supports_disjunction | * supports_condition_in_parens * ; */ var tokenStream = this._tokenStream, ident; if (tokenStream.match(Tokens.IDENT)) { ident = tokenStream.token().value.toLowerCase(); if (ident === "not") { tokenStream.mustMatch(Tokens.S); this._supports_condition_in_parens(); } else { tokenStream.unget(); } } else { this._supports_condition_in_parens(); this._readWhitespace(); while (tokenStream.peek() === Tokens.IDENT) { ident = tokenStream.LT(1).value.toLowerCase(); if (ident === "and" || ident === "or") { tokenStream.mustMatch(Tokens.IDENT); this._readWhitespace(); this._supports_condition_in_parens(); this._readWhitespace(); } } } }, _supports_condition_in_parens: function() { /* * supports_condition_in_parens * : ( '(' S* supports_condition S* ')' ) | supports_declaration_condition | * general_enclosed * ; */ var tokenStream = this._tokenStream, ident; if (tokenStream.match(Tokens.LPAREN)) { this._readWhitespace(); if (tokenStream.match(Tokens.IDENT)) { // look ahead for not keyword, if not given, continue with declaration condition. ident = tokenStream.token().value.toLowerCase(); if (ident === "not") { this._readWhitespace(); this._supports_condition(); this._readWhitespace(); tokenStream.mustMatch(Tokens.RPAREN); } else { tokenStream.unget(); this._supports_declaration_condition(false); } } else { this._supports_condition(); this._readWhitespace(); tokenStream.mustMatch(Tokens.RPAREN); } } else { this._supports_declaration_condition(); } }, _supports_declaration_condition: function(requireStartParen) { /* * supports_declaration_condition * : '(' S* declaration ')' * ; */ var tokenStream = this._tokenStream; if (requireStartParen !== false) { tokenStream.mustMatch(Tokens.LPAREN); } this._readWhitespace(); this._declaration(); tokenStream.mustMatch(Tokens.RPAREN); }, _media: function() { /* * media * : MEDIA_SYM S* media_query_list S* '{' S* ruleset* '}' S* * ; */ var tokenStream = this._tokenStream, line, col, mediaList;// = []; //look for @media tokenStream.mustMatch(Tokens.MEDIA_SYM); line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); mediaList = this._media_query_list(); tokenStream.mustMatch(Tokens.LBRACE); this._readWhitespace(); this.fire({ type: "startmedia", media: mediaList, line: line, col: col }); while (true) { if (tokenStream.peek() === Tokens.PAGE_SYM) { this._page(); } else if (tokenStream.peek() === Tokens.FONT_FACE_SYM) { this._font_face(); } else if (tokenStream.peek() === Tokens.VIEWPORT_SYM) { this._viewport(); } else if (tokenStream.peek() === Tokens.DOCUMENT_SYM) { this._document(); } else if (tokenStream.peek() === Tokens.SUPPORTS_SYM) { this._supports(); } else if (!this._ruleset()) { break; } } tokenStream.mustMatch(Tokens.RBRACE); this._readWhitespace(); this.fire({ type: "endmedia", media: mediaList, line: line, col: col }); }, //CSS3 Media Queries _media_query_list: function() { /* * media_query_list * : S* [media_query [ ',' S* media_query ]* ]? * ; */ var tokenStream = this._tokenStream, mediaList = []; this._readWhitespace(); if (tokenStream.peek() === Tokens.IDENT || tokenStream.peek() === Tokens.LPAREN) { mediaList.push(this._media_query()); } while (tokenStream.match(Tokens.COMMA)) { this._readWhitespace(); mediaList.push(this._media_query()); } return mediaList; }, /* * Note: "expression" in the grammar maps to the _media_expression * method. */ _media_query: function() { /* * media_query * : [ONLY | NOT]? S* media_type S* [ AND S* expression ]* * | expression [ AND S* expression ]* * ; */ var tokenStream = this._tokenStream, type = null, ident = null, token = null, expressions = []; if (tokenStream.match(Tokens.IDENT)) { ident = tokenStream.token().value.toLowerCase(); //since there's no custom tokens for these, need to manually check if (ident !== "only" && ident !== "not") { tokenStream.unget(); ident = null; } else { token = tokenStream.token(); } } this._readWhitespace(); if (tokenStream.peek() === Tokens.IDENT) { type = this._media_type(); if (token === null) { token = tokenStream.token(); } } else if (tokenStream.peek() === Tokens.LPAREN) { if (token === null) { token = tokenStream.LT(1); } expressions.push(this._media_expression()); } if (type === null && expressions.length === 0) { return null; } else { this._readWhitespace(); while (tokenStream.match(Tokens.IDENT)) { if (tokenStream.token().value.toLowerCase() !== "and") { this._unexpectedToken(tokenStream.token()); } this._readWhitespace(); expressions.push(this._media_expression()); } } return new MediaQuery(ident, type, expressions, token.startLine, token.startCol); }, //CSS3 Media Queries _media_type: function() { /* * media_type * : IDENT * ; */ return this._media_feature(); }, /** * Note: in CSS3 Media Queries, this is called "expression". * Renamed here to avoid conflict with CSS3 Selectors * definition of "expression". Also note that "expr" in the * grammar now maps to "expression" from CSS3 selectors. * @method _media_expression * @private */ _media_expression: function() { /* * expression * : '(' S* media_feature S* [ ':' S* expr ]? ')' S* * ; */ var tokenStream = this._tokenStream, feature = null, token, expression = null; tokenStream.mustMatch(Tokens.LPAREN); feature = this._media_feature(); this._readWhitespace(); if (tokenStream.match(Tokens.COLON)) { this._readWhitespace(); token = tokenStream.LT(1); expression = this._expression(); } tokenStream.mustMatch(Tokens.RPAREN); this._readWhitespace(); return new MediaFeature(feature, expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null); }, //CSS3 Media Queries _media_feature: function() { /* * media_feature * : IDENT * ; */ var tokenStream = this._tokenStream; this._readWhitespace(); tokenStream.mustMatch(Tokens.IDENT); return SyntaxUnit.fromToken(tokenStream.token()); }, //CSS3 Paged Media _page: function() { /* * page: * PAGE_SYM S* IDENT? pseudo_page? S* * '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S* * ; */ var tokenStream = this._tokenStream, line, col, identifier = null, pseudoPage = null; //look for @page tokenStream.mustMatch(Tokens.PAGE_SYM); line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); if (tokenStream.match(Tokens.IDENT)) { identifier = tokenStream.token().value; //The value 'auto' may not be used as a page name and MUST be treated as a syntax error. if (identifier.toLowerCase() === "auto") { this._unexpectedToken(tokenStream.token()); } } //see if there's a colon upcoming if (tokenStream.peek() === Tokens.COLON) { pseudoPage = this._pseudo_page(); } this._readWhitespace(); this.fire({ type: "startpage", id: identifier, pseudo: pseudoPage, line: line, col: col }); this._readDeclarations(true, true); this.fire({ type: "endpage", id: identifier, pseudo: pseudoPage, line: line, col: col }); }, //CSS3 Paged Media _margin: function() { /* * margin : * margin_sym S* '{' declaration [ ';' S* declaration? ]* '}' S* * ; */ var tokenStream = this._tokenStream, line, col, marginSym = this._margin_sym(); if (marginSym) { line = tokenStream.token().startLine; col = tokenStream.token().startCol; this.fire({ type: "startpagemargin", margin: marginSym, line: line, col: col }); this._readDeclarations(true); this.fire({ type: "endpagemargin", margin: marginSym, line: line, col: col }); return true; } else { return false; } }, //CSS3 Paged Media _margin_sym: function() { /* * margin_sym : * TOPLEFTCORNER_SYM | * TOPLEFT_SYM | * TOPCENTER_SYM | * TOPRIGHT_SYM | * TOPRIGHTCORNER_SYM | * BOTTOMLEFTCORNER_SYM | * BOTTOMLEFT_SYM | * BOTTOMCENTER_SYM | * BOTTOMRIGHT_SYM | * BOTTOMRIGHTCORNER_SYM | * LEFTTOP_SYM | * LEFTMIDDLE_SYM | * LEFTBOTTOM_SYM | * RIGHTTOP_SYM | * RIGHTMIDDLE_SYM | * RIGHTBOTTOM_SYM * ; */ var tokenStream = this._tokenStream; if (tokenStream.match([Tokens.TOPLEFTCORNER_SYM, Tokens.TOPLEFT_SYM, Tokens.TOPCENTER_SYM, Tokens.TOPRIGHT_SYM, Tokens.TOPRIGHTCORNER_SYM, Tokens.BOTTOMLEFTCORNER_SYM, Tokens.BOTTOMLEFT_SYM, Tokens.BOTTOMCENTER_SYM, Tokens.BOTTOMRIGHT_SYM, Tokens.BOTTOMRIGHTCORNER_SYM, Tokens.LEFTTOP_SYM, Tokens.LEFTMIDDLE_SYM, Tokens.LEFTBOTTOM_SYM, Tokens.RIGHTTOP_SYM, Tokens.RIGHTMIDDLE_SYM, Tokens.RIGHTBOTTOM_SYM])) { return SyntaxUnit.fromToken(tokenStream.token()); } else { return null; } }, _pseudo_page: function() { /* * pseudo_page * : ':' IDENT * ; */ var tokenStream = this._tokenStream; tokenStream.mustMatch(Tokens.COLON); tokenStream.mustMatch(Tokens.IDENT); //TODO: CSS3 Paged Media says only "left", "center", and "right" are allowed return tokenStream.token().value; }, _font_face: function() { /* * font_face * : FONT_FACE_SYM S* * '{' S* declaration [ ';' S* declaration ]* '}' S* * ; */ var tokenStream = this._tokenStream, line, col; //look for @page tokenStream.mustMatch(Tokens.FONT_FACE_SYM); line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); this.fire({ type: "startfontface", line: line, col: col }); this._readDeclarations(true); this.fire({ type: "endfontface", line: line, col: col }); }, _viewport: function() { /* * viewport * : VIEWPORT_SYM S* * '{' S* declaration? [ ';' S* declaration? ]* '}' S* * ; */ var tokenStream = this._tokenStream, line, col; tokenStream.mustMatch(Tokens.VIEWPORT_SYM); line = tokenStream.token().startLine; col = tokenStream.token().startCol; this._readWhitespace(); this.fire({ type: "startviewport", line: line, col: col }); this._readDeclarations(true); this.fire({ type: "endviewport", line: line, col: col }); }, _document: function() { /* * document * : DOCUMENT_SYM S* * _document_function [ ',' S* _document_function ]* S* * '{' S* ruleset* '}' * ; */ var tokenStream = this._tokenStream, token, functions = [], prefix = ""; tokenStream.mustMatch(Tokens.DOCUMENT_SYM); token = tokenStream.token(); if (/^@\-([^\-]+)\-/.test(token.value)) { prefix = RegExp.$1; } this._readWhitespace(); functions.push(this._document_function()); while (tokenStream.match(Tokens.COMMA)) { this._readWhitespace(); functions.push(this._document_function()); } tokenStream.mustMatch(Tokens.LBRACE); this._readWhitespace(); this.fire({ type: "startdocument", functions: functions, prefix: prefix, line: token.startLine, col: token.startCol }); var ok = true; while (ok) { switch (tokenStream.peek()) { case Tokens.PAGE_SYM: this._page(); break; case Tokens.FONT_FACE_SYM: this._font_face(); break; case Tokens.VIEWPORT_SYM: this._viewport(); break; case Tokens.MEDIA_SYM: this._media(); break; case Tokens.KEYFRAMES_SYM: this._keyframes(); break; case Tokens.DOCUMENT_SYM: this._document(); break; default: ok = Boolean(this._ruleset()); } } tokenStream.mustMatch(Tokens.RBRACE); token = tokenStream.token(); this._readWhitespace(); this.fire({ type: "enddocument", functions: functions, prefix: prefix, line: token.startLine, col: token.startCol }); }, _document_function: function() { /* * document_function * : function | URI S* * ; */ var tokenStream = this._tokenStream, value; if (tokenStream.match(Tokens.URI)) { value = tokenStream.token().value; this._readWhitespace(); } else { value = this._function(); } return value; }, _operator: function(inFunction) { /* * operator (outside function) * : '/' S* | ',' S* | /( empty )/ * operator (inside function) * : '/' S* | '+' S* | '*' S* | '-' S* /( empty )/ * ; */ var tokenStream = this._tokenStream, token = null; if (tokenStream.match([Tokens.SLASH, Tokens.COMMA]) || (inFunction && tokenStream.match([Tokens.PLUS, Tokens.STAR, Tokens.MINUS]))) { token = tokenStream.token(); this._readWhitespace(); } return token ? PropertyValuePart.fromToken(token) : null; }, _combinator: function() { /* * combinator * : PLUS S* | GREATER S* | TILDE S* | S+ * ; */ var tokenStream = this._tokenStream, value = null, token; if (tokenStream.match([Tokens.PLUS, Tokens.GREATER, Tokens.TILDE])) { token = tokenStream.token(); value = new Combinator(token.value, token.startLine, token.startCol); this._readWhitespace(); } return value; }, _unary_operator: function() { /* * unary_operator * : '-' | '+' * ; */ var tokenStream = this._tokenStream; if (tokenStream.match([Tokens.MINUS, Tokens.PLUS])) { return tokenStream.token().value; } else { return null; } }, _property: function() { /* * property * : IDENT S* * ; */ var tokenStream = this._tokenStream, value = null, hack = null, tokenValue, token, line, col; //check for star hack - throws error if not allowed if (tokenStream.peek() === Tokens.STAR && this.options.starHack) { tokenStream.get(); token = tokenStream.token(); hack = token.value; line = token.startLine; col = token.startCol; } if (tokenStream.match(Tokens.IDENT)) { token = tokenStream.token(); tokenValue = token.value; //check for underscore hack - no error if not allowed because it's valid CSS syntax if (tokenValue.charAt(0) === "_" && this.options.underscoreHack) { hack = "_"; tokenValue = tokenValue.substring(1); } value = new PropertyName(tokenValue, hack, (line||token.startLine), (col||token.startCol)); this._readWhitespace(); } return value; }, //Augmented with CSS3 Selectors _ruleset: function() { /* * ruleset * : selectors_group * '{' S* declaration? [ ';' S* declaration? ]* '}' S* * ; */ var tokenStream = this._tokenStream, tt, selectors; /* * Error Recovery: If even a single selector fails to parse, * then the entire ruleset should be thrown away. */ try { selectors = this._selectors_group(); } catch (ex) { if (ex instanceof SyntaxError && !this.options.strict) { //fire error event this.fire({ type: "error", error: ex, message: ex.message, line: ex.line, col: ex.col }); //skip over everything until closing brace tt = tokenStream.advance([Tokens.RBRACE]); if (tt === Tokens.RBRACE) { //if there's a right brace, the rule is finished so don't do anything } else { //otherwise, rethrow the error because it wasn't handled properly throw ex; } } else { //not a syntax error, rethrow it throw ex; } //trigger parser to continue return true; } //if it got here, all selectors parsed if (selectors) { this.fire({ type: "startrule", selectors: selectors, line: selectors[0].line, col: selectors[0].col }); this._readDeclarations(true); this.fire({ type: "endrule", selectors: selectors, line: selectors[0].line, col: selectors[0].col }); } return selectors; }, //CSS3 Selectors _selectors_group: function() { /* * selectors_group * : selector [ COMMA S* selector ]* * ; */ var tokenStream = this._tokenStream, selectors = [], selector; selector = this._selector(); if (selector !== null) { selectors.push(selector); while (tokenStream.match(Tokens.COMMA)) { this._readWhitespace(); selector = this._selector(); if (selector !== null) { selectors.push(selector); } else { this._unexpectedToken(tokenStream.LT(1)); } } } return selectors.length ? selectors : null; }, //CSS3 Selectors _selector: function() { /* * selector * : simple_selector_sequence [ combinator simple_selector_sequence ]* * ; */ var tokenStream = this._tokenStream, selector = [], nextSelector = null, combinator = null, ws = null; //if there's no simple selector, then there's no selector nextSelector = this._simple_selector_sequence(); if (nextSelector === null) { return null; } selector.push(nextSelector); do { //look for a combinator combinator = this._combinator(); if (combinator !== null) { selector.push(combinator); nextSelector = this._simple_selector_sequence(); //there must be a next selector if (nextSelector === null) { this._unexpectedToken(tokenStream.LT(1)); } else { //nextSelector is an instance of SelectorPart selector.push(nextSelector); } } else { //if there's not whitespace, we're done if (this._readWhitespace()) { //add whitespace separator ws = new Combinator(tokenStream.token().value, tokenStream.token().startLine, tokenStream.token().startCol); //combinator is not required combinator = this._combinator(); //selector is required if there's a combinator nextSelector = this._simple_selector_sequence(); if (nextSelector === null) { if (combinator !== null) { this._unexpectedToken(tokenStream.LT(1)); } } else { if (combinator !== null) { selector.push(combinator); } else { selector.push(ws); } selector.push(nextSelector); } } else { break; } } } while (true); return new Selector(selector, selector[0].line, selector[0].col); }, //CSS3 Selectors _simple_selector_sequence: function() { /* * simple_selector_sequence * : [ type_selector | universal ] * [ HASH | class | attrib | pseudo | negation ]* * | [ HASH | class | attrib | pseudo | negation ]+ * ; */ var tokenStream = this._tokenStream, //parts of a simple selector elementName = null, modifiers = [], //complete selector text selectorText= "", //the different parts after the element name to search for components = [ //HASH function() { return tokenStream.match(Tokens.HASH) ? new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) : null; }, this._class, this._attrib, this._pseudo, this._negation ], i = 0, len = components.length, component = null, line, col; //get starting line and column for the selector line = tokenStream.LT(1).startLine; col = tokenStream.LT(1).startCol; elementName = this._type_selector(); if (!elementName) { elementName = this._universal(); } if (elementName !== null) { selectorText += elementName; } while (true) { //whitespace means we're done if (tokenStream.peek() === Tokens.S) { break; } //check for each component while (i < len && component === null) { component = components[i++].call(this); } if (component === null) { //we don't have a selector if (selectorText === "") { return null; } else { break; } } else { i = 0; modifiers.push(component); selectorText += component.toString(); component = null; } } return selectorText !== "" ? new SelectorPart(elementName, modifiers, selectorText, line, col) : null; }, //CSS3 Selectors _type_selector: function() { /* * type_selector * : [ namespace_prefix ]? element_name * ; */ var tokenStream = this._tokenStream, ns = this._namespace_prefix(), elementName = this._element_name(); if (!elementName) { /* * Need to back out the namespace that was read due to both * type_selector and universal reading namespace_prefix * first. Kind of hacky, but only way I can figure out * right now how to not change the grammar. */ if (ns) { tokenStream.unget(); if (ns.length > 1) { tokenStream.unget(); } } return null; } else { if (ns) { elementName.text = ns + elementName.text; elementName.col -= ns.length; } return elementName; } }, //CSS3 Selectors _class: function() { /* * class * : '.' IDENT * ; */ var tokenStream = this._tokenStream, token; if (tokenStream.match(Tokens.DOT)) { tokenStream.mustMatch(Tokens.IDENT); token = tokenStream.token(); return new SelectorSubPart("." + token.value, "class", token.startLine, token.startCol - 1); } else { return null; } }, //CSS3 Selectors _element_name: function() { /* * element_name * : IDENT * ; */ var tokenStream = this._tokenStream, token; if (tokenStream.match(Tokens.IDENT)) { token = tokenStream.token(); return new SelectorSubPart(token.value, "elementName", token.startLine, token.startCol); } else { return null; } }, //CSS3 Selectors _namespace_prefix: function() { /* * namespace_prefix * : [ IDENT | '*' ]? '|' * ; */ var tokenStream = this._tokenStream, value = ""; //verify that this is a namespace prefix if (tokenStream.LA(1) === Tokens.PIPE || tokenStream.LA(2) === Tokens.PIPE) { if (tokenStream.match([Tokens.IDENT, Tokens.STAR])) { value += tokenStream.token().value; } tokenStream.mustMatch(Tokens.PIPE); value += "|"; } return value.length ? value : null; }, //CSS3 Selectors _universal: function() { /* * universal * : [ namespace_prefix ]? '*' * ; */ var tokenStream = this._tokenStream, value = "", ns; ns = this._namespace_prefix(); if (ns) { value += ns; } if (tokenStream.match(Tokens.STAR)) { value += "*"; } return value.length ? value : null; }, //CSS3 Selectors _attrib: function() { /* * attrib * : '[' S* [ namespace_prefix ]? IDENT S* * [ [ PREFIXMATCH | * SUFFIXMATCH | * SUBSTRINGMATCH | * '=' | * INCLUDES | * DASHMATCH ] S* [ IDENT | STRING ] S* * ]? ']' * ; */ var tokenStream = this._tokenStream, value = null, ns, token; if (tokenStream.match(Tokens.LBRACKET)) { token = tokenStream.token(); value = token.value; value += this._readWhitespace(); ns = this._namespace_prefix(); if (ns) { value += ns; } tokenStream.mustMatch(Tokens.IDENT); value += tokenStream.token().value; value += this._readWhitespace(); if (tokenStream.match([Tokens.PREFIXMATCH, Tokens.SUFFIXMATCH, Tokens.SUBSTRINGMATCH, Tokens.EQUALS, Tokens.INCLUDES, Tokens.DASHMATCH])) { value += tokenStream.token().value; value += this._readWhitespace(); tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]); value += tokenStream.token().value; value += this._readWhitespace(); } tokenStream.mustMatch(Tokens.RBRACKET); return new SelectorSubPart(value + "]", "attribute", token.startLine, token.startCol); } else { return null; } }, //CSS3 Selectors _pseudo: function() { /* * pseudo * : ':' ':'? [ IDENT | functional_pseudo ] * ; */ var tokenStream = this._tokenStream, pseudo = null, colons = ":", line, col; if (tokenStream.match(Tokens.COLON)) { if (tokenStream.match(Tokens.COLON)) { colons += ":"; } if (tokenStream.match(Tokens.IDENT)) { pseudo = tokenStream.token().value; line = tokenStream.token().startLine; col = tokenStream.token().startCol - colons.length; } else if (tokenStream.peek() === Tokens.FUNCTION) { line = tokenStream.LT(1).startLine; col = tokenStream.LT(1).startCol - colons.length; pseudo = this._functional_pseudo(); } if (pseudo) { pseudo = new SelectorSubPart(colons + pseudo, "pseudo", line, col); } else { var startLine = tokenStream.LT(1).startLine, startCol = tokenStream.LT(0).startCol; throw new SyntaxError("Expected a `FUNCTION` or `IDENT` after colon at line " + startLine + ", col " + startCol + ".", startLine, startCol); } } return pseudo; }, //CSS3 Selectors _functional_pseudo: function() { /* * functional_pseudo * : FUNCTION S* expression ')' * ; */ var tokenStream = this._tokenStream, value = null; if (tokenStream.match(Tokens.FUNCTION)) { value = tokenStream.token().value; value += this._readWhitespace(); value += this._expression(); tokenStream.mustMatch(Tokens.RPAREN); value += ")"; } return value; }, //CSS3 Selectors _expression: function() { /* * expression * : [ [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S* ]+ * ; */ var tokenStream = this._tokenStream, value = ""; while (tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION, Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH, Tokens.FREQ, Tokens.ANGLE, Tokens.TIME, Tokens.RESOLUTION, Tokens.SLASH])) { value += tokenStream.token().value; value += this._readWhitespace(); } return value.length ? value : null; }, //CSS3 Selectors _negation: function() { /* * negation * : NOT S* negation_arg S* ')' * ; */ var tokenStream = this._tokenStream, line, col, value = "", arg, subpart = null; if (tokenStream.match(Tokens.NOT)) { value = tokenStream.token().value; line = tokenStream.token().startLine; col = tokenStream.token().startCol; value += this._readWhitespace(); arg = this._negation_arg(); value += arg; value += this._readWhitespace(); tokenStream.match(Tokens.RPAREN); value += tokenStream.token().value; subpart = new SelectorSubPart(value, "not", line, col); subpart.args.push(arg); } return subpart; }, //CSS3 Selectors _negation_arg: function() { /* * negation_arg * : type_selector | universal | HASH | class | attrib | pseudo * ; */ var tokenStream = this._tokenStream, args = [ this._type_selector, this._universal, function() { return tokenStream.match(Tokens.HASH) ? new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) : null; }, this._class, this._attrib, this._pseudo ], arg = null, i = 0, len = args.length, line, col, part; line = tokenStream.LT(1).startLine; col = tokenStream.LT(1).startCol; while (i < len && arg === null) { arg = args[i].call(this); i++; } //must be a negation arg if (arg === null) { this._unexpectedToken(tokenStream.LT(1)); } //it's an element name if (arg.type === "elementName") { part = new SelectorPart(arg, [], arg.toString(), line, col); } else { part = new SelectorPart(null, [arg], arg.toString(), line, col); } return part; }, _declaration: function() { /* * declaration * : property ':' S* expr prio? * | /( empty )/ * ; */ var tokenStream = this._tokenStream, property = null, expr = null, prio = null, invalid = null, propertyName= ""; property = this._property(); if (property !== null) { tokenStream.mustMatch(Tokens.COLON); this._readWhitespace(); expr = this._expr(); //if there's no parts for the value, it's an error if (!expr || expr.length === 0) { this._unexpectedToken(tokenStream.LT(1)); } prio = this._prio(); /* * If hacks should be allowed, then only check the root * property. If hacks should not be allowed, treat * _property or *property as invalid properties. */ propertyName = property.toString(); if (this.options.starHack && property.hack === "*" || this.options.underscoreHack && property.hack === "_") { propertyName = property.text; } try { this._validateProperty(propertyName, expr); } catch (ex) { invalid = ex; } this.fire({ type: "property", property: property, value: expr, important: prio, line: property.line, col: property.col, invalid: invalid }); return true; } else { return false; } }, _prio: function() { /* * prio * : IMPORTANT_SYM S* * ; */ var tokenStream = this._tokenStream, result = tokenStream.match(Tokens.IMPORTANT_SYM); this._readWhitespace(); return result; }, _expr: function(inFunction) { /* * expr * : term [ operator term ]* * ; */ var values = [], //valueParts = [], value = null, operator = null; value = this._term(inFunction); if (value !== null) { values.push(value); do { operator = this._operator(inFunction); //if there's an operator, keep building up the value parts if (operator) { values.push(operator); } /*else { //if there's not an operator, you have a full value values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col)); valueParts = []; }*/ value = this._term(inFunction); if (value === null) { break; } else { values.push(value); } } while (true); } //cleanup /*if (valueParts.length) { values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col)); }*/ return values.length > 0 ? new PropertyValue(values, values[0].line, values[0].col) : null; }, _term: function(inFunction) { /* * term * : unary_operator? * [ NUMBER S* | PERCENTAGE S* | LENGTH S* | ANGLE S* | * TIME S* | FREQ S* | function | ie_function ] * | STRING S* | IDENT S* | URI S* | UNICODERANGE S* | hexcolor * ; */ var tokenStream = this._tokenStream, unary = null, value = null, endChar = null, part = null, token, line, col; //returns the operator or null unary = this._unary_operator(); if (unary !== null) { line = tokenStream.token().startLine; col = tokenStream.token().startCol; } //exception for IE filters if (tokenStream.peek() === Tokens.IE_FUNCTION && this.options.ieFilters) { value = this._ie_function(); if (unary === null) { line = tokenStream.token().startLine; col = tokenStream.token().startCol; } //see if it's a simple block } else if (inFunction && tokenStream.match([Tokens.LPAREN, Tokens.LBRACE, Tokens.LBRACKET])) { token = tokenStream.token(); endChar = token.endChar; value = token.value + this._expr(inFunction).text; if (unary === null) { line = tokenStream.token().startLine; col = tokenStream.token().startCol; } tokenStream.mustMatch(Tokens.type(endChar)); value += endChar; this._readWhitespace(); //see if there's a simple match } else if (tokenStream.match([Tokens.NUMBER, Tokens.PERCENTAGE, Tokens.LENGTH, Tokens.ANGLE, Tokens.TIME, Tokens.FREQ, Tokens.STRING, Tokens.IDENT, Tokens.URI, Tokens.UNICODE_RANGE])) { value = tokenStream.token().value; if (unary === null) { line = tokenStream.token().startLine; col = tokenStream.token().startCol; // Correct potentially-inaccurate IDENT parsing in // PropertyValuePart constructor. part = PropertyValuePart.fromToken(tokenStream.token()); } this._readWhitespace(); } else { //see if it's a color token = this._hexcolor(); if (token === null) { //if there's no unary, get the start of the next token for line/col info if (unary === null) { line = tokenStream.LT(1).startLine; col = tokenStream.LT(1).startCol; } //has to be a function if (value === null) { /* * This checks for alpha(opacity=0) style of IE * functions. IE_FUNCTION only presents progid: style. */ if (tokenStream.LA(3) === Tokens.EQUALS && this.options.ieFilters) { value = this._ie_function(); } else { value = this._function(); } } /*if (value === null) { return null; //throw new Error("Expected identifier at line " + tokenStream.token().startLine + ", character " + tokenStream.token().startCol + "."); }*/ } else { value = token.value; if (unary === null) { line = token.startLine; col = token.startCol; } } } return part !== null ? part : value !== null ? new PropertyValuePart(unary !== null ? unary + value : value, line, col) : null; }, _function: function() { /* * function * : FUNCTION S* expr ')' S* * ; */ var tokenStream = this._tokenStream, functionText = null, expr = null, lt; if (tokenStream.match(Tokens.FUNCTION)) { functionText = tokenStream.token().value; this._readWhitespace(); expr = this._expr(true); functionText += expr; //START: Horrible hack in case it's an IE filter if (this.options.ieFilters && tokenStream.peek() === Tokens.EQUALS) { do { if (this._readWhitespace()) { functionText += tokenStream.token().value; } //might be second time in the loop if (tokenStream.LA(0) === Tokens.COMMA) { functionText += tokenStream.token().value; } tokenStream.match(Tokens.IDENT); functionText += tokenStream.token().value; tokenStream.match(Tokens.EQUALS); functionText += tokenStream.token().value; //functionText += this._term(); lt = tokenStream.peek(); while (lt !== Tokens.COMMA && lt !== Tokens.S && lt !== Tokens.RPAREN) { tokenStream.get(); functionText += tokenStream.token().value; lt = tokenStream.peek(); } } while (tokenStream.match([Tokens.COMMA, Tokens.S])); } //END: Horrible Hack tokenStream.match(Tokens.RPAREN); functionText += ")"; this._readWhitespace(); } return functionText; }, _ie_function: function() { /* (My own extension) * ie_function * : IE_FUNCTION S* IDENT '=' term [S* ','? IDENT '=' term]+ ')' S* * ; */ var tokenStream = this._tokenStream, functionText = null, lt; //IE function can begin like a regular function, too if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])) { functionText = tokenStream.token().value; do { if (this._readWhitespace()) { functionText += tokenStream.token().value; } //might be second time in the loop if (tokenStream.LA(0) === Tokens.COMMA) { functionText += tokenStream.token().value; } tokenStream.match(Tokens.IDENT); functionText += tokenStream.token().value; tokenStream.match(Tokens.EQUALS); functionText += tokenStream.token().value; //functionText += this._term(); lt = tokenStream.peek(); while (lt !== Tokens.COMMA && lt !== Tokens.S && lt !== Tokens.RPAREN) { tokenStream.get(); functionText += tokenStream.token().value; lt = tokenStream.peek(); } } while (tokenStream.match([Tokens.COMMA, Tokens.S])); tokenStream.match(Tokens.RPAREN); functionText += ")"; this._readWhitespace(); } return functionText; }, _hexcolor: function() { /* * There is a constraint on the color that it must * have either 3 or 6 hex-digits (i.e., [0-9a-fA-F]) * after the "#"; e.g., "#000" is OK, but "#abcd" is not. * * hexcolor * : HASH S* * ; */ var tokenStream = this._tokenStream, token = null, color; if (tokenStream.match(Tokens.HASH)) { //need to do some validation here token = tokenStream.token(); color = token.value; if (!/#[a-f0-9]{3,6}/i.test(color)) { throw new SyntaxError("Expected a hex color but found '" + color + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); } this._readWhitespace(); } return token; }, //----------------------------------------------------------------- // Animations methods //----------------------------------------------------------------- _keyframes: function() { /* * keyframes: * : KEYFRAMES_SYM S* keyframe_name S* '{' S* keyframe_rule* '}' { * ; */ var tokenStream = this._tokenStream, token, tt, name, prefix = ""; tokenStream.mustMatch(Tokens.KEYFRAMES_SYM); token = tokenStream.token(); if (/^@\-([^\-]+)\-/.test(token.value)) { prefix = RegExp.$1; } this._readWhitespace(); name = this._keyframe_name(); this._readWhitespace(); tokenStream.mustMatch(Tokens.LBRACE); this.fire({ type: "startkeyframes", name: name, prefix: prefix, line: token.startLine, col: token.startCol }); this._readWhitespace(); tt = tokenStream.peek(); //check for key while (tt === Tokens.IDENT || tt === Tokens.PERCENTAGE) { this._keyframe_rule(); this._readWhitespace(); tt = tokenStream.peek(); } this.fire({ type: "endkeyframes", name: name, prefix: prefix, line: token.startLine, col: token.startCol }); this._readWhitespace(); tokenStream.mustMatch(Tokens.RBRACE); this._readWhitespace(); }, _keyframe_name: function() { /* * keyframe_name: * : IDENT * | STRING * ; */ var tokenStream = this._tokenStream; tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]); return SyntaxUnit.fromToken(tokenStream.token()); }, _keyframe_rule: function() { /* * keyframe_rule: * : key_list S* * '{' S* declaration [ ';' S* declaration ]* '}' S* * ; */ var keyList = this._key_list(); this.fire({ type: "startkeyframerule", keys: keyList, line: keyList[0].line, col: keyList[0].col }); this._readDeclarations(true); this.fire({ type: "endkeyframerule", keys: keyList, line: keyList[0].line, col: keyList[0].col }); }, _key_list: function() { /* * key_list: * : key [ S* ',' S* key]* * ; */ var tokenStream = this._tokenStream, keyList = []; //must be least one key keyList.push(this._key()); this._readWhitespace(); while (tokenStream.match(Tokens.COMMA)) { this._readWhitespace(); keyList.push(this._key()); this._readWhitespace(); } return keyList; }, _key: function() { /* * There is a restriction that IDENT can be only "from" or "to". * * key * : PERCENTAGE * | IDENT * ; */ var tokenStream = this._tokenStream, token; if (tokenStream.match(Tokens.PERCENTAGE)) { return SyntaxUnit.fromToken(tokenStream.token()); } else if (tokenStream.match(Tokens.IDENT)) { token = tokenStream.token(); if (/from|to/i.test(token.value)) { return SyntaxUnit.fromToken(token); } tokenStream.unget(); } //if it gets here, there wasn't a valid token, so time to explode this._unexpectedToken(tokenStream.LT(1)); }, //----------------------------------------------------------------- // Helper methods //----------------------------------------------------------------- /** * Not part of CSS grammar, but useful for skipping over * combination of white space and HTML-style comments. * @return {void} * @method _skipCruft * @private */ _skipCruft: function() { while (this._tokenStream.match([Tokens.S, Tokens.CDO, Tokens.CDC])) { //noop } }, /** * Not part of CSS grammar, but this pattern occurs frequently * in the official CSS grammar. Split out here to eliminate * duplicate code. * @param {Boolean} checkStart Indicates if the rule should check * for the left brace at the beginning. * @param {Boolean} readMargins Indicates if the rule should check * for margin patterns. * @return {void} * @method _readDeclarations * @private */ _readDeclarations: function(checkStart, readMargins) { /* * Reads the pattern * S* '{' S* declaration [ ';' S* declaration ]* '}' S* * or * S* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S* * Note that this is how it is described in CSS3 Paged Media, but is actually incorrect. * A semicolon is only necessary following a declaration if there's another declaration * or margin afterwards. */ var tokenStream = this._tokenStream, tt; this._readWhitespace(); if (checkStart) { tokenStream.mustMatch(Tokens.LBRACE); } this._readWhitespace(); try { while (true) { if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())) { //noop } else if (this._declaration()) { if (!tokenStream.match(Tokens.SEMICOLON)) { break; } } else { break; } //if ((!this._margin() && !this._declaration()) || !tokenStream.match(Tokens.SEMICOLON)){ // break; //} this._readWhitespace(); } tokenStream.mustMatch(Tokens.RBRACE); this._readWhitespace(); } catch (ex) { if (ex instanceof SyntaxError && !this.options.strict) { //fire error event this.fire({ type: "error", error: ex, message: ex.message, line: ex.line, col: ex.col }); //see if there's another declaration tt = tokenStream.advance([Tokens.SEMICOLON, Tokens.RBRACE]); if (tt === Tokens.SEMICOLON) { //if there's a semicolon, then there might be another declaration this._readDeclarations(false, readMargins); } else if (tt !== Tokens.RBRACE) { //if there's a right brace, the rule is finished so don't do anything //otherwise, rethrow the error because it wasn't handled properly throw ex; } } else { //not a syntax error, rethrow it throw ex; } } }, /** * In some cases, you can end up with two white space tokens in a * row. Instead of making a change in every function that looks for * white space, this function is used to match as much white space * as necessary. * @method _readWhitespace * @return {String} The white space if found, empty string if not. * @private */ _readWhitespace: function() { var tokenStream = this._tokenStream, ws = ""; while (tokenStream.match(Tokens.S)) { ws += tokenStream.token().value; } return ws; }, /** * Throws an error when an unexpected token is found. * @param {Object} token The token that was found. * @method _unexpectedToken * @return {void} * @private */ _unexpectedToken: function(token) { throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); }, /** * Helper method used for parsing subparts of a style sheet. * @return {void} * @method _verifyEnd * @private */ _verifyEnd: function() { if (this._tokenStream.LA(1) !== Tokens.EOF) { this._unexpectedToken(this._tokenStream.LT(1)); } }, //----------------------------------------------------------------- // Validation methods //----------------------------------------------------------------- _validateProperty: function(property, value) { Validation.validate(property, value); }, //----------------------------------------------------------------- // Parsing methods //----------------------------------------------------------------- parse: function(input) { this._tokenStream = new TokenStream(input, Tokens); this._stylesheet(); }, parseStyleSheet: function(input) { //just passthrough return this.parse(input); }, parseMediaQuery: function(input) { this._tokenStream = new TokenStream(input, Tokens); var result = this._media_query(); //if there's anything more, then it's an invalid selector this._verifyEnd(); //otherwise return result return result; }, /** * Parses a property value (everything after the semicolon). * @return {parserlib.css.PropertyValue} The property value. * @throws parserlib.util.SyntaxError If an unexpected token is found. * @method parserPropertyValue */ parsePropertyValue: function(input) { this._tokenStream = new TokenStream(input, Tokens); this._readWhitespace(); var result = this._expr(); //okay to have a trailing white space this._readWhitespace(); //if there's anything more, then it's an invalid selector this._verifyEnd(); //otherwise return result return result; }, /** * Parses a complete CSS rule, including selectors and * properties. * @param {String} input The text to parser. * @return {Boolean} True if the parse completed successfully, false if not. * @method parseRule */ parseRule: function(input) { this._tokenStream = new TokenStream(input, Tokens); //skip any leading white space this._readWhitespace(); var result = this._ruleset(); //skip any trailing white space this._readWhitespace(); //if there's anything more, then it's an invalid selector this._verifyEnd(); //otherwise return result return result; }, /** * Parses a single CSS selector (no comma) * @param {String} input The text to parse as a CSS selector. * @return {Selector} An object representing the selector. * @throws parserlib.util.SyntaxError If an unexpected token is found. * @method parseSelector */ parseSelector: function(input) { this._tokenStream = new TokenStream(input, Tokens); //skip any leading white space this._readWhitespace(); var result = this._selector(); //skip any trailing white space this._readWhitespace(); //if there's anything more, then it's an invalid selector this._verifyEnd(); //otherwise return result return result; }, /** * Parses an HTML style attribute: a set of CSS declarations * separated by semicolons. * @param {String} input The text to parse as a style attribute * @return {void} * @method parseStyleAttribute */ parseStyleAttribute: function(input) { input += "}"; // for error recovery in _readDeclarations() this._tokenStream = new TokenStream(input, Tokens); this._readDeclarations(); } }; //copy over onto prototype for (prop in additions) { if (Object.prototype.hasOwnProperty.call(additions, prop)) { proto[prop] = additions[prop]; } } return proto; }(); /* nth : S* [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]? | ['-'|'+']? INTEGER | {O}{D}{D} | {E}{V}{E}{N} ] S* ; */ },{"../util/EventTarget":23,"../util/SyntaxError":25,"../util/SyntaxUnit":26,"./Combinator":2,"./MediaFeature":4,"./MediaQuery":5,"./PropertyName":8,"./PropertyValue":9,"./PropertyValuePart":11,"./Selector":13,"./SelectorPart":14,"./SelectorSubPart":15,"./TokenStream":17,"./Tokens":18,"./Validation":19}],7:[function(require,module,exports){ "use strict"; /* exported Properties */ var Properties = module.exports = { __proto__: null, //A "align-items" : "flex-start | flex-end | center | baseline | stretch", "align-content" : "flex-start | flex-end | center | space-between | space-around | stretch", "align-self" : "auto | flex-start | flex-end | center | baseline | stretch", "-webkit-align-items" : "flex-start | flex-end | center | baseline | stretch", "-webkit-align-content" : "flex-start | flex-end | center | space-between | space-around | stretch", "-webkit-align-self" : "auto | flex-start | flex-end | center | baseline | stretch", "alignment-adjust" : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | | ", "alignment-baseline" : "auto | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical", "animation" : 1, "animation-delay" : "