1import{g as y}from"./lodash-pUwldgrz.js";import{O as d,Q as p,a1 as g,a4 as v}from"./vendor-DKuO0rbx.js";import{_ as C}from"./main-28h1t_1Q.js";import"./timezone-support-C-mnkNYX.js";import"./vue-tools-BAyj-N1r.js";var b=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],c=0;c<t.rangeCount;c++)r.push(t.getRangeAt(c));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||r.forEach(function(s){t.addRange(s)}),e&&e.focus()}},w=b,f={"text/plain":"Text","text/html":"Url",default:"Text"},D="Copy to clipboard: #{key}, Enter";function h(t){var e=(/mac os x/i.test(navigator.userAgent)?"â":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}function k(t,e){var r,c,s,l,n,a,i=!1;e||(e={}),r=e.debug||!1;try{s=w(),l=document.createRange(),n=document.getSelection(),a=document.createElement("span"),a.textContent=t,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(o){if(o.stopPropagation(),e.format)if(o.preventDefault(),typeof o.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var u=f[e.format]||f.default;window.clipboardData.setData(u,t)}else o.clipboardData.clearData(),o.clipboardData.setData(e.format,t);e.onCopy&&(o.preventDefault(),e.onCopy(o.clipboardData))}),document.body.appendChild(a),l.selectNodeContents(a),n.addRange(l);var m=document.execCommand("copy");if(!m)throw new Error("copy command was unsuccessful");i=!0}catch(o){r&&console.error("unable to copy using execCommand: ",o),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),i=!0}catch(u){r&&console.error("unable to copy using clipboardData: ",u),r&&console.error("falling back to prompt"),c=h("message"in e?e.message:D),window.prompt(c,t)}}finally{n&&(typeof n.removeRange=="function"?n.removeRange(l):n.removeAllRanges()),a&&document.body.removeChild(a),s()}return i}var x=k;const E=y(x),S={props:{url:{type:String,required:!0}},data(){return{copied:!1}},methods:{handleClick(t){E(this.url)&&(t.preventDefault(),this.copied=!0,setTimeout(()=>{this.copied=!1},2e3))}}},_={key:0,class:"copy-link__success"};function R(t,e,r,c,s,l){return p(),d("a",{href:"#",class:"copy-link",onClick:e[0]||(e[0]=(...n)=>l.handleClick&&l.handleClick(...n))},[g(t.$slots,"default",{},void 0,!0),s.copied?(p(),d("span",_,"Copied!")):v("",!0)])}const P=C(S,[["render",R],["__scopeId","data-v-42464147"]]);export{P as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.