summaryrefslogtreecommitdiffstats
path: root/RaspberryPITVHDMI_archivos/plugin-d3f2aabe1f4c66e75c9ad0d17efb33e5633e91ae4b556c155058c9.js
blob: 9333117f2797270d3829557e5fee940d919353d4 (plain) (blame)
1
2
3
4
!function(e,t){function n(e){e.toggleClass("open")}var s=function(e){var t,n=e.createElement("details");if(!("open"in n))return!1;var s=e.body||function(){var n=e.documentElement;return t=!0,n.insertBefore(e.createElement("body"),n.firstElementChild||n.firstChild)}();n.innerHTML="<summary>a</summary>b",n.style.display="block",s.appendChild(n);var o=n.offsetHeight;return n.open=!0,o=o!==n.offsetHeight,s.removeChild(n),t&&s.parentNode.removeChild(s),o}(e);t.fn.details=function(){return s?this:this.each(function(){var e=t(this),s=t("summary",e).first();s.prop("tabIndex",0),s.on("keydown",function(t){if(32===t.keyCode||13===t.keyCode)return n(e),!1}),s.on("click",function(){s.focus(),n(e)})})}}(document,jQuery),define("discourse/plugins/discourse-details/initializers/apply-details",["exports","discourse/lib/plugin-api"],function(e,t){"use strict";function n(e){e.decorateCooked(function(e){return $("details",e).details()},{id:"discourse-details"}),e.addToolbarPopupMenuOptionsCallback(function(){return{action:"insertDetails",icon:"caret-right",label:"details.title"}}),e.modifyClass("controller:composer",{actions:{insertDetails:function(){this.toolbarEvent.applySurround('\n[details="'+I18n.t("composer.details_title")+'"]\n',"\n[/details]\n","details_text",{multiline:!1})}}})}Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"apply-details",initialize:function(){(0,t.withPluginApi)("0.8.7",n)}}}),define("discourse/plugins/discourse-details/lib/discourse-markdown/details",["exports"],function(e){"use strict";function t(e){e.whiteList(["summary","summary[title]","details","details[open]","details.elided"]),e.registerPlugin(function(e){e.block.bbcode.ruler.push("details",n)})}Object.defineProperty(e,"__esModule",{value:!0}),e.setup=t;var n={tag:"details",before:function(e,t){var n=t.attrs;e.push("bbcode_open","details",1),e.push("bbcode_open","summary",1),e.push("text","",0).content=n._default||"",e.push("bbcode_close","summary",-1)},after:function(e){e.push("bbcode_close","details",-1)}}}),function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};clearTimeout(this.timeout);var s=moment().utc(),l=n.time?n.date+" "+n.time:n.date,i=void 0,a=void 0;a=n.time?n.displayedTimezone||moment.tz.guess():n.displayedTimezone||n.timezone||moment.tz.guess(),(i=n.timezone?o(l,n.timezone):moment.utc(l))<s&&(n.recurring?i=u(i,n.recurring):e.addClass("past"));var c=i.tz(a),h=d(c.clone(),a,n),v=p(h),b=m(h),g=r(c,a,n);e.html(f).attr("aria-label",v).attr("data-html-tooltip",'<div class="locale-dates-previews">'+b+"</div>").addClass("cooked-date").find(".relative-time").text(g),this.timeout=setTimeout(function(){return t(e,n)},1e4)}function n(e){return e.replace("_"," ").replace("Etc/","").split("/")}function s(e){var t=n(e);return t[1]||t[0]}function o(e,t){return moment.tz(e,t).utc()}function l(e,t){var n=I18n.t("discourse_local_dates.relative_dates."+t,{time:"LT"});return e?n.split("LT").map(function(e){return"["+e+"]"}).join("LT"):"["+n.replace(" LT","")+"]"}function i(e){return{sameDay:l(e,"today"),nextDay:l(e,"tomorrow"),lastDay:l(e,"yesterday"),sameElse:"L"}}function a(e,t){return moment.tz(e).utcOffset()===moment.tz(t).utcOffset()}function r(e,t,o){var l=a(t,moment.tz.guess()),r=e.isBetween(moment().subtract(2,"days"),moment().add(1,"days").endOf("day"));return o.calendar&&r?l?e=o.time?e.calendar(null,i(o.time)):e.calendar(null,i(null)):(e=e.format(o.format),e=e.replace("TZ",""),e=e+" ("+s(t)+")"):o.time?(e=e.format(o.format),o.displayedTimezone&&!l?(e=e.replace("TZ",""),e=e+" ("+s(t)+")"):e=e.replace("TZ",n(t).join(": "))):(e=e.format(o.format),l?e=e.replace("TZ",s(t)):(e=e.replace("TZ",""),e=e+" ("+s(t)+")")),e}function u(e,t){var n=t.split("."),s=parseInt(n[0],10),o=n[1],l=moment().diff(e,o),i=Math.ceil(l+s),a=moment(e.format()).isDST(),r=e.add(i,o),u=moment(r.format()).isDST();return!a&&u&&r.subtract(1,"hour"),a&&!u&&r.add(1,"hour"),r}function c(e,t){var n=moment(e).tz(t);return[n.format("LLL"),"→",n.add(24,"hours").format("LLL")].join(" ")}function d(e,t,n){var s=[],o=moment.tz.guess(),l=n.timezones.filter(function(e){return e!==o});return s.push({timezone:o,current:!0,dateTime:n.time?moment(e).tz(o).format("LLL"):c(e,o)}),n.timezone&&t===o&&n.timezone!==t&&!a(t,n.timezone)&&l.unshift(n.timezone),l.filter(function(e){return e}).forEach(function(l){a(l,t)||(a(l,o)&&(l=o),s.push({timezone:l,dateTime:n.time?moment(e).tz(l).format("LLL"):c(e,l)}))}),s.length||s.push({timezone:"Etc/UTC",dateTime:n.time?moment(e).tz("Etc/UTC").format("LLL"):c(e,"Etc/UTC")}),_.uniq(s,"timezone")}function p(e){return e.map(function(e){var t=s(e.timezone);return e.dateTime.match(/TZ/)?e.dateTime.replace(/TZ/,t):t+" "+e.dateTime}).join(", ")}function m(t){return t.map(function(t){var n=e(h);return t.current&&n.addClass("current"),n.find(".timezone").text(s(t.timezone)),n.find(".date-time").text(t.dateTime),n[0].outerHTML}).join("")}var f='\n    <span>\n      <svg class="fa d-icon d-icon-globe-americas svg-icon" xmlns="http://www.w3.org/2000/svg">\n        <use xlink:href="#globe-americas"></use>\n      </svg>\n      <span class="relative-time"></span>\n    </span>\n  ',h="\n    <div class='preview'>\n      <span class='timezone'></span>\n      <span class='date-time'></span>\n    </div>\n  ";e.fn.applyLocalDates=function(){return this.each(function(){var n=e(this),s={};s.time=n.attr("data-time"),s.date=n.attr("data-date"),s.recurring=n.attr("data-recurring"),s.timezones=(n.attr("data-timezones")||Discourse.SiteSettings.discourse_local_dates_default_timezones||"Etc/UTC").split("|"),s.timezone=n.attr("data-timezone"),s.calendar="on"===(n.attr("data-calendar")||"on"),s.displayedTimezone=n.attr("data-displayed-timezone"),s.format=n.attr("data-format")||(s.time?"LLL":"LL"),t(n,s)})}}(jQuery),define("discourse/plugins/discourse-local-dates/discourse/components/discourse-local-dates-create-form",["exports","discourse/lib/computed","discourse/lib/load-script","ember-addons/ember-computed-decorators","discourse/lib/text","discourse/lib/debounce"],function(e,t,n,s,o,l){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t,n,s,o){var l={};return Object.<