PageSourceSearch

https://omnitools.app/assets/index-Bg9GtIFE.js

js omnitools.app collected 2026-09-29 14:10:44 UTC 2,699 bytes, 5 lines download raw bytes

1import{a as d,r as m,j as n,B as g}from"./index-ns1xYkE3.js";import{T}from"./ToolContent-CAEuGU2l.js";import{T as j}from"./ToolTextInput-DfyWQL6-.js";import{T as R}from"./ToolTextResult-Cvq523nC.js";import{T as C}from"./TextFieldWithDesc-C7cjd3t6.js";import{S as h}from"./SimpleRadio-Dyvpxspz.js";import{C as b}from"./CheckboxWithDesc-BcbjlaHI.js";import"./TextField-C2-ggeEL.js";import"./ContentPaste-BtIU-5c9.js";import"./InputFooter-DxcfFvIG.js";import"./ResultFooter-D3pWGvfO.js";import"./index-D0txp6_X.js";import"./Radio-CIZCmvIw.js";import"./SwitchBase-D71fLuiH.js";import"./FormControlLabel-Dq83jjDQ.js";import"./Checkbox-DFMyd1TK.js";function u(r,t,l){const e=r.split(""),o=e.length;if(o===0)return r;const i=(t%o+o)%o;return l?e.slice(-i).concat(e.slice(0,-i)).join(""):e.slice(i).concat(e.slice(0,i)).join("")}function L(r,t,l,e){const o=[];if(e){const i=r.split(`
2`);for(const p of i)o.push(u(p,t,l))}else o.push(u(r,t,l));return o.join(`
3`)}const k={step:"1",direction:"right",multiLine:!0},w=[{title:"Rotate text to the right",description:"This example shows how to rotate text to the right by 2 positions.",sampleText:"abcdef",sampleResult:"efabcd",sampleOptions:{step:"2",direction:"right",multiLine:!1}},{title:"Rotate text to the left",description:"This example shows how to rotate text to the left by 2 positions.",sampleText:"abcdef",sampleResult:"cdefab",sampleOptions:{step:"2",direction:"left",multiLine:!1}},{title:"Rotate multi-line text",description:"This example shows how to rotate each line of a multi-line text.",sampleText:`abcdef
4ghijkl`,sampleResult:`fabcde
5lghijk`,sampleOptions:{step:"1",direction:"right",multiLine:!0}}];function J({title:r}){const{t}=d("string"),[l,e]=m.useState(""),[o,i]=m.useState(""),p=(s,a)=>
5{if(a){const c=parseInt(s.step,10)||1,x=s.direction==="right";i(L(a,c,x,s.multiLine))}},f=({values:s,updateField:a})=>[{title:t("rotate.rotationOptions"),component:n.jsxs(g,{children:[n.jsx(C,{value:s.step,onOwnChange:c=>a("step",c),description:t("rotate.stepDescription"),type:"number"}),n.jsx(h,{onClick:()=>a("direction","right"),checked:s.direction==="right",title:t("rotate.rotateRight")}),n.jsx(h,{onClick:()=>a("direction","left"),checked:s.direction==="left",title:t("rotate.rotateLeft")}),n.jsx(b,{checked:s.multiLine,onChange:c=>a("multiLine",c),title:t("rotate.processAsMultiLine")})]})}];return n.jsx(T,{title:r,inputComponent:n.jsx(j,{title:t("rotate.inputTitle"),value:l,onChange:e}),resultComponent:n.jsx(R,{title:t("rotate.resultTitle"),value:o}),initialValues:k,getGroups:f,toolInfo:{title:t("rotate.toolInfo.title"),description:t("rotate.toolInfo.description")},exampleCards:w,input:l,setInput:e,compute:p})}export{J 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.