芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/cansahcab.gob.mx/media/vendor/bootstrap/js/dom.min.js
const NODE_TEXT=3,SelectorEngine={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const n=[];let o=e.parentNode;for(;o&&o.nodeType===Node.ELEMENT_NODE&&3!==o.nodeType;)o.matches(t)&&n.push(o),o=o.parentNode;return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]}},MAX_UID=1e6,MILLISECONDS_MULTIPLIER=1e3,TRANSITION_END="transitionend",toType=e=>null==e?`${e}`:{}.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),getUID=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},getSelector=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t},getSelectorFromElement=e=>{const t=getSelector(e);return t&&document.querySelector(t)?t:null},getElementFromSelector=e=>{const t=getSelector(e);return t?document.querySelector(t):null},getTransitionDurationFromElement=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const o=Number.parseFloat(t),r=Number.parseFloat(n);return o||r?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0},triggerTransitionEnd=e=>{e.dispatchEvent(new Event(TRANSITION_END))},isElement=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),getElement=e=>isElement(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?SelectorEngine.findOne(e):null,typeCheckConfig=(e,t,n)=>{Object.keys(n).forEach((o=>{const r=n[o],a=t[o],l=a&&isElement(a)?"element":null==(s=a)?`${s}`:{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase();var s;if(!new RegExp(r).test(l))throw new TypeError(`${e.toUpperCase()}: Option "${o}" provided type "${l}" but expected type "${r}".`)}))},isVisible=e=>!(!isElement(e)||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility"),isDisabled=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),findShadowRoot=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?findShadowRoot(e.parentNode):null},noop=()=>{},reflow=e=>e.offsetHeight,getjQuery=()=>{const{jQuery:e}=window;return e&&!document.body.hasAttribute("data-bs-no-jquery")?e:null},DOMContentLoadedCallbacks=[],onDOMContentLoaded=e=>{"loading"===document.readyState?(DOMContentLoadedCallbacks.length||document.addEventListener("DOMContentLoaded",(()=>{DOMContentLoadedCallbacks.forEach((e=>e()))})),DOMContentLoadedCallbacks.push(e)):e()},isRTL=()=>"rtl"===document.documentElement.dir,defineJQueryPlugin=e=>{var t;t=()=>{const t=getjQuery();if(t){const n=e.NAME,o=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=o,e.jQueryInterface)}},"loading"===document.readyState?(DOMContentLoadedCallbacks.length||document.addEventListener("DOMContentLoaded",(()=>{DOMContentLoadedCallbacks.forEach((e=>e()))})),DOMContentLoadedCallbacks.push(t)):t()},execute=e=>{"function"==typeof e&&e()},executeAfterTransition=(e,t,n=!0)=>{if(!n)return void execute(e);const o=getTransitionDurationFromElement(t)+5;let r=!1;const a=({target:n})=>{n===t&&(r=!0,t.removeEventListener(TRANSITION_END,a),execute(e))};t.addEventListener(TRANSITION_END,a),setTimeout((()=>{r||triggerTransitionEnd(t)}),o)},getNextActiveElement=(e,t,n,o)=>{let r=e.indexOf(t);if(-1===r)return e[!n&&o?e.length-1:0];const a=e.length;return r+=n?1:-1,o&&(r=(r+a)%a),e[Math.max(0,Math.min(r,a-1))]},namespaceRegex=/[^.]*(?=\..*)\.|.*/,stripNameRegex=/\..*/,stripUidRegex=/::\d+$/,eventRegistry={};let uidEvent=1;const customEvents={mouseenter:"mouseover",mouseleave:"mouseout"},customEventsRegex=/^(mouseenter|mouseleave)/i,nativeEvents=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function getUidEvent(e,t){return t&&`${t}::${uidEvent++}`||e.uidEvent||uidEvent++}function getEvent(e){const t=getUidEvent(e);return e.uidEvent=t,eventRegistry[t]=eventRegistry[t]||{},eventRegistry[t]}function bootstrapHandler(e,t){return function n(o){return o.delegateTarget=e,n.oneOff&&EventHandler.off(e,o.type,t),t.apply(e,[o])}}function bootstrapDelegationHandler(e,t,n){return function o(r){const a=e.querySelectorAll(t);for(let{target:l}=r;l&&l!==this;l=l.parentNode)for(let s=a.length;s--;)if(a[s]===l)return r.delegateTarget=l,o.oneOff&&EventHandler.off(e,r.type,t,n),n.apply(l,[r]);return null}}function findHandler(e,t,n=null){const o=Object.keys(e);for(let r=0,a=o.length;r
function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};o?o=e(o):n=e(n)}const[a,l,s]=normalizeParams(t,n,o),i=getEvent(e),c=i[s]||(i[s]={}),u=findHandler(c,l,a?n:null);if(u)return void(u.oneOff=u.oneOff&&r);const d=getUidEvent(l,t.replace(namespaceRegex,"")),m=a?bootstrapDelegationHandler(e,n,o):bootstrapHandler(e,n);m.delegationSelector=a?n:null,m.originalHandler=l,m.oneOff=r,m.uidEvent=d,c[d]=m,e.addEventListener(s,m,a)}function removeHandler(e,t,n,o,r){const a=findHandler(t[n],o,r);a&&(e.removeEventListener(n,a,Boolean(r)),delete t[n][a.uidEvent])}function removeNamespacedHandlers(e,t,n,o){const r=t[n]||{};Object.keys(r).forEach((a=>{if(a.includes(o)){const o=r[a];removeHandler(e,t,n,o.originalHandler,o.delegationSelector)}}))}function getTypeEvent(e){return e=e.replace(stripNameRegex,""),customEvents[e]||e}const EventHandler={on(e,t,n,o){addHandler(e,t,n,o,!1)},one(e,t,n,o){addHandler(e,t,n,o,!0)},off(e,t,n,o){if("string"!=typeof t||!e)return;const[r,a,l]=normalizeParams(t,n,o),s=l!==t,i=getEvent(e),c=t.startsWith(".");if(void 0!==a){if(!i||!i[l])return;return void removeHandler(e,i,l,a,r?n:null)}c&&Object.keys(i).forEach((n=>{removeNamespacedHandlers(e,i,n,t.slice(1))}));const u=i[l]||{};Object.keys(u).forEach((n=>{const o=n.replace(stripUidRegex,"");if(!s||t.includes(o)){const t=u[n];removeHandler(e,i,l,t.originalHandler,t.delegationSelector)}}))},trigger(e,t,n){if("string"!=typeof t||!e)return null;const o=getjQuery(),r=getTypeEvent(t),a=t!==r,l=nativeEvents.has(r);let s,i=!0,c=!0,u=!1,d=null;return a&&o&&(s=o.Event(t,n),o(e).trigger(s),i=!s.isPropagationStopped(),c=!s.isImmediatePropagationStopped(),u=s.isDefaultPrevented()),l?(d=document.createEvent("HTMLEvents"),d.initEvent(r,i,!0)):d=new CustomEvent(t,{bubbles:i,cancelable:!0}),void 0!==n&&Object.keys(n).forEach((e=>{Object.defineProperty(d,e,{get:()=>n[e]})})),u&&d.preventDefault(),c&&e.dispatchEvent(d),d.defaultPrevented&&void 0!==s&&s.preventDefault(),d}},elementMap=new Map;var Data={set(e,t,n){elementMap.has(e)||elementMap.set(e,new Map);const o=elementMap.get(e);o.has(t)||0===o.size?o.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(o.keys())[0]}.`)},get:(e,t)=>elementMap.has(e)&&elementMap.get(e).get(t)||null,remove(e,t){if(!elementMap.has(e))return;const n=elementMap.get(e);n.delete(t),0===n.size&&elementMap.delete(e)}};const VERSION="5.0.2";class BaseComponent{constructor(e){(e=getElement(e))&&(this._element=e,Data.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Data.remove(this._element,this.constructor.DATA_KEY),EventHandler.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((e=>{this[e]=null}))}_queueCallback(e,t,n=!0){executeAfterTransition(e,t,n)}static getInstance(e){return Data.get(e,this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.0.2"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}function normalizeData(e){return"true"===e||"false"!==e&&(e===Number(e).toString()?Number(e):""===e||"null"===e?null:e)}function normalizeDataKey(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const Manipulator={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${normalizeDataKey(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${normalizeDataKey(t)}`)},getDataAttributes(e){if(!e)return{};const t={};return Object.keys(e.dataset).filter((e=>e.startsWith("bs"))).forEach((n=>{let o=n.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1,o.length),t[o]=normalizeData(e.dataset[n])})),t},getDataAttribute:(e,t)=>normalizeData(e.getAttribute(`data-bs-${normalizeDataKey(t)}`)),offset(e){const t=e.getBoundingClientRect();return{top:t.top+document.body.scrollTop,left:t.left+document.body.scrollLeft}},position:e=>({top:e.offsetTop,left:e.offsetLeft})};export{BaseComponent as B,Data as D,EventHandler as E,Manipulator as M,SelectorEngine as S,typeCheckConfig as a,getNextActiveElement as b,isRTL as c,defineJQueryPlugin as d,getSelectorFromElement as e,getElement as f,getElementFromSelector as g,isDisabled as h,isVisible as i,isElement as j,execute as k,executeAfterTransition as l,findShadowRoot as m,noop as n,getUID as o,reflow as r,triggerTransitionEnd as t};