0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-03 15:24:19 +01:00
Bootstrap/site/static/docs/4.3/assets/js/docs.min.js

22 lines
22 KiB
JavaScript
Raw Normal View History

2019-03-01 17:31:34 +01:00
!function(t,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(t.AnchorJS=e(),t.anchors=new t.AnchorJS)}(this,function(){"use strict";return function(t){function e(t){t.icon=t.hasOwnProperty("icon")?t.icon:"",t.visible=t.hasOwnProperty("visible")?t.visible:"hover",t.placement=t.hasOwnProperty("placement")?t.placement:"right",t.ariaLabel=t.hasOwnProperty("ariaLabel")?t.ariaLabel:"Anchor",t.class=t.hasOwnProperty("class")?t.class:"",t.truncate=t.hasOwnProperty("truncate")?Math.floor(t.truncate):64}function n(t){var e;if("string"==typeof t||t instanceof String)e=[].slice.call(document.querySelectorAll(t));else{if(!(Array.isArray(t)||t instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(t)}return e}this.options=t||{},this.elements=[],e(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(t){var o,r,i,A,a,c,l,s,u,f,d,h=[];if(e(this.options),"touch"===(d=this.options.visible)&&(d=this.isTouchDevice()?"always":"hover"),t||(t="h2, h3, h4, h5, h6"),0===(o=n(t)).length)return this;for(function(){if(null===document.head.querySelector("style.anchorjs")){var t,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(t=document.head.querySelector('[rel="stylesheet"], style'))?document.head.appendChild(e):document.head.insertBefore(e,t),e.sheet.insertRule(" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }",e.sheet.cssRules.length),e.sheet.insertRule(" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",e.sheet.cssRules.length),e.sheet.insertRule(" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }",e.sheet.cssRules.length),e.sheet.insertRule(' @font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }',e.sheet.cssRules.length)}}(),r=document.querySelectorAll("[id]"),i=[].map.call(r,function(t){return t.id}),a=0;a<o.length;a++)if(this.hasAnchorJSLink(o[a]))h.push(a);else{if(o[a].hasAttribute("id"))A=o[a].getAttribute("id");else if(o[a].hasAttribute("data-anchor-id"))A=o[a].getAttribute("data-anchor-id");else{for(u=s=this.urlify(o[a].textContent),l=0;void 0!==c&&(u=s+"-"+l),l+=1,-1!==(c=i.indexOf(u)););c=void 0,i.push(u),o[a].setAttribute("id",u),A=u}A.replace(/-/g," "),(f=document.createElement("a")).className="anchorjs-link "+this.options.class,f.href="#"+A,f.setAttribute("aria-label",this.options.ariaLabel),f.setAttribute("data-anchorjs-icon",this.options.icon),"always"===d&&(f.style.opacity="1"),"<EFBFBD>
2017-12-31 04:41:36 +01:00
/*!
2018-12-16 00:13:22 +01:00
* clipboard.js v2.0.4
2017-10-01 21:14:55 +02:00
* https://zenorocha.github.io/clipboard.js
2018-03-31 22:59:37 +02:00
*
2017-10-01 21:14:55 +02:00
* Licensed MIT © Zeno Rocha
*/
2019-03-01 17:31:34 +01:00
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=c(n(1)),A=c(n(3)),a=c(n(4));function c(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return o.resolveOptions(n),o.listenClick(t),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,A.default),r(e,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===o(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,a.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new i.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return s("action",t)}},{key:"defaultTarget",value:function(t){var e=s("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return s("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}();function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=l},function(t,e,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==t
2018-09-19 06:35:40 +02:00
/*!
2018-12-16 00:13:22 +01:00
* bsCustomFileInput v1.3.1 (https://github.com/Johann-S/bs-custom-file-input)
2018-09-19 06:35:40 +02:00
* Copyright 2018 Johann-S <johann.servoire@gmail.com>
* Licensed under MIT (https://github.com/Johann-S/bs-custom-file-input/blob/master/LICENSE)
*/
2019-03-01 17:31:34 +01:00
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.bsCustomFileInput=e()}(this,function(){"use strict";var t={CUSTOMFILE:'.custom-file input[type="file"]',CUSTOMFILELABEL:".custom-file-label",FORM:"form",INPUT:"input"},e=function(t){if(0<t.childNodes.length)for(var e=[].slice.call(t.childNodes),n=0;n<e.length;n++){var o=e[n];if(3!==o.nodeType)return o}return t},n=function(n){var o=n.bsCustomFileInput.defaultText,r=n.parentNode.querySelector(t.CUSTOMFILELABEL);r&&(e(r).innerHTML=o)},o=!!window.File,r=function(t){if(t.hasAttribute("multiple")&&o)return[].slice.call(t.files).map(function(t){return t.name}).join(", ");if(-1===t.value.indexOf("fakepath"))return t.value;var e=t.value.split("\\");return e[e.length-1]};function i(){var o=this.parentNode.querySelector(t.CUSTOMFILELABEL);if(o){var i=e(o),A=r(this);A.length?i.innerHTML=A:n(this)}}function A(){for(var e=[].slice.call(this.querySelectorAll(t.INPUT)).filter(function(t){return!!t.bsCustomFileInput}),o=0,r=e.length;o<r;o++)n(e[o])}var a="bsCustomFileInput",c="reset",l="change";return{init:function(e,n){void 0===e&&(e=t.CUSTOMFILE),void 0===n&&(n=t.FORM);for(var o,r,s,u=[].slice.call(document.querySelectorAll(e)),f=[].slice.call(document.querySelectorAll(n)),d=0,h=u.length;d<h;d++){var p=u[d];Object.defineProperty(p,a,{value:{defaultText:(o=p,r=void 0,void 0,r="",s=o.parentNode.querySelector(t.CUSTOMFILELABEL),s&&(r=s.innerHTML),r)},writable:!0}),p.addEventListener(l,i)}for(var y=0,m=f.length;y<m;y++)f[y].addEventListener(c,A),Object.defineProperty(f[y],a,{value:!0,writable:!0})},destroy:function(){for(var e=[].slice.call(document.querySelectorAll(t.FORM)).filter(function(t){return!!t.bsCustomFileInput}),o=[].slice.call(document.querySelectorAll(t.INPUT)).filter(function(t){return!!t.bsCustomFileInput}),r=0,s=o.length;r<s;r++){var u=o[r];n(u),u[a]=void 0,u.removeEventListener(l,i)}for(var f=0,d=e.length;f<d;f++)e[f].removeEventListener(c,A),e[f][a]=void 0}}});
2017-12-31 04:41:36 +01:00
/*!
* JavaScript for Bootstrap's docs (https://getbootstrap.com/)
2019-01-08 18:49:55 +01:00
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under the Creative Commons Attribution 3.0 Unported License.
* For details, see https://creativecommons.org/licenses/by/3.0/.
2015-08-13 05:14:14 +02:00
*/
2019-04-18 13:47:52 +02:00
(function(){"use strict";function t(t){return[].slice.call(t)}t(document.querySelectorAll(".tooltip-demo")).forEach(function(t){new bootstrap.Tooltip(t,{selector:'[data-toggle="tooltip"]'})});t(document.querySelectorAll('[data-toggle="popover"]')).forEach(function(t){new bootstrap.Popover(t)});t(document.querySelectorAll(".toast")).forEach(function(t){var e=new bootstrap.Toast(t,{autohide:false});e.show()});t(document.querySelectorAll(".tooltip-test")).forEach(function(t){new bootstrap.Tooltip(t)});t(document.querySelectorAll(".popover-test")).forEach(function(t){new bootstrap.Popover(t)});t(document.querySelectorAll('.bd-example-indeterminate [type="checkbox"]')).forEach(function(t){t.indeterminate=true});t(document.querySelectorAll('.bd-content [href="#"]')).forEach(function(t){t.addEventListener("click",function(t){t.preventDefault()})});var e=document.getElementById("exampleModal");if(e){e.addEventListener("show.bs.modal",function(t){var n=t.relatedTarget;var o=n.getAttribute("data-whatever");var r=e.querySelector(".modal-title");var i=e.querySelector(".modal-body input");r.innerHTML="New message to "+o;i.value=o})}t(document.querySelectorAll(".bd-toggle-animated-progress > .progress-bar-striped")).forEach(function(t){t.addEventListener("click",function(){if(t.classList.contains("progress-bar-animated")){t.classList.remove("progress-bar-animated")}else{t.classList.add("progress-bar-animated")}})});var n='<div class="bd-clipboard"><button type="button" class="btn-clipboard" title="Copy to clipboard">Copy</button></div>';t(document.querySelectorAll("figure.highlight, div.highlight")).forEach(function(t){t.insertAdjacentHTML("beforebegin",n)});t(document.querySelectorAll(".btn-clipboard")).forEach(function(t){var e=new bootstrap.Tooltip(t);t.addEventListener("mouseleave",function(){e.hide()})});var o=new ClipboardJS(".btn-clipboard",{target:function(t){return t.parentNode.nextElementSibling}});o.on("success",function(t){var e=bootstrap.Tooltip._getInstance(t.trigger);t.trigger.setAttribute("title","Copied!");e._fixTitle();e.show();t.trigger.setAttribute("title","Copy to clipboard");e._fixTitle();t.clearSelection()});o.on("error",function(t){var e=/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl-";var n="Press "+e+"C to copy";var o=bootstrap.Tooltip._getInstance(t.trigger);t.trigger.setAttribute("title",n);o._fixTitle();o.show();t.trigger.setAttribute("title","Copy to clipboard");o._fixTitle()});anchors.options={icon:"#"};anchors.add(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5");t(document.querySelectorAll(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5")).forEach(function(t){t.innerHTML='<span class="bd-content-title">'+t.innerHTML+"</span>"});bsCustomFileInput.init()})();(function(){"use strict";if(!window.docsearch){return}var t=document.getElementById("search-input");var e=t.getAttribute("data-docs-version");function n(){var t=window.location;var e=t.origin;if(!e){var n=t.port?":"+t.port:"";e=t.protocol+"//"+t.hostname+n}return e}window.docsearch({apiKey:"5990ad008512000bba2cf951ccf0332f",indexName:"bootstrap",inputSelector:"#search-input",algoliaOptions:{facetFilters:["version:"+e]},transformData:function(t){return t.map(function(t){var e=n();var o="https://getbootstrap.com";t.url=e.indexOf(o)!==-1?t.url:t.url.replace(o,"");if(t.anchor==="content"){t.url=t.url.replace(/#content$/,"");t.anchor=null}return t})},debug:false})})();