diff options
Diffstat (limited to 'browser/components/pocket/content/panels')
56 files changed, 5688 insertions, 0 deletions
diff --git a/browser/components/pocket/content/panels/css/normalize.css b/browser/components/pocket/content/panels/css/normalize.css new file mode 100644 index 0000000000..af461f1e0b --- /dev/null +++ b/browser/components/pocket/content/panels/css/normalize.css @@ -0,0 +1,425 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + box-sizing: content-box; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} + +/* Normalization for FF panel defauts + ========================================================================== */ +html { + outline: none; + padding: 0; +} + +a { + color: #0095dd; + margin: 0; + outline: none; + padding: 0; + text-decoration: none; +} + +a:hover, +a:active, +a:focus { + color: #008acb; + text-decoration: underline; +} + +a:active { + color: #006b9d; +} diff --git a/browser/components/pocket/content/panels/css/saved.css b/browser/components/pocket/content/panels/css/saved.css new file mode 100644 index 0000000000..866d9e3634 --- /dev/null +++ b/browser/components/pocket/content/panels/css/saved.css @@ -0,0 +1,1032 @@ +/* saved.css + * + * Description: + * With base elements out of the way, this sets all custom styling for the page saved dialog. + * + * Contents: + * Global + * Loading spinner + * Core detail + * Tag entry + * Recent/suggested tags + * Premium upsell + * Token input/autocomplete + * Overflow mode + * Language overrides + */ + +/*=Global +--------------------------------------------------------------------------------------- */ +.pkt_ext_containersaved { + background-color: #fbfbfb; + border-radius: 4px; + display: block; + font-size: 16px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + padding: 0; + position: relative; + text-align: center; +} +.pkt_ext_cf:after { + content: " "; + display:table; + clear:both; +} +.pkt_ext_containersaved .pkt_ext_tag_detail, +.pkt_ext_containersaved .pkt_ext_recenttag_detail, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail { + margin: 0 auto; + padding: 0.25em 1em; + position: relative; + width: auto; +} + +/*=Loading spinner +--------------------------------------------------------------------------------------- */ +@keyframes pkt_ext_spin { + to { + transform: rotate(1turn); + } +} +.pkt_ext_containersaved { + font-size: 16px; +} +.pkt_ext_containersaved .pkt_ext_loadingspinner { + position: relative; + display: inline-block; + height: 2.5em; + inset-inline-start: 50%; + margin-block: 2em 0; + margin-inline: -1.25em 0; + font-size: 10px; + text-indent: 999em; + position: absolute; + top: 4em; + overflow: hidden; + width: 2.5em; + animation: pkt_ext_spin 0.7s infinite steps(8); +} +.pkt_ext_containersaved .pkt_ext_loadingspinner:before, +.pkt_ext_containersaved .pkt_ext_loadingspinner:after, +.pkt_ext_containersaved .pkt_ext_loadingspinner > div:before, +.pkt_ext_containersaved .pkt_ext_loadingspinner > div:after { + content: ''; + position: absolute; + top: 0; + inset-inline-start: 1.125em; + width: 0.25em; + height: 0.75em; + border-radius: .2em; + background: #eee; + box-shadow: 0 1.75em #eee; + transform-origin: 50% 1.25em; +} +.pkt_ext_containersaved .pkt_ext_loadingspinner:before { + background: #555; +} +.pkt_ext_containersaved .pkt_ext_loadingspinner:after { + transform: rotate(-45deg); + background: #777; +} +.pkt_ext_containersaved .pkt_ext_loadingspinner > div:before { + transform: rotate(-90deg); + background: #999; +} +.pkt_ext_containersaved .pkt_ext_loadingspinner > div:after { + transform: rotate(-135deg); + background: #bbb; +} + +/*=Core detail +--------------------------------------------------------------------------------------- */ +.pkt_ext_containersaved .pkt_ext_initload { + inset-inline-start: 0; + position: absolute; + top: 0; + width: 100%; +} +.pkt_ext_containersaved .pkt_ext_detail { + max-height: 0; + opacity: 0; + position: relative; +} +.pkt_ext_container_detailactive .pkt_ext_initload { + opacity: 0; +} +.pkt_ext_container_detailactive .pkt_ext_initload .pkt_ext_loadingspinner, +.pkt_ext_container_finalstate .pkt_ext_initload .pkt_ext_loadingspinner { + animation: none; +} +.pkt_ext_container_detailactive .pkt_ext_detail { + max-height: 20em; + opacity: 1; +} +.pkt_ext_container_finalstate .pkt_ext_edit_msg, +.pkt_ext_container_finalstate .pkt_ext_tag_detail, +.pkt_ext_container_finalstate .pkt_ext_suggestedtag_detail, +.pkt_ext_container_finalstate .pkt_ext_item_actions { + opacity: 0; + transition: opacity 0.2s ease-out; +} +.pkt_ext_container_finalerrorstate .pkt_ext_edit_msg, +.pkt_ext_container_finalerrorstate .pkt_ext_tag_detail, +.pkt_ext_container_finalerrorstate .pkt_ext_suggestedtag_detail, +.pkt_ext_container_finalerrorstate .pkt_ext_item_actions { + display: none; + transition: none; +} +.pkt_ext_containersaved h2 { + background: transparent; + border: none; + color: #333; + display: block; + float: none; + font-size: 18px; + font-weight: normal; + letter-spacing: normal; + line-height: 1; + margin: 19px 0 4px; + padding: 0; + position: relative; + text-align: start; + text-transform: none; +} +@keyframes fade_in_out { + 0% { + opacity: 1; + } + 50% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +.pkt_ext_container_finalstate h2 { + animation: fade_in_out 0.4s ease-out; +} +.pkt_ext_container_finalerrorstate h2 { + animation: none; + color: #d74345; +} +.pkt_ext_containersaved .pkt_ext_errordetail { + display: none; + font-size: 12px; + font-weight: normal; + inset-inline-start: 6.4em; + max-width: 21em; + opacity: 0; + position: absolute; + top: 2.7em; + text-align: start; + visibility: hidden; +} +.pkt_ext_container_finalerrorstate .pkt_ext_errordetail { + display: block; + opacity: 1; + visibility: visible; +} +.pkt_ext_containersaved .pkt_ext_logo { + background: url(../img/pocketlogosolo@1x.png) center center no-repeat; + display: block; + float: inline-start; + height: 40px; + padding: 1.25em 1em; + position: relative; + width: 44px; +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_containersaved .pkt_ext_logo { + background-image: url(../img/pocketlogosolo@2x.png); + background-size: 44px 40px; + } +} +.pkt_ext_container_finalerrorstate .pkt_ext_logo { + background-image: url(../img/pocketerror@1x.png); + height: 44px; + width: 44px; +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_container_finalerrorstate .pkt_ext_logo { + background-image: url(../img/pocketerror@2x.png); + background-size: 44px 44px; + } +} +.pkt_ext_containersaved .pkt_ext_topdetail { + float: inline-start; +} +.pkt_ext_containersaved .pkt_ext_edit_msg { + box-sizing: border-box; + display: none; + font-size: 0.75em; + inset-inline-start: auto; + padding: 0 1.4em; + position: absolute; + text-align: start; + top: 8.7em; + width: 100%; +} +.pkt_ext_containersaved .pkt_ext_edit_msg_error { + color: #d74345; +} +.pkt_ext_containersaved .pkt_ext_edit_msg_active { + display: block; +} +.pkt_ext_containersaved .pkt_ext_item_actions { + background: transparent; + float: none; + height: auto; + margin-bottom: 1em; + margin-top: 0; + width: auto; +} +.pkt_ext_containersaved .pkt_ext_item_actions_disabled { + opacity: 0.5; +} +.pkt_ext_container_finalstate .pkt_ext_item_actions_disabled { + opacity: 0; +} +.pkt_ext_containersaved .pkt_ext_item_actions ul { + background: none; + display: block; + float: none; + font-size: 16px; + height: auto; + margin: 0; + padding: 0; + width: 100%; +} +.pkt_ext_containersaved .pkt_ext_item_actions li { + box-sizing: border-box; + background: none; + border: 0; + float: inline-start; + list-style: none; + line-height: 0.8; + height: auto; + padding-inline-end: 0.4em; + width: auto; +} +.pkt_ext_containersaved .pkt_ext_item_actions li:before { + content: none; +} +.pkt_ext_containersaved .pkt_ext_item_actions .pkt_ext_actions_separator { + border-inline-start: 2px solid #777; + height: 0.75em; + margin-top: 0.3em; + padding: 0; + width: 10px; +} +.pkt_ext_containersaved .pkt_ext_item_actions a { + background: transparent; + color: #0095dd; + display: block; + font-feature-settings: normal; + font-size: 12px; + font-weight: normal; + letter-spacing: normal; + line-height: inherit; + height: auto; + margin: 0; + padding: 0.5em; + float: inline-start; + text-align: start; + text-decoration: none; + text-transform: none; +} +.pkt_ext_containersaved .pkt_ext_item_actions a:hover, +.pkt_ext_containersaved .pkt_ext_item_actions a:focus { + color: #008acb; + text-decoration: underline; +} +.pkt_ext_containersaved .pkt_ext_item_actions a:before, +.pkt_ext_containersaved .pkt_ext_item_actions a:after { + background: transparent; + display: none; +} +.pkt_ext_containersaved .pkt_ext_item_actions_disabled a { + cursor: default; +} +.pkt_ext_containersaved .pkt_ext_item_actions .pkt_ext_openpocket { + float: inline-end; + padding-inline-end: 0.7em; + text-align: end; +} +.pkt_ext_containersaved .pkt_ext_item_actions .pkt_ext_removeitem { + padding-inline-start: 0; +} +.pkt_ext_containersaved .pkt_ext_close { + background: url(../img/tag_close@1x.png) center center no-repeat; + color: #333; + display: block; + font-size: 0.8em; + height: 10px; + inset-inline-end: 0.5em; + overflow: hidden; + position: absolute; + text-align: center; + text-indent: -9999px; + top: -1em; + width: 10px; +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_containersaved .pkt_ext_close { + background-image: url(../img/tag_close@2x.png); + background-size: 8px 8px; + } +} +.pkt_ext_containersaved .pkt_ext_close:hover { + color: #000; + text-decoration: none; +} + +/*=Tag entry +--------------------------------------------------------------------------------------- */ +.pkt_ext_containersaved .pkt_ext_tag_detail { + border: 1px solid #c1c1c1; + border-radius: 2px; + font-size: 16px; + clear: both; + margin: 1.25em 1em; + padding: 0; + display: flex; +} +.pkt_ext_containersaved .pkt_ext_tag_error { + border: none; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper { + box-sizing: border-box; + flex: 1; + background-color: #fff; + border-inline-end: 1px solid #c3c3c3; + color: #333; + display: block; + float: none; + font-size: 0.875em; + list-style: none; + margin: 0; + overflow: hidden; + padding: 0.25em 0.5em; + width: 14em; + padding-inline: 0.5em; +} +.pkt_ext_containersaved .pkt_ext_tag_error .pkt_ext_tag_input_wrapper { + border: 1px solid #d74345; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper .token-input-list { + display: block; + height: 1.7em; + overflow: hidden; + position: relative; + width: 60em; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper .token-input-list, +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper li { + font-size: 14px; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper li { + height: auto; + width: auto; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper li:before { + content: none; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper input { + border: 0; + box-shadow: none; + background-color: #fff; + color: #333; + font-size: 14px; + float: inline-start; + line-height: normal; + height: auto; + min-height: 0; + min-width: 5em; + padding: 3px 2px 1px; + text-transform: none; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper input::placeholder { + color: #a9a9a9; + letter-spacing: normal; + text-transform: none; +} +.pkt_ext_containersaved .input_disabled { + cursor: default; + opacity: 0.5; +} +.pkt_ext_containersaved .pkt_ext_btn { + box-sizing: border-box; + color: #333; + float: none; + font-size: 0.875em; + font-size: 14px; + letter-spacing: normal; + height: 2.2em; + min-width: 4em; + padding: 0.5em 0; + text-decoration: none; + text-transform: none; + width: auto; +} +.pkt_ext_containersaved .pkt_ext_btn:hover { + background-color: #ebebeb; +} +.pkt_ext_containersaved .pkt_ext_btn:active { + background-color: #dadada; +} +.pkt_ext_containersaved .pkt_ext_btn_disabled, +.pkt_ext_containersaved .pkt_ext_btn_disabled:hover, +.pkt_ext_containersaved .pkt_ext_btn_disabled:active { + background-color: transparent; + cursor: default; + opacity: 0.4; +} +.pkt_ext_containersaved .pkt_ext_tag_error .pkt_ext_btn { + border: 1px solid #c3c3c3; + border-block-width: 1px; + border-inline-width: 0 1px; + height: 2.35em; +} +.pkt_ext_containersaved .autocomplete-suggestions { + margin-top: 2.2em; +} + +/*=Recent/suggested tags +--------------------------------------------------------------------------------------- */ +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detailshown { + box-sizing: border-box; + clear: both; + inset-inline-start: 0; + opacity: 0; + min-height: 110px; + visibility: hidden; + width: 100%; +} +.pkt_ext_container_detailactive .pkt_ext_suggestedtag_detail, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detailshown { + opacity: 1; + visibility: visible; +} +.pkt_ext_containersaved .pkt_ext_suggestedtag_detailshown { + padding: 4px 0; +} +.pkt_ext_container_finalstate .pkt_ext_suggestedtag_detail { + opacity: 0; + visibility: hidden; +} + +.pkt_ext_containersaved .pkt_ext_recenttag_detail h4, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail h4 { + color: #333; + font-size: 13px; + font-weight: normal; + font-style: normal; + letter-spacing: normal; + margin: 0.5em 0; + text-align: start; + text-transform: none; +} +.pkt_ext_containersaved .pkt_ext_recenttag_detail .pkt_ext_loadingspinner, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail .pkt_ext_loadingspinner { + display: none; + position: absolute; +} +.pkt_ext_containersaved .pkt_ext_recenttag_detail_loading .pkt_ext_loadingspinner, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail_loading .pkt_ext_loadingspinner { + display: block; + font-size: 6px; + inset-inline-start: 48%; +} +.pkt_ext_containersaved .pkt_ext_recenttag_detail ul, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail ul { + display: block; + margin: 0; + height: 2em; + overflow: hidden; + padding: 2px 0 0; +} +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail ul { + height: auto; + margin: 0; + max-height: 4em; + padding-top: 6px; +} +.pkt_ext_containersaved .pkt_ext_recenttag_detail li, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail li { + background: none; + float: inline-start; + height: inherit; + line-height: 1.5; + list-style: none; + margin-bottom: 0.5em; + width: inherit; +} +.pkt_ext_containersaved .pkt_ext_recenttag_detail li:before, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail li:before { + content: none; +} +.pkt_ext_containersaved .pkt_ext_recenttag_detail .recenttag_msg, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail .suggestedtag_msg { + color: #333; + font-size: 0.8125em; + line-height: 1.2; + inset-inline-start: auto; + position: absolute; + text-align: start; + top: 2em; +} +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail .suggestedtag_msg { + margin-inline-end: 1.3em; +} +.pkt_ext_containersaved .token_tag { + border-radius: 4px; + background: #f7f7f7; + border: 1px solid #c3c3c3; + color: #333; + font-size: 0.875em; + font-size: 14px; + font-weight: normal; + letter-spacing: normal; + margin-inline-end: 0.5em; + padding: 0.125em 0.625em; + text-decoration: none; + text-transform: none; +} +.pkt_ext_containersaved .token_tag:hover { + background-color: #008acb; + border-color: #008acb; + color: #fff; + text-decoration: none; +} +.pkt_ext_containersaved .token_tag:before, +.pkt_ext_containersaved .token_tag:after { + content: none; +} +.pkt_ext_containersaved .token_tag:hover span { + background-image: url(../img/tag_closeactive@1x.png); +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_containersaved .token_tag:hover span { + background-image: url(../img/tag_closeactive@2x.png); + background-size: 8px 8px; + } +} +.pkt_ext_containersaved .pkt_ext_recenttag_detail_disabled .token_tag, +.pkt_ext_containersaved .pkt_ext_recenttag_detail_disabled .token_tag:hover, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail_disabled .token_tag, +.pkt_ext_containersaved .pkt_ext_suggestedtag_detail_disabled .token_tag:hover { + background-color: #f7f7f7; + cursor: default; + opacity: 0.5; +} +.pkt_ext_containersaved .token_tag_inactive { + display: none; +} + +/*=Premium upsell +--------------------------------------------------------------------------------------- */ +.pkt_ext_detail .pkt_ext_premupsell { + background-color: #50bbb6; + display: block; + padding: 1.5em 0; + text-align: center; +} +.pkt_ext_premupsell h4 { + color: #fff; + font-size: 1em; + margin-bottom: 1em; +} +.pkt_ext_premupsell a { + color: #28605d; + border-bottom: 1px solid #47a7a3; + font-weight: normal; +} +.pkt_ext_premupsell a:hover { + color: #14302f; +} + +/*=Token input/autocomplete +--------------------------------------------------------------------------------------- */ +.token-input-dropdown-tag { + border-radius: 4px; + box-sizing: border-box; + background: #fff; + border: 1px solid #cdcdcd; + margin-top: 0.5em; + inset-inline-start: 0 !important; + overflow-y: auto; + top: 1.9em !important; + z-index: 9000; +} +.token-input-dropdown-tag ul { + height: inherit; + max-height: 115px; + margin: 0; + overflow: auto; + padding: 0.5em 0; +} +.token-input-dropdown-tag ul li { + background: none; + color: #333; + font-weight: normal; + font-size: 1em; + float: none; + height: inherit; + letter-spacing: normal; + list-style: none; + padding: 0.75em; + text-align: start; + text-transform: none; + width: inherit; +} +.token-input-dropdown-tag ul li:before { + content: none; +} +.token-input-dropdown ul li.token-input-selected-dropdown-item { + background-color: #008acb; + color: #fff; +} +.token-input-list { + list-style: none; + margin: 0; + padding: 0; +} +.token-input-list li { + text-align: start; + list-style: none; +} +.token-input-list li input { + border: 0; + background-color: white; +} +.pkt_ext_containersaved .token-input-token { + background: none; + border-radius: 4px; + border: 1px solid #c3c3c3; + overflow: hidden; + margin: 0; + padding: 0 8px; + background-color: #f7f7f7; + color: #000; + font-weight: normal; + cursor: default; + line-height: 1.5; + display: block; + width: auto; + margin: 0 0.2em; + float: inline-start; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper_disabled { + position: relative; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper_disabled input { + opacity: 0.5; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper_disabled .token-input-list { + opacity: 0.5; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper_disabled .pkt_ext_tag_input_blocker { + height: 100%; + inset-inline-start: 0; + position: absolute; + top: 0; + width: 100%; + z-index: 5; +} +.pkt_ext_containersaved .token-input-token p { + display: inline-block; + font-size: 14px; + font-weight: normal; + line-height: inherit; + letter-spacing: normal; + padding: 0; + margin: 0; + text-transform: none; + vertical-align: top; + width: auto; + unicode-bidi: plaintext; +} +.pkt_ext_containersaved .token-input-token p:before { + content: none; + width: 0; +} +.pkt_ext_containersaved .token-input-token span { + background: url(../img/tag_close@1x.png) center center no-repeat; + cursor: pointer; + display: inline-block; + height: 8px; + margin-block: 0; + margin-inline: 8px 0; + overflow: hidden; + width: 8px; + text-indent: -99px; +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_containersaved .token-input-token span { + background-image: url(../img/tag_close@2x.png); + background-size: 8px 8px; + } +} +.pkt_ext_containersaved .token-input-selected-token { + background-color: #008acb; + border-color: #008acb; + color: #fff; +} +.pkt_ext_containersaved .token-input-selected-token span { + background-image: url(../img/tag_closeactive@1x.png); +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_containersaved .token-input-selected-token span { + background-image: url(../img/tag_closeactive@2x.png); + background-size: 8px 8px; + } +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper_disabled .token-input-selected-token { + background-color: #f7f7f7; +} +.pkt_ext_containersaved .pkt_ext_tag_input_wrapper_disabled .token-input-selected-token span { + color: #bbb; +} + +/*=Overflow mode +--------------------------------------------------------------------------------------- */ +.pkt_ext_saved_overflow .pkt_ext_logo { + float: none; + margin: 0.5em auto 0; +} +.pkt_ext_saved_overflow .pkt_ext_initload { + top: -8px; +} +.pkt_ext_saved_overflow .pkt_ext_loadingspinner { + top: 10em; +} +.pkt_ext_saved_overflow .pkt_ext_topdetail { + float: none; + margin: 0 auto; + padding: 0 1em; +} +.pkt_ext_saved_overflow h2 { + margin-bottom: 0.5em; + margin-top: 0; + text-align: center; +} +.pkt_ext_saved_overflow .pkt_ext_item_actions ul { + display: inline-block; + width: auto; +} +.pkt_ext_saved_overflow .pkt_ext_item_actions li { + float: none; + padding-inline: 1em; + text-align: center; +} +.pkt_ext_saved_overflow .pkt_ext_item_actions .pkt_ext_removeitem, +.pkt_ext_saved_overflow .pkt_ext_item_actions .pkt_ext_openpocket { + float: none; + text-align: center; + padding-inline: 0; +} +.pkt_ext_saved_overflow .pkt_ext_item_actions .pkt_ext_actions_separator { + display: none; +} +.pkt_ext_saved_overflow .pkt_ext_tag_detail { + margin-top: 0; +} +.pkt_ext_saved_overflow .pkt_ext_suggestedtag_detail, +.pkt_ext_saved_overflow .pkt_ext_suggestedtag_detailshown { + top: 14.75em; +} +.pkt_ext_saved_overflow .pkt_ext_edit_msg { + top: 16em; +} +.pkt_ext_container_finalerrorstate.pkt_ext_saved_overflow .pkt_ext_errordetail { + box-sizing: border-box; + inset-inline-start: 0; + padding-inline: 1em; + text-align: center; + top: 8.3em; + width: 100%; +} + +/*=Language overrides +--------------------------------------------------------------------------------------- */ +.pkt_ext_saved_es .pkt_ext_btn { + min-width: 5em; +} +.pkt_ext_saved_de .pkt_ext_btn, +.pkt_ext_saved_ru .pkt_ext_btn { + min-width: 6em; +} + +/*=Coral Button +--------------------------------------------------------------------------------------- */ +button { + padding: 0; + margin: 0; + background: none; + border: 0; + outline: none; + color: inherit; + font: inherit; + overflow: visible; +} + +.pkt_ext_button { + padding: 3px; + background-color: #EF4056; + color: #FFF; + text-align: center; + cursor: pointer; + height: 32px; + box-sizing: border-box; + width: 320px; + margin: 0 auto; + border-radius: 2px; + font-size: 14px; +} + +.pkt_ext_button:hover, +.pkt_ext_button:active { + background-color: #d5374b; +} + +/* alt button */ +.pkt_ext_blue_button { + background-color: #0060df; + color: #FFF; +} + +.pkt_ext_blue_button:hover { + background-color: #003eaa; +} + +.pkt_ext_blue_button:active { + background-color: #002275; +} + +.pkt_ext_ffx_icon:after { + position: absolute; + height: 22px; + width: 22px; + top: -3px; + inset-inline-start: -28px; + content: ""; + background-image: url(../img/signup_firefoxlogo@2x.png); + background-size: 22px 22px; + background-repeat: no-repeat; +} + + +/*=Tmp Account Login +--------------------------------------------------------------------------------------- */ +.pkt_shaded_background { + background-color: #EBEBEB; + border-top: 1px solid #C3C3C3; + padding: 0 15px; +} + +.pkt_ext_saved_tmplogin { + height: 146px; +} + +.pkt_ext_indent_bordered { + margin: 15px 0; + padding: 0 7px; + border-inline-start: 4px solid rgba(68, 68, 68, .15); + text-align: start; + font-size: 13px; + color: #313131; +} + +.pkt_ext_indent_bordered > p { + margin-bottom: 3px; +} + +.pkt_ext_subshell { + display: none; + border-top: 1px solid #c1c1c1; + position: fixed; + background: #ebebeb; + bottom: 0; + width: 100%; +} + +.pkt_ext_subshell hr { + display: none; +} + +.recs_enabled .pkt_ext_subshell hr { + display: block; + border: 0; + border-top: 1px solid #D7D7DB; + margin: 0 -16px 0; +} + +.pkt_ext_item_recs { + text-align: start; + margin: 0 auto; + padding: 0.25em 1em; +} + +.pkt_ext_item_recs header { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 12px; +} + +.pkt_ext_item_recs header h4 { + color: #333; + font-size: 13px; + font-weight: normal; + font-style: normal; + letter-spacing: normal; + margin: 0.5em 0; + text-align: start; + text-transform: none; +} + +.pkt_ext_item_recs header a { + font-style: normal; + font-weight: 500; + font-size: 12px; + line-height: 20px; + color: #0095DD; +} + +.pkt_ext_containersaved .pkt_ext_item_recs ol { + padding: 0; + margin: 0 0 10px; + list-style: none; +} + +.pkt_ext_containersaved .pkt_ext_item_recs li { + float: none; + display: flex; + font-style: normal; + font-weight: normal; + font-size: 15px; + line-height: 18px; + margin: 0 -1em; +} + +.pkt_ext_containersaved .pkt_ext_item_recs li a { + padding-block: 8px; + padding-inline: 1em 40px; + background: url(../img/open.svg) 318px 8px no-repeat; + flex-grow: 1; +} + +.pkt_ext_containersaved .pkt_ext_item_recs li a:dir(rtl) { + background-position-x: right 318px; +} + +.pkt_ext_containersaved .pkt_ext_item_recs li:hover, +.pkt_ext_containersaved .pkt_ext_item_recs li a:focus { + background-color: rgba(12, 12, 13, 0.1); +} + +.pkt_ext_containersaved .pkt_ext_item_recs li:active { + background-color: rgba(12, 12, 13, 0.2); +} + +.pkt_ext_containersaved .pkt_ext_item_recs .pkt_ext_item_recs_link:hover { + text-decoration: none; +} + +.pkt_ext_containersaved .pkt_ext_item_recs .rec-thumb { + width: 40px; + height: 40px; + float: inline-start; + margin: 0; + margin-inline-end: 12px; + border-radius: 2px; +} + +.pkt_ext_containersaved .pkt_ext_item_recs .rec-thumb:-moz-broken { + display: none; +} + +.pkt_ext_containersaved .pkt_ext_item_recs p { + -webkit-box-orient: vertical; + display: -webkit-box; + overflow: hidden; + word-break: break-word; + font-style: normal; + font-weight: normal; + margin: 0; +} + +.pkt_ext_containersaved .pkt_ext_item_recs .rec-title { + -webkit-line-clamp: 2; + font-size: 15px; + line-height: 18px; + color: #0C0C0D; +} + +.pkt_ext_containersaved .pkt_ext_item_recs .rec-source { + -webkit-line-clamp: 1; + font-size: 13px; + line-height: 16px; + color: #737373; +} diff --git a/browser/components/pocket/content/panels/css/sendtomobile.css b/browser/components/pocket/content/panels/css/sendtomobile.css new file mode 100644 index 0000000000..9550f0c3b0 --- /dev/null +++ b/browser/components/pocket/content/panels/css/sendtomobile.css @@ -0,0 +1,199 @@ +.pkt_ext_saved_sendtomobile .pkt_ext_loadingspinner { + top: -5px; +} + +.pkt_ext_save_title_wrapper { + position: relative; + display: inline-flex; +} + +.pkt_ext_save_title_wrapper.pkt_ext_mobile_icon:after { + position: absolute; + height: 15px; + width: 10px; + top: 0; + inset-inline-start: -16px; + content: url('data:image/svg+xml;utf8,<svg viewBox="0 0 10 15" xmlns="http://www.w3.org/2000/svg"><g stroke="none" stroke-width="1" fill="white" fill-rule="evenodd"><path d="M0.81,0.407552083 L9.19,0.407552083 C9.63735065,0.407552083 10,0.770201436 10,1.21755208 L10,14.0233333 C10,14.470684 9.63735065,14.8333333 9.19,14.8333333 L0.81,14.8333333 C0.362649353,14.8333333 6.09896166e-16,14.470684 5.55111512e-16,14.0233333 L2.22044605e-16,1.21755208 C1.67259951e-16,0.770201436 0.362649353,0.407552083 0.81,0.407552083 Z M1,1.31865406 L1,12.074719 L9,12.074719 L9,1.31865406 L1,1.31865406 Z M3.68055556,13.1666667 C3.48879002,13.1666667 3.33333333,13.3221234 3.33333333,13.5138889 C3.33333333,13.7056544 3.48879002,13.8611111 3.68055556,13.8611111 L6.31944444,13.8611111 C6.51120998,13.8611111 6.66666667,13.7056544 6.66666667,13.5138889 C6.66666667,13.3221234 6.51120998,13.1666667 6.31944444,13.1666667 L3.68055556,13.1666667 Z"></path></g></svg>'); +} + +.pkt_ext_logo_action_copy { + display: inline-block; + font-size: 13px; +} + +.pkt_ext_checkbox_label { + font-size: 11px; + color: #999; + cursor: pointer; +} + +#pkt_ext_signup_button { + width: 70px; +} + +.pkt_ext_heading { + font-size: 17px; + font-weight: 400; + color: #222; + width: 250px; + margin: 35px auto 10px; +} + +.pkt_ext_saved_sendcollectemail .pkt_ext_tag_detail { + margin: 0 auto; +} + +.pkt_ext_saved_sendcollectemail .pkt_ext_tag_detail, +.pkt_ext_saved_sendcollectemail .pkt_ext_tag_input_wrapper { + width: 255px; +} + +.pkt_ext_checkbox_wrapper { + text-align: start; + margin: 0 auto 15px; + width: 255px; +} + +.pkt_ext_description { + font-size: 14px; + color: #666; + font-weight: 400; + width: 280px; + margin: 0 auto; + line-height: 20px; +} + +.pkt_ext_bold { + font-weight: bold; +} + +.pkt_ext_download_section { + margin-top: 28px; +} + +.pkt_ext_download_button_wrapper { + margin-top: 5px; +} + +.pkt_ext_apple_download { + display: inline-block; + cursor: pointer; + height: 40px; + margin: 10px; + width: 120px; + background: url(../img/app_store_dowload_apple.svg) bottom right no-repeat; +} + +.pkt_ext_apple_download:dir(rtl) { + background-position-x: left; +} + +.pkt_ext_google_download { + display: inline-block; + height: 60px; + width: 155px; + cursor: pointer; +} + +.pkt_ext_experiment_saved_tile { + position: relative; + margin: 0 auto 17px; + height: 95px; + background-color: #FFF; + box-shadow: 0 1px 1px rgba(147,147,147,0.5); +} + +.pkt_ext_experiment_saved_tile .pkt_ext_save_title { + width: 295px; +} + +.pkt_ext_experiment_saved_tile .pkt_ext_save_open { + max-height: 50px; + overflow: hidden; +} + +.pkt_ext_experiment_saved_tile.pkt_ext_has_image .pkt_ext_save_title { + margin-inline-start: 78px; + width: 210px; +} + +.pkt_ext_experiment_saved_tile .pkt_ext_save_image { + inset-inline-start: 0; +} + +.pkt_ext_experiment_saved_tile { + transform-style: preserve-3d; +} + +.pkt_ext_save_image { + position: absolute; + top: 0; + inset-inline-end: 0; + box-sizing: border-box; + height: 100%; + width: 78px; + background-color: #979797; + border: none; +} + +.pkt_ext_save_title { + position: relative; + top: 50%; + padding: 10px 15px; + transform: perspective(1px) translateY(-50%); + font-size: 14px; + font-weight: 400; + line-height: 16px; + text-align: start; + overflow: hidden; + color: #222; +} + +.pkt_ext_save_title a { + display: block; + text-overflow: ellipsis; + overflow: hidden; +} + +.pkt_ext_save_title a:link , +.pkt_ext_save_title a:visited , +.pkt_ext_save_title a:active, +.pkt_ext_save_title a:hover { + color: #222 !important; +} + +a.pkt_ext_save_open, +a.pkt_ext_save_open:hover { + color: #000; +} + +.pkt_ext_save_source { + margin-top: 7px; + padding-inline-start: 0; + color: #999; + font-size: 12px; + font-weight: 400; + line-height: 1.1em; + letter-spacing: 0.03em; +} + +.pkt_ext_ho2_experiment .pkt_ext_suggestedtag_detail, +.pkt_ext_ho2_experiment .pkt_ext_suggestedtag_detailshown { + position: relative; + background-color: #fbfbfb; + border-top: none; +} + +/* Placeholder */ +.pkt_ext_experiment_saved_tile .pkt_ext_save_image.pkt_ext_save_image_placeholder, +.pkt_ext_experiment_saved_tile.pkt_ext_has_image .pkt_ext_save_title.pkt_ext_title_image_placeholder .pkt_ext_save_open, +.pkt_ext_experiment_saved_tile.pkt_ext_has_image .pkt_ext_save_title.pkt_ext_title_image_placeholder .pkt_ext_save_source { + background: linear-gradient(to right, #EEE 0%, #DDD 50%, #EEE 100%); + background-size: 400% 400%; + animation: backgroundScroll 3s linear infinite; +} + +@keyframes backgroundScroll { + 0% { background-position: -200% 0 } + 100%{ background-position: 200% 0 } +} diff --git a/browser/components/pocket/content/panels/css/signup.css b/browser/components/pocket/content/panels/css/signup.css new file mode 100644 index 0000000000..e4719aa909 --- /dev/null +++ b/browser/components/pocket/content/panels/css/signup.css @@ -0,0 +1,547 @@ +/* signup.css + * + * Description: + * With base elements out of the way, this sets all custom styling for the extension. + * + * Contents: + * Global + * Core detail + * Core detail - storyboard + * Buttons + * Overflow mode + * Language overrides + */ + +/*=Global +--------------------------------------------------------------------------------------- */ +.pkt_ext_containersignup { + background-color: #ebebeb; + color: #333; + display: block; + font-size: 16px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + margin: 0; + padding: 0; + position: relative; + text-align: center; +} +.pkt_ext_containersignup_inactive { + animation: pkt_ext_hide 0.3s ease-out; + opacity: 0; + visibility: hidden; +} +.pkt_ext_cf:after { + content: " "; + display: table; + clear: both; +} +@keyframes pkt_ext_hide { + 0% { + opacity: 1; + visibility: visible; + } + 99% { + opacity: 0; + visibility: visible; + } + 100% { + opacity: 0; + visibility: hidden; + } +} + +/*=Core detail +--------------------------------------------------------------------------------------- */ +.pkt_ext_containersignup p { + font-size: 14px; + color: #333; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + line-height: 1.3; + margin: 0 auto 1.5em; + max-width: 260px; +} +.pkt_ext_containersignup a { + color: #4c8fd0; +} +.pkt_ext_containersignup a:hover { + color: #3076b9; +} +.pkt_ext_containersignup .pkt_ext_introdetail { + background-color: #fbfbfb; + border: 1px solid #c1c1c1; + border-width: 0 0 1px; +} +.pkt_ext_containersignup .pkt_ext_logo { + background: url(../img/pocketlogo@1x.png) center bottom no-repeat; + display: block; + height: 32px; + margin: 0 auto 15px; + padding-top: 25px; + position: relative; + text-indent: -9999px; + width: 123px; +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_containersignup .pkt_ext_logo { + background-image: url(../img/pocketlogo@2x.png); + background-size: 123px 32px; + } +} +.pkt_ext_containersignup .pkt_ext_introimg { + background: url(../img/pocketsignup_hero@1x.png) center center no-repeat; + display: block; + height: 125px; + margin: 0 auto; + position: relative; + text-indent: -9999px; + width: 255px; +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_containersignup .pkt_ext_introimg { + background-image: url(../img/pocketsignup_hero@2x.png); + background-size: 255px 125px; + } +} +.pkt_ext_containersignup .pkt_ext_tagline { + margin-bottom: 0.5em; +} +.pkt_ext_containersignup .pkt_ext_learnmore { + font-size: 12px; +} +.pkt_ext_containersignup .pkt_ext_learnmoreinactive { + visibility: hidden; +} +.pkt_ext_signupdetail h4 { + font-size: 12px; + font-weight: normal; +} +.pkt_ext_signupdetail .btn-container { + position: relative; + margin-bottom: 0.8em; +} +.pkt_ext_containersignup .ff_signuphelp { + background: url(../img/signup_help@1x.png) center center no-repeat; + display: block; + height: 18px; + margin-top: -9px; + inset-inline-end: -15px; + position: absolute; + text-indent: -9999px; + width: 18px; + top: 50%; +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_containersignup .ff_signuphelp { + background-image: url(../img/signup_help@2x.png); + background-size: 18px 18px; + } +} +.pkt_ext_containersignup .alreadyhave { + font-size: 12px; + max-width: 320px; + margin-top: 15px; +} +.pkt_ext_containersignup .tryitnowspace { + margin-top: 22px; +} +.pkt_ext_signupdetail p.pkt_ext_tos { + color: #777; + font-size: 10px; + line-height: 1.5; + margin-top: 17px; + padding-top: 0; + max-width: 190px; +} + +/*=Core detail - storyboard +--------------------------------------------------------------------------------------- */ +.pkt_ext_introstory { + align-items: center; + display: flex; + padding: 20px; +} +.pkt_ext_introstory:after { + clear: both; + content: ""; + display: table; +} +.pkt_ext_introstory p { + margin-bottom: 0; + text-align: start; +} +.pkt_ext_introstoryone { + padding-block: 20px 15px; + padding-inline: 20px 18px; +} +.pkt_ext_introstorytwo { + padding-block: 3px 0; + padding-inline: 20px 0; +} +.pkt_ext_introstorytwo .pkt_ext_tagline { + margin-bottom: 1.5em; +} +.pkt_ext_introstory_text { + flex: 1; +} +.pkt_ext_introstoryone_img, +.pkt_ext_introstorytwo_img { + display: block; + overflow: hidden; + position: relative; + text-indent: -999px; +} +.pkt_ext_introstoryone_img { + background: url(../img/pocketsignup_button@1x.png) center right no-repeat; + height: 82px; + padding-block: 0; + padding-inline: 0.7em 0; + width: 82px; +} +.pkt_ext_introstoryone_img:dir(rtl) { + background-position-x: left; +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_introstoryone_img { + background-image: url(../img/pocketsignup_button@2x.png); + background-size: 82px 82px; + } +} +.pkt_ext_introstorytwo_img { + background: url(../img/pocketsignup_devices@1x.png) bottom right no-repeat; + height: 110px; + padding-block: 1em 0; + padding-inline: 0.7em 0; + width: 124px; +} +.pkt_ext_introstorytwo_img:dir(rtl) { + background-position-x: left; +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_introstorytwo_img { + background-image: url(../img/pocketsignup_devices@2x.png); + background-size: 124px 110px; + } +} +.pkt_ext_introstorydivider { + border-top: 1px solid #c1c1c1; + height: 1px; + margin: 0 auto; + width: 125px; +} + +/*=Buttons +--------------------------------------------------------------------------------------- */ +.pkt_ext_containersignup .btn { + background-color: #0096dd; + border: 1px solid #0095dd; + border-radius: 2px; + color: #fff; + display: inline-block; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 16px; + font-weight: normal; + line-height: 1; + margin: 0; + padding: 11px 45px; + text-align: center; + text-decoration: none; + text-shadow: 0 -1px 0 rgba(142,4,17,0.5); + transition: background-color 0.1s linear; + width: auto; +} +.pkt_ext_containersignup .btn-secondary { + background-color: #fbfbfb; + border-color: #c1c1c1; + color: #444; + text-shadow: 0 1px 0 rgba(255,255,255,0.5); +} +.pkt_ext_containersignup .btn-small { + padding: 6px 20px; +} +.pkt_ext_containersignup .btn-mini { + font-size: 14px; + padding: 5px 15px 4px; +} +.pkt_ext_containersignup .btn:hover { + background-color: #008acb; + color: #fff; + text-decoration: none; +} +.pkt_ext_containersignup .btn-secondary:hover, +.pkt_ext_containersignup .btn-important:hover { + background-color: #f6f6f6; + color: #222; +} +.pkt_ext_containersignup .btn-disabled { + background-image: none; + color: #ccc; + color: rgba(255,255,255,0.6); + cursor: default; + opacity: 0.9; +} +.pkt_ext_containersignup .signup-btn-firefox, +.pkt_ext_containersignup .signup-btn-tryitnow, +.pkt_ext_containersignup .signup-btn-email, +.pkt_ext_containersignup .signupinterim-btn-login, +.pkt_ext_containersignup .signupinterim-btn-signup, +.pkt_ext_containersignup .forgot-btn-submit, +.pkt_ext_containersignup .forgotreset-btn-change { + min-width: 12.125em; + padding: 0.8em 1.1875em; + box-sizing: content-box; +} +.pkt_ext_containersignup .signup-btn-email { + position: relative; + z-index: 10; +} +.pkt_ext_containersignup .signup-btn-tryitnow, +.pkt_ext_containersignup .signup-btn-firefox { + min-width: 14.5em; + position: relative; + padding: 0; +} +.pkt_ext_containersignup .signup-btn-tryitnow{ + margin-top: 25px; +} +.pkt_ext_containersignup .signup-btn-firefox .logo { + background: url(../img/signup_firefoxlogo@1x.png) center center no-repeat; + height: 2.6em; + inset-inline-start: 10px; + margin: 0; + padding: 0; + width: 22px; + position: absolute; +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_containersignup .signup-btn-firefox .logo { + background-image: url(../img/signup_firefoxlogo@2x.png); + background-size: 22px 22px; + } +} +.pkt_ext_containersignup .forgotreset-btn-change { + margin-bottom: 2em; +} +.pkt_ext_containersignup .signup-btn-tryitnow .text, +.pkt_ext_containersignup .signup-btn-firefox .text { + display: inline-block; + padding: 0.8em 1.625em; + position: relative; + text-shadow: none; + white-space: nowrap; +} +.pkt_ext_containersignup .signup-btn-tryitnow .text, +.pkt_ext_containersignup .signup-btn-firefox .text { + color: #fff; +} +.pkt_ext_containersignup .btn-disabled .text { + color: #ccc; + color: rgba(255,255,255,0.6); +} + +/*=Overflow mode +--------------------------------------------------------------------------------------- */ +.pkt_ext_signup_overflow .pkt_ext_tagline { + margin-bottom: 1em; + padding: 0 1em; +} +.pkt_ext_signup_overflow .pkt_ext_introimg { + background-size: 200px 98px; + height: 98px; + width: 200px; +} +.pkt_ext_signup_overflow .signup-btn-firefox, +.pkt_ext_containersignup .signup-btn-tryitnow, +.pkt_ext_signup_overflow .signup-btn-email { + font-size: 14px; + min-width: 12.6em; + padding-inline: 0.75em; +} +.pkt_ext_signup_overflow .signup-btn-tryitnow .text, +.pkt_ext_signup_overflow .signup-btn-firefox .text { + padding-inline: 0; +} + +/*=Language overrides +--------------------------------------------------------------------------------------- */ +.pkt_ext_signup_de .pkt_ext_introstoryone_img { + margin-inline-end: -5px; + padding-inline-start: 0; +} +.pkt_ext_signup_de .pkt_ext_introstorytwo .pkt_ext_tagline, +.pkt_ext_signup_es .pkt_ext_introstorytwo .pkt_ext_tagline, +.pkt_ext_signup_ja .pkt_ext_introstorytwo .pkt_ext_tagline, +.pkt_ext_signup_ru .pkt_ext_introstorytwo .pkt_ext_tagline { + margin-bottom: 0.5em; +} +.pkt_ext_signup_de .signup-btn-firefox .text, +.pkt_ext_signup_de .signup-btn-tryitnow .text, +.pkt_ext_signup_de .signup-btn-email, +.pkt_ext_signup_es .pkt_ext_signupdetail_hero .signup-btn-firefox .text, +.pkt_ext_signup_es .pkt_ext_signupdetail_hero .signup-btn-email, +.pkt_ext_signup_ja .signup-btn-firefox .text, +.pkt_ext_signup_ja .signup-btn-tryitnow .text, +.pkt_ext_signup_ja .signup-btn-email, +.pkt_ext_signup_ru .signup-btn-firefox .text, +.pkt_ext_signup_ru .signup-btn-tryitnow .text, +.pkt_ext_signup_ru .signup-btn-email { + font-size: 15px; +} +.pkt_ext_signup_ja .signup-btn-firefox .text, +.pkt_ext_signup_ja .signup-btn-tryitnow .text, +.pkt_ext_signup_ru .signup-btn-firefox .text, +.pkt_ext_signup_ru .signup-btn-tryitnow .text { + inset-inline-start: 15px; +} +.pkt_ext_signup_de .signup-btn-firefox .logo, +.pkt_ext_signup_es .pkt_ext_signupdetail_hero .signup-btn-firefox .logo, +.pkt_ext_signup_ja .signup-btn-firefox .logo, +.pkt_ext_signup_ru .signup-btn-firefox .logo { + height: 2.4em; +} +@media (min-resolution: 1.1dppx) { + .pkt_ext_signup_de .signup-btn-firefox .logo, + .pkt_ext_signup_es .pkt_ext_signupdetail_hero .signup-btn-firefox .logo, + .pkt_ext_signup_ja .signup-btn-firefox .logo, + .pkt_ext_signup_ru .signup-btn-firefox .logo { + height: 2.5em; + } +} +.pkt_ext_signup_de .signup-btn-email, +.pkt_ext_signup_es .pkt_ext_signupdetail_hero .signup-btn-email, +.pkt_ext_signup_ja .signup-btn-email, +.pkt_ext_signup_ru .signup-btn-email { + min-width: 13em; + padding: 0.8533em 1.2667em; +} +.pkt_ext_signup_de .pkt_ext_logo, +.pkt_ext_signup_es .pkt_ext_logo, +.pkt_ext_signup_ru .pkt_ext_logo { + padding-top: 15px; +} +.pkt_ext_signup_de .pkt_ext_introdetailhero .pkt_ext_tagline, +.pkt_ext_signup_es .pkt_ext_introdetailhero .pkt_ext_tagline, +.pkt_ext_signup_ja .pkt_ext_introdetailhero .pkt_ext_tagline, +.pkt_ext_signup_ru .pkt_ext_introdetailhero .pkt_ext_tagline { + font-size: 13px; +} +.pkt_ext_signup_overflow.pkt_ext_signup_de .signup-btn-firefox .logo, +.pkt_ext_signup_overflow.pkt_ext_signup_es .signup-btn-firefox .logo, +.pkt_ext_signup_overflow.pkt_ext_signup_ja .signup-btn-firefox .logo, +.pkt_ext_signup_overflow.pkt_ext_signup_ru .signup-btn-firefox .logo { + display: none; +} + +/* Signup variants */ +/* TODO: Delete post-experiment */ + +.los_variant { + background-color: #fff; + padding: 0; + text-align: start; +} + +.los_variant_top { + padding: 24px; +} + +.los_variant_bottom { + text-align: start; + padding: 26px 22px; +} + +.los_variant_a .los_variant_bottom { + text-align: center; +} + +.los_variant_bottom .los_variant_button { + font-style: normal; + font-weight: 500; + font-size: 16px; + line-height: 24px; + text-align: center; + color: #FFFFFF; + border-radius: 4px; + background: #0060DF; + display: inline-block; + padding: 8px 16px; + margin-bottom: 16px +} + +.los_variant_a .los_variant_bottom .los_variant_button { + display: block; +} + +.los_variant_bottom .los_variant_button:hover { + color: #fff; +} + +.los_variant_c .los_variant_bottom { + border-top: 1px solid #D7D7DB; + margin-top: 20px; +} + +.los_variant_bottom .los_variant_sub { + font-style: normal; + font-weight: normal; + font-size: 13px; + line-height: 16px; + color: #737373; +} + +.los_variant_bottom .los_variant_sub a { + color: #0060DF; +} + +.los_variant_top a { + font-size: 15px; +} + +.los_variant_a .los_variant_top { + background: #e8f7f6 url(../img/variant_a.png) bottom right no-repeat; + background-size: contain; + padding-block: 6px 24px; + padding-inline: 24px 102px; + height: 260px; +} + +.los_variant_a .los_variant_top p { + margin-bottom: 0; +} + +.los_variant_b .los_variant_top { + background: #DCEAFF url(../img/variant_b.png) bottom right no-repeat; + background-size: 80%; + padding: 24px 24px 160px; +} + +.los_variant_top:dir(rtl) { + background-position-x: left; +} + +.los_variant_b .los_variant_top a { + font-size: 15px; + line-height: 18px; + text-decoration-line: underline; + color: #0C0C0D; +} + +.los_variant_c .los_variant_top { + background: #fff url(../img/variant_c.png) bottom right no-repeat; + background-size: contain; + padding: 24px 24px 160px; +} + +.los_variant h1 { + font-weight: 600; + font-size: 17px; + line-height: 20px; + color: #0C0C0D; +} + +.los_variant p { + font-style: normal; + font-weight: normal; + font-size: 15px; + line-height: 18px; + color: #0C0C0D; +} diff --git a/browser/components/pocket/content/panels/fonts/FiraSans-Regular.woff b/browser/components/pocket/content/panels/fonts/FiraSans-Regular.woff Binary files differnew file mode 100644 index 0000000000..f466cdda9b --- /dev/null +++ b/browser/components/pocket/content/panels/fonts/FiraSans-Regular.woff diff --git a/browser/components/pocket/content/panels/img/app_store_dowload_apple.svg b/browser/components/pocket/content/panels/img/app_store_dowload_apple.svg new file mode 100644 index 0000000000..e2e7f8ab2c --- /dev/null +++ b/browser/components/pocket/content/panels/img/app_store_dowload_apple.svg @@ -0,0 +1,7 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="119.664" height="40" viewBox="0 0 119.66407 40"> + <path d="M110.135 0H9.535c-.367 0-.73 0-1.095.002-.306.002-.61.008-.919.013A13.215 13.215 0 0 0 5.517.19a6.665 6.665 0 0 0-1.9.627 6.438 6.438 0 0 0-1.62 1.18A6.258 6.258 0 0 0 .82 3.617a6.601 6.601 0 0 0-.625 1.903 12.993 12.993 0 0 0-.179 2.002c-.01.307-.01.615-.015.921V31.56c.005.31.006.61.015.921a12.992 12.992 0 0 0 .18 2.002 6.588 6.588 0 0 0 .624 1.905A6.208 6.208 0 0 0 1.998 38a6.274 6.274 0 0 0 1.618 1.179 6.7 6.7 0 0 0 1.901.63 13.455 13.455 0 0 0 2.004.177c.31.007.613.011.919.011.366.002.728.002 1.095.002h100.6c.36 0 .724 0 1.084-.002.304 0 .617-.004.922-.01a13.279 13.279 0 0 0 2-.178 6.804 6.804 0 0 0 1.908-.63A6.277 6.277 0 0 0 117.666 38a6.395 6.395 0 0 0 1.182-1.614 6.604 6.604 0 0 0 .619-1.905 13.506 13.506 0 0 0 .185-2.002c.004-.31.004-.61.004-.921.008-.364.008-.725.008-1.094V9.536c0-.366 0-.73-.008-1.092 0-.306 0-.614-.004-.92a13.507 13.507 0 0 0-.185-2.003 6.618 6.618 0 0 0-.62-1.903 6.466 6.466 0 0 0-2.798-2.8 6.768 6.768 0 0 0-1.908-.627 13.044 13.044 0 0 0-2-.176c-.305-.005-.618-.011-.922-.013-.36-.002-.725-.002-1.084-.002z" fill="#a6a6a6" /> + <path d="M8.445 39.125c-.305 0-.602-.004-.904-.01a12.687 12.687 0 0 1-1.87-.164 5.884 5.884 0 0 1-1.656-.548 5.406 5.406 0 0 1-1.397-1.016 5.32 5.32 0 0 1-1.02-1.397 5.722 5.722 0 0 1-.544-1.657 12.414 12.414 0 0 1-.166-1.875c-.007-.21-.015-.913-.015-.913v-23.1s.009-.692.015-.895a12.37 12.37 0 0 1 .165-1.872 5.755 5.755 0 0 1 .544-1.662 5.373 5.373 0 0 1 1.015-1.398 5.565 5.565 0 0 1 1.402-1.023 5.823 5.823 0 0 1 1.653-.544A12.586 12.586 0 0 1 7.543.887l.902-.012h102.769l.913.013a12.385 12.385 0 0 1 1.858.162 5.938 5.938 0 0 1 1.671.548 5.594 5.594 0 0 1 2.415 2.42 5.763 5.763 0 0 1 .535 1.649 12.995 12.995 0 0 1 .174 1.887c.003.283.003.588.003.89.008.375.008.732.008 1.092v20.929c0 .363 0 .718-.008 1.075 0 .325 0 .623-.004.93a12.731 12.731 0 0 1-.17 1.853 5.739 5.739 0 0 1-.54 1.67 5.48 5.48 0 0 1-1.016 1.386 5.413 5.413 0 0 1-1.4 1.022 5.862 5.862 0 0 1-1.668.55 12.542 12.542 0 0 1-1.869.163c-.293.007-.6.011-.897.011l-1.084.002z" /> + <path fill="#fff" d="M24.769 20.3a4.949 4.949 0 0 1 2.356-4.151 5.066 5.066 0 0 0-3.99-2.158c-1.68-.176-3.308 1.005-4.164 1.005-.872 0-2.19-.988-3.608-.958a5.315 5.315 0 0 0-4.473 2.728c-1.934 3.348-.491 8.269 1.361 10.976.927 1.325 2.01 2.805 3.428 2.753 1.387-.058 1.905-.885 3.58-.885 1.658 0 2.144.885 3.59.852 1.489-.025 2.426-1.332 3.32-2.67a10.962 10.962 0 0 0 1.52-3.092 4.782 4.782 0 0 1-2.92-4.4zM22.037 12.21a4.872 4.872 0 0 0 1.115-3.49 4.957 4.957 0 0 0-3.208 1.66A4.636 4.636 0 0 0 18.8 13.74a4.1 4.1 0 0 0 3.237-1.53z" /> + <path fill="#fff" d="M42.302 27.14H37.57l-1.137 3.356h-2.005l4.484-12.418h2.083l4.483 12.418h-2.039zm-4.243-1.55h3.752l-1.85-5.446h-.051zM55.16 25.97c0 2.813-1.506 4.62-3.779 4.62a3.07 3.07 0 0 1-2.848-1.583h-.043v4.484H46.63V21.442h1.8v1.506h.033a3.212 3.212 0 0 1 2.883-1.6c2.298 0 3.813 1.816 3.813 4.622zm-1.91 0c0-1.833-.948-3.038-2.393-3.038-1.42 0-2.375 1.23-2.375 3.038 0 1.824.955 3.046 2.375 3.046 1.445 0 2.393-1.197 2.393-3.046zM65.125 25.97c0 2.813-1.506 4.62-3.779 4.62a3.07 3.07 0 0 1-2.848-1.583h-.043v4.484h-1.859V21.442h1.799v1.506h.034a3.212 3.212 0 0 1 2.883-1.6c2.298 0 3.813 1.816 3.813 4.622zm-1.91 0c0-1.833-.948-3.038-2.393-3.038-1.42 0-2.375 1.23-2.375 3.038 0 1.824.955 3.046 2.375 3.046 1.445 0 2.392-1.197 2.392-3.046zM71.71 27.036c.138 1.232 1.334 2.04 2.97 2.04 1.566 0 2.693-.808 2.693-1.919 0-.964-.68-1.54-2.29-1.936l-1.609-.388c-2.28-.55-3.339-1.617-3.339-3.348 0-2.142 1.867-3.614 4.519-3.614 2.624 0 4.423 1.472 4.483 3.614h-1.876c-.112-1.239-1.136-1.987-2.634-1.987s-2.521.757-2.521 1.858c0 .878.654 1.395 2.255 1.79l1.368.336c2.548.603 3.606 1.626 3.606 3.443 0 2.323-1.85 3.778-4.793 3.778-2.754 0-4.614-1.42-4.734-3.667zM83.346 19.3v2.142h1.722v1.472h-1.722v4.991c0 .776.345 1.137 1.102 1.137a5.808 5.808 0 0 0 .611-.043v1.463a5.104 5.104 0 0 1-1.032.086c-1.833 0-2.548-.689-2.548-2.445v-5.189h-1.316v-1.472h1.316V19.3zM86.065 25.97c0-2.849 1.678-4.639 4.294-4.639 2.625 0 4.295 1.79 4.295 4.639 0 2.856-1.661 4.638-4.295 4.638-2.633 0-4.294-1.782-4.294-4.638zm6.695 0c0-1.954-.895-3.108-2.401-3.108s-2.4 1.162-2.4 3.108c0 1.962.894 3.106 2.4 3.106s2.401-1.144 2.401-3.106zM96.186 21.442h1.773v1.541h.043a2.16 2.16 0 0 1 2.177-1.635 2.866 2.866 0 0 1 .637.069v1.738a2.598 2.598 0 0 0-.835-.112 1.873 1.873 0 0 0-1.937 2.083v5.37h-1.858zM109.384 27.837c-.25 1.643-1.85 2.771-3.898 2.771-2.634 0-4.269-1.764-4.269-4.595 0-2.84 1.644-4.682 4.19-4.682 2.506 0 4.08 1.72 4.08 4.466v.637h-6.394v.112a2.358 2.358 0 0 0 2.436 2.564 2.048 2.048 0 0 0 2.09-1.273zm-6.282-2.702h4.526a2.177 2.177 0 0 0-2.22-2.298 2.292 2.292 0 0 0-2.306 2.298z" /> + <path fill="#fff" d="M37.826 8.731a2.64 2.64 0 0 1 2.808 2.965c0 1.906-1.03 3.002-2.808 3.002h-2.155V8.73zm-1.228 5.123h1.125a1.876 1.876 0 0 0 1.967-2.146 1.881 1.881 0 0 0-1.967-2.134h-1.125zM41.68 12.444a2.133 2.133 0 1 1 4.248 0 2.134 2.134 0 1 1-4.247 0zm3.334 0c0-.976-.439-1.547-1.208-1.547-.773 0-1.207.571-1.207 1.547 0 .984.434 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55zM51.573 14.698h-.922l-.93-3.317h-.07l-.927 3.317h-.913l-1.242-4.503h.902l.806 3.436h.067l.926-3.436h.852l.926 3.436h.07l.803-3.436h.889zM53.854 10.195h.855v.715h.066a1.348 1.348 0 0 1 1.344-.802 1.465 1.465 0 0 1 1.559 1.675v2.915h-.889v-2.692c0-.724-.314-1.084-.972-1.084a1.033 1.033 0 0 0-1.075 1.141v2.635h-.888zM59.094 8.437h.888v6.26h-.888zM61.218 12.444a2.133 2.133 0 1 1 4.247 0 2.134 2.134 0 1 1-4.247 0zm3.333 0c0-.976-.439-1.547-1.208-1.547-.773 0-1.207.571-1.207 1.547 0 .984.434 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55zM66.4 13.424c0-.81.604-1.278 1.676-1.344l1.22-.07v-.389c0-.475-.315-.744-.922-.744-.497 0-.84.182-.939.5h-.86c.09-.773.818-1.27 1.84-1.27 1.128 0 1.765.563 1.765 1.514v3.077h-.855v-.633h-.07a1.515 1.515 0 0 1-1.353.707 1.36 1.36 0 0 1-1.501-1.348zm2.895-.384v-.377l-1.1.07c-.62.042-.9.253-.9.65 0 .405.351.64.834.64a1.062 1.062 0 0 0 1.166-.983zM71.348 12.444c0-1.423.732-2.324 1.87-2.324a1.484 1.484 0 0 1 1.38.79h.067V8.437h.888v6.26h-.851v-.71h-.07a1.563 1.563 0 0 1-1.415.785c-1.145 0-1.869-.901-1.869-2.328zm.918 0c0 .955.45 1.53 1.203 1.53.75 0 1.212-.583 1.212-1.526 0-.938-.468-1.53-1.212-1.53-.748 0-1.203.58-1.203 1.526zM79.23 12.444a2.133 2.133 0 1 1 4.247 0 2.134 2.134 0 1 1-4.247 0zm3.333 0c0-.976-.438-1.547-1.208-1.547-.772 0-1.207.571-1.207 1.547 0 .984.435 1.55 1.207 1.55.77 0 1.208-.57 1.208-1.55zM84.67 10.195h.855v.715h.066a1.348 1.348 0 0 1 1.344-.802 1.465 1.465 0 0 1 1.559 1.675v2.915h-.889v-2.692c0-.724-.314-1.084-.972-1.084a1.033 1.033 0 0 0-1.075 1.141v2.635h-.889zM93.515 9.074v1.141h.976v.749h-.976v2.315c0 .472.194.679.637.679a2.967 2.967 0 0 0 .339-.021v.74a2.916 2.916 0 0 1-.484.046c-.988 0-1.381-.348-1.381-1.216v-2.543h-.715v-.749h.715V9.074zM95.705 8.437h.88v2.481h.07a1.386 1.386 0 0 1 1.374-.806 1.483 1.483 0 0 1 1.55 1.679v2.907h-.889V12.01c0-.72-.335-1.084-.963-1.084a1.052 1.052 0 0 0-1.134 1.142v2.63h-.888zM104.761 13.482a1.828 1.828 0 0 1-1.95 1.303 2.045 2.045 0 0 1-2.081-2.325 2.077 2.077 0 0 1 2.076-2.352c1.253 0 2.009.856 2.009 2.27v.31h-3.18v.05a1.19 1.19 0 0 0 1.2 1.29 1.08 1.08 0 0 0 1.07-.546zm-3.126-1.451h2.275a1.086 1.086 0 0 0-1.109-1.167 1.152 1.152 0 0 0-1.166 1.167z" /> +</svg> diff --git a/browser/components/pocket/content/panels/img/glyph.svg b/browser/components/pocket/content/panels/img/glyph.svg new file mode 100644 index 0000000000..9eb942e85e --- /dev/null +++ b/browser/components/pocket/content/panels/img/glyph.svg @@ -0,0 +1,4 @@ +<svg width="34" height="30" viewBox="0 0 34 30" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M0.333252 3.33333C0.333252 1.49238 1.82564 0 3.66659 0H30.3333C32.1742 0 33.6666 1.49238 33.6666 3.33333H30.3333H3.66659H0.333252ZM3.66659 3.33333H0.333252V13.3333C0.333252 22.5381 7.79517 30 16.9999 30C26.2047 30 33.6666 22.5381 33.6666 13.3333V3.33333H30.3333V13.3333C30.3333 20.6971 24.3637 26.6667 16.9999 26.6667C9.63612 26.6667 3.66659 20.6971 3.66659 13.3333V3.33333Z" fill="#0C0C0D"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M9.15474 10.4882C9.80561 9.83728 10.8609 9.83728 11.5118 10.4882L16.9999 15.9763L22.4881 10.4882C23.1389 9.83728 24.1942 9.83728 24.8451 10.4882C25.496 11.139 25.496 12.1943 24.8451 12.8452L18.1784 19.5118C17.5276 20.1627 16.4723 20.1627 15.8214 19.5118L9.15474 12.8452C8.50387 12.1943 8.50387 11.139 9.15474 10.4882Z" fill="#0c0c0d"/> +</svg> diff --git a/browser/components/pocket/content/panels/img/open.svg b/browser/components/pocket/content/panels/img/open.svg new file mode 100644 index 0000000000..49406f04ba --- /dev/null +++ b/browser/components/pocket/content/panels/img/open.svg @@ -0,0 +1,3 @@ +<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> + <path fill-rule="evenodd" clip-rule="evenodd" d="M3.83333 2.16667C3.39131 2.16667 2.96738 2.34226 2.65482 2.65482C2.34226 2.96738 2.16667 3.39131 2.16667 3.83333V12.1667C2.16667 12.6087 2.34226 13.0326 2.65482 13.3452C2.96738 13.6577 3.39131 13.8333 3.83333 13.8333H12.1667C12.6087 13.8333 13.0326 13.6577 13.3452 13.3452C13.6577 13.0326 13.8333 12.6087 13.8333 12.1667V11.3333C13.8333 11.1123 13.9211 10.9004 14.0774 10.7441C14.2337 10.5878 14.4457 10.5 14.6667 10.5C14.8877 10.5 15.0996 10.5878 15.2559 10.7441C15.4122 10.9004 15.5 11.1123 15.5 11.3333V12.1667C15.5 13.0507 15.1488 13.8986 14.5237 14.5237C13.8986 15.1488 13.0507 15.5 12.1667 15.5H3.83333C2.94928 15.5 2.10143 15.1488 1.47631 14.5237C0.851189 13.8986 0.5 13.0507 0.5 12.1667V3.83333C0.5 2.94928 0.851189 2.10143 1.47631 1.47631C2.10143 0.851189 2.94928 0.5 3.83333 0.5H4.66667C4.88768 0.5 5.09964 0.587797 5.25592 0.744078C5.4122 0.900358 5.5 1.11232 5.5 1.33333C5.5 1.55435 5.4122 1.76631 5.25592 1.92259C5.09964 2.07887 4.88768 2.16667 4.66667 2.16667H3.83333ZM8.83333 2.16667C8.61232 2.16667 8.40036 2.07887 8.24408 1.92259C8.0878 1.76631 8 1.55435 8 1.33333C8 1.11232 8.0878 0.900358 8.24408 0.744078C8.40036 0.587797 8.61232 0.5 8.83333 0.5H14.6667C14.8877 0.5 15.0996 0.587797 15.2559 0.744078C15.4122 0.900358 15.5 1.11232 15.5 1.33333V7.16667C15.5 7.38768 15.4122 7.59964 15.2559 7.75592C15.0996 7.9122 14.8877 8 14.6667 8C14.4457 8 14.2337 7.9122 14.0774 7.75592C13.9211 7.59964 13.8333 7.38768 13.8333 7.16667V3.345L8.58917 8.58917C8.432 8.74096 8.2215 8.82496 8.003 8.82306C7.7845 8.82116 7.57549 8.73352 7.42098 8.57901C7.26648 8.42451 7.17884 8.2155 7.17694 7.997C7.17504 7.7785 7.25904 7.568 7.41083 7.41083L12.655 2.16667H8.83333Z" fill="#0C0C0D" fill-opacity="0.8"/> +</svg> diff --git a/browser/components/pocket/content/panels/img/pocketerror@1x.png b/browser/components/pocket/content/panels/img/pocketerror@1x.png Binary files differnew file mode 100644 index 0000000000..059812678a --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketerror@1x.png diff --git a/browser/components/pocket/content/panels/img/pocketerror@2x.png b/browser/components/pocket/content/panels/img/pocketerror@2x.png Binary files differnew file mode 100644 index 0000000000..f462f30a6c --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketerror@2x.png diff --git a/browser/components/pocket/content/panels/img/pocketlogo@1x.png b/browser/components/pocket/content/panels/img/pocketlogo@1x.png Binary files differnew file mode 100644 index 0000000000..4ae1a84dc9 --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketlogo@1x.png diff --git a/browser/components/pocket/content/panels/img/pocketlogo@2x.png b/browser/components/pocket/content/panels/img/pocketlogo@2x.png Binary files differnew file mode 100644 index 0000000000..86d4264d06 --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketlogo@2x.png diff --git a/browser/components/pocket/content/panels/img/pocketlogosolo@1x.png b/browser/components/pocket/content/panels/img/pocketlogosolo@1x.png Binary files differnew file mode 100644 index 0000000000..0af50f1f10 --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketlogosolo@1x.png diff --git a/browser/components/pocket/content/panels/img/pocketlogosolo@2x.png b/browser/components/pocket/content/panels/img/pocketlogosolo@2x.png Binary files differnew file mode 100644 index 0000000000..e3e203172f --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketlogosolo@2x.png diff --git a/browser/components/pocket/content/panels/img/pocketsignup_button@1x.png b/browser/components/pocket/content/panels/img/pocketsignup_button@1x.png Binary files differnew file mode 100644 index 0000000000..e0cb05a51a --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketsignup_button@1x.png diff --git a/browser/components/pocket/content/panels/img/pocketsignup_button@2x.png b/browser/components/pocket/content/panels/img/pocketsignup_button@2x.png Binary files differnew file mode 100644 index 0000000000..6f26cee95d --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketsignup_button@2x.png diff --git a/browser/components/pocket/content/panels/img/pocketsignup_devices@1x.png b/browser/components/pocket/content/panels/img/pocketsignup_devices@1x.png Binary files differnew file mode 100644 index 0000000000..effa073c60 --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketsignup_devices@1x.png diff --git a/browser/components/pocket/content/panels/img/pocketsignup_devices@2x.png b/browser/components/pocket/content/panels/img/pocketsignup_devices@2x.png Binary files differnew file mode 100644 index 0000000000..8a539070ad --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketsignup_devices@2x.png diff --git a/browser/components/pocket/content/panels/img/pocketsignup_hero@1x.png b/browser/components/pocket/content/panels/img/pocketsignup_hero@1x.png Binary files differnew file mode 100644 index 0000000000..6659c0843c --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketsignup_hero@1x.png diff --git a/browser/components/pocket/content/panels/img/pocketsignup_hero@2x.png b/browser/components/pocket/content/panels/img/pocketsignup_hero@2x.png Binary files differnew file mode 100644 index 0000000000..d31d610f54 --- /dev/null +++ b/browser/components/pocket/content/panels/img/pocketsignup_hero@2x.png diff --git a/browser/components/pocket/content/panels/img/signup_firefoxlogo@1x.png b/browser/components/pocket/content/panels/img/signup_firefoxlogo@1x.png Binary files differnew file mode 100644 index 0000000000..d8c9474477 --- /dev/null +++ b/browser/components/pocket/content/panels/img/signup_firefoxlogo@1x.png diff --git a/browser/components/pocket/content/panels/img/signup_firefoxlogo@2x.png b/browser/components/pocket/content/panels/img/signup_firefoxlogo@2x.png Binary files differnew file mode 100644 index 0000000000..c027d53d3f --- /dev/null +++ b/browser/components/pocket/content/panels/img/signup_firefoxlogo@2x.png diff --git a/browser/components/pocket/content/panels/img/signup_help@1x.png b/browser/components/pocket/content/panels/img/signup_help@1x.png Binary files differnew file mode 100644 index 0000000000..e11d56b6a8 --- /dev/null +++ b/browser/components/pocket/content/panels/img/signup_help@1x.png diff --git a/browser/components/pocket/content/panels/img/signup_help@2x.png b/browser/components/pocket/content/panels/img/signup_help@2x.png Binary files differnew file mode 100644 index 0000000000..2b37abf0e0 --- /dev/null +++ b/browser/components/pocket/content/panels/img/signup_help@2x.png diff --git a/browser/components/pocket/content/panels/img/tag_close@1x.png b/browser/components/pocket/content/panels/img/tag_close@1x.png Binary files differnew file mode 100644 index 0000000000..334ad03f70 --- /dev/null +++ b/browser/components/pocket/content/panels/img/tag_close@1x.png diff --git a/browser/components/pocket/content/panels/img/tag_close@2x.png b/browser/components/pocket/content/panels/img/tag_close@2x.png Binary files differnew file mode 100644 index 0000000000..c6834cc305 --- /dev/null +++ b/browser/components/pocket/content/panels/img/tag_close@2x.png diff --git a/browser/components/pocket/content/panels/img/tag_closeactive@1x.png b/browser/components/pocket/content/panels/img/tag_closeactive@1x.png Binary files differnew file mode 100644 index 0000000000..196004b2f8 --- /dev/null +++ b/browser/components/pocket/content/panels/img/tag_closeactive@1x.png diff --git a/browser/components/pocket/content/panels/img/tag_closeactive@2x.png b/browser/components/pocket/content/panels/img/tag_closeactive@2x.png Binary files differnew file mode 100644 index 0000000000..a1512f6ada --- /dev/null +++ b/browser/components/pocket/content/panels/img/tag_closeactive@2x.png diff --git a/browser/components/pocket/content/panels/img/variant_a.png b/browser/components/pocket/content/panels/img/variant_a.png Binary files differnew file mode 100644 index 0000000000..628a179af3 --- /dev/null +++ b/browser/components/pocket/content/panels/img/variant_a.png diff --git a/browser/components/pocket/content/panels/img/variant_b.png b/browser/components/pocket/content/panels/img/variant_b.png Binary files differnew file mode 100644 index 0000000000..1b2690c554 --- /dev/null +++ b/browser/components/pocket/content/panels/img/variant_b.png diff --git a/browser/components/pocket/content/panels/img/variant_c.png b/browser/components/pocket/content/panels/img/variant_c.png Binary files differnew file mode 100644 index 0000000000..ea0bb08f53 --- /dev/null +++ b/browser/components/pocket/content/panels/img/variant_c.png diff --git a/browser/components/pocket/content/panels/js/messages.js b/browser/components/pocket/content/panels/js/messages.js new file mode 100644 index 0000000000..38d7399ffa --- /dev/null +++ b/browser/components/pocket/content/panels/js/messages.js @@ -0,0 +1,79 @@ +// Documentation of methods used here are at: +// https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Interaction_between_privileged_and_non-privileged_pages + +var pktPanelMessaging = (function() { + function panelIdFromURL(url) { + var panelId = url.match(/panelId=([\w|\d|\.]*)&?/); + if (panelId && panelId.length > 1) { + return panelId[1]; + } + + return 0; + } + + function prefixedMessageId(messageId) { + return "PKT_" + messageId; + } + + function panelPrefixedMessageId(panelId, messageId) { + return prefixedMessageId(panelId + "_" + messageId); + } + + function addMessageListener(panelId, messageId, callback) { + document.addEventListener( + panelPrefixedMessageId(panelId, messageId), + function(e) { + callback(JSON.parse(e.target.getAttribute("payload"))[0]); + + // TODO: Figure out why e.target.parentNode is null + // e.target.parentNode.removeChild(e.target); + } + ); + } + + function removeMessageListener(panelId, messageId, callback) { + document.removeEventListener( + panelPrefixedMessageId(panelId, messageId), + callback + ); + } + + function sendMessage(panelId, messageId, payload, callback) { + // Payload needs to be an object in format: + // { panelId: panelId, data: {} } + var messagePayload = { + panelId, + data: payload || {}, + }; + + // Create a callback to listen for a response + if (callback) { + var messageResponseId = messageId + "Response"; + var responseListener = function(responsePayload) { + callback(responsePayload); + removeMessageListener(panelId, messageResponseId, responseListener); + }; + + addMessageListener(panelId, messageResponseId, responseListener); + } + + // Send message + var element = document.createElement("PKTMessageFromPanelElement"); + element.setAttribute("payload", JSON.stringify([messagePayload])); + document.documentElement.appendChild(element); + + var evt = document.createEvent("Events"); + evt.initEvent(prefixedMessageId(messageId), true, false); + element.dispatchEvent(evt); + } + + /** + * Public functions + */ + return { + panelIdFromURL, + addMessageListener, + removeMessageListener, + sendMessage, + }; +})(); diff --git a/browser/components/pocket/content/panels/js/saved.js b/browser/components/pocket/content/panels/js/saved.js new file mode 100644 index 0000000000..2c8ece09eb --- /dev/null +++ b/browser/components/pocket/content/panels/js/saved.js @@ -0,0 +1,788 @@ +/* global $:false, Handlebars:false, PKT_SENDTOMOBILE:false, */ +/* import-globals-from messages.js */ + +/* +PKT_SAVED_OVERLAY is the view itself and contains all of the methods to manipute the overlay and messaging. +It does not contain any logic for saving or communication with the extension or server. +*/ + +var PKT_SAVED_OVERLAY = function(options) { + var myself = this; + this.inited = false; + this.active = false; + this.wrapper = null; + this.pockethost = "getpocket.com"; + this.savedItemId = 0; + this.savedUrl = ""; + this.premiumStatus = false; + this.preventCloseTimerCancel = false; + this.closeValid = true; + this.mouseInside = false; + this.autocloseTimer = null; + this.inoverflowmenu = false; + this.dictJSON = {}; + this.autocloseTimerEnabled = false; + this.autocloseTiming = 4500; + this.autocloseTimingFinalState = 2000; + this.mouseInside = false; + this.userTags = []; + this.cxt_suggested_available = 0; + this.cxt_entered = 0; + this.cxt_suggested = 0; + this.cxt_removed = 0; + this.justaddedsuggested = false; + this.fxasignedin = false; + this.premiumDetailsAdded = false; + this.ho2 = false; + this.fillTagContainer = function(tags, container, tagclass) { + container.children().remove(); + for (var i = 0; i < tags.length; i++) { + var newtag = $('<li><a href="#" class="token_tag"></a></li>'); + newtag.find("a").text(tags[i]); + newtag.addClass(tagclass); + container.append(newtag); + this.cxt_suggested_available++; + } + }; + this.fillUserTags = function() { + thePKT_SAVED.sendMessage("getTags", {}, function(resp) { + if (typeof resp == "object" && typeof resp.tags == "object") { + myself.userTags = resp.tags; + } + }); + }; + this.fillSuggestedTags = function() { + if (!$(".pkt_ext_suggestedtag_detail").length) { + myself.suggestedTagsLoaded = true; + myself.startCloseTimer(); + return; + } + + $(".pkt_ext_subshell").show(); + + thePKT_SAVED.sendMessage( + "getSuggestedTags", + { + url: myself.savedUrl, + }, + function(resp) { + $(".pkt_ext_suggestedtag_detail").removeClass( + "pkt_ext_suggestedtag_detail_loading" + ); + if (resp.status == "success") { + var newtags = []; + for (var i = 0; i < resp.value.suggestedTags.length; i++) { + newtags.push(resp.value.suggestedTags[i].tag); + } + myself.suggestedTagsLoaded = true; + if (!myself.mouseInside) { + myself.startCloseTimer(); + } + myself.fillTagContainer( + newtags, + $(".pkt_ext_suggestedtag_detail ul"), + "token_suggestedtag" + ); + } else if (resp.status == "error") { + var msg = $('<p class="suggestedtag_msg">'); + msg.text(resp.error.message); + $(".pkt_ext_suggestedtag_detail").append(msg); + this.suggestedTagsLoaded = true; + if (!myself.mouseInside) { + myself.startCloseTimer(); + } + } + } + ); + }; + this.initAutoCloseEvents = function() { + this.wrapper.on("mouseenter", function() { + myself.mouseInside = true; + myself.stopCloseTimer(); + }); + this.wrapper.on("mouseleave", function() { + myself.mouseInside = false; + myself.startCloseTimer(); + }); + this.wrapper.on("click", function(e) { + myself.closeValid = false; + }); + $("body").on("keydown", function(e) { + var key = e.keyCode || e.which; + if (key === 9) { + myself.mouseInside = true; + myself.stopCloseTimer(); + } + }); + }; + this.startCloseTimer = function(manualtime) { + if (!myself.autocloseTimerEnabled) { + return; + } + + var settime = manualtime ? manualtime : myself.autocloseTiming; + if (typeof myself.autocloseTimer == "number") { + clearTimeout(myself.autocloseTimer); + } + myself.autocloseTimer = setTimeout(function() { + if (myself.closeValid || myself.preventCloseTimerCancel) { + myself.preventCloseTimerCancel = false; + myself.closePopup(); + } + }, settime); + }; + this.stopCloseTimer = function() { + if (myself.preventCloseTimerCancel) { + return; + } + clearTimeout(myself.autocloseTimer); + }; + this.closePopup = function() { + myself.stopCloseTimer(); + thePKT_SAVED.sendMessage("close"); + }; + this.checkValidTagSubmit = function() { + var inputlength = $.trim( + $(".pkt_ext_tag_input_wrapper") + .find(".token-input-input-token") + .children("input") + .val() + ).length; + if ( + $(".pkt_ext_containersaved").find(".token-input-token").length || + (inputlength > 0 && inputlength < 26) + ) { + $(".pkt_ext_containersaved") + .find(".pkt_ext_btn") + .removeClass("pkt_ext_btn_disabled"); + } else { + $(".pkt_ext_containersaved") + .find(".pkt_ext_btn") + .addClass("pkt_ext_btn_disabled"); + } + myself.updateSlidingTagList(); + }; + this.updateSlidingTagList = function() { + var cssDir; + if (document.dir == "ltr") { + cssDir = "left"; + } else { + cssDir = "right"; + } + var inputleft = $(".token-input-input-token input").position()[cssDir]; + var listleft = $(".token-input-list").position()[cssDir]; + var listleftmanual = parseInt($(".token-input-list").css(cssDir)); + var listleftnatural = listleft - listleftmanual; + var leftwidth = $(".pkt_ext_tag_input_wrapper").outerWidth(); + + if (inputleft + listleft + 20 > leftwidth) { + $(".token-input-list").css( + cssDir, + Math.min((inputleft + listleftnatural - leftwidth + 20) * -1, 0) + "px" + ); + } else { + $(".token-input-list").css(cssDir, "0"); + } + }; + this.checkPlaceholderStatus = function() { + if ( + this.wrapper.find(".pkt_ext_tag_input_wrapper").find(".token-input-token") + .length + ) { + this.wrapper + .find(".token-input-input-token input") + .attr("placeholder", ""); + } else { + this.wrapper + .find(".token-input-input-token input") + .attr("placeholder", $(".pkt_ext_tag_input").attr("placeholder")) + .css("width", "200px"); + } + }; + this.initTagInput = function() { + var inputwrapper = $(".pkt_ext_tag_input_wrapper"); + inputwrapper.find(".pkt_ext_tag_input").tokenInput([], { + searchDelay: 200, + minChars: 1, + animateDropdown: false, + noResultsHideDropdown: true, + scrollKeyboard: true, + emptyInputLength: 200, + search_function(term, cb) { + var returnlist = []; + if (term.length) { + var limit = 15; + var r = new RegExp("^" + term); + for (var i = 0; i < myself.userTags.length; i++) { + if (r.test(myself.userTags[i]) && limit > 0) { + returnlist.push({ name: myself.userTags[i] }); + limit--; + } + } + } + if (!$(".token-input-dropdown-tag").data("init")) { + $(".token-input-dropdown-tag") + .css("width", inputwrapper.outerWidth()) + .data("init"); + inputwrapper.append($(".token-input-dropdown-tag")); + } + cb(returnlist); + }, + textToData(text) { + if ($.trim(text).length > 25 || !$.trim(text).length) { + if (text.length > 25) { + myself.showTagsError(myself.dictJSON.maxtaglength); + this.changestamp = Date.now(); + setTimeout(function() { + $(".token-input-input-token input") + .val(text) + .focus(); + }, 10); + } + return null; + } + myself.hideTagsError(); + return { name: myself.sanitizeText(text.toLowerCase()) }; + }, + onReady() { + $(".token-input-dropdown").addClass("token-input-dropdown-tag"); + inputwrapper + .find(".token-input-input-token input") + .attr("placeholder", $(".tag-input").attr("placeholder")) + .css("width", "200px"); + if ($(".pkt_ext_suggestedtag_detail").length) { + myself.wrapper + .find(".pkt_ext_suggestedtag_detail") + .on("click", ".token_tag", function(e) { + e.preventDefault(); + var tag = $(e.target); + if ( + $(this).parents(".pkt_ext_suggestedtag_detail_disabled").length + ) { + return; + } + myself.justaddedsuggested = true; + inputwrapper.find(".pkt_ext_tag_input").tokenInput("add", { + id: inputwrapper.find(".token-input-token").length, + name: tag.text(), + }); + tag.addClass("token-suggestedtag-inactive"); + $(".token-input-input-token input").focus(); + }); + } + $(".token-input-list") + .on("keydown", "input", function(e) { + if (e.which == 37) { + myself.updateSlidingTagList(); + } + if (e.which === 9) { + $("a.pkt_ext_learn_more").focus(); + } + }) + .on("keypress", "input", function(e) { + if (e.which == 13) { + if ( + typeof this.changestamp == "undefined" || + Date.now() - this.changestamp > 250 + ) { + e.preventDefault(); + myself.wrapper.find(".pkt_ext_btn").trigger("click"); + } + } + }) + .on("keyup", "input", function(e) { + myself.checkValidTagSubmit(); + }); + myself.checkPlaceholderStatus(); + }, + onAdd() { + myself.checkValidTagSubmit(); + this.changestamp = Date.now(); + myself.hideInactiveTags(); + myself.checkPlaceholderStatus(); + }, + onDelete() { + myself.checkValidTagSubmit(); + this.changestamp = Date.now(); + myself.showActiveTags(); + myself.checkPlaceholderStatus(); + }, + onShowDropdown() { + if (myself.ho2 !== "show_prompt_preview") { + $(".pkt_ext_item_recs").hide(); // hide recs when tag input begins + thePKT_SAVED.sendMessage("expandSavePanel"); + } + }, + }); + $("body").on("keydown", function(e) { + var key = e.keyCode || e.which; + if (key == 8) { + var selected = $(".token-input-selected-token"); + if (selected.length) { + e.preventDefault(); + e.stopImmediatePropagation(); + inputwrapper + .find(".pkt_ext_tag_input") + .tokenInput("remove", { name: selected.find("p").text() }); + } + } else if ( + $(e.target) + .parent() + .hasClass("token-input-input-token") + ) { + e.stopImmediatePropagation(); + } + }); + }; + this.disableInput = function() { + this.wrapper + .find(".pkt_ext_item_actions") + .addClass("pkt_ext_item_actions_disabled"); + this.wrapper.find(".pkt_ext_btn").addClass("pkt_ext_btn_disabled"); + this.wrapper + .find(".pkt_ext_tag_input_wrapper") + .addClass("pkt_ext_tag_input_wrapper_disabled"); + if (this.wrapper.find(".pkt_ext_suggestedtag_detail").length) { + this.wrapper + .find(".pkt_ext_suggestedtag_detail") + .addClass("pkt_ext_suggestedtag_detail_disabled"); + } + }; + this.enableInput = function() { + this.wrapper + .find(".pkt_ext_item_actions") + .removeClass("pkt_ext_item_actions_disabled"); + this.checkValidTagSubmit(); + this.wrapper + .find(".pkt_ext_tag_input_wrapper") + .removeClass("pkt_ext_tag_input_wrapper_disabled"); + if (this.wrapper.find(".pkt_ext_suggestedtag_detail").length) { + this.wrapper + .find(".pkt_ext_suggestedtag_detail") + .removeClass("pkt_ext_suggestedtag_detail_disabled"); + } + }; + this.initAddTagInput = function() { + $(".pkt_ext_btn").click(function(e) { + e.preventDefault(); + if ( + $(this).hasClass("pkt_ext_btn_disabled") || + $(".pkt_ext_edit_msg_active").filter(".pkt_ext_edit_msg_error").length + ) { + return; + } + myself.disableInput(); + $(".pkt_ext_containersaved") + .find(".pkt_ext_detail h2") + .text(myself.dictJSON.processingtags); + var originaltags = []; + $(".token-input-token").each(function() { + var text = $.trim( + $(this) + .find("p") + .text() + ); + if (text.length) { + originaltags.push(text); + } + }); + + thePKT_SAVED.sendMessage( + "addTags", + { + url: myself.savedUrl, + tags: originaltags, + }, + function(resp) { + if (resp.status == "success") { + myself.showStateFinalMsg(myself.dictJSON.tagssaved); + } else if (resp.status == "error") { + $(".pkt_ext_edit_msg") + .addClass("pkt_ext_edit_msg_error pkt_ext_edit_msg_active") + .text(resp.error.message); + } + } + ); + }); + }; + this.initRemovePageInput = function() { + $(".pkt_ext_removeitem").click(function(e) { + $(".pkt_ext_subshell").hide(); + if ($(this).parents(".pkt_ext_item_actions_disabled").length) { + e.preventDefault(); + return; + } + if ($(this).hasClass("pkt_ext_removeitem")) { + e.preventDefault(); + myself.disableInput(); + $(".pkt_ext_containersaved") + .find(".pkt_ext_detail h2") + .text(myself.dictJSON.processingremove); + + thePKT_SAVED.sendMessage( + "deleteItem", + { + itemId: myself.savedItemId, + }, + function(resp) { + if (resp.status == "success") { + myself.showStateFinalMsg(myself.dictJSON.pageremoved); + } else if (resp.status == "error") { + $(".pkt_ext_edit_msg") + .addClass("pkt_ext_edit_msg_error pkt_ext_edit_msg_active") + .text(resp.error.message); + } + } + ); + } + }); + }; + this.initOpenListInput = function() { + $(".pkt_ext_openpocket").click(function(e) { + e.preventDefault(); + thePKT_SAVED.sendMessage("openTabWithUrl", { + url: $(this).attr("href"), + activate: true, + }); + myself.closePopup(); + }); + }; + this.showTagsError = function(msg) { + $(".pkt_ext_edit_msg") + .addClass("pkt_ext_edit_msg_error pkt_ext_edit_msg_active") + .text(msg); + $(".pkt_ext_tag_detail").addClass("pkt_ext_tag_error"); + }; + this.hideTagsError = function(msg) { + $(".pkt_ext_edit_msg") + .removeClass("pkt_ext_edit_msg_error pkt_ext_edit_msg_active") + .text(""); + $(".pkt_ext_tag_detail").removeClass("pkt_ext_tag_error"); + }; + this.showActiveTags = function() { + if (!$(".pkt_ext_suggestedtag_detail").length) { + return; + } + var activetokenstext = "|"; + $(".token-input-token").each(function(index, element) { + activetokenstext += + $(element) + .find("p") + .text() + "|"; + }); + + var inactivetags = $(".pkt_ext_suggestedtag_detail").find( + ".token_tag_inactive" + ); + inactivetags.each(function(index, element) { + if (!activetokenstext.includes("|" + $(element).text() + "|")) { + $(element).removeClass("token_tag_inactive"); + } + }); + }; + this.hideInactiveTags = function() { + if (!$(".pkt_ext_suggestedtag_detail").length) { + return; + } + var activetokenstext = "|"; + $(".token-input-token").each(function(index, element) { + activetokenstext += + $(element) + .find("p") + .text() + "|"; + }); + var activesuggestedtags = $(".token_tag").not(".token_tag_inactive"); + activesuggestedtags.each(function(index, element) { + if (activetokenstext.indexOf("|" + $(element).text() + "|") > -1) { + $(element).addClass("token_tag_inactive"); + } + }); + }; + this.showStateSaved = function(initobj) { + this.wrapper.find(".pkt_ext_detail h2").text(this.dictJSON.pagesaved); + this.wrapper.find(".pkt_ext_btn").addClass("pkt_ext_btn_disabled"); + if (typeof initobj.item == "object") { + this.savedItemId = initobj.item.item_id; + this.savedUrl = initobj.item.given_url; + } + $(".pkt_ext_containersaved") + .addClass("pkt_ext_container_detailactive") + .removeClass("pkt_ext_container_finalstate"); + + if ( + initobj.ho2 && + initobj.ho2 != "control" && + !initobj.accountState.has_mobile && + !myself.savedUrl.includes("getpocket.com") + ) { + myself.createSendToMobilePanel(initobj.ho2, initobj.displayName); + myself.ho2 = initobj.ho2; + } + + myself.fillUserTags(); + if (myself.suggestedTagsLoaded) { + myself.startCloseTimer(); + } else { + myself.fillSuggestedTags(); + } + }; + this.renderItemRecs = function(data) { + if (data?.recommendations?.length) { + $("body").addClass("recs_enabled"); + $(".pkt_ext_subshell").show(); + // URL encode and append raw image source for Thumbor + CDN + data.recommendations = data.recommendations.map(rec => { + // Using array notation because there is a key titled `1` (`images` is an object) + let rawSource = rec?.item?.top_image_url || rec?.item?.images["1"]?.src; + + // Append UTM to rec URLs (leave existing query strings intact) + if (rec?.item?.resolved_url && !rec.item.resolved_url.match(/\?/)) { + rec.item.resolved_url = `${rec.item.resolved_url}?utm_source=pocket-ff-recs`; + } + + rec.item.encodedThumbURL = rawSource + ? encodeURIComponent(rawSource) + : null; + + return rec; + }); + + // This is the ML model used to recommend the story. + // Right now this value is the same for all three items returned together, + // so we can just use the first item's value for all. + const model = data.recommendations[0].experiment; + $(".pkt_ext_item_recs").append(Handlebars.templates.item_recs(data)); + + // Resize popover to accomodate recs: + thePKT_SAVED.sendMessage("resizePanel", { + width: 350, + height: this.premiumStatus ? 535 : 424, // TODO: Dynamic height based on number of recs + }); + + $(".pkt_ext_item_recs_link").click(function(e) { + e.preventDefault(); + const url = $(this).attr("href"); + const position = $(".pkt_ext_item_recs_link").index(this); + thePKT_SAVED.sendMessage("openTabWithPocketUrl", { + url, + model, + position, + }); + myself.closePopup(); + }); + } + }; + this.createSendToMobilePanel = function(ho2, displayName) { + PKT_SENDTOMOBILE.create(ho2, displayName, myself.premiumDetailsAdded); + }; + this.sanitizeText = function(s) { + var sanitizeMap = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + }; + if (typeof s !== "string") { + return ""; + } + return String(s).replace(/[&<>"']/g, function(str) { + return sanitizeMap[str]; + }); + }; + this.showStateFinalMsg = function(msg) { + this.wrapper + .find(".pkt_ext_tag_detail") + .one( + "webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd", + function(e) { + $(this).off( + "webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd" + ); + myself.preventCloseTimerCancel = true; + myself.startCloseTimer(myself.autocloseTimingFinalState); + myself.wrapper.find(".pkt_ext_detail h2").text(msg); + } + ); + this.wrapper.addClass("pkt_ext_container_finalstate"); + }; + this.showStateError = function(headline, detail) { + this.wrapper.find(".pkt_ext_detail h2").text(headline); + this.wrapper.find(".pkt_ext_detail h3").text(detail); + this.wrapper.addClass( + "pkt_ext_container_detailactive pkt_ext_container_finalstate pkt_ext_container_finalerrorstate" + ); + this.preventCloseTimerCancel = true; + this.startCloseTimer(myself.autocloseTimingFinalState); + }; + this.getTranslations = function() { + this.dictJSON = window.pocketStrings; + }; +}; + +PKT_SAVED_OVERLAY.prototype = { + create() { + if (this.active) { + return; + } + this.active = true; + + // set translations + this.getTranslations(); + + // set host + this.dictJSON.pockethost = this.pockethost; + + // extra modifier class for collapsed state + if (this.inoverflowmenu) { + $("body").addClass("pkt_ext_saved_overflow"); + } + + // extra modifier class for language + if (this.locale) { + $("body").addClass("pkt_ext_saved_" + this.locale); + } + + // Create actual content + $("body").append(Handlebars.templates.saved_shell(this.dictJSON)); + + // Add in premium content (if applicable based on premium status) + this.createPremiumFunctionality(); + + // Initialize functionality for overlay + this.wrapper = $(".pkt_ext_containersaved"); + this.initTagInput(); + this.initAddTagInput(); + this.initRemovePageInput(); + this.initOpenListInput(); + this.initAutoCloseEvents(); + }, + createPremiumFunctionality() { + if (this.premiumStatus && !$(".pkt_ext_suggestedtag_detail").length) { + this.premiumDetailsAdded = true; + + // Append shell for suggested tags + $("body .pkt_ext_subshell").prepend( + Handlebars.templates.saved_premiumshell(this.dictJSON) + ); + + $(".pkt_ext_initload").append( + Handlebars.templates.saved_premiumextras(this.dictJSON) + ); + } + }, +}; + +// Layer between Bookmarklet and Extensions +var PKT_SAVED = function() {}; + +PKT_SAVED.prototype = { + init() { + if (this.inited) { + return; + } + this.panelId = pktPanelMessaging.panelIdFromURL(window.location.href); + this.overlay = new PKT_SAVED_OVERLAY(); + + this.inited = true; + }, + + addMessageListener(messageId, callback) { + pktPanelMessaging.addMessageListener(this.panelId, messageId, callback); + }, + + sendMessage(messageId, payload, callback) { + pktPanelMessaging.sendMessage(this.panelId, messageId, payload, callback); + }, + + create() { + var myself = this; + var url = window.location.href.match(/premiumStatus=([\w|\d|\.]*)&?/); + if (url && url.length > 1) { + myself.overlay.premiumStatus = url[1] == "1"; + } + var fxasignedin = window.location.href.match(/fxasignedin=([\w|\d|\.]*)&?/); + if (fxasignedin && fxasignedin.length > 1) { + myself.overlay.fxasignedin = fxasignedin[1] == "1"; + } + var host = window.location.href.match(/pockethost=([\w|\.]*)&?/); + if (host && host.length > 1) { + myself.overlay.pockethost = host[1]; + } + var inoverflowmenu = window.location.href.match( + /inoverflowmenu=([\w|\.]*)&?/ + ); + if (inoverflowmenu && inoverflowmenu.length > 1) { + myself.overlay.inoverflowmenu = inoverflowmenu[1] == "true"; + } + var locale = window.location.href.match(/locale=([\w|\.]*)&?/); + if (locale && locale.length > 1) { + myself.overlay.locale = locale[1].toLowerCase(); + } + + myself.overlay.create(); + + // tell back end we're ready + thePKT_SAVED.sendMessage("show"); + + // wait confirmation of save before flipping to final saved state + thePKT_SAVED.addMessageListener("saveLink", function(resp) { + if (resp.status == "error") { + if (typeof resp.error == "object") { + if (resp.error.localizedKey) { + myself.overlay.showStateError( + myself.overlay.dictJSON.pagenotsaved, + myself.overlay.dictJSON[resp.error.localizedKey] + ); + } else { + myself.overlay.showStateError( + myself.overlay.dictJSON.pagenotsaved, + resp.error.message + ); + } + } else { + myself.overlay.showStateError( + myself.overlay.dictJSON.pagenotsaved, + myself.overlay.dictJSON.errorgeneric + ); + } + return; + } + + myself.overlay.showStateSaved(resp); + }); + + thePKT_SAVED.addMessageListener("renderItemRecs", function(payload) { + myself.overlay.renderItemRecs(payload); + }); + }, +}; + +$(function() { + if (!window.thePKT_SAVED) { + var thePKT_SAVED = new PKT_SAVED(); + /* global thePKT_SAVED */ + window.thePKT_SAVED = thePKT_SAVED; + thePKT_SAVED.init(); + } + + var pocketHost = thePKT_SAVED.overlay.pockethost; + // send an async message to get string data + thePKT_SAVED.sendMessage( + "initL10N", + { + tos: [ + "https://" + pocketHost + "/tos?s=ffi&t=tos&tv=panel_tryit", + "https://" + + pocketHost + + "/privacy?s=ffi&t=privacypolicy&tv=panel_tryit", + ], + }, + function(resp) { + window.pocketStrings = resp.strings; + // Set the writing system direction + document.documentElement.setAttribute("dir", resp.dir); + window.thePKT_SAVED.create(); + } + ); +}); diff --git a/browser/components/pocket/content/panels/js/sendtomobile.js b/browser/components/pocket/content/panels/js/sendtomobile.js new file mode 100644 index 0000000000..0bdfbfa25d --- /dev/null +++ b/browser/components/pocket/content/panels/js/sendtomobile.js @@ -0,0 +1,53 @@ +/* global $:false, Handlebars:false, thePKT_SAVED:false, */ + +var PKT_SENDTOMOBILE = (function() { + var width = 350; + var ctaHeight = 200; // iframe height + var confirmHeight = 275; + var premDetailsHeight = 110; + var email = null; + + function _initPanelOneClicks() { + $("#pkt_ext_sendtomobile_button").click(function() { + $("#pkt_ext_sendtomobile_button").replaceWith( + '<div class="pkt_ext_loadingspinner"><div></div></div>' + ); + + thePKT_SAVED.sendMessage("getMobileDownload", {}, function(data) { + if (data.status == 1) { + $("body").html(Handlebars.templates.ho2_download({ email })); + thePKT_SAVED.sendMessage("resizePanel", { + width, + height: confirmHeight, + }); + } else { + $("body").html(Handlebars.templates.ho2_download_error({ email })); + thePKT_SAVED.sendMessage("resizePanel", { + width, + height: confirmHeight, + }); + } + }); + }); + } + + function create(ho2, displayName, adjustHeight) { + email = displayName; + $("body").addClass("pkt_ext_ho2_experiment"); + var height = adjustHeight ? premDetailsHeight : 0; + + // Show "Send to your phone" CTA + height += ctaHeight; + $("body").append(Handlebars.templates.ho2_sharebutton()); + thePKT_SAVED.sendMessage("resizePanel", { width, height }); + + _initPanelOneClicks(); + } + + /** + * Public functions + */ + return { + create, + }; +})(); diff --git a/browser/components/pocket/content/panels/js/signup.js b/browser/components/pocket/content/panels/js/signup.js new file mode 100644 index 0000000000..c7f1bd884e --- /dev/null +++ b/browser/components/pocket/content/panels/js/signup.js @@ -0,0 +1,256 @@ +/* global $:false, Handlebars:false */ +/* import-globals-from messages.js */ + +/* +PKT_SIGNUP_OVERLAY is the view itself and contains all of the methods to manipute the overlay and messaging. +It does not contain any logic for saving or communication with the extension or server. +*/ + +var PKT_SIGNUP_OVERLAY = function(options) { + var myself = this; + this.inited = false; + this.active = false; + this.delayedStateSaved = false; + this.wrapper = null; + this.variant = window.___PKT__SIGNUP_VARIANT; + this.tagline = window.___PKT__SIGNUP_TAGLINE || ""; + this.preventCloseTimerCancel = false; + this.translations = {}; + this.closeValid = true; + this.mouseInside = false; + this.autocloseTimer = null; + this.variant = ""; + this.inoverflowmenu = false; + this.controlvariant; + this.pockethost = "getpocket.com"; + this.loggedOutVariant = "control"; + this.dictJSON = {}; + this.initCloseTabEvents = function() { + function clickHelper(e, linkData) { + e.preventDefault(); + thePKT_SIGNUP.sendMessage("openTabWithUrl", { + url: linkData.url, + activate: true, + source: linkData.source || "", + }); + myself.closePopup(); + } + $(".pkt_ext_learnmore").click(function(e) { + clickHelper(e, { + source: "learn_more", + url: $(this).attr("href"), + }); + }); + $(".signup-btn-firefox").click(function(e) { + clickHelper(e, { + source: "sign_up_1", + url: $(this).attr("href"), + }); + }); + $(".signup-btn-email").click(function(e) { + clickHelper(e, { + source: "sign_up_2", + url: $(this).attr("href"), + }); + }); + $(".pkt_ext_login").click(function(e) { + clickHelper(e, { + source: "log_in", + url: $(this).attr("href"), + }); + }); + // A generic click we don't do anything special for. + // Was used for an experiment, possibly not needed anymore. + $(".signup-btn-tryitnow").click(function(e) { + clickHelper(e, { + url: $(this).attr("href"), + }); + }); + }; + this.closePopup = function() { + thePKT_SIGNUP.sendMessage("close"); + }; + this.sanitizeText = function(s) { + var sanitizeMap = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + }; + if (typeof s !== "string") { + return ""; + } + return String(s).replace(/[&<>"']/g, function(str) { + return sanitizeMap[str]; + }); + }; + this.getTranslations = function() { + this.dictJSON = window.pocketStrings; + }; +}; + +PKT_SIGNUP_OVERLAY.prototype = { + create() { + var controlvariant = window.location.href.match( + /controlvariant=([\w|\.]*)&?/ + ); + if (controlvariant && controlvariant.length > 1) { + this.controlvariant = controlvariant[1]; + } + var variant = window.location.href.match(/variant=([\w|\.]*)&?/); + if (variant && variant.length > 1) { + this.variant = variant[1]; + } + var loggedOutVariant = window.location.href.match( + /loggedOutVariant=([\w|\.]*)&?/ + ); + if (loggedOutVariant && loggedOutVariant.length > 1) { + this.loggedOutVariant = loggedOutVariant[1]; + } + var host = window.location.href.match(/pockethost=([\w|\.]*)&?/); + if (host && host.length > 1) { + this.pockethost = host[1]; + } + var inoverflowmenu = window.location.href.match( + /inoverflowmenu=([\w|\.]*)&?/ + ); + if (inoverflowmenu && inoverflowmenu.length > 1) { + this.inoverflowmenu = inoverflowmenu[1] == "true"; + } + var locale = window.location.href.match(/locale=([\w|\.]*)&?/); + if (locale && locale.length > 1) { + this.locale = locale[1].toLowerCase(); + } + + if (this.active) { + return; + } + this.active = true; + + // set translations + this.getTranslations(); + this.dictJSON.controlvariant = this.controlvariant == "true" ? 1 : 0; + this.dictJSON.variant = this.variant ? this.variant : "undefined"; + this.dictJSON.pockethost = this.pockethost; + this.dictJSON.showlearnmore = true; + this.dictJSON.utmCampaign = "logged_out_save_test"; + this.dictJSON.utmSource = "control"; + + // extra modifier class for collapsed state + if (this.inoverflowmenu) { + $("body").addClass("pkt_ext_signup_overflow"); + } + + // extra modifier class for language + if (this.locale) { + $("body").addClass("pkt_ext_signup_" + this.locale); + } + + // Create actual content + if (this.variant == "overflow") { + $("body").append(Handlebars.templates.signup_shell(this.dictJSON)); + } else { + // Logged Out Display Variants for MV Testing + let variants = { + control: "signupstoryboard_shell", + variant_a: "variant_a", + variant_b: "variant_b", + variant_c: "variant_c", + button_variant: "signupstoryboard_shell", + button_control: "signupstoryboard_shell", + }; + + let loggedOutVariantTemplate = variants[this.loggedOutVariant]; + if ( + this.loggedOutVariant === "button_variant" || + this.loggedOutVariant === "button_control" + ) { + this.dictJSON.buttonVariant = true; + this.dictJSON.utmCampaign = "logged_out_button_test"; + this.dictJSON.utmSource = "button_control"; + if (this.loggedOutVariant === "button_variant") { + this.dictJSON.oneButton = true; + this.dictJSON.utmSource = "button_variant"; + } + } + + if (loggedOutVariantTemplate !== `signupstoryboard_shell`) { + $("body").addClass(` + los_variant los_${loggedOutVariantTemplate} + `); + } + + $("body").append( + Handlebars.templates[loggedOutVariantTemplate || variants.control]( + this.dictJSON + ) + ); + } + + // tell background we're ready + thePKT_SIGNUP.sendMessage("show"); + + // close events + this.initCloseTabEvents(); + }, +}; + +// Layer between Bookmarklet and Extensions +var PKT_SIGNUP = function() {}; + +PKT_SIGNUP.prototype = { + init() { + if (this.inited) { + return; + } + this.panelId = pktPanelMessaging.panelIdFromURL(window.location.href); + this.overlay = new PKT_SIGNUP_OVERLAY(); + + this.inited = true; + }, + + addMessageListener(messageId, callback) { + pktPanelMessaging.addMessageListener(this.panelId, messageId, callback); + }, + + sendMessage(messageId, payload, callback) { + pktPanelMessaging.sendMessage(this.panelId, messageId, payload, callback); + }, + + create() { + this.overlay.create(); + + // tell back end we're ready + thePKT_SIGNUP.sendMessage("show"); + }, +}; + +$(function() { + if (!window.thePKT_SIGNUP) { + var thePKT_SIGNUP = new PKT_SIGNUP(); + /* global thePKT_SIGNUP */ + window.thePKT_SIGNUP = thePKT_SIGNUP; + thePKT_SIGNUP.init(); + } + + var pocketHost = thePKT_SIGNUP.overlay.pockethost; + // send an async message to get string data + thePKT_SIGNUP.sendMessage( + "initL10N", + { + tos: [ + "https://" + pocketHost + "/tos?s=ffi&t=tos&tv=panel_tryit", + "https://" + + pocketHost + + "/privacy?s=ffi&t=privacypolicy&tv=panel_tryit", + ], + }, + function(resp) { + window.pocketStrings = resp.strings; + // Set the writing system direction + document.documentElement.setAttribute("dir", resp.dir); + window.thePKT_SIGNUP.create(); + } + ); +}); diff --git a/browser/components/pocket/content/panels/js/tmpl.js b/browser/components/pocket/content/panels/js/tmpl.js new file mode 100644 index 0000000000..e708c87d36 --- /dev/null +++ b/browser/components/pocket/content/panels/js/tmpl.js @@ -0,0 +1,359 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['ho2_articleinfo'] = template({"1":function(depth0,helpers,partials,data) { + return "pkt_ext_has_image"; +},"3":function(depth0,helpers,partials,data) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <div class=\"pkt_ext_save_image\" style=\"background-image:url('" + + alias3(((helper = (helper = helpers.image_src || (depth0 != null ? depth0.image_src : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"image_src","hash":{},"data":data}) : helper))) + + "'); background-size:cover; background-position:center center;\" data-imgsrc=\"" + + alias3(((helper = (helper = helpers.image_src || (depth0 != null ? depth0.image_src : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"image_src","hash":{},"data":data}) : helper))) + + "\"></div>\n"; +},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var stack1, helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return "<div class=\"pkt_ext_experiment_saved_tile pkt_ext_cf " + + ((stack1 = helpers['if'].call(depth0,(depth0 != null ? depth0.has_image : depth0),{"name":"if","hash":{},"fn":this.program(1, data, 0),"inverse":this.noop,"data":data})) != null ? stack1 : "") + + "\">\n" + + ((stack1 = helpers['if'].call(depth0,(depth0 != null ? depth0.has_image : depth0),{"name":"if","hash":{},"fn":this.program(3, data, 0),"inverse":this.noop,"data":data})) != null ? stack1 : "") + + " <div class=\"pkt_ext_save_title\">\n <div class=\"pkt_ext_save_open\">" + + alias3(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"title","hash":{},"data":data}) : helper))) + + "</div>\n <div class=\"pkt_ext_save_source\">" + + alias3(((helper = (helper = helpers.domain || (depth0 != null ? depth0.domain : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"domain","hash":{},"data":data}) : helper))) + + "</div>\n </div>\n</div>\n"; +},"useData":true}); +templates['ho2_download'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var helper; + + return "<div class=\"pkt_ext_detail pkt_ext_saved_sendcollectemail\">\n <h3 class=\"pkt_ext_heading\">Check your inbox</h3>\n <p class=\"pkt_ext_description\">We’ve sent an email to <span class=\"pkt_ext_bold\">" + + this.escapeExpression(((helper = (helper = helpers.email || (depth0 != null ? depth0.email : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0,{"name":"email","hash":{},"data":data}) : helper))) + + "</span> with a link to install the Pocket app, where your article will be waiting for you.</p>\n\n <div class=\"pkt_ext_download_section\">\n <p class=\"pkt_ext_description\">You can also get it on the App Store here:</p>\n\n <div class=\"pkt_ext_download_button_wrapper\">\n <a href=\"https://getpocket.com/apps/link/pocket-iphone/?s=fx_save_hanger\" target=\"_blank\" ><div class=\"pkt_ext_apple_download\"></div></a>\n <a href=\"https://getpocket.com/apps/link/pocket-android/?s=fx_save_hanger\" target=\"_blank\" ><img class=\"pkt_ext_google_download\" alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png'/></a>\n </div>\n </div>\n</div>\n"; +},"useData":true}); +templates['ho2_download_error'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + return "<div class=\"pkt_ext_detail pkt_ext_saved_sendcollectemail\">\n <h3 class=\"pkt_ext_heading\">There was a problem</h3>\n <p class=\"pkt_ext_description\">Email failed to send, please try again later</p>\n\n <div class=\"pkt_ext_download_section\">\n <p class=\"pkt_ext_description\">You can also get the Pocket app on the App Store here:</p>\n\n <div class=\"pkt_ext_download_button_wrapper\">\n <a href=\"https://getpocket.com/apps/link/pocket-iphone/?s=fx_save_hanger\" target=\"_blank\" ><div class=\"pkt_ext_apple_download\"></div></a>\n <a href=\"https://getpocket.com/apps/link/pocket-android/?s=fx_save_hanger\" target=\"_blank\" ><img class=\"pkt_ext_google_download\" alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png'/></a>\n </div>\n </div>\n</div>\n"; +},"useData":true}); +templates['ho2_sharebutton'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + return "<div class=\"pkt_ext_detail pkt_ext_saved_sendtomobile\">\n <button id=\"pkt_ext_sendtomobile_button\" class=\"pkt_ext_button\">\n <span class=\"pkt_ext_save_title_wrapper pkt_ext_mobile_icon\">\n <span class=\"pkt_ext_logo_action_copy\">Send to your phone</span>\n </span>\n </button>\n</div>\n"; +},"useData":true}); +templates['variant_a'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + return "<div class=\"los_variant_wrapper\">\n <div class=\"los_variant_top\">\n <h1>Click the <img src=\"img/glyph.svg\" alt=\"Pocket Button\" height=\"14\" /> button to save articles, videos, and links to Pocket.</h1>\n <p>Enjoy everything you save, on any device.</p>\n <a class=\"pkt_ext_learnmore\" href=\"https://getpocket.com/pocket-and-firefox?utm_campaign=logged_out_save_test&utm_source=variant_a\">Learn more ›</a>\n </div>\n\n <div class=\"los_variant_bottom\">\n <a class=\"los_variant_button signup-btn-email\" href=\"https://getpocket.com/signup?utm_campaign=logged_out_save_test&utm_source=variant_a\">Get Pocket for free</a>\n <p class=\"los_variant_sub\">Already a Pocket user? <a class=\"pkt_ext_login\" href=\"https://getpocket.com/login?utm_campaign=logged_out_save_test&utm_source=variant_a\">Log in.</a></p>\n </div>\n</div>\n"; +},"useData":true}); +templates['variant_b'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + return "<div class=\"los_variant_wrapper\">\n <div class=\"los_variant_top\">\n <h1>Here's your save button for the internet.</h1>\n <a class=\"pkt_ext_learnmore\" href=\"https://getpocket.com/pocket-and-firefox?utm_campaign=logged_out_save_test&utm_source=variant_b\">Learn more ›</a>\n </div>\n\n <div class=\"los_variant_bottom\">\n <a class=\"los_variant_button signup-btn-email\" href=\"https://getpocket.com/signup?utm_campaign=logged_out_save_test&utm_source=variant_b\">Get Pocket for free</a>\n <p class=\"los_variant_sub\">Already a Pocket user? <a class=\"pkt_ext_login\" href=\"https://getpocket.com/login?utm_campaign=logged_out_save_test&utm_source=variant_b\">Log in.</a></p>\n </div>\n</div>\n"; +},"useData":true}); +templates['variant_c'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + return "<div class=\"los_variant_wrapper\">\n <div class=\"los_variant_top\">\n <h1>Get Pocket to save anything to your personal corner of the internet.</h1>\n <a class=\"pkt_ext_learnmore\" href=\"https://getpocket.com/pocket-and-firefox?utm_campaign=logged_out_save_test&utm_source=variant_c\">Learn more ›</a>\n </div>\n\n <div class=\"los_variant_bottom\">\n <a class=\"los_variant_button signup-btn-email\" href=\"https://getpocket.com/signup?utm_campaign=logged_out_save_test&utm_source=variant_c\">Sign up for free</a>\n <p class=\"los_variant_sub\">Already a Pocket user? <a class=\"pkt_ext_login\" href=\"https://getpocket.com/login?utm_campaign=logged_out_save_test&utm_source=variant_c\">Log in.</a></p>\n </div>\n</div>\n"; +},"useData":true}); +templates['saved_premiumextras'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + return "<div class=\"pkt_ext_suggestedtag_detailshown\">\r\n</div> "; +},"useData":true}); +templates['saved_premiumshell'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var helper; + + return "<div class=\"pkt_ext_suggestedtag_detail pkt_ext_suggestedtag_detail_loading\">\n <h4>" + + this.escapeExpression(((helper = (helper = helpers.suggestedtags || (depth0 != null ? depth0.suggestedtags : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0,{"name":"suggestedtags","hash":{},"data":data}) : helper))) + + "</h4>\n <div class=\"pkt_ext_loadingspinner\"><div></div></div>\n <ul class=\"pkt_ext_cf\">\n </ul>\n</div>\n\n<hr/>\n"; +},"useData":true}); +templates['saved_shell'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return "<div class=\"pkt_ext_initload\">\n <div class=\"pkt_ext_logo\"></div>\n <div class=\"pkt_ext_topdetail\">\n <h2>" + + alias3(((helper = (helper = helpers.saving || (depth0 != null ? depth0.saving : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"saving","hash":{},"data":data}) : helper))) + + "</h2>\n </div>\n <div class=\"pkt_ext_loadingspinner\"><div></div></div>\n</div>\n<div class=\"pkt_ext_detail\">\n <div class=\"pkt_ext_logo\"></div>\n <div class=\"pkt_ext_topdetail\">\n <h2>" + + alias3(((helper = (helper = helpers.pagesaved || (depth0 != null ? depth0.pagesaved : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pagesaved","hash":{},"data":data}) : helper))) + + "</h2>\n <h3 class=\"pkt_ext_errordetail\"></h3>\n <nav class=\"pkt_ext_item_actions pkt_ext_cf\">\n <ul>\n <li><a class=\"pkt_ext_removeitem\" href=\"#\">" + + alias3(((helper = (helper = helpers.removepage || (depth0 != null ? depth0.removepage : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"removepage","hash":{},"data":data}) : helper))) + + "</a></li>\n <li class=\"pkt_ext_actions_separator\"></li>\n <li><a class=\"pkt_ext_openpocket\" href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/a?src=ff_ext_saved\" target=\"_blank\">" + + alias3(((helper = (helper = helpers.viewlist || (depth0 != null ? depth0.viewlist : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"viewlist","hash":{},"data":data}) : helper))) + + "</a></li>\n </ul>\n </nav>\n </div>\n <div class=\"pkt_ext_tag_detail pkt_ext_cf\">\n <div class=\"pkt_ext_tag_input_wrapper\">\n <div class=\"pkt_ext_tag_input_blocker\"></div>\n <input class=\"pkt_ext_tag_input\" type=\"text\" placeholder=\"" + + alias3(((helper = (helper = helpers.addtags || (depth0 != null ? depth0.addtags : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"addtags","hash":{},"data":data}) : helper))) + + "\">\n </div>\n <a href=\"#\" class=\"pkt_ext_btn pkt_ext_btn_disabled\">" + + alias3(((helper = (helper = helpers.save || (depth0 != null ? depth0.save : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"save","hash":{},"data":data}) : helper))) + + "</a>\n </div>\n <p class=\"pkt_ext_edit_msg\"></p>\n</div>\n\n<div class=\"pkt_ext_subshell\">\n <div class=\"pkt_ext_item_recs\"></div>\n</div>\n"; +},"useData":true}); +templates['saved_tmplogin'] = template({"1":function(depth0,helpers,partials,data) { + return " <button id=\"pkt_ext_tmp_account_signup\" class=\"pkt_ext_button pkt_ext_blue_button\">\n <span class=\"pkt_ext_save_title_wrapper pkt_ext_ffx_icon\">\n <span class=\"pkt_ext_logo_action_copy\">Login with Firefox</span>\n </span>\n </button>\n"; +},"3":function(depth0,helpers,partials,data) { + return " <button id=\"pkt_ext_tmp_account_signup\" class=\"pkt_ext_button\">\n <span class=\"pkt_ext_save_title_wrapper\">\n <span class=\"pkt_ext_logo_action_copy\">Sign up</span>\n </span>\n </button>\n"; +},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var stack1; + + return "<div class=\"pkt_ext_detail pkt_ext_saved_tmplogin pkt_shaded_background\">\n <div class=\"pkt_ext_indent_bordered\">\n <p>You are using Pocket without an account.<br />Sign up to back up your saved items.</p>\n <p><a href=\"https://help.getpocket.com/article/1129-using-pocket-without-an-account-in-firefox?s=ghost_upsell\" target=\"_blank\">Learn more</a></p>\n </div>\n\n" + + ((stack1 = helpers['if'].call(depth0,(depth0 != null ? depth0.fxasignedin : depth0),{"name":"if","hash":{},"fn":this.program(1, data, 0),"inverse":this.program(3, data, 0),"data":data})) != null ? stack1 : "") + + "</div>\n"; +},"useData":true}); +templates['signup_shell'] = template({"1":function(depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers['if'].call(depth0,(depth0 != null ? depth0.controlvariant : depth0),{"name":"if","hash":{},"fn":this.program(2, data, 0),"inverse":this.program(4, data, 0),"data":data})) != null ? stack1 : ""); +},"2":function(depth0,helpers,partials,data) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <p class=\"pkt_ext_learnmorecontainer\"><a class=\"pkt_ext_learnmore\" href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/firefox_learnmore?utm_campaign=logged_out_save_test&utm_source=control&s=ffi&t=learnmore&tv=panel_control&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\">" + + alias3(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"learnmore","hash":{},"data":data}) : helper))) + + "</a></p>\n"; +},"4":function(depth0,helpers,partials,data) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <p class=\"pkt_ext_learnmorecontainer\"><a class=\"pkt_ext_learnmore\" href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/firefox_learnmore?utm_campaign=logged_out_save_test&utm_source=control&s=ffi&t=learnmore&tv=panel_tryit&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\">" + + alias3(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"learnmore","hash":{},"data":data}) : helper))) + + "</a></p>\n"; +},"6":function(depth0,helpers,partials,data) { + var helper; + + return " <p class=\"pkt_ext_learnmorecontainer\"><a class=\"pkt_ext_learnmore pkt_ext_learnmoreinactive\" href=\"#\">" + + this.escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0,{"name":"learnmore","hash":{},"data":data}) : helper))) + + "</a></p>\n"; +},"8":function(depth0,helpers,partials,data) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <h4>" + + alias3(((helper = (helper = helpers.signuptosave || (depth0 != null ? depth0.signuptosave : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"signuptosave","hash":{},"data":data}) : helper))) + + "</h4>\n <p class=\"btn-container\"><a href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/ff_signup?utm_campaign=logged_out_save_test&utm_source=control&s=ffi&tv=panel_control&t=signupff&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">" + + alias3(((helper = (helper = helpers.signupfirefox || (depth0 != null ? depth0.signupfirefox : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"signupfirefox","hash":{},"data":data}) : helper))) + + "</span></a></p>\n <p class=\"btn-container\"><a href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/signup?utm_campaign=logged_out_save_test&utm_source=control&force=email&tv=panel_control&src=extension&s=ffi&t=signupemail&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\" class=\"btn btn-secondary signup-btn-email signup-btn-initstate\">" + + alias3(((helper = (helper = helpers.signupemail || (depth0 != null ? depth0.signupemail : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"signupemail","hash":{},"data":data}) : helper))) + + "</a></p>\n <p class=\"alreadyhave\">" + + alias3(((helper = (helper = helpers.alreadyhaveacct || (depth0 != null ? depth0.alreadyhaveacct : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"alreadyhaveacct","hash":{},"data":data}) : helper))) + + " <a class=\"pkt_ext_login\" href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/login?utm_campaign=logged_out_save_test&utm_source=control&ep=3&tv=panel_control&src=extension&s=ffi&t=login&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\">" + + alias3(((helper = (helper = helpers.loginnow || (depth0 != null ? depth0.loginnow : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"loginnow","hash":{},"data":data}) : helper))) + + "</a>.</p>\n"; +},"10":function(depth0,helpers,partials,data) { + var stack1, helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <p class=\"btn-container\"><a href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/firefox_tryitnow?utm_campaign=logged_out_save_test&utm_source=control&s=ffi&tv=panel_tryit&t=tryitnow\" target=\"_blank\" class=\"btn signup-btn-tryitnow\"><span class=\"text\">" + + alias3(((helper = (helper = helpers.tryitnow || (depth0 != null ? depth0.tryitnow : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"tryitnow","hash":{},"data":data}) : helper))) + + "</span></a></p>\n <p class=\"alreadyhave tryitnowspace\">" + + alias3(((helper = (helper = helpers.alreadyhaveacct || (depth0 != null ? depth0.alreadyhaveacct : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"alreadyhaveacct","hash":{},"data":data}) : helper))) + + " <a class=\"pkt_ext_login\" href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/login?utm_campaign=logged_out_save_test&utm_source=control&ep=3&s=ffi&tv=panel_tryit&src=extension&t=login&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\">" + + alias3(((helper = (helper = helpers.loginnow || (depth0 != null ? depth0.loginnow : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"loginnow","hash":{},"data":data}) : helper))) + + "</a>.</p>\n <p class=\"pkt_ext_tos\">" + + ((stack1 = ((helper = (helper = helpers.tos || (depth0 != null ? depth0.tos : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"tos","hash":{},"data":data}) : helper))) != null ? stack1 : "") + + "</p>\n"; +},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var stack1, helper; + + return "<div class=\"pkt_ext_introdetail pkt_ext_introdetailhero\">\n <h2 class=\"pkt_ext_logo\">Pocket</h2>\n <p class=\"pkt_ext_tagline\">" + + this.escapeExpression(((helper = (helper = helpers.tagline || (depth0 != null ? depth0.tagline : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0,{"name":"tagline","hash":{},"data":data}) : helper))) + + "</p>\n" + + ((stack1 = helpers['if'].call(depth0,(depth0 != null ? depth0.showlearnmore : depth0),{"name":"if","hash":{},"fn":this.program(1, data, 0),"inverse":this.program(6, data, 0),"data":data})) != null ? stack1 : "") + + " <div class=\"pkt_ext_introimg\"></div>\n</div>\n<div class=\"pkt_ext_signupdetail pkt_ext_signupdetail_hero\">\n" + + ((stack1 = helpers['if'].call(depth0,(depth0 != null ? depth0.controlvariant : depth0),{"name":"if","hash":{},"fn":this.program(8, data, 0),"inverse":this.program(10, data, 0),"data":data})) != null ? stack1 : "") + + "\n</div>\n"; +},"useData":true}); +templates['signupstoryboard_shell'] = template({"1":function(depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers['if'].call(depth0,(depth0 != null ? depth0.controlvariant : depth0),{"name":"if","hash":{},"fn":this.program(2, data, 0),"inverse":this.program(4, data, 0),"data":data})) != null ? stack1 : ""); +},"2":function(depth0,helpers,partials,data) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <p><a class=\"pkt_ext_learnmore\" href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/firefox_learnmore?utm_campaign=" + + alias3(((helper = (helper = helpers.utmCampaign || (depth0 != null ? depth0.utmCampaign : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmCampaign","hash":{},"data":data}) : helper))) + + "&utm_source=" + + alias3(((helper = (helper = helpers.utmSource || (depth0 != null ? depth0.utmSource : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmSource","hash":{},"data":data}) : helper))) + + "&s=ffi&t=learnmore&tv=panel_control&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\">" + + alias3(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"learnmore","hash":{},"data":data}) : helper))) + + "</a></p>\n"; +},"4":function(depth0,helpers,partials,data) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <p><a class=\"pkt_ext_learnmore\" href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/firefox_learnmore?utm_campaign=" + + alias3(((helper = (helper = helpers.utmCampaign || (depth0 != null ? depth0.utmCampaign : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmCampaign","hash":{},"data":data}) : helper))) + + "&utm_source=" + + alias3(((helper = (helper = helpers.utmSource || (depth0 != null ? depth0.utmSource : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmSource","hash":{},"data":data}) : helper))) + + "&s=ffi&t=learnmore&tv=panel_tryit&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\">" + + alias3(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"learnmore","hash":{},"data":data}) : helper))) + + "</a></p>\n"; +},"6":function(depth0,helpers,partials,data) { + var helper; + + return " <p><a class=\"pkt_ext_learnmore pkt_ext_learnmoreinactive\" href=\"#\">" + + this.escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0,{"name":"learnmore","hash":{},"data":data}) : helper))) + + "</a></p>\n"; +},"8":function(depth0,helpers,partials,data) { + var stack1, helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <h4>" + + alias3(((helper = (helper = helpers.signuptosave || (depth0 != null ? depth0.signuptosave : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"signuptosave","hash":{},"data":data}) : helper))) + + "</h4>\n" + + ((stack1 = helpers['if'].call(depth0,(depth0 != null ? depth0.buttonVariant : depth0),{"name":"if","hash":{},"fn":this.program(9, data, 0),"inverse":this.program(14, data, 0),"data":data})) != null ? stack1 : "") + + " <p class=\"alreadyhave\">" + + alias3(((helper = (helper = helpers.alreadyhaveacct || (depth0 != null ? depth0.alreadyhaveacct : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"alreadyhaveacct","hash":{},"data":data}) : helper))) + + " <a class=\"pkt_ext_login\" href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/login?utm_campaign=" + + alias3(((helper = (helper = helpers.utmCampaign || (depth0 != null ? depth0.utmCampaign : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmCampaign","hash":{},"data":data}) : helper))) + + "&utm_source=" + + alias3(((helper = (helper = helpers.utmSource || (depth0 != null ? depth0.utmSource : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmSource","hash":{},"data":data}) : helper))) + + "&ep=3&tv=panel_control&src=extension&s=ffi&t=login&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\">" + + alias3(((helper = (helper = helpers.loginnow || (depth0 != null ? depth0.loginnow : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"loginnow","hash":{},"data":data}) : helper))) + + "</a>.</p>\n"; +},"9":function(depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers['if'].call(depth0,(depth0 != null ? depth0.oneButton : depth0),{"name":"if","hash":{},"fn":this.program(10, data, 0),"inverse":this.program(12, data, 0),"data":data})) != null ? stack1 : ""); +},"10":function(depth0,helpers,partials,data) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <p class=\"btn-container\">\n <a href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/signup?utm_campaign=" + + alias3(((helper = (helper = helpers.utmCampaign || (depth0 != null ? depth0.utmCampaign : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmCampaign","hash":{},"data":data}) : helper))) + + "&utm_source=button_variant&tv=panel_control&src=extension&s=ffi&t=signupemail&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\" class=\"btn signup-btn-email signup-btn-initstate\">Sign up</a>\n </p>\n"; +},"12":function(depth0,helpers,partials,data) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <p class=\"btn-container\">\n <a href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/ff_signup?utm_campaign=" + + alias3(((helper = (helper = helpers.utmCampaign || (depth0 != null ? depth0.utmCampaign : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmCampaign","hash":{},"data":data}) : helper))) + + "&utm_source=button_control&s=ffi&tv=panel_control&t=signupff&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\" class=\"btn signup-btn-firefox\">\n <span class=\"logo\"></span><span class=\"text\">" + + alias3(((helper = (helper = helpers.signupfirefox || (depth0 != null ? depth0.signupfirefox : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"signupfirefox","hash":{},"data":data}) : helper))) + + "</span>\n </a>\n </p>\n <p class=\"btn-container\">\n <a href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/signup?utm_campaign=" + + alias3(((helper = (helper = helpers.utmCampaign || (depth0 != null ? depth0.utmCampaign : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmCampaign","hash":{},"data":data}) : helper))) + + "&utm_source=button_control&force=email&tv=panel_control&src=extension&s=ffi&t=signupemail&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\" class=\"btn btn-secondary signup-btn-email signup-btn-initstate\">" + + alias3(((helper = (helper = helpers.signupemail || (depth0 != null ? depth0.signupemail : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"signupemail","hash":{},"data":data}) : helper))) + + "</a>\n </p>\n"; +},"14":function(depth0,helpers,partials,data) { + var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <p class=\"btn-container\"><a href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/ff_signup?utm_campaign=" + + alias3(((helper = (helper = helpers.utmCampaign || (depth0 != null ? depth0.utmCampaign : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmCampaign","hash":{},"data":data}) : helper))) + + "&utm_source=" + + alias3(((helper = (helper = helpers.utmSource || (depth0 != null ? depth0.utmSource : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmSource","hash":{},"data":data}) : helper))) + + "&s=ffi&tv=panel_control&t=signupff&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">" + + alias3(((helper = (helper = helpers.signupfirefox || (depth0 != null ? depth0.signupfirefox : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"signupfirefox","hash":{},"data":data}) : helper))) + + "</span></a></p>\n <p class=\"btn-container\"><a href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/signup?utm_campaign=" + + alias3(((helper = (helper = helpers.utmCampaign || (depth0 != null ? depth0.utmCampaign : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmCampaign","hash":{},"data":data}) : helper))) + + "&utm_source=" + + alias3(((helper = (helper = helpers.utmSource || (depth0 != null ? depth0.utmSource : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmSource","hash":{},"data":data}) : helper))) + + "&force=email&tv=panel_control&src=extension&s=ffi&t=signupemail&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\" class=\"btn btn-secondary signup-btn-email signup-btn-initstate\">" + + alias3(((helper = (helper = helpers.signupemail || (depth0 != null ? depth0.signupemail : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"signupemail","hash":{},"data":data}) : helper))) + + "</a></p>\n"; +},"16":function(depth0,helpers,partials,data) { + var stack1, helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return " <p class=\"btn-container\"><a href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/firefox_tryitnow?utm_campaign=" + + alias3(((helper = (helper = helpers.utmCampaign || (depth0 != null ? depth0.utmCampaign : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmCampaign","hash":{},"data":data}) : helper))) + + "&utm_source=" + + alias3(((helper = (helper = helpers.utmSource || (depth0 != null ? depth0.utmSource : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmSource","hash":{},"data":data}) : helper))) + + "&s=ffi&tv=panel_tryit&t=tryitnow\" target=\"_blank\" class=\"btn signup-btn-tryitnow\"><span class=\"text\">" + + alias3(((helper = (helper = helpers.tryitnow || (depth0 != null ? depth0.tryitnow : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"tryitnow","hash":{},"data":data}) : helper))) + + "</span></a></p>\n <p class=\"alreadyhave tryitnowspace\">" + + alias3(((helper = (helper = helpers.alreadyhaveacct || (depth0 != null ? depth0.alreadyhaveacct : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"alreadyhaveacct","hash":{},"data":data}) : helper))) + + " <a class=\"pkt_ext_login\" href=\"https://" + + alias3(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"pockethost","hash":{},"data":data}) : helper))) + + "/login?utm_campaign=" + + alias3(((helper = (helper = helpers.utmCampaign || (depth0 != null ? depth0.utmCampaign : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmCampaign","hash":{},"data":data}) : helper))) + + "&utm_source=" + + alias3(((helper = (helper = helpers.utmSource || (depth0 != null ? depth0.utmSource : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"utmSource","hash":{},"data":data}) : helper))) + + "&ep=3&s=ffi&tv=panel_tryit&src=extension&t=login&v=" + + alias3(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"variant","hash":{},"data":data}) : helper))) + + "\" target=\"_blank\">" + + alias3(((helper = (helper = helpers.loginnow || (depth0 != null ? depth0.loginnow : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"loginnow","hash":{},"data":data}) : helper))) + + "</a>.</p>\n <p class=\"pkt_ext_tos\">" + + ((stack1 = ((helper = (helper = helpers.tos || (depth0 != null ? depth0.tos : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"tos","hash":{},"data":data}) : helper))) != null ? stack1 : "") + + "</p>\n"; +},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var stack1, helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; + + return "<div class=\"pkt_ext_introdetail pkt_ext_introdetailstoryboard\">\n <div class=\"pkt_ext_introstory pkt_ext_introstoryone\">\n <div class=\"pkt_ext_introstory_text\">\n <p class=\"pkt_ext_tagline\">" + + alias3(((helper = (helper = helpers.taglinestory_one || (depth0 != null ? depth0.taglinestory_one : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"taglinestory_one","hash":{},"data":data}) : helper))) + + "</p>\n </div>\n <div class=\"pkt_ext_introstoryone_img\"></div>\n </div>\n <div class=\"pkt_ext_introstorydivider\"></div>\n <div class=\"pkt_ext_introstory pkt_ext_introstorytwo\">\n <div class=\"pkt_ext_introstory_text\">\n <p class=\"pkt_ext_tagline\">" + + alias3(((helper = (helper = helpers.taglinestory_two || (depth0 != null ? depth0.taglinestory_two : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"taglinestory_two","hash":{},"data":data}) : helper))) + + "</p>\n" + + ((stack1 = helpers['if'].call(depth0,(depth0 != null ? depth0.showlearnmore : depth0),{"name":"if","hash":{},"fn":this.program(1, data, 0),"inverse":this.program(6, data, 0),"data":data})) != null ? stack1 : "") + + " </div>\n <div class=\"pkt_ext_introstorytwo_img\"></div>\n </div>\n</div>\n<div class=\"pkt_ext_signupdetail\">\n" + + ((stack1 = helpers['if'].call(depth0,(depth0 != null ? depth0.controlvariant : depth0),{"name":"if","hash":{},"fn":this.program(8, data, 0),"inverse":this.program(16, data, 0),"data":data})) != null ? stack1 : "") + + "</div>\n\n"; +},"useData":true}); +templates['item_recs'] = template({"1":function(depth0,helpers,partials,data) { + return " <h4>Similar Stories</h4>\n"; +},"3":function(depth0,helpers,partials,data) { + return " <h4>Similar Story</h4>\n"; +},"5":function(depth0,helpers,partials,data) { + var stack1, alias1=this.lambda, alias2=this.escapeExpression; + + return " <li>\n <a href=\"" + + alias2(alias1(((stack1 = (depth0 != null ? depth0.item : depth0)) != null ? stack1.resolved_url : stack1), depth0)) + + "\" class=\"pkt_ext_item_recs_link\" target=\"_blank\">\n\n" + + ((stack1 = helpers['if'].call(depth0,((stack1 = (depth0 != null ? depth0.item : depth0)) != null ? stack1.encodedThumbURL : stack1),{"name":"if","hash":{},"fn":this.program(6, data, 0),"inverse":this.noop,"data":data})) != null ? stack1 : "") + + "\n <p class=\"rec-title\">" + + alias2(alias1(((stack1 = (depth0 != null ? depth0.item : depth0)) != null ? stack1.title : stack1), depth0)) + + "</p>\n <p class=\"rec-source\">" + + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.item : depth0)) != null ? stack1.domain_metadata : stack1)) != null ? stack1.name : stack1), depth0)) + + "</p>\n </a>\n </li>\n"; +},"6":function(depth0,helpers,partials,data) { + var stack1; + + return " <img class=\"rec-thumb\" src=\"https://img-getpocket.cdn.mozilla.net/80x80/filters:format(jpeg):quality(60):no_upscale():strip_exif()/" + + this.escapeExpression(this.lambda(((stack1 = (depth0 != null ? depth0.item : depth0)) != null ? stack1.encodedThumbURL : stack1), depth0)) + + "\" />\n"; +},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { + var stack1; + + return "<header>\n" + + ((stack1 = helpers['if'].call(depth0,((stack1 = (depth0 != null ? depth0.recommendations : depth0)) != null ? stack1['1'] : stack1),{"name":"if","hash":{},"fn":this.program(1, data, 0),"inverse":this.program(3, data, 0),"data":data})) != null ? stack1 : "") + + " <a class=\"pkt_ext_learn_more\" target=\"_blank\" href=\"https://getpocket.com/story_recommendations_learn_more\">Learn more</a>\n</header>\n\n<ol>\n" + + ((stack1 = helpers.each.call(depth0,(depth0 != null ? depth0.recommendations : depth0),{"name":"each","hash":{},"fn":this.program(5, data, 0),"inverse":this.noop,"data":data})) != null ? stack1 : "") + + "</ol>\n"; +},"useData":true}); +})();
\ No newline at end of file diff --git a/browser/components/pocket/content/panels/js/vendor/handlebars.runtime.js b/browser/components/pocket/content/panels/js/vendor/handlebars.runtime.js new file mode 100644 index 0000000000..c8bb1c4523 --- /dev/null +++ b/browser/components/pocket/content/panels/js/vendor/handlebars.runtime.js @@ -0,0 +1,660 @@ +/* + + handlebars v2.0.0 + +Copyright (C) 2011-2014 by Yehuda Katz + +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. + +@license +*/ +/* exported Handlebars */ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + define([], factory); + } else if (typeof exports === 'object') { + module.exports = factory(); + } else { + root.Handlebars = root.Handlebars || factory(); + } +}(this, function () { +// handlebars/safe-string.js +var __module3__ = (function() { + "use strict"; + var __exports__; + // Build out our basic SafeString type + function SafeString(string) { + this.string = string; + } + + SafeString.prototype.toString = function() { + return "" + this.string; + }; + + __exports__ = SafeString; + return __exports__; +})(); + +// handlebars/utils.js +var __module2__ = (function(__dependency1__) { + "use strict"; + var __exports__ = {}; + /*jshint -W004 */ + var SafeString = __dependency1__; + + var escape = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + "`": "`" + }; + + var badChars = /[&<>"'`]/g; + var possible = /[&<>"'`]/; + + function escapeChar(chr) { + return escape[chr]; + } + + function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; + } + + __exports__.extend = extend;var toString = Object.prototype.toString; + __exports__.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + var isFunction = function(value) { + return typeof value === 'function'; + }; + // fallback for older versions of Chrome and Safari + /* istanbul ignore next */ + if (isFunction(/x/)) { + isFunction = function(value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; + } + var isFunction; + __exports__.isFunction = isFunction; + /* istanbul ignore next */ + var isArray = Array.isArray || function(value) { + return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false; + }; + __exports__.isArray = isArray; + + function escapeExpression(string) { + // don't escape SafeStrings, since they're already safe + if (string instanceof SafeString) { + return string.toString(); + } else if (string == null) { + return ""; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = "" + string; + + if(!possible.test(string)) { return string; } + return string.replace(badChars, escapeChar); + } + + __exports__.escapeExpression = escapeExpression;function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + + __exports__.isEmpty = isEmpty;function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; + } + + __exports__.appendContextPath = appendContextPath; + return __exports__; +})(__module3__); + +// handlebars/exception.js +var __module4__ = (function() { + "use strict"; + var __exports__; + + var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; + + function Exception(message, node) { + var line; + if (node && node.firstLine) { + line = node.firstLine; + + message += ' - ' + line + ':' + node.firstColumn; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + if (line) { + this.lineNumber = line; + this.column = node.firstColumn; + } + } + + Exception.prototype = new Error(); + + __exports__ = Exception; + return __exports__; +})(); + +// handlebars/base.js +var __module1__ = (function(__dependency1__, __dependency2__) { + "use strict"; + var __exports__ = {}; + var Utils = __dependency1__; + var Exception = __dependency2__; + + var VERSION = "2.0.0"; + __exports__.VERSION = VERSION;var COMPILER_REVISION = 6; + __exports__.COMPILER_REVISION = COMPILER_REVISION; + var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1' + }; + __exports__.REVISION_CHANGES = REVISION_CHANGES; + var isArray = Utils.isArray, + isFunction = Utils.isFunction, + toString = Utils.toString, + objectType = '[object Object]'; + + function HandlebarsEnvironment(helpers, partials) { + this.helpers = helpers || {}; + this.partials = partials || {}; + + registerDefaultHelpers(this); + } + + __exports__.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: logger, + log: log, + + registerHelper: function(name, fn) { + if (toString.call(name) === objectType) { + if (fn) { throw new Exception('Arg not supported with multiple helpers'); } + Utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function(name) { + delete this.helpers[name]; + }, + + registerPartial: function(name, partial) { + if (toString.call(name) === objectType) { + Utils.extend(this.partials, name); + } else { + this.partials[name] = partial; + } + }, + unregisterPartial: function(name) { + delete this.partials[name]; + } + }; + + function registerDefaultHelpers(instance) { + instance.registerHelper('helperMissing', function(/* [args, ]options */) { + if(arguments.length === 1) { + // A missing field in a {{foo}} constuct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new Exception("Missing helper: '" + arguments[arguments.length-1].name + "'"); + } + }); + + instance.registerHelper('blockHelperMissing', function(context, options) { + var inverse = options.inverse, + fn = options.fn; + + if(context === true) { + return fn(this); + } else if(context === false || context == null) { + return inverse(this); + } else if (isArray(context)) { + if(context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = createFrame(options.data); + data.contextPath = Utils.appendContextPath(options.data.contextPath, options.name); + options = {data: data}; + } + + return fn(context, options); + } + }); + + instance.registerHelper('each', function(context, options) { + if (!options) { + throw new Exception('Must pass iterator to #each'); + } + + var fn = options.fn, inverse = options.inverse; + var i = 0, ret = "", data; + + var contextPath; + if (options.data && options.ids) { + contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (isFunction(context)) { context = context.call(this); } + + if (options.data) { + data = createFrame(options.data); + } + + if(context && typeof context === 'object') { + if (isArray(context)) { + for(var j = context.length; i<j; i++) { + if (data) { + data.index = i; + data.first = (i === 0); + data.last = (i === (context.length-1)); + + if (contextPath) { + data.contextPath = contextPath + i; + } + } + ret = ret + fn(context[i], { data: data }); + } + } else { + for(var key in context) { + if(context.hasOwnProperty(key)) { + if(data) { + data.key = key; + data.index = i; + data.first = (i === 0); + + if (contextPath) { + data.contextPath = contextPath + key; + } + } + ret = ret + fn(context[key], {data: data}); + i++; + } + } + } + } + + if(i === 0){ + ret = inverse(this); + } + + return ret; + }); + + instance.registerHelper('if', function(conditional, options) { + if (isFunction(conditional)) { conditional = conditional.call(this); } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if ((!options.hash.includeZero && !conditional) || Utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function(conditional, options) { + return instance.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn, hash: options.hash}); + }); + + instance.registerHelper('with', function(context, options) { + if (isFunction(context)) { context = context.call(this); } + + var fn = options.fn; + + if (!Utils.isEmpty(context)) { + if (options.data && options.ids) { + var data = createFrame(options.data); + data.contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]); + options = {data:data}; + } + + return fn(context, options); + } else { + return options.inverse(this); + } + }); + + instance.registerHelper('log', function(message, options) { + var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1; + instance.log(level, message); + }); + + instance.registerHelper('lookup', function(obj, field) { + return obj && obj[field]; + }); + } + + var logger = { + methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' }, + + // State enum + DEBUG: 0, + INFO: 1, + WARN: 2, + ERROR: 3, + level: 3, + + // can be overridden in the host environment + log: function(level, message) { + if (logger.level <= level) { + var method = logger.methodMap[level]; + if (typeof console !== 'undefined' && console[method]) { + console[method].call(console, message); + } + } + } + }; + __exports__.logger = logger; + var log = logger.log; + __exports__.log = log; + var createFrame = function(object) { + var frame = Utils.extend({}, object); + frame._parent = object; + return frame; + }; + __exports__.createFrame = createFrame; + return __exports__; +})(__module2__, __module4__); + +// handlebars/runtime.js +var __module5__ = (function(__dependency1__, __dependency2__, __dependency3__) { + "use strict"; + var __exports__ = {}; + var Utils = __dependency1__; + var Exception = __dependency2__; + var COMPILER_REVISION = __dependency3__.COMPILER_REVISION; + var REVISION_CHANGES = __dependency3__.REVISION_CHANGES; + var createFrame = __dependency3__.createFrame; + + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + var runtimeVersions = REVISION_CHANGES[currentRevision], + compilerVersions = REVISION_CHANGES[compilerRevision]; + throw new Exception("Template was precompiled with an older version of Handlebars than the current runtime. "+ + "Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+")."); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new Exception("Template was precompiled with a newer version of Handlebars than the current runtime. "+ + "Please update your runtime to a newer version ("+compilerInfo[1]+")."); + } + } + } + + __exports__.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial + + function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new Exception("No environment passed to template"); + } + if (!templateSpec || !templateSpec.main) { + throw new Exception('Unknown template object: ' + typeof templateSpec); + } + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as psuedo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + var invokePartialWrapper = function(partial, indent, name, context, hash, helpers, partials, data, depths) { + if (hash) { + context = Utils.extend({}, context, hash); + } + + var result = env.VM.invokePartial.call(this, partial, name, context, helpers, partials, data, depths); + + if (result == null && env.compile) { + var options = { helpers: helpers, partials: partials, data: data, depths: depths }; + partials[name] = env.compile(partial, { data: data !== undefined, compat: templateSpec.compat }, env); + result = partials[name](context, options); + } + if (result != null) { + if (indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new Exception("The partial " + name + " could not be compiled when running in runtime-only mode"); + } + }; + + // Just add water + var container = { + lookup: function(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + if (depths[i] && depths[i][name] != null) { + return depths[i][name]; + } + } + }, + lambda: function(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function(i) { + return templateSpec[i]; + }, + + programs: [], + program: function(i, data, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths) { + programWrapper = program(this, i, fn, data, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = program(this, i, fn); + } + return programWrapper; + }, + + data: function(data, depth) { + while (data && depth--) { + data = data._parent; + } + return data; + }, + merge: function(param, common) { + var ret = param || common; + + if (param && common && (param !== common)) { + ret = Utils.extend({}, common, param); + } + + return ret; + }, + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + var ret = function(context, options) { + options = options || {}; + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths; + if (templateSpec.useDepths) { + depths = options.depths ? [context].concat(options.depths) : [context]; + } + + return templateSpec.main.call(container, context, container.helpers, container.partials, data, depths); + }; + ret.isTop = true; + + ret._setup = function(options) { + if (!options.partial) { + container.helpers = container.merge(options.helpers, env.helpers); + + if (templateSpec.usePartial) { + container.partials = container.merge(options.partials, env.partials); + } + } else { + container.helpers = options.helpers; + container.partials = options.partials; + } + }; + + ret._child = function(i, data, depths) { + if (templateSpec.useDepths && !depths) { + throw new Exception('must pass parent depths'); + } + + return program(container, i, templateSpec[i], data, depths); + }; + return ret; + } + + __exports__.template = template;function program(container, i, fn, data, depths) { + var prog = function(context, options) { + options = options || {}; + + return fn.call(container, context, container.helpers, container.partials, options.data || data, depths && [context].concat(depths)); + }; + prog.program = i; + prog.depth = depths ? depths.length : 0; + return prog; + } + + __exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data, depths) { + var options = { partial: true, helpers: helpers, partials: partials, data: data, depths: depths }; + + if(partial === undefined) { + throw new Exception("The partial " + name + " could not be found"); + } else if(partial instanceof Function) { + return partial(context, options); + } + } + + __exports__.invokePartial = invokePartial;function noop() { return ""; } + + __exports__.noop = noop;function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? createFrame(data) : {}; + data.root = context; + } + return data; + } + return __exports__; +})(__module2__, __module4__, __module1__); + +// handlebars.runtime.js +var __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) { + "use strict"; + var __exports__; + /*globals Handlebars: true */ + var base = __dependency1__; + + // Each of these augment the Handlebars object. No need to setup here. + // (This is done to easily share code between commonjs and browse envs) + var SafeString = __dependency2__; + var Exception = __dependency3__; + var Utils = __dependency4__; + var runtime = __dependency5__; + + // For compatibility and usage outside of module systems, make the Handlebars object a namespace + var create = function() { + var hb = new base.HandlebarsEnvironment(); + + Utils.extend(hb, base); + hb.SafeString = SafeString; + hb.Exception = Exception; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + + hb.VM = runtime; + hb.template = function(spec) { + return runtime.template(spec, hb); + }; + + return hb; + }; + + var Handlebars = create(); + Handlebars.create = create; + + Handlebars['default'] = Handlebars; + + __exports__ = Handlebars; + return __exports__; +})(__module1__, __module3__, __module4__, __module2__, __module5__); + + return __module0__; +})); diff --git a/browser/components/pocket/content/panels/js/vendor/jquery-2.1.1.min.js b/browser/components/pocket/content/panels/js/vendor/jquery-2.1.1.min.js new file mode 100644 index 0000000000..9ed2acc66d --- /dev/null +++ b/browser/components/pocket/content/panels/js/vendor/jquery-2.1.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b) +},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b)) +},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});
\ No newline at end of file diff --git a/browser/components/pocket/content/panels/js/vendor/jquery.tokeninput.min.js b/browser/components/pocket/content/panels/js/vendor/jquery.tokeninput.min.js new file mode 100644 index 0000000000..40d323df0d --- /dev/null +++ b/browser/components/pocket/content/panels/js/vendor/jquery.tokeninput.min.js @@ -0,0 +1,954 @@ +/*
+ * jQuery Plugin: Tokenizing Autocomplete Text Entry
+ * Version 1.6.0
+ *
+ * Copyright (c) 2009 James Smith (http://loopj.com)
+ * Licensed jointly under the GPL and MIT licenses,
+ * choose which one suits your project best!
+ *
+ * Licensed under MIT
+ * With modifications
+ *
+ */
+
+(function ($) {
+// Default settings
+var DEFAULT_SETTINGS = {
+ // Search settings
+ method: "GET",
+ contentType: "json",
+ queryParam: "q",
+ searchDelay: 300,
+ minChars: 1,
+ propertyToSearch: "name",
+ jsonContainer: null,
+ scrollKeyboard: false,
+
+ // Display settings
+ hintText: null,
+ noResultsText: null,
+ noResultsHideDropdown: false,
+ searchingText: null,
+ deleteText: "×",
+ animateDropdown: true,
+ emptyInputLength: null,
+
+ // Tokenization settings
+ tokenLimit: null,
+ tokenDelimiter: ",",
+ preventDuplicates: false,
+
+ // Output settings
+ tokenValue: "id",
+
+ // Prepopulation settings
+ prePopulate: null,
+ processPrePopulate: false,
+
+ // Manipulation settings
+ idPrefix: "token-input-",
+
+ // Formatters
+ resultsFormatter: function(item) {
+ let listItem = document.createElement("li");
+ listItem.textContent = item[this.propertyToSearch];
+ return listItem.outerHTML;
+ },
+ tokenFormatter: function(item) {
+ let listItem = document.createElement("li");
+ let p = document.createElement("p");
+ p.textContent = item[this.propertyToSearch];
+ listItem.appendChild(p);
+ return listItem.outerHTML;
+ },
+
+ // Validations
+ validateItem: null,
+
+ // Force selections only on mouse click
+ noHoverSelect: false,
+
+ // Callbacks
+ onResult: null,
+ onAdd: null,
+ onDelete: null,
+ onReady: null
+};
+
+// Default classes to use when theming
+var DEFAULT_CLASSES = {
+ tokenList: "token-input-list",
+ token: "token-input-token",
+ tokenDelete: "token-input-delete-token",
+ selectedToken: "token-input-selected-token",
+ highlightedToken: "token-input-highlighted-token",
+ dropdown: "token-input-dropdown",
+ dropdownItem: "token-input-dropdown-item",
+ dropdownItem2: "token-input-dropdown-item2",
+ selectedDropdownItem: "token-input-selected-dropdown-item",
+ inputToken: "token-input-input-token"
+};
+
+// Input box position "enum"
+var POSITION = {
+ BEFORE: 0,
+ AFTER: 1,
+ END: 2
+};
+
+// Keys "enum"
+var KEY = {
+ BACKSPACE: 8,
+ TAB: 9,
+ ENTER: 13,
+ ESCAPE: 27,
+ SPACE: 32,
+ PAGE_UP: 33,
+ PAGE_DOWN: 34,
+ END: 35,
+ HOME: 36,
+ LEFT: 37,
+ UP: 38,
+ RIGHT: 39,
+ DOWN: 40,
+ NUMPAD_ENTER: 108,
+ COMMA: 188
+};
+
+// Additional public (exposed) methods
+var methods = {
+ init: function(url_or_data_or_function, options) {
+ var settings = $.extend({}, DEFAULT_SETTINGS, options || {});
+
+ return this.each(function () {
+ $(this).data("tokenInputObject", new $.TokenList(this, url_or_data_or_function, settings));
+ });
+ },
+ clear: function() {
+ this.data("tokenInputObject").clear();
+ return this;
+ },
+ add: function(item) {
+ this.data("tokenInputObject").add(item);
+ return this;
+ },
+ remove: function(item) {
+ this.data("tokenInputObject").remove(item);
+ return this;
+ },
+ get: function() {
+ return this.data("tokenInputObject").getTokens();
+ }
+}
+
+// Expose the .tokenInput function to jQuery as a plugin
+$.fn.tokenInput = function (method) {
+ // Method calling and initialization logic
+ if(methods[method]) {
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
+ } else {
+ return methods.init.apply(this, arguments);
+ }
+};
+
+// TokenList class for each input
+$.TokenList = function (input, url_or_data, settings) {
+ //
+ // Initialization
+ //
+
+ // Configure the data source
+ if($.type(url_or_data) === "string" || $.type(url_or_data) === "function") {
+ // Set the url to query against
+ settings.url = url_or_data;
+
+ // If the URL is a function, evaluate it here to do our initalization work
+ var url = computeURL();
+
+ // Make a smart guess about cross-domain if it wasn't explicitly specified
+ if(settings.crossDomain === undefined) {
+ if(url.indexOf("://") === -1) {
+ settings.crossDomain = false;
+ } else {
+ settings.crossDomain = (location.href.split(/\/+/g)[1] !== url.split(/\/+/g)[1]);
+ }
+ }
+ } else if(typeof(url_or_data) === "object") {
+ // Set the local data to search through
+ settings.local_data = url_or_data;
+ }
+
+ // Build class names
+ if(settings.classes) {
+ // Use custom class names
+ settings.classes = $.extend({}, DEFAULT_CLASSES, settings.classes);
+ } else if(settings.theme) {
+ // Use theme-suffixed default class names
+ settings.classes = {};
+ $.each(DEFAULT_CLASSES, function(key, value) {
+ settings.classes[key] = value + "-" + settings.theme;
+ });
+ } else {
+ settings.classes = DEFAULT_CLASSES;
+ }
+
+
+ // Save the tokens
+ var saved_tokens = [];
+
+ // Keep track of the number of tokens in the list
+ var token_count = 0;
+
+ // Basic cache to save on db hits
+ var cache = new $.TokenList.Cache();
+
+ // Keep track of the timeout, old vals
+ var timeout;
+ var input_val;
+
+ function tokenize(){
+ var item = $(selected_dropdown_item).data("tokeninput");
+ if(!item && settings.textToData){
+ item = settings.textToData(input_box.val());
+ }
+
+ if(item) {
+ add_token(item);
+ hidden_input.change();
+ return false;
+ }
+ }
+
+ // Create a new text input an attach keyup events
+ var input_box = $("<input type=\"text\" autocomplete=\"off\">")
+ .css({
+ outline: "none"
+ })
+ .attr("id", settings.idPrefix + input.id)
+ .focus(function () {
+ if (settings.minChars == 0) {
+ setTimeout(function(){do_search();}, 5);
+ }
+ if (settings.tokenLimit === null || settings.tokenLimit !== token_count) {
+ show_dropdown_hint();
+ }
+ })
+ .blur(function () {
+ tokenize();
+ hide_dropdown();
+ $(this).val("");
+ })
+ .bind("keyup keydown blur update", resize_input)
+ .keydown(function (event) {
+ var previous_token;
+ var next_token;
+
+ switch(event.keyCode) {
+ case KEY.LEFT:
+ case KEY.RIGHT:
+ case KEY.UP:
+ case KEY.DOWN:
+ if(!$(this).val()) {
+ previous_token = input_token.prev();
+ next_token = input_token.next();
+
+ if((previous_token.length && previous_token.get(0) === selected_token) || (next_token.length && next_token.get(0) === selected_token)) {
+ // Check if there is a previous/next token and it is selected
+ if(event.keyCode === KEY.LEFT || event.keyCode === KEY.UP) {
+ deselect_token($(selected_token), POSITION.BEFORE);
+ } else {
+ deselect_token($(selected_token), POSITION.AFTER);
+ }
+ } else if((event.keyCode === KEY.LEFT || event.keyCode === KEY.UP) && previous_token.length) {
+ // We are moving left, select the previous token if it exists
+ select_token($(previous_token.get(0)));
+ } else if((event.keyCode === KEY.RIGHT || event.keyCode === KEY.DOWN) && next_token.length) {
+ // We are moving right, select the next token if it exists
+ select_token($(next_token.get(0)));
+ }
+ } else {
+ if (event.keyCode === KEY.UP || event.keyCode === KEY.DOWN) {
+ var dropdown_item = null;
+ if(!selected_dropdown_item && (event.keyCode === KEY.DOWN)) {
+ dropdown_item = $('.token-input-dropdown li').first();
+ }
+ else if(event.keyCode === KEY.DOWN) {
+ dropdown_item = $(selected_dropdown_item).next();
+ } else {
+ dropdown_item = $(selected_dropdown_item).prev();
+ }
+
+ if(dropdown_item.length) {
+ select_dropdown_item(dropdown_item,true);
+ }
+ else if (!(event.keyCode === KEY.DOWN) && $(selected_dropdown_item).length) {
+ deselect_dropdown_item($(selected_dropdown_item));
+ }
+ return false;
+ }
+ }
+ break;
+
+ case KEY.BACKSPACE:
+ previous_token = input_token.prev();
+
+ if(!$(this).val().length) {
+ if(selected_token) {
+ delete_token($(selected_token));
+ hidden_input.change();
+ } else if(previous_token.length) {
+ select_token($(previous_token.get(0)));
+ }
+
+ return false;
+ } else if($(this).val().length === 1) {
+ hide_dropdown();
+ } else {
+ // set a timeout just long enough to let this function finish.
+ setTimeout(function(){do_search();}, 5);
+ }
+ break;
+
+ case KEY.TAB:
+ case KEY.ENTER:
+ case KEY.NUMPAD_ENTER:
+ case KEY.COMMA:
+ if (event.keyCode != KEY.ENTER && event.keyCode != KEY.NUMPAD_ENTER)
+ {
+ event.preventDefault();
+ }
+ tokenize();
+ break;
+
+ case KEY.ESCAPE:
+ hide_dropdown();
+ return true;
+
+ default:
+ if(String.fromCharCode(event.which)) {
+ // set a timeout just long enough to let this function finish.
+ setTimeout(function(){do_search();}, 5);
+ }
+ break;
+ }
+ });
+
+ // Keep a reference to the original input box
+ var hidden_input = $(input)
+ .hide()
+ .val("")
+ .focus(function () {
+ input_box.focus();
+ })
+ .blur(function () {
+ input_box.blur();
+ });
+
+ // Keep a reference to the selected token and dropdown item
+ var selected_token = null;
+ var selected_token_index = 0;
+ var selected_dropdown_item = null;
+
+ // The list to store the token items in
+ var token_list = $("<ul />")
+ .addClass(settings.classes.tokenList)
+ .click(function (event) {
+ var li = $(event.target).closest("li");
+ if(li && li.get(0) && $.data(li.get(0), "tokeninput")) {
+ toggle_select_token(li);
+ } else {
+ // Deselect selected token
+ if(selected_token) {
+ deselect_token($(selected_token), POSITION.END);
+ }
+
+ // Focus input box
+ input_box.focus();
+ }
+ })
+ .mouseover(function (event) {
+ var li = $(event.target).closest("li");
+ if(li && selected_token !== this) {
+ li.addClass(settings.classes.highlightedToken);
+ }
+ })
+ .mouseout(function (event) {
+ var li = $(event.target).closest("li");
+ if(li && selected_token !== this) {
+ li.removeClass(settings.classes.highlightedToken);
+ }
+ })
+ .insertBefore(hidden_input);
+
+ // The token holding the input box
+ var input_token = $("<li />")
+ .addClass(settings.classes.inputToken)
+ .appendTo(token_list)
+ .append(input_box);
+
+ // The list to store the dropdown items in
+ var dropdown = $("<div>")
+ .addClass(settings.classes.dropdown)
+ .appendTo("body")
+ .hide();
+
+ // Magic element to help us resize the text input
+ var input_resizer = $("<tester/>")
+ .insertAfter(input_box)
+ .css({
+ position: "absolute",
+ top: -9999,
+ left: -9999,
+ width: "auto",
+ fontSize: input_box.css("fontSize"),
+ fontFamily: input_box.css("fontFamily"),
+ fontWeight: input_box.css("fontWeight"),
+ letterSpacing: input_box.css("letterSpacing"),
+ whiteSpace: "nowrap"
+ });
+
+ // Pre-populate list if items exist
+ hidden_input.val("");
+ var li_data = settings.prePopulate || hidden_input.data("pre");
+ if(settings.processPrePopulate && $.isFunction(settings.onResult)) {
+ li_data = settings.onResult.call(hidden_input, li_data);
+ }
+ if(li_data && li_data.length) {
+ $.each(li_data, function (index, value) {
+ insert_token(value);
+ checkTokenLimit();
+ });
+ }
+
+ // Initialization is done
+ if($.isFunction(settings.onReady)) {
+ settings.onReady.call();
+ if (settings.minChars == 0)
+ {
+ setTimeout(function(){do_search();}, 5);
+ }
+ }
+
+ //
+ // Public functions
+ //
+
+ this.clear = function() {
+ token_list.children("li").each(function() {
+ if ($(this).children("input").length === 0) {
+ delete_token($(this));
+ }
+ });
+ }
+
+ this.add = function(item) {
+ add_token(item);
+ }
+
+ this.remove = function(item) {
+ token_list.children("li").each(function() {
+ if ($(this).children("input").length === 0) {
+ var currToken = $(this).data("tokeninput");
+ var match = true;
+ for (var prop in item) {
+ if (item[prop] !== currToken[prop]) {
+ match = false;
+ break;
+ }
+ }
+ if (match) {
+ delete_token($(this));
+ }
+ }
+ });
+ }
+
+ this.getTokens = function() {
+ return saved_tokens;
+ }
+
+ //
+ // Private functions
+ //
+
+ function checkTokenLimit() {
+ if(settings.tokenLimit !== null && token_count >= settings.tokenLimit) {
+ input_box.hide();
+ hide_dropdown();
+ return;
+ }
+ }
+
+ function resize_input() {
+ if(input_val === (input_val = input_box.val())) {return;}
+
+ // Enter new content into resizer and resize input accordingly
+ var escaped = input_val.replace(/&/g, '&').replace(/\s/g,' ').replace(/</g, '<').replace(/>/g, '>');
+ input_resizer.html(escaped);
+ var minwidth = 30;
+ if (settings.emptyInputLength && token_list.children().length < 2) {
+ minwidth = settings.emptyInputLength;
+ }
+ input_box.width(input_resizer.width() + minwidth);
+ }
+
+ function is_printable_character(keycode) {
+ return ((keycode >= 48 && keycode <= 90) || // 0-1a-z
+ (keycode >= 96 && keycode <= 111) || // numpad 0-9 + - / * .
+ (keycode >= 186 && keycode <= 192) || // ; = , - . / ^
+ (keycode >= 219 && keycode <= 222)); // ( \ ) '
+ }
+
+ // Inner function to a token to the list
+ function insert_token(item) {
+ var this_token = settings.tokenFormatter(item);
+ this_token = $(this_token)
+ .addClass(settings.classes.token)
+ .insertBefore(input_token);
+
+ // The 'delete token' button
+ $("<span>" + settings.deleteText + "</span>")
+ .addClass(settings.classes.tokenDelete)
+ .appendTo(this_token)
+ .click(function () {
+ delete_token($(this).parent());
+ hidden_input.change();
+ return false;
+ });
+
+ // Store data on the token
+ var token_data = {"id": item.id};
+ token_data[settings.propertyToSearch] = item[settings.propertyToSearch];
+ token_data.item = item;
+ $.data(this_token.get(0), "tokeninput", item);
+
+ // Save this token for duplicate checking
+ saved_tokens = saved_tokens.slice(0,selected_token_index).concat([token_data]).concat(saved_tokens.slice(selected_token_index));
+ selected_token_index++;
+
+ // Update the hidden input
+ update_hidden_input(saved_tokens, hidden_input);
+
+ token_count += 1;
+
+ // Check the token limit
+ if(settings.tokenLimit !== null && token_count >= settings.tokenLimit) {
+ input_box.hide();
+ hide_dropdown();
+ }
+
+ return this_token;
+ }
+
+ // Add a token to the token list based on user input
+ function add_token (item) {
+ if(!item) return;
+
+ // Check for item validation
+ if ($.isFunction(settings.validateItem) && !settings.validateItem(item)) {
+ return false;
+ }
+
+ var callback = settings.onAdd;
+
+ // See if the token already exists and select it if we don't want duplicates
+ if(token_count > 0 && settings.preventDuplicates) {
+ var found_existing_token = null;
+ token_list.children().each(function () {
+ var existing_token = $(this);
+ var existing_data = $.data(existing_token.get(0), "tokeninput");
+ if(existing_data && existing_data.id === item.id) {
+ found_existing_token = existing_token;
+ return false;
+ }
+ });
+
+ if(found_existing_token) {
+ select_token(found_existing_token);
+ input_token.insertAfter(found_existing_token);
+ input_box.focus();
+ return;
+ }
+ }
+
+ // Insert the new tokens
+ if(settings.tokenLimit == null || token_count < settings.tokenLimit) {
+ insert_token(item);
+ checkTokenLimit();
+ }
+
+ // Clear input box
+ input_box.val("");
+
+ // Don't show the help dropdown, they've got the idea
+ hide_dropdown();
+
+ // Execute the onAdd callback if defined
+ if($.isFunction(callback)) {
+ callback.call(hidden_input,item);
+ }
+ }
+
+ // Select a token in the token list
+ function select_token (token) {
+ token.addClass(settings.classes.selectedToken);
+ selected_token = token.get(0);
+
+ // Hide input box
+ input_box.val("");
+
+ // Hide dropdown if it is visible (eg if we clicked to select token)
+ hide_dropdown();
+ }
+
+ // Deselect a token in the token list
+ function deselect_token (token, position) {
+ token.removeClass(settings.classes.selectedToken);
+ selected_token = null;
+
+ if(position === POSITION.BEFORE) {
+ input_token.insertBefore(token);
+ selected_token_index--;
+ } else if(position === POSITION.AFTER) {
+ input_token.insertAfter(token);
+ selected_token_index++;
+ } else {
+ input_token.appendTo(token_list);
+ selected_token_index = token_count;
+ }
+
+ // Show the input box and give it focus again
+ input_box.focus();
+ }
+
+ // Toggle selection of a token in the token list
+ function toggle_select_token(token) {
+ var previous_selected_token = selected_token;
+
+ if(selected_token) {
+ deselect_token($(selected_token), POSITION.END);
+ }
+
+ if(previous_selected_token === token.get(0)) {
+ deselect_token(token, POSITION.END);
+ } else {
+ select_token(token);
+ }
+ }
+
+ // Delete a token from the token list
+ function delete_token (token) {
+ // Remove the id from the saved list
+ var token_data = $.data(token.get(0), "tokeninput");
+ var callback = settings.onDelete;
+
+ var index = token.prevAll().length;
+ if(index > selected_token_index) index--;
+
+ // Delete the token
+ token.remove();
+ selected_token = null;
+
+ // Show the input box and give it focus again
+ input_box.focus();
+
+ // Remove this token from the saved list
+ saved_tokens = saved_tokens.slice(0,index).concat(saved_tokens.slice(index+1));
+ if(index < selected_token_index) selected_token_index--;
+
+ // Update the hidden input
+ update_hidden_input(saved_tokens, hidden_input);
+
+ token_count -= 1;
+
+ if(settings.tokenLimit !== null) {
+ input_box
+ .show()
+ .val("")
+ .focus();
+ }
+
+ // Execute the onDelete callback if defined
+ if($.isFunction(callback)) {
+ callback.call(hidden_input,token_data);
+ }
+ }
+
+ // Update the hidden input box value
+ function update_hidden_input(saved_tokens, hidden_input) {
+ var token_values = $.map(saved_tokens, function (el) {
+ return el[settings.tokenValue];
+ });
+ hidden_input.val(token_values.join(settings.tokenDelimiter));
+
+ }
+
+ // Hide and clear the results dropdown
+ function hide_dropdown () {
+ dropdown.hide().empty();
+ selected_dropdown_item = null;
+ if (settings.onHideDropdown)
+ settings.onHideDropdown();
+ }
+
+ function show_dropdown() {
+ dropdown
+ .css({
+ position: "absolute",
+ top: $(token_list).offset().top + $(token_list).outerHeight(),
+ left: $(token_list).offset().left,
+ zindex: 999
+ })
+ .show();
+ if (settings.onShowDropdown)
+ settings.onShowDropdown();
+ }
+
+ function show_dropdown_searching () {
+ if(settings.searchingText) {
+ dropdown.html("<p>"+settings.searchingText+"</p>");
+ show_dropdown();
+ }
+ }
+
+ function show_dropdown_hint () {
+ if(settings.hintText) {
+ dropdown.html("<p>"+settings.hintText+"</p>");
+ show_dropdown();
+ }
+ }
+
+ // Highlight the query part of the search term
+ function highlight_term(value, term) {
+ return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<b>$1</b>");
+ }
+
+ function find_value_and_highlight_term(template, value, term) {
+ return template.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + value + ")(?![^<>]*>)(?![^&;]+;)", "g"), highlight_term(value, term));
+ }
+
+ // Populate the results dropdown with some results
+ function populate_dropdown (query, results) {
+ if(results && results.length) {
+ dropdown.empty();
+ var dropdown_ul = $("<ul>")
+ .appendTo(dropdown)
+ .mouseover(function (event) {
+ select_dropdown_item($(event.target).closest("li"));
+ })
+ .mousedown(function (event) {
+ add_token($(event.target).closest("li").data("tokeninput"));
+ hidden_input.change();
+ return false;
+ })
+ .hide();
+ if (settings.noHoverSelect) {
+ dropdown_ul.off('mouseover');
+ dropdown_ul.on('mouseover',function (event) {
+ $(this).find("li").removeClass(settings.classes.selectedDropdownItem);
+ $(event.target).closest("li").addClass(settings.classes.selectedDropdownItem);
+ });
+ }
+
+ $.each(results, function(index, value) {
+ var this_li = settings.resultsFormatter(value);
+
+ // this_li = find_value_and_highlight_term(this_li ,value[settings.propertyToSearch], query);
+
+ this_li = $(this_li).appendTo(dropdown_ul);
+
+ if(index % 2) {
+ this_li.addClass(settings.classes.dropdownItem);
+ } else {
+ this_li.addClass(settings.classes.dropdownItem2);
+ }
+
+ // if(index === 0) {
+ // select_dropdown_item(this_li);
+ // }
+
+ $.data(this_li.get(0), "tokeninput", value);
+ });
+
+ show_dropdown();
+
+ if(settings.animateDropdown) {
+ dropdown_ul.slideDown("fast");
+ } else {
+ dropdown_ul.show();
+ }
+ } else {
+ if(settings.noResultsText) {
+ dropdown.html("<p>"+settings.noResultsText+"</p>");
+ show_dropdown();
+ }
+ if (settings.noResultsHideDropdown) {
+ hide_dropdown();
+ }
+ }
+ }
+
+ // Highlight an item in the results dropdown
+ function select_dropdown_item (item,withkeyboard) {
+ if(item) {
+ if(selected_dropdown_item) {
+ deselect_dropdown_item($(selected_dropdown_item));
+ }
+ if (settings.scrollKeyboard && withkeyboard) {
+ var list = $('.token-input-dropdown-tag ul');
+ var listheight = list.height();
+ var itemheight = item.outerHeight();
+ var itemtop = item.position().top;
+ if (itemtop > listheight) {
+ var listscroll = list.scrollTop();
+ list.scrollTop(listscroll + itemheight);
+ }
+ else if (itemtop < 0) {
+ var listscroll = list.scrollTop();
+ list.scrollTop(listscroll - itemheight);
+ }
+
+ }
+ item.addClass(settings.classes.selectedDropdownItem);
+ selected_dropdown_item = item.get(0);
+ }
+ }
+
+ // Remove highlighting from an item in the results dropdown
+ function deselect_dropdown_item (item) {
+ item.removeClass(settings.classes.selectedDropdownItem);
+ selected_dropdown_item = null;
+ }
+
+ // Do a search and show the "searching" dropdown if the input is longer
+ // than settings.minChars
+ function do_search() {
+ var query = input_box.val().toLowerCase();
+ if(query && query.length || settings.minChars == 0) {
+ if(selected_token) {
+ deselect_token($(selected_token), POSITION.AFTER);
+ }
+
+ if(query.length >= settings.minChars) {
+ show_dropdown_searching();
+ clearTimeout(timeout);
+
+ timeout = setTimeout(function(){
+ run_search(query);
+ }, settings.searchDelay);
+ } else {
+ hide_dropdown();
+ }
+ }
+ }
+
+ // Do the actual search
+ function run_search(query) {
+ var cache_key = query + computeURL();
+ var cached_results = cache.get(cache_key);
+ if(cached_results) {
+ populate_dropdown(query, cached_results);
+ } else {
+ // Are we doing an ajax search or local data search?
+ if(settings.url) {
+ var url = computeURL();
+ // Extract exisiting get params
+ var ajax_params = {};
+ ajax_params.data = {};
+ if(url.indexOf("?") > -1) {
+ var parts = url.split("?");
+ ajax_params.url = parts[0];
+
+ var param_array = parts[1].split("&");
+ $.each(param_array, function (index, value) {
+ var kv = value.split("=");
+ ajax_params.data[kv[0]] = kv[1];
+ });
+ } else {
+ ajax_params.url = url;
+ }
+
+ // Prepare the request
+ ajax_params.data[settings.queryParam] = query;
+ ajax_params.type = settings.method;
+ ajax_params.dataType = settings.contentType;
+ if(settings.crossDomain) {
+ ajax_params.dataType = "jsonp";
+ }
+
+ // Attach the success callback
+ ajax_params.success = function(results) {
+ if($.isFunction(settings.onResult)) {
+ results = settings.onResult.call(hidden_input, results);
+ }
+ cache.add(cache_key, settings.jsonContainer ? results[settings.jsonContainer] : results);
+
+ // only populate the dropdown if the results are associated with the active search query
+ if(input_box.val().toLowerCase() === query) {
+ populate_dropdown(query, settings.jsonContainer ? results[settings.jsonContainer] : results);
+ }
+ };
+
+ // Make the request
+ $.ajax(ajax_params);
+ } else if(settings.search_function){
+ settings.search_function(query, function(results){
+ cache.add(cache_key, results);
+ populate_dropdown(query, results);
+ });
+ } else if(settings.local_data) {
+ // Do the search through local data
+ var results = $.grep(settings.local_data, function (row) {
+ return row[settings.propertyToSearch].toLowerCase().indexOf(query.toLowerCase()) > -1;
+ });
+
+ if($.isFunction(settings.onResult)) {
+ results = settings.onResult.call(hidden_input, results);
+ }
+ cache.add(cache_key, results);
+ populate_dropdown(query, results);
+ }
+ }
+ }
+
+ // compute the dynamic URL
+ function computeURL() {
+ var url = settings.url;
+ if(typeof settings.url == 'function') {
+ url = settings.url.call();
+ }
+ return url;
+ }
+};
+
+// Really basic cache for the results
+$.TokenList.Cache = function (options) {
+ var settings = $.extend({
+ max_size: 500
+ }, options);
+
+ var data = {};
+ var size = 0;
+
+ var flush = function () {
+ data = {};
+ size = 0;
+ };
+
+ this.add = function (query, results) {
+ if(size > settings.max_size) {
+ flush();
+ }
+
+ if(!data[query]) {
+ size += 1;
+ }
+
+ data[query] = results;
+ };
+
+ this.get = function (query) {
+ return data[query];
+ };
+};
+}(jQuery));
diff --git a/browser/components/pocket/content/panels/license.txt b/browser/components/pocket/content/panels/license.txt new file mode 100644 index 0000000000..7f3f806bab --- /dev/null +++ b/browser/components/pocket/content/panels/license.txt @@ -0,0 +1,35 @@ +
+Unless where otherwise noted, the following license applies to the files
+within this directory and descendents of this directory.
+
+POCKET MARKS
+
+Notwithstanding the permitted uses of the Software (as defined below) pursuant
+to the license set forth below, "Pocket," "Read It Later" and the Pocket icon
+and logos (collectively, the “Pocket Marks”) are registered and common law
+trademarks of Read It Later, Inc. This means that, while you have considerable
+freedom to redistribute and modify the Software, there are tight restrictions
+on your ability to use the Pocket Marks. This license does not grant you any
+rights to use the Pocket Marks except as they are embodied in the Software.
+
+---
+
+SOFTWARE
+
+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.
diff --git a/browser/components/pocket/content/panels/saved.html b/browser/components/pocket/content/panels/saved.html new file mode 100644 index 0000000000..bf40e411a3 --- /dev/null +++ b/browser/components/pocket/content/panels/saved.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta http-equiv="Content-Security-Policy" content="default-src chrome:; img-src https://img-getpocket.cdn.mozilla.net; object-src 'none'" /> + <base href="chrome://pocket/content/panels/"> + <title>Pocket: Page Saved</title> + <link rel="stylesheet" href="css/normalize.css"> + <link rel="stylesheet" href="css/saved.css"> + <link rel="stylesheet" href="css/sendtomobile.css"> + </head> + <body class="pkt_ext_containersaved" aria-live="polite"> + <script src="js/vendor/jquery-2.1.1.min.js"></script> + <script src="js/vendor/handlebars.runtime.js"></script> + <script src="js/vendor/jquery.tokeninput.min.js"></script> + <script src="js/tmpl.js"></script> + <script src="js/messages.js"></script> + <script src="js/sendtomobile.js"></script> + <script src="js/saved.js"></script> + </body> +</html> diff --git a/browser/components/pocket/content/panels/signup.html b/browser/components/pocket/content/panels/signup.html new file mode 100644 index 0000000000..019e9f0a36 --- /dev/null +++ b/browser/components/pocket/content/panels/signup.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta http-equiv="Content-Security-Policy" content="default-src chrome:; object-src 'none'" /> + <base href="chrome://pocket/content/panels/"> + <title>Pocket: Sign Up</title> + <link rel="stylesheet" href="css/normalize.css"> + <link rel="stylesheet" href="css/signup.css"> + </head> + <body class="pkt_ext_containersignup" aria-live="polite"> + <script src="js/vendor/jquery-2.1.1.min.js"></script> + <script src="js/vendor/handlebars.runtime.js"></script> + <script src="js/tmpl.js"></script> + <script src="js/messages.js"></script> + <script src="js/signup.js"></script> + </body> +</html> diff --git a/browser/components/pocket/content/panels/tmpl/ho2/ho2_articleinfo.handlebars b/browser/components/pocket/content/panels/tmpl/ho2/ho2_articleinfo.handlebars new file mode 100644 index 0000000000..f9633c17e1 --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/ho2/ho2_articleinfo.handlebars @@ -0,0 +1,9 @@ +<div class="pkt_ext_experiment_saved_tile pkt_ext_cf {{#if has_image }}pkt_ext_has_image{{/if}}"> + {{#if has_image}} + <div class="pkt_ext_save_image" style="background-image:url('{{image_src}}'); background-size:cover; background-position:center center;" data-imgsrc="{{image_src}}"></div> + {{/if}} + <div class="pkt_ext_save_title"> + <div class="pkt_ext_save_open">{{title}}</div> + <div class="pkt_ext_save_source">{{domain}}</div> + </div> +</div> diff --git a/browser/components/pocket/content/panels/tmpl/ho2/ho2_download.handlebars b/browser/components/pocket/content/panels/tmpl/ho2/ho2_download.handlebars new file mode 100644 index 0000000000..747cf6b6cf --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/ho2/ho2_download.handlebars @@ -0,0 +1,13 @@ +<div class="pkt_ext_detail pkt_ext_saved_sendcollectemail"> + <h3 class="pkt_ext_heading">Check your inbox</h3> + <p class="pkt_ext_description">We’ve sent an email to <span class="pkt_ext_bold">{{email}}</span> with a link to install the Pocket app, where your article will be waiting for you.</p> + + <div class="pkt_ext_download_section"> + <p class="pkt_ext_description">You can also get it on the App Store here:</p> + + <div class="pkt_ext_download_button_wrapper"> + <a href="https://getpocket.com/apps/link/pocket-iphone/?s=fx_save_hanger" target="_blank" ><div class="pkt_ext_apple_download"></div></a> + <a href="https://getpocket.com/apps/link/pocket-android/?s=fx_save_hanger" target="_blank" ><img class="pkt_ext_google_download" alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png'/></a> + </div> + </div> +</div> diff --git a/browser/components/pocket/content/panels/tmpl/ho2/ho2_download_error.handlebars b/browser/components/pocket/content/panels/tmpl/ho2/ho2_download_error.handlebars new file mode 100644 index 0000000000..303a7af13c --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/ho2/ho2_download_error.handlebars @@ -0,0 +1,13 @@ +<div class="pkt_ext_detail pkt_ext_saved_sendcollectemail"> + <h3 class="pkt_ext_heading">There was a problem</h3> + <p class="pkt_ext_description">Email failed to send, please try again later</p> + + <div class="pkt_ext_download_section"> + <p class="pkt_ext_description">You can also get the Pocket app on the App Store here:</p> + + <div class="pkt_ext_download_button_wrapper"> + <a href="https://getpocket.com/apps/link/pocket-iphone/?s=fx_save_hanger" target="_blank" ><div class="pkt_ext_apple_download"></div></a> + <a href="https://getpocket.com/apps/link/pocket-android/?s=fx_save_hanger" target="_blank" ><img class="pkt_ext_google_download" alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png'/></a> + </div> + </div> +</div> diff --git a/browser/components/pocket/content/panels/tmpl/ho2/ho2_sharebutton.handlebars b/browser/components/pocket/content/panels/tmpl/ho2/ho2_sharebutton.handlebars new file mode 100644 index 0000000000..9c7ee85e79 --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/ho2/ho2_sharebutton.handlebars @@ -0,0 +1,7 @@ +<div class="pkt_ext_detail pkt_ext_saved_sendtomobile"> + <button id="pkt_ext_sendtomobile_button" class="pkt_ext_button"> + <span class="pkt_ext_save_title_wrapper pkt_ext_mobile_icon"> + <span class="pkt_ext_logo_action_copy">Send to your phone</span> + </span> + </button> +</div> diff --git a/browser/components/pocket/content/panels/tmpl/item_recs.handlebars b/browser/components/pocket/content/panels/tmpl/item_recs.handlebars new file mode 100644 index 0000000000..ce18b647d7 --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/item_recs.handlebars @@ -0,0 +1,24 @@ +<header> + {{#if recommendations.[1] }} + <h4>Similar Stories</h4> + {{else}} + <h4>Similar Story</h4> + {{/if}} + <a class="pkt_ext_learn_more" target="_blank" href="https://getpocket.com/story_recommendations_learn_more">Learn more</a> +</header> + +<ol> + {{#each recommendations}} + <li> + <a href="{{this.item.resolved_url}}" class="pkt_ext_item_recs_link" target="_blank"> + + {{#if this.item.encodedThumbURL}} + <img class="rec-thumb" src="https://img-getpocket.cdn.mozilla.net/80x80/filters:format(jpeg):quality(60):no_upscale():strip_exif()/{{this.item.encodedThumbURL}}" /> + {{/if}} + + <p class="rec-title">{{this.item.title}}</p> + <p class="rec-source">{{this.item.domain_metadata.name}}</p> + </a> + </li> + {{/each}} +</ol> diff --git a/browser/components/pocket/content/panels/tmpl/loggedoutvariants/variant_a.handlebars b/browser/components/pocket/content/panels/tmpl/loggedoutvariants/variant_a.handlebars new file mode 100644 index 0000000000..9d9344f05f --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/loggedoutvariants/variant_a.handlebars @@ -0,0 +1,12 @@ +<div class="los_variant_wrapper"> + <div class="los_variant_top"> + <h1>Click the <img src="img/glyph.svg" alt="Pocket Button" height="14" /> button to save articles, videos, and links to Pocket.</h1> + <p>Enjoy everything you save, on any device.</p> + <a class="pkt_ext_learnmore" href="https://getpocket.com/pocket-and-firefox?utm_campaign=logged_out_save_test&utm_source=variant_a">Learn more ›</a> + </div> + + <div class="los_variant_bottom"> + <a class="los_variant_button signup-btn-email" href="https://getpocket.com/signup?utm_campaign=logged_out_save_test&utm_source=variant_a">Get Pocket for free</a> + <p class="los_variant_sub">Already a Pocket user? <a class="pkt_ext_login" href="https://getpocket.com/login?utm_campaign=logged_out_save_test&utm_source=variant_a">Log in.</a></p> + </div> +</div> diff --git a/browser/components/pocket/content/panels/tmpl/loggedoutvariants/variant_b.handlebars b/browser/components/pocket/content/panels/tmpl/loggedoutvariants/variant_b.handlebars new file mode 100644 index 0000000000..68baef6fd9 --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/loggedoutvariants/variant_b.handlebars @@ -0,0 +1,11 @@ +<div class="los_variant_wrapper"> + <div class="los_variant_top"> + <h1>Here's your save button for the internet.</h1> + <a class="pkt_ext_learnmore" href="https://getpocket.com/pocket-and-firefox?utm_campaign=logged_out_save_test&utm_source=variant_b">Learn more ›</a> + </div> + + <div class="los_variant_bottom"> + <a class="los_variant_button signup-btn-email" href="https://getpocket.com/signup?utm_campaign=logged_out_save_test&utm_source=variant_b">Get Pocket for free</a> + <p class="los_variant_sub">Already a Pocket user? <a class="pkt_ext_login" href="https://getpocket.com/login?utm_campaign=logged_out_save_test&utm_source=variant_b">Log in.</a></p> + </div> +</div> diff --git a/browser/components/pocket/content/panels/tmpl/loggedoutvariants/variant_c.handlebars b/browser/components/pocket/content/panels/tmpl/loggedoutvariants/variant_c.handlebars new file mode 100644 index 0000000000..1722524596 --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/loggedoutvariants/variant_c.handlebars @@ -0,0 +1,11 @@ +<div class="los_variant_wrapper"> + <div class="los_variant_top"> + <h1>Get Pocket to save anything to your personal corner of the internet.</h1> + <a class="pkt_ext_learnmore" href="https://getpocket.com/pocket-and-firefox?utm_campaign=logged_out_save_test&utm_source=variant_c">Learn more ›</a> + </div> + + <div class="los_variant_bottom"> + <a class="los_variant_button signup-btn-email" href="https://getpocket.com/signup?utm_campaign=logged_out_save_test&utm_source=variant_c">Sign up for free</a> + <p class="los_variant_sub">Already a Pocket user? <a class="pkt_ext_login" href="https://getpocket.com/login?utm_campaign=logged_out_save_test&utm_source=variant_c">Log in.</a></p> + </div> +</div> diff --git a/browser/components/pocket/content/panels/tmpl/saved_premiumextras.handlebars b/browser/components/pocket/content/panels/tmpl/saved_premiumextras.handlebars new file mode 100644 index 0000000000..b224450ec1 --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/saved_premiumextras.handlebars @@ -0,0 +1,2 @@ +<div class="pkt_ext_suggestedtag_detailshown">
+</div>
\ No newline at end of file diff --git a/browser/components/pocket/content/panels/tmpl/saved_premiumshell.handlebars b/browser/components/pocket/content/panels/tmpl/saved_premiumshell.handlebars new file mode 100644 index 0000000000..892c947cc9 --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/saved_premiumshell.handlebars @@ -0,0 +1,8 @@ +<div class="pkt_ext_suggestedtag_detail pkt_ext_suggestedtag_detail_loading"> + <h4>{{suggestedtags}}</h4> + <div class="pkt_ext_loadingspinner"><div></div></div> + <ul class="pkt_ext_cf"> + </ul> +</div> + +<hr/> diff --git a/browser/components/pocket/content/panels/tmpl/saved_shell.handlebars b/browser/components/pocket/content/panels/tmpl/saved_shell.handlebars new file mode 100644 index 0000000000..9efc974894 --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/saved_shell.handlebars @@ -0,0 +1,33 @@ +<div class="pkt_ext_initload"> + <div class="pkt_ext_logo"></div> + <div class="pkt_ext_topdetail"> + <h2>{{saving}}</h2> + </div> + <div class="pkt_ext_loadingspinner"><div></div></div> +</div> +<div class="pkt_ext_detail"> + <div class="pkt_ext_logo"></div> + <div class="pkt_ext_topdetail"> + <h2>{{pagesaved}}</h2> + <h3 class="pkt_ext_errordetail"></h3> + <nav class="pkt_ext_item_actions pkt_ext_cf"> + <ul> + <li><a class="pkt_ext_removeitem" href="#">{{removepage}}</a></li> + <li class="pkt_ext_actions_separator"></li> + <li><a class="pkt_ext_openpocket" href="https://{{pockethost}}/a?src=ff_ext_saved" target="_blank">{{viewlist}}</a></li> + </ul> + </nav> + </div> + <div class="pkt_ext_tag_detail pkt_ext_cf"> + <div class="pkt_ext_tag_input_wrapper"> + <div class="pkt_ext_tag_input_blocker"></div> + <input class="pkt_ext_tag_input" type="text" placeholder="{{addtags}}"> + </div> + <a href="#" class="pkt_ext_btn pkt_ext_btn_disabled">{{save}}</a> + </div> + <p class="pkt_ext_edit_msg"></p> +</div> + +<div class="pkt_ext_subshell"> + <div class="pkt_ext_item_recs"></div> +</div> diff --git a/browser/components/pocket/content/panels/tmpl/saved_tmplogin.handlebars b/browser/components/pocket/content/panels/tmpl/saved_tmplogin.handlebars new file mode 100644 index 0000000000..b6a488d888 --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/saved_tmplogin.handlebars @@ -0,0 +1,20 @@ +<div class="pkt_ext_detail pkt_ext_saved_tmplogin pkt_shaded_background"> + <div class="pkt_ext_indent_bordered"> + <p>You are using Pocket without an account.<br />Sign up to back up your saved items.</p> + <p><a href="https://help.getpocket.com/article/1129-using-pocket-without-an-account-in-firefox?s=ghost_upsell" target="_blank">Learn more</a></p> + </div> + + {{#if fxasignedin}} + <button id="pkt_ext_tmp_account_signup" class="pkt_ext_button pkt_ext_blue_button"> + <span class="pkt_ext_save_title_wrapper pkt_ext_ffx_icon"> + <span class="pkt_ext_logo_action_copy">Login with Firefox</span> + </span> + </button> + {{else}} + <button id="pkt_ext_tmp_account_signup" class="pkt_ext_button"> + <span class="pkt_ext_save_title_wrapper"> + <span class="pkt_ext_logo_action_copy">Sign up</span> + </span> + </button> + {{/if}} +</div> diff --git a/browser/components/pocket/content/panels/tmpl/signup_shell.handlebars b/browser/components/pocket/content/panels/tmpl/signup_shell.handlebars new file mode 100644 index 0000000000..34aa9e9ca2 --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/signup_shell.handlebars @@ -0,0 +1,27 @@ +<div class="pkt_ext_introdetail pkt_ext_introdetailhero"> + <h2 class="pkt_ext_logo">Pocket</h2> + <p class="pkt_ext_tagline">{{tagline}}</p> + {{#if showlearnmore}} + {{#if controlvariant}} + <p class="pkt_ext_learnmorecontainer"><a class="pkt_ext_learnmore" href="https://{{pockethost}}/firefox_learnmore?utm_campaign=logged_out_save_test&utm_source=control&s=ffi&t=learnmore&tv=panel_control&v={{variant}}" target="_blank">{{learnmore}}</a></p> + {{else}} + <p class="pkt_ext_learnmorecontainer"><a class="pkt_ext_learnmore" href="https://{{pockethost}}/firefox_learnmore?utm_campaign=logged_out_save_test&utm_source=control&s=ffi&t=learnmore&tv=panel_tryit&v={{variant}}" target="_blank">{{learnmore}}</a></p> + {{/if}} + {{else}} + <p class="pkt_ext_learnmorecontainer"><a class="pkt_ext_learnmore pkt_ext_learnmoreinactive" href="#">{{learnmore}}</a></p> + {{/if}} + <div class="pkt_ext_introimg"></div> +</div> +<div class="pkt_ext_signupdetail pkt_ext_signupdetail_hero"> + {{#if controlvariant}} + <h4>{{signuptosave}}</h4> + <p class="btn-container"><a href="https://{{pockethost}}/ff_signup?utm_campaign=logged_out_save_test&utm_source=control&s=ffi&tv=panel_control&t=signupff&v={{variant}}" target="_blank" class="btn signup-btn-firefox"><span class="logo"></span><span class="text">{{signupfirefox}}</span></a></p> + <p class="btn-container"><a href="https://{{pockethost}}/signup?utm_campaign=logged_out_save_test&utm_source=control&force=email&tv=panel_control&src=extension&s=ffi&t=signupemail&v={{variant}}" target="_blank" class="btn btn-secondary signup-btn-email signup-btn-initstate">{{signupemail}}</a></p> + <p class="alreadyhave">{{alreadyhaveacct}} <a class="pkt_ext_login" href="https://{{pockethost}}/login?utm_campaign=logged_out_save_test&utm_source=control&ep=3&tv=panel_control&src=extension&s=ffi&t=login&v={{variant}}" target="_blank">{{loginnow}}</a>.</p> + {{else}} + <p class="btn-container"><a href="https://{{pockethost}}/firefox_tryitnow?utm_campaign=logged_out_save_test&utm_source=control&s=ffi&tv=panel_tryit&t=tryitnow" target="_blank" class="btn signup-btn-tryitnow"><span class="text">{{tryitnow}}</span></a></p> + <p class="alreadyhave tryitnowspace">{{alreadyhaveacct}} <a class="pkt_ext_login" href="https://{{pockethost}}/login?utm_campaign=logged_out_save_test&utm_source=control&ep=3&s=ffi&tv=panel_tryit&src=extension&t=login&v={{variant}}" target="_blank">{{loginnow}}</a>.</p> + <p class="pkt_ext_tos">{{{tos}}}</p> + {{/if}} + +</div> diff --git a/browser/components/pocket/content/panels/tmpl/signupstoryboard_shell.handlebars b/browser/components/pocket/content/panels/tmpl/signupstoryboard_shell.handlebars new file mode 100644 index 0000000000..7d3d16b7ba --- /dev/null +++ b/browser/components/pocket/content/panels/tmpl/signupstoryboard_shell.handlebars @@ -0,0 +1,54 @@ +<div class="pkt_ext_introdetail pkt_ext_introdetailstoryboard"> + <div class="pkt_ext_introstory pkt_ext_introstoryone"> + <div class="pkt_ext_introstory_text"> + <p class="pkt_ext_tagline">{{taglinestory_one}}</p> + </div> + <div class="pkt_ext_introstoryone_img"></div> + </div> + <div class="pkt_ext_introstorydivider"></div> + <div class="pkt_ext_introstory pkt_ext_introstorytwo"> + <div class="pkt_ext_introstory_text"> + <p class="pkt_ext_tagline">{{taglinestory_two}}</p> + {{#if showlearnmore}} + {{#if controlvariant}} + <p><a class="pkt_ext_learnmore" href="https://{{pockethost}}/firefox_learnmore?utm_campaign={{utmCampaign}}&utm_source={{utmSource}}&s=ffi&t=learnmore&tv=panel_control&v={{variant}}" target="_blank">{{learnmore}}</a></p> + {{else}} + <p><a class="pkt_ext_learnmore" href="https://{{pockethost}}/firefox_learnmore?utm_campaign={{utmCampaign}}&utm_source={{utmSource}}&s=ffi&t=learnmore&tv=panel_tryit&v={{variant}}" target="_blank">{{learnmore}}</a></p> + {{/if}} + {{else}} + <p><a class="pkt_ext_learnmore pkt_ext_learnmoreinactive" href="#">{{learnmore}}</a></p> + {{/if}} + </div> + <div class="pkt_ext_introstorytwo_img"></div> + </div> +</div> +<div class="pkt_ext_signupdetail"> + {{#if controlvariant}} + <h4>{{signuptosave}}</h4> + {{#if buttonVariant}} + {{#if oneButton}} + <p class="btn-container"> + <a href="https://{{pockethost}}/signup?utm_campaign={{utmCampaign}}&utm_source=button_variant&tv=panel_control&src=extension&s=ffi&t=signupemail&v={{variant}}" target="_blank" class="btn signup-btn-email signup-btn-initstate">Sign up</a> + </p> + {{else}} + <p class="btn-container"> + <a href="https://{{pockethost}}/ff_signup?utm_campaign={{utmCampaign}}&utm_source=button_control&s=ffi&tv=panel_control&t=signupff&v={{variant}}" target="_blank" class="btn signup-btn-firefox"> + <span class="logo"></span><span class="text">{{signupfirefox}}</span> + </a> + </p> + <p class="btn-container"> + <a href="https://{{pockethost}}/signup?utm_campaign={{utmCampaign}}&utm_source=button_control&force=email&tv=panel_control&src=extension&s=ffi&t=signupemail&v={{variant}}" target="_blank" class="btn btn-secondary signup-btn-email signup-btn-initstate">{{signupemail}}</a> + </p> + {{/if}} + {{else}} + <p class="btn-container"><a href="https://{{pockethost}}/ff_signup?utm_campaign={{utmCampaign}}&utm_source={{utmSource}}&s=ffi&tv=panel_control&t=signupff&v={{variant}}" target="_blank" class="btn signup-btn-firefox"><span class="logo"></span><span class="text">{{signupfirefox}}</span></a></p> + <p class="btn-container"><a href="https://{{pockethost}}/signup?utm_campaign={{utmCampaign}}&utm_source={{utmSource}}&force=email&tv=panel_control&src=extension&s=ffi&t=signupemail&v={{variant}}" target="_blank" class="btn btn-secondary signup-btn-email signup-btn-initstate">{{signupemail}}</a></p> + {{/if}} + <p class="alreadyhave">{{alreadyhaveacct}} <a class="pkt_ext_login" href="https://{{pockethost}}/login?utm_campaign={{utmCampaign}}&utm_source={{utmSource}}&ep=3&tv=panel_control&src=extension&s=ffi&t=login&v={{variant}}" target="_blank">{{loginnow}}</a>.</p> + {{else}} + <p class="btn-container"><a href="https://{{pockethost}}/firefox_tryitnow?utm_campaign={{utmCampaign}}&utm_source={{utmSource}}&s=ffi&tv=panel_tryit&t=tryitnow" target="_blank" class="btn signup-btn-tryitnow"><span class="text">{{tryitnow}}</span></a></p> + <p class="alreadyhave tryitnowspace">{{alreadyhaveacct}} <a class="pkt_ext_login" href="https://{{pockethost}}/login?utm_campaign={{utmCampaign}}&utm_source={{utmSource}}&ep=3&s=ffi&tv=panel_tryit&src=extension&t=login&v={{variant}}" target="_blank">{{loginnow}}</a>.</p> + <p class="pkt_ext_tos">{{{tos}}}</p> + {{/if}} +</div> + |