Help me Open the Box I have an ASCII-art box and I need a program to open it.

Examples

Input:

-------
|     |
|_____|


Output:

      /
     /
    /
   /
  /
 /
/
|     |
|_____|


Specification


The first line will only consist of -, at least 3 of them
The middle rows will start with | have spaces, and end with |


All the middle rows will be the same

The last row will start with | have _ and end with a |
All rows will be the same length


Opening the box:


Each - should be replaced by a / in ascending lines and position.
JavaScript ES6, 57 bytes

s=&gt;s[r="replace"](/-+/,s=&gt;s[r](/-/g,`
$'/`))[r](/-/g,' ')


Outputs a leading newline. Works by taking the row of -s and converting them into a triangle, then replacing the -s with spaces.

Edit: Saved 5 bytes thanks to @edc65.