PageSourceSearch

https://atproto-os.pages.dev/_nuxt/DSs-9TF_.js

js atproto-os.pages.dev collected 2026-10-03 06:32:38 UTC 4,525 bytes, 22 lines download raw bytes

1import{a3 as f,a4 as c,aa as m,g as h,v as s,x as p,Q as g,P as y,K as v,A as T,L as I,aj as k}from"./C-jFTK7P.js";import b from"./Q2YniHwC.js";import{s as x}from"./DCWkR_6g.js";import"./Be1fzYNM.js";import"./Dg8GJ9vu.js";import"./D6ccI_RY.js";var w=f`
2    .p-inputotp {
3        display: flex;
4        align-items: center;
5        gap: dt('inputotp.gap');
6    }
7
8    .p-inputotp-input {
9        text-align: center;
10        width: dt('inputotp.input.width');
11    }
12
13    .p-inputotp-input.p-inputtext-sm {
14        text-align: center;
15        width: dt('inputotp.input.sm.width');
16    }
17
18    .p-inputotp-input.p-inputtext-lg {
19        text-align: center;
20        width: dt('inputotp.input.lg.width');
21    }
22`,N={root:"p-inputotp p-component",pcInputText:"p-inputotp-input"},P=c.extend({name:"inputotp",style:w,classes:N}),D={name:"BaseInputOtp",extends:x,props:{readonly:{type:Boolean,default:!1},tabindex:{type:Number,default:null},length:{type:Number,default:4},mask:{type:Boolean,default:!1},integerOnly:{type:Boolean,default:!1}},style:P,provide:function(){return{$pcInputOtp:this,$parentInstance:this}}},B={name:"InputOtp",extends:D,inheritAttrs:!1,emits:["change","focus","blur"],data:function(){return{tokens:[]}},watch:{modelValue:{immediate:!0,handler:function(t){this.tokens=t?t.split(""):new Array(this.length)}}},methods:{getTemplateAttrs:function(t){return{value:this.tokens[t]}},getTemplateEvents:function(t){var n=this;return{input:function(r){return n.onInput(r,t)},keydown:function(r){return n.onKeyDown(r)},focus:function(r){return n.onFocus(r)},blur:function(r){return n.onBlur(r)},paste:function(r){return n.onPaste(r)}}},onInput:function(t,n){this.tokens[n]=t.target.value,this.updateModel(t),t.inputType==="deleteContentBackward"?this.moveToPrev(t):(t.inputType==="insertText"||t.inputType==="deleteContentForward"||m()&&t instanceof CustomEvent)&&this.moveToNext(t)},updateModel:function(t){var n=this.tokens.join("");this.writeValue(n,t),this.$emit("change",{originalEvent:t,value:n})},moveToPrev:function(t){var n=this.findPrevInput(t.target);n&&(n.focus(),n.select())},moveToNext:function(t){var n=this.findNextInput(t.target);n&&(n.focus(),n.select())},findNextInput:function(t){var n=t.nextElementSibling;if(n)return n.nodeName==="INPUT"?n:this.findNextInput(n)},findPrevInput:function(t){var n=t.previousElementSibling;if(n)return n.nodeName==="INPUT"?n:this.findPrevInput(n)},onFocus:function(t){t.target.select(),this.$emit("focus",t)},onBlur:function(t){this.$emit("blur",t)},onClick:function(t){setTimeout(function(){return t.target.select()},1)},onKeyDown:function(t){if(!(t.ctrlKey||t.metaKey))switch(t.code){case"ArrowLeft":this.moveToPrev(t),t.preventDefault();break;case"ArrowUp":case"ArrowDown":t.preventDefault();break;case"Backspace":t.target.value.length===0&&(this.moveToPrev(t),t.preventDefault());break;case"ArrowRight":this.moveToNext(t),t.preventDefault();break;case"Enter":case"NumpadEnter":case"Tab":break;default:(this.integerOnly&&!(t.code!=="Space"&&Number(t.key)>=0&&Number(t.key)<=9)||this.tokens.join("").length>=this.length&&t.code!=="Delete")&&t.preventDefault();break}},onPaste:function(t){var n=t.clipboardData.getData("text");if(n.length){var o=n.substring(0,this.length);(!this.integerOnly||!isNaN(o))&&(this.tokens=o.split(""),this.updateModel(t))}t.preventDefault()}},computed:{inputMode:function(){return this.integerOnly?"numeric":"text"},inputType:function(){return this.mask?"password":"text"}},components:{OtpInputText:b}};function E(e,t,n,o,r,i){var l=h("OtpInputText");return p(),s("div",k({class:e.cx("root")},e.ptmi("root")),[(p(!0),s(g,null,y(e.length,function(a){return v(e.$slots,"default",{key:a,events:i.getTemplateEvents(a-1),attrs:i.getTemplateAttrs(a-1),index:a},function(){return[T(l,{value:r.tokens[a-1],type:i.inputType,class:I(e.cx("pcInputText")),name:e.$formName,inputmode:i.inputMode,variant:e.variant,readonly:e.readonly,disabled:e.disabled,size:e.size,invalid:e.invalid,tabindex:e.tabindex,unstyled:e.unstyled,onInput:function(d){return i.onInput(d,a-1)},onFocus:t[0]||(t[0]=function(u){return i.onFocus(u)}),onBlur:t[1]||(t[1]=function(u){return i.onBlur(u)}),onPaste:t[2]||(t[2]=function(u){return i.onPaste(u)}),onKeydown:t[3]||(t[3]=function(u){return i.onKeyDown(u)}),onClick:t[4]||(t[4]=function(u){return i.onClick(u)}),pt:e.ptm("pcInputText")},null,8,["value","type","class","name","inputmode","variant","readonly","disabled","size","invali
22d","tabindex","unstyled","onInput","pt"])]})}),128))],16)}B.render=E;export{B 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.